emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How do I make TikZ pictures (babel) that are both viewable as block results, _and_ properly exportable? (invert colours?)
@ 2020-05-25  3:10 Vladimir Nikishkin
  2020-05-25  3:22 ` Vladimir Nikishkin
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Nikishkin @ 2020-05-25  3:10 UTC (permalink / raw)
  To: emacs-orgmode

Hello, everyone

So...

I have the following block:

#+name: figure-1-2
#+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 300
#+header: :fit yes :headers '("\\usepackage{tikz}")
#+header: :buffer on
#+begin_src latex :results value graphics file :exports both :file
figure-1-2-tree.png
\usetikzlibrary{trees}
\begin{tikzpicture}[color=gray]
\node {sqrt} % root
  child { node {sqrt-iter}
                  child[sibling distance=5cm] { node{ good-enough }
                          child[sibling distance=2cm] { node { square } }
                          child[sibling distance=2cm] { node { abs } } }
                  child { node{ improve }
                          child { node { average } } } };
\end{tikzpicture}
#+end_src

Note the [color=gray] parameter to the tikzpicture environment.

I use a dark theme (arguably more merciful for the eyes when spending
a lot of time working with computers).

Therefore, when I type C-c at a picture block, I'm want to be getting
a picture that is decently viewable on a black background. But when I
am exporting the document, I expect to print it on a white piece of
paper, so I want the pictures to be viewable too.

These two requirements are contradictory to each other, so I need some
additional level of abstraction somewhere here. But where?

[color=gray] is a workaround, as it is visible on both the black
background and the white background. If I don't find anything better,
I will just either let it be, or replace it with [color=blue].

But ideally, I'd like to export black-on-white pictures to LaTeX, and
keep white-on-black when using the org document directly.

Has this been already solved by some canned recipe? I'm getting lost
in too many levels of abstraction:
GTK Theme -> Emacs Theme -> org -> TikZ -> LaTeX -> Viewer

-- 
Yours sincerely, Vladimir Nikishkin


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-25  3:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25  3:10 How do I make TikZ pictures (babel) that are both viewable as block results, _and_ properly exportable? (invert colours?) Vladimir Nikishkin
2020-05-25  3:22 ` Vladimir Nikishkin

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).