Skip to content

KaTeX(7/n): Handle 'op-limits' KaTeX CSS #1669

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

rajveermalviya
Copy link
Member

@rajveermalviya rajveermalviya commented Jul 4, 2025

Stacked on top of #1559.

Currently a draft because there are some vertical offset differences in the tests, after f10a078 that I still need to figure out. But otherwise when seeing the content side-by-side with Web, I wasn't able to see any differences.

And inline the behaviour for `inline: false` in MathBlock widget.
This applies the correct font scaling if the KaTeX content is
inside a header.
In KaTeX HTML it is used to set the baseline of the content in a
span, so handle it separately here.
Implement handling most common types of `vlist` spans.
Negative margin spans on web render to the offset being applied
to the specific span and all the adjacent spans, so mimic the
same behaviour here.
This will be use in later commits to apply styles based on
some preconditions that depend on a class being present on
an ancestor.
…Stack`

This allows the children in the vlist to expand horizontally as wide
as their siblings. That will enable support for vlist's children to be
center aligned if they had (or inherited) a `text-align: center`.
@rajveermalviya
Copy link
Member Author

rajveermalviya commented Jul 4, 2025

The difference ends up being that Stack impl had more height, especially at the bottom, than the current Column impl:

Golden "goldens/math_block_katex_negative_margins.png": Pixel test failed, image sizes do not match.
Master Image: 59 X 43
Test Image: 59 X 41

(Column impl left, Stack right)

Screenshot 2025-07-04 at 12 02 27

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.

1 participant