1

I'm generating .svg files with mahe4ht and dvisvgm. The .svg is generated but contains text at the beginning regarding the use of option -dNEWPDF:

The old, written in PostScript, PDF interpreter has been removed entirely.
You should cease using -dNEWDPF as it has no effect n
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 3.0.3 --> ...

If I remove the text till <?xml... the graphic is shown properly in the browser.

Question: How do I get rid of the text during processing of the files?

I use MacTeX 2023 (TeX Live 2023) on MacOS Monterey with recent updates. Maybe editing some scripts is necessary but I don't know which one(s).

1
  • The GS option -dNEWPDF was only removed after the release of dvisvgm 3.0.3. As this version still uses the option, the current versions of Ghostscript print an error message -- unfortunately to stdout which therefore might end up in the SVG file depending on the usage of dvisvgm. As of version 3.1.1, dvisvgm omits -dNEWPDF for GS versions >= 10.0.2.
    – Martin
    Commented Jan 24 at 21:37

2 Answers 2

1

I know about this issue and fixed that in TeX4ht sources in December. The update is included in TeX Live, so I would expect that it is MacTeX too, but maybe it takes more time in this distro.

Anyway, the dvisvgm_hashes doesn't suffer from this issue. Moreover, it significantly speeds up the compilation, so if you have a lot of SVG files, the compilation will be much faster. Try this command:

$ make4ht -f html5+dvisvgm_hashes filename.tex
0

Thank you Martin and Michal, I updated my TeX Live using the TeX Live Utility and that fixed this issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .