I found a strange issue when experimenting with dvisvgm
trying to create SVG files from DVI files.
I found that if I append a box (or a coffin) to a draw
ing created with the l3draw
package and this box (or coffin) is inside a scope, the DVI created via a run of latex
cannot be converted to an SVG via dvisvgm
. But if this box (of coffin) is not inside a scope, it works.
Consider the following MWE:
\documentclass[border=10pt]{standalone}
\usepackage{l3draw}
\begin{document}
\ExplSyntaxOn
\draw_begin:
\draw_path_circle:nn { 0cm , 0cm } { 1cm }
\draw_path_use_clear:n { stroke }
\draw_scope_begin:
\hbox_set:Nn \l_tmpa_box {foo}
\draw_box_use:N \l_tmpa_box
\draw_scope_end:
\draw_end:
\ExplSyntaxOff
\end{document}
I run latex
and then dvisvgm
and the error PostScript error: stackunderflow in restore
will occur. If I comment out the scope, the file is converted without problems and the circle and the text in the box show up in resulting SVG.
I am unsure where to locate the problem: With the l3draw
package or with dvisvgm
(or somewhere else altogether).
dvisvgm
. I triedlatex
>dvips
>ps2pdf
and everyhing is fine.dvips
and call Ghostscript on the generated PS file, you get the same error.