* babel noob question: how to have babel create png using tikz?
@ 2018-10-14 12:00 Julius Dittmar
0 siblings, 0 replies; only message in thread
From: Julius Dittmar @ 2018-10-14 12:00 UTC (permalink / raw)
To: emacs-orgmode list
Hi folks,
somehow I do not manage to get babel to create a png image using tikz
package. It does create an image, but that image looks exactly as if the
tikz package were not loaded during the generating latex run and all of
latex's error messages were ignored.
Here's what I do:
- emacs -q mini.org
(that's GNU Emacs 26.1, Org mode version 9.1.9, same result with
current master, mini.org see below)
- Go to first source block, C-c C-c.
- Go to second source block, C-c C-c.
- Have a look at the generated test.png
It displays the text "[red!50!black] (a) {A}; (b) [right of=a] {B};
[->] (a) -- (b);"
Where's my mistake?
Thanks in advance,
Julius Dittmar
mini.org:
----------------------------
#+begin_src elisp :exports none :eval never-export
(org-babel-do-load-languages 'org-babel-load-languages '((latex . t)))
#+end_src
#+header: :file test.png :fit yes
#+header: :results (if (and (boundp 'backend) (eq backend 'latex))
"latex" "file")
#+begin_src latex :exports results :file test.png :headers
'("\\usepackage{tikz}")
\begin{tikzpicture}
\node[red!50!black] (a) {A};
\node (b) [right of=a] {B};
\draw[->] (a) -- (b);
\end{tikzpicture}
#+end_src
--------------------------------------
PS: except for omitting the ImageMagic call I took this example from
https://org-babel.readthedocs.io/en/latest/eval/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-10-14 12:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-14 12:00 babel noob question: how to have babel create png using tikz? Julius Dittmar
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).