emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mark Edgington <edgimar@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: TikZ (circuitikz) and org-preview-latex-fragment don't play nicely together
Date: Tue, 10 Dec 2013 10:37:33 -0500	[thread overview]
Message-ID: <CAMsBe8rCRvEadn=69Mv8etHcf1KiWGsMNf8JEMuzBX3FHNN+Kg@mail.gmail.com> (raw)

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

             reply	other threads:[~2013-12-10 15:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 15:37 Mark Edgington [this message]
2013-12-11  8:46 ` TikZ (circuitikz) and org-preview-latex-fragment don't play nicely together Eric S Fraga
2013-12-11 14:02   ` Mark Edgington
2013-12-11 15:06     ` Mark Edgington
2013-12-11 15:31       ` Nicolas Goaziou
2013-12-11 15:43         ` Mark Edgington
2013-12-11 15:55           ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMsBe8rCRvEadn=69Mv8etHcf1KiWGsMNf8JEMuzBX3FHNN+Kg@mail.gmail.com' \
    --to=edgimar@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).