Hi Org Mode!

I'm trying to understand the logic behind ob-latex, because the last of the
examples provided in
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html
doesn't work on my machine.

As far as I understand org-babel-execute:latex function, central for
this to work, during html export supposed to think that :file attribute
is actually tree.svg, so it goes to (string= "svg" extension) condition,
where the following .tex file is created
\documentclass[preview]{standalone}
\def\pgfsysdriver{pgfsys-tex4ht.def}
\usepackage{tikz}\begin{document}\usetikzlibrary{trees}
\begin{tikzpicture}
  \node [circle, draw, fill=red!20] at (0,0) {1}
  child { node [circle, draw, fill=blue!30] {2}
    child { node [circle, draw, fill=green!30] {3} }
    child { node [circle, draw, fill=yellow!30] {4} }};
\end{tikzpicture}\end{document}

which doesn't compile with pdflatex because of
\def\pgfsysdriver{pgfsys-tex4ht.def} declaration, which is designed to
work specifically with htlatex.

Okay then, we have a condition with htlatex processing, I mean
(and (string= "html" extension)
               (executable-find org-babel-latex-htlatex))
and we can actually make the strange move and rename :file to tree.html,
but after that it will inevitably face
(error "SVG file produced but HTML file requested")
in the code.

I've tested all the statements above with edebug-defun and I'm starting
to wonder what is the way this thing is supposed to work:)

-- 
Best wishes,
Yaroslav Drachov

Attachment: signature.asc
Description: PGP signature

Reply via email to