Closed tapyu closed 1 week ago
The difference in the SVG/PDF output should be opened as a Typst bug, CeTZ has no control over this.
The show
: set
rule triggers on content in a canvas because it wraps everything drawn into a box
and we wrap content in a block in order to add padding to the content.
There is a mismatch in SVG and PDF outputs:
Although the
show
:set
rule is being applied in the SVG output, the spacing in not being handled correctly.Moreover, by changing
by
We obtain
If I didn't missunderstand it, the problem is twofold:
align
shouldn't trigger the#show box: set block
rule. In fact, outside CeTZ, it doesn't happenshow
:set
rule is being applied, making it trigger and set the spacing wrongly, which leads to a divergence in the PDF and SVG output.Maybe this can explain the offset observed in #621