# Svg definitions not included in each page when exporting multipage #110

Closed
opened this issue Jul 6, 2019 · 5 comments

### hchauvet commented Jul 6, 2019

 Hi, When I tried to output multiple pages from a dvi as one svg per page, dvisvgm does not always includes the definition of used parts in the svg ("xlink:href" point to a missing id in the file) when I force font to be written as path using the --no-fonts option. The missing svg element is written in an other file (for an other page of the dvi) where it is also used. I use a .tex file which looks like that: \documentclass[crop=true, multi=varwidth]{standalone} \begin{document} \begin{varwidth}{500pt} $\bullet$ the first page stuff \end{varwidth} \newpage \begin{varwidth}{50pt} $\bullet$ the second page stuff \end{varwidth} [...] \end{document} And convert the dvi using dvisvgm -n -p1- my_dvifile.dvi  I have tried with v2.5 (which comes with debian 10) and the last version v2.7.2 of dvisvgm, and the results are the same. Is there a way to force all definitions to be written at the beginning of each svg ? So that when exporting only a given page of the document all the svg definitions that is used in this page are written inside the . For the moment I extract each page of the dvi using dviselect command and each dvi is then correctly rendered as svg but this adds a lots of files and largely slow down the conversion from latex to svg.
Owner

### mgieseki commented Jul 6, 2019 • edited

 That sounds strange. Actually, dvisvgm is supposed to add all referenced glyphs to the corresponding SVG files. And it indeed does it for all the files I tested so far. So unfortunately, I can't reproduce your issue at the moment. Both SVG files created from your example contain all referenced paths. Do you get any warning messages when running dvisvgm?

Author

### hchauvet commented Jul 6, 2019 • edited

 It does not bug for each multi page file, only some documents produce that. I add one file (it's .tex but I change the extension for the upload to github) where for the page 2 their is a missing definition to a green bullet on my computer. test_tex_dvisvgm_bug.txt I didn't get any warning from dvisvgm.
Owner

### mgieseki commented Jul 6, 2019

 Thanks for providing the additional file. I was able to reproduce the issue and found the cause. I'll fix it with the next release.

Author

### hchauvet commented Jul 7, 2019 • edited

 Thanks for your quick reply and for the bug fix. Dvisvgm is really a usefull tools !
Owner

### mgieseki commented Jul 7, 2019

 Thanks, I'm glad you like dvisvgm. Let me know if you find any further issues.
referenced this issue Jul 8, 2019