Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure that \kern inside an SVG only affects the following content #2502

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xworld21
Copy link
Contributor

When \kern happens inside an SVG group, the current code shifts the entire group, which goes wrong as soon as \kern appears after the content (hence HACK HACK HACK in the comments, I guess). I changed it so that it creates an extra <svg:g> around the previous content and translates it the opposite way before applying the new transform.

In practice, this fixes the horizontal alignment of arrow labels in xymatrix, because they use \kern before and after the label: we go from
image
to
image

Vertical alignment is obviously off; it becomes pretty good with #2488, but still visibly wrong due to unrelated depth shenanigans.

@dginev dginev requested a review from brucemiller January 26, 2025 20:13
@dginev
Copy link
Collaborator

dginev commented Feb 2, 2025

Workflow question: Do you have a branch with all/most of your tikz-related PRs merged? I am curious to test them in tandem. Such a branch will inevitably be a diverged one from master (as we'd like to reintegrate PR-by-PR), but could make other upgrades easier to test while the process of merging converges...

@xworld21
Copy link
Contributor Author

xworld21 commented Feb 2, 2025

Do you have a branch with all/most of your tikz-related PRs merged?

No, they are essentially orthogonal to each other, but I might as well make one for testing purposes. Even if the merged branch diverges from the smaller PRs, it should still be a close approximation. I just need a moment to rebase...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants