emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Vladimir Nikishkin <lockywolf@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: How do I make TikZ pictures (babel) that are both viewable as block results, _and_ properly exportable? (invert colours?)
Date: Mon, 25 May 2020 11:10:47 +0800	[thread overview]
Message-ID: <CA+A2iZbatDwX78Lab4-7TY4Zrs_ed04gxaZ-zOrzLMHy7CVmkg@mail.gmail.com> (raw)

Hello, everyone


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
\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 } } } };

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

             reply	other threads:[~2020-05-25  3:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25  3:10 Vladimir Nikishkin [this message]
2020-05-25  3:22 ` Vladimir Nikishkin

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:

  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=CA+A2iZbatDwX78Lab4-7TY4Zrs_ed04gxaZ-zOrzLMHy7CVmkg@mail.gmail.com \
    --to=lockywolf@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: How do I make TikZ pictures (babel) that are both viewable as block results, _and_ properly exportable? (invert colours?)' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


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