LaTeXML
LaTeXML copied to clipboard
image size mismatch with --mathsvg
trafficstars
Very related with #1841: dvisvgm and latexml guess different bounding boxes for mathimages.
\documentclass{amsart}
\begin{document}
Horizontal spacing: see space between $\{x : x\text{ is an even integer}\}$ and the following text.
\end{document}
produces

Here the <img> tag has a @width attribute which is wider than the actual image obtained from dvisvgm. As soon as you delete @width, the spacing looks ok.
My suggestion would be to use, or emulate (not easy!), the preview package, and run dvisvgm with the option --bbox=preview.