I tried to compute a bounding box in LaTeX and pass the value on to dvisvgm via DVI specials. The resulting code (which I copy-and-pasted together from all over the internet) looked as follows:
\newlength{\mywidth}
\newlength{\myheight}
% ...
\special{dvisvgm:bbox a 0 0 \the\mywidth \the\myheight}
This resulted (predictably after the fact) in the following output in the DVI file:
dvisvgm:bbox a 0 0 147.00748pt26.3999pt
After considerable amounts of googling I came up with the following workaround:
\newtoks\spacetoken
\spacetoken={ }
\special{dvisvgm:bbox a 0 0 \the\mywidth\the\spacetoken\the\myheight}
However, that just looks horridly wrong to my eyes. Hence, my questions:
- How does
\specialwork? - Is there any better way to do this?