From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julius Dittmar Subject: babel noob question: how to have babel create png using tikz? Date: Sun, 14 Oct 2018 14:00:44 +0200 Message-ID: <2deefde9-7906-1f1c-2228-539cfe5e3df0@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBf4o-0005sO-LT for emacs-orgmode@gnu.org; Sun, 14 Oct 2018 08:00:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBf4k-0008BV-K4 for emacs-orgmode@gnu.org; Sun, 14 Oct 2018 08:00:54 -0400 Received: from mout.gmx.net ([212.227.17.21]:58055) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBf4k-00088v-Ao for emacs-orgmode@gnu.org; Sun, 14 Oct 2018 08:00:50 -0400 Received: from [192.168.175.209] ([87.139.53.30]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LvhC4-1fbXU11zrw-017RBo for ; Sun, 14 Oct 2018 14:00:45 +0200 Received: from [192.168.175.209] ([87.139.53.30]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LvhC4-1fbXU11zrw-017RBo for ; Sun, 14 Oct 2018 14:00:45 +0200 Content-Language: de-DE List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" 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/