brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
961 stars 101 forks source link

respect PGF/TikZ bounding boxes #2401

Open xworld21 opened 3 months ago

xworld21 commented 3 months ago

Allow PGF and TikZ to set \pgf@relevantforpicturesizefalse, which is how pictures can override their own bounding box (see 'use as bounding box').

Fixes #2399. As usual: does it break something else?

The undesirable side effect is that figures that purposefully draw outside of the bounding box will overflow into the surrounding text. That might have been the original motivation for locking \ifpgf@relevantforpicturesize to true.

dginev commented 3 months ago

As usual: does it break something else?

I carried over some tikz tests that Bruce had prepared some time back, which you can use to double-check for any obvious regressions. They were added in #2314 and have a separate make target, via:

CI=true make extratest

They won't run in CI by default either, since they take a long while to complete...

xworld21 commented 3 months ago

I carried over some tikz tests that Bruce had prepared some time back, which you can use to double-check for any obvious regressions.

I only see a difference in Silviu's test 16: the square close to the no smoking sign used to have empty space to the left, now it doesn't. The no smoking sign is still in the wrong place

I also get slightly different numbers, but that's independent of this PR – possibly slight differences in TeX Live (I run 2023 final). I also don't get the <pagination role="newpage"/> element, but that's likely caused by a different change altogether.