I am trying to compile some minimal test.tex
using htlatex test.tex "xhtml,svg"
, but the SVG generated from tikz pictures does not seem to work.
\documentclass[11pt]{article}
\usepackage{tikz}
\title{Testing}
\begin{document}
\maketitle
Inline equation \(X_1 + X_2 = Y\), equation
\[\int^{X \in \mathbf{C}} \mathbf{C}(X,X).
\]
Tikz picture.
\begin{tikzpicture}
\draw [blue,fill] (0,0) rectangle (3,3);
\draw [red,fill] (0,0) rectangle (3,2);
\end{tikzpicture}
\end{document}
The svg file for the tikz picture seems to be generated in a different way from the other SVGs (it has a different name scheme from the others, for instance), and it does not display due to the following error.
XML Parsing Error: mismatched tag. Expected: </g>.
Location: file:///home/mario/testing-htlatex/test-1.svg
Line Number 5, Column 3:
</p><g stroke="#000" fill="#000">
Indeed, removing that conflicting <p>
makes the SVG display again. Is this a bug or am I missing something? Did I do something wrong that added that <p>
to the tikz picture? Why is the tikz picture generated differently?
What puzzles me the most is that, if I decide to try without svg, using just htlatex test.tex
, then a correct SVG for the tikz picture gets generated (!).
\[...\]
. Was this intended behaviour?