emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [Bug] Errors when evaluating LaTeX source block with new SVG headers


From: Tobias Getzner
Subject: [O] [Bug] Errors when evaluating LaTeX source block with new SVG headers patch
Date: Mon, 22 Sep 2014 10:05:50 +0000 (UTC)
User-agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]