Closed csevast closed 9 months ago
Sorry, I don't think this is the right forum for asking this. Maybe try stackexchange.
I was thinking that the problem is a bug of dvisvgm output driver and not a TikZ syntax problem.
I don't have anything to do with dvisvgm, I only maintain the html version of the tikz manual :)
I am sorry, I was mixed with the repositories.
Hi, I want to produce an SVG file with a node shape, e.g. rectangle. I use the following LaTeX code:
and then I use
xelatex
and thendvisvgm
to produce the SVG file:xelatex -no-pdf -interaction nonstopmode -output-directory .\ test1.tex & dvisvgm -n -o .\test1.svg test1.xdv
Unfortunately, the produced SVG file has a background object with larger width than the width of the rectangle, resulting in a TikZ picture with larger width. The width is depended on the text width, i.e., if the text is short, the resulting background object width is not longer than the rectangle width, and there is no problem. But when the text width is longer than some critical length, the tikzpicture width is not the same as the drawn object width. Also, I noticed the same problem with the height. In the following example, the problem appears on the top of the tikzpicture:
with the following command to be executed:
xelatex -no-pdf -interaction nonstopmode -output-directory .\ test3.tex & dvisvgm -n -o .\test3.svg test1.xdv
I am using: Windows 11 MiKTeX-XeTeX 4.10 (MiKTeX 23.5) dvisvgm 3.0.4 pgf 3.1.10
Thank you for your support.