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

add viewBox in xy, with baseline adjustment #2534

Merged
merged 4 commits into from
Mar 27, 2025
Merged

Conversation

brucemiller
Copy link
Owner

This PR adds viewbox to XY's svg along with baseline adjustment (via vertical-align). It also wraps the svg in an inline-block so that the baseline works even when within mtext (even in Firefox). We also add a couple of interesting test cases to the xy tests.

This is an alternative to #2397 and steals most of the code, but deals with the baseline adjustment differently. Thanks @xworld21 for excellent debugging and useful testcase!!!

Closes #2397
Fixes #2376

@brucemiller brucemiller requested a review from dginev March 20, 2025 22:02
@@ -191,7 +191,7 @@ a.ltx_LaTeXML_logo { text-decoration: none; }

.ltx_tabular .ltx_tabular { width:100%; }
.ltx_inline-block,
.ltx_inline-logical-block { display:inline-block; }
.ltx_inline-logical-block { display:inline-block; text-indent:0px; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I have seen text-indent getting inherited and cause issues! This will have some side effects, but all good I hope. It's just a bit weird to see it in a xypic PR.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, but not as weird as the effect it caused on a test case! :>

@brucemiller brucemiller merged commit b48d497 into master Mar 27, 2025
26 checks passed
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.

add viewBox to inline SVGs
3 participants