From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Getzner Subject: [Bug] Errors when evaluating LaTeX source block with new SVG headers patch Date: Mon, 22 Sep 2014 10:05:50 +0000 (UTC) Message-ID: 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]:50599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XW0Vk-0005E2-4L for emacs-orgmode@gnu.org; Mon, 22 Sep 2014 06:06:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XW0Vc-000710-K6 for emacs-orgmode@gnu.org; Mon, 22 Sep 2014 06:06:24 -0400 Received: from plane.gmane.org ([80.91.229.3]:46767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XW0Vc-000705-Dw for emacs-orgmode@gnu.org; Mon, 22 Sep 2014 06:06:16 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XW0VS-0004Zp-Tn for emacs-orgmode@gnu.org; Mon, 22 Sep 2014 12:06:06 +0200 Received: from glenalbyn.linguistics.ruhr-uni-bochum.de ([134.147.14.84]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Sep 2014 12:06:06 +0200 Received: from tobias.getzner by glenalbyn.linguistics.ruhr-uni-bochum.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Sep 2014 12:06:06 +0200 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Evaluating LaTeX source blocks had an issue where header options would be ignored when exporting to SVG; this appears to have been addressed in 246df88. I have patched this commit into my 8.2.7c installation. While the headers now seem to work, I’ve noticed that LaTeX still doesn’t like the generated temporary files when SVG-output is selected. Below is an example which fails to work when SVG output is chosen, but which will work when PNG is used. #+HEADERS: :headers '("\\usepackage{tikz}" "\\usetikzlibrary {shapes,arrows,positioning}") #+BEGIN_src latex :file test.svg :imagemagick \begin{tikzpicture} \node {quux quux quux}; \end{tikzpicture} #+END_SRC The generated temporary LaTeX file is shown below. \documentclass[preview]{standalone} \def\pgfsysdriver{pgfsys-tex4ht.def} \usepackage[usenames]{color} \usepackage{tikz} \usepackage{color} \usepackage{listings} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{shapes,arrows,positioning} \begin{document}\begin{tikzpicture} \node {quux}; \end{tikzpicture}\end{document} By default, LaTeX will choke on this with a lot of undefined command errors. I have no clue about PGF, but I’ve noticed that if I insert «\usepackage{pgf}» before the «\def\pgfsysdriver» line, this will resolve those errors. Should this be done in ob-latex too? After these errors are resolved, though, LaTeX will still complain about an option clash for the color package. At first I thought this might be because the colors package is imported twice. But apparently PGF will also import colors, so that both the «\usepackage{pgf}» and the «\def \pgfsysdriver» had to come after «\usepackage[usenames]{color}». Best regards, T.