When I use make4ht index.tex "xhtml"
to compile the file
\documentclass{report}
\ifdefined\HCode
\def\pgfsysdriver{pgfsys-dvisvgm4ht.def}
\fi
\usepackage{tikz}
\begin{document}
\begin{figure}
\begin{center}
\begin{tikzpicture}
\draw (0,0) rectangle (3,3);
\end{tikzpicture}
\begin{tikzpicture}
\draw (0,0) rectangle (3,3);
\end{tikzpicture}
\end{center}
\caption{Test.\label{fig:test}}
\end{figure}
\end{document}
the SVG file corresponding to the second rectangle does not compile correctly, so it is not rendered. If I place the two rectangles one below the other instead of side by side (by adding a blank line between the two TikZ pictures)
\documentclass{report}
\ifdefined\HCode
\def\pgfsysdriver{pgfsys-dvisvgm4ht.def}
\fi
\usepackage{tikz}
\begin{document}
\begin{figure}
\begin{center}
\begin{tikzpicture}
\draw (0,0) rectangle (3,3);
\end{tikzpicture}
\begin{tikzpicture}
\draw (0,0) rectangle (3,3);
\end{tikzpicture}
\end{center}
\caption{Test.\label{fig:test}}
\end{figure}
\end{document}
then everything works as expected. The PDF compiles correctly using pdflatex
in either case. Is this a bug, either in tex4ht
or in the dvisvgm
driver, or am I not using it right?