emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Julius Dittmar <Julius.Dittmar@gmx.de>
To: emacs-orgmode list <emacs-orgmode@gnu.org>
Subject: babel noob question: how to have babel create png using tikz?
Date: Sun, 14 Oct 2018 14:00:44 +0200	[thread overview]
Message-ID: <2deefde9-7906-1f1c-2228-539cfe5e3df0@gmx.de> (raw)

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/

                 reply	other threads:[~2018-10-14 12:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=2deefde9-7906-1f1c-2228-539cfe5e3df0@gmx.de \
    --to=julius.dittmar@gmx.de \
    --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).