LaTeXML icon indicating copy to clipboard operation
LaTeXML copied to clipboard

image size mismatch with --mathsvg

Open xworld21 opened this issue 3 years ago • 0 comments
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 image

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.

xworld21 avatar Apr 02 '22 18:04 xworld21