From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Edgington Subject: TikZ (circuitikz) and org-preview-latex-fragment don't play nicely together Date: Tue, 10 Dec 2013 10:37:33 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqPO4-0003up-0A for emacs-orgmode@gnu.org; Tue, 10 Dec 2013 10:38:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqPO2-0001v3-R0 for emacs-orgmode@gnu.org; Tue, 10 Dec 2013 10:38:15 -0500 Received: from mail-oa0-x236.google.com ([2607:f8b0:4003:c02::236]:65388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqPO2-0001uv-Lu for emacs-orgmode@gnu.org; Tue, 10 Dec 2013 10:38:14 -0500 Received: by mail-oa0-f54.google.com with SMTP id h16so5764858oag.27 for ; Tue, 10 Dec 2013 07:38:13 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Hello everyone, Assume I have an org-mode file that contains the following: ---------------------- #+OPTIONS: tex:imagemagick #+LaTeX_HEADER: \usepackage[siunitx]{circuitikz} * Test circuit #+begin_lateX \begin{circuitikz}[scale = 1.0] \draw (0,0) node[anchor=east]{$V_{in} -$} to[short, o-] (4,0) to[V, v_=$V_{s}(t)$] (4,2) to[L, l_=$L_m$] (2,2) to[R, l_=3<\kilo\ohm>] (1,2) -- (0,2) to[short, o-] (0,2) node[anchor=east]{$V_{in} +$}; \end{circuitikz} #+end_latex -------------------- If my current emacs color-theme background is black, running org-preview-latex-fragment on the latex block results in all electrical-elements being invisible (only labels and lines are visible). The only (poor) workaround I have for this is to add the configuration option: #+LaTeX_HEADER: \tikzset{every picture/.style={color=gray}} Which means that I can barely see the picture when previewed in emacs, and that it appears in gray on the exported PDF instead of black. Is there any way that I can make it so that without a lot of "hacks" I can make the previews appear as white-on-black, and the PDFs print black on white? Would something need to change with how org-mode handles previewing to make this possible? Regards, Mark