Open Qrrbrbirlbel opened 1 year ago
If you look carefully at your examples you will see that only in the middle one (of each three) is a crossing found. So it's actually nothing to do with the option ignore endpoint intersections=false
except for the fact that your drawing is so small that with the default tolerance then the crossing is judged to be too close to the endpoints to be identified unless that option is set. So the real difference between your versions is whether or not there is an identified crossing.
When a crossing is identified then the relevant strands are redrawn with a clip. It is that clip that is providing the bounding box. The overlay
option is applied only to the strand and not to the clipping region (which makes sense since a crossing could well be between two strands and if only one of them has the overlay
option then what should the clipping region do?).
There's a case that could be made for the clipping region to always be considered overlay
ed, since the bounding box of the clipping region should be within the bounding box of the whole knot, but the clipping region doesn't have to be used to clip so I'd rather leave that up to the user to decide, especially as there is an easy fix: simply append overlay
to the background clip
and clip
styles in the knot
environment:
Consider the following document:
When
![grafik](https://user-images.githubusercontent.com/4043967/235302530-285b71a8-9693-4d6d-8a3b-603249788db9.png)
ignore endpoint intersections = false
, the picture gets it bounding box adjusted so that it fits a 24pt × 24pt rectangle around, I guess, the strand's path's center:When adding
![grafik](https://user-images.githubusercontent.com/4043967/235302582-b401e346-7c31-479e-936a-c0da6e4b359f.png)
overlay
to the strand, the\fbox
disappears in the other cases because the TikZ picture has no size anymore but in the problematic case the rectangle is still there: