mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 11:18:39 +00:00
Fix spacing between groups to match TeX spacing (#567)
* Internal: Pass full `options` objects to makeSpan/makeSymbol. Not just the current color. This will facilitate applying options to built nodes in a standardized way, rather than changing all callsites. * Add style switching test: text and scriptstyle in the same group. * Apply style-specific spacing using different CSS coding. Specifically, infer style from a class on the *current* element, rather than the parent element. Use "mtight" class to denote elements with tight spacing (scriptstyle or scriptscriptstyle). Apply that class automatically based on options. * Fix #533, #534, #541. - #534: Implement getTypeOfGroup for font groups. - #533, #541: Improve the ways spaces are applied to lists. Since CSS adjacency implements mathematical spacing, it's incorrect to introduce "convenience spans" for spaces and display changes into the generated HTML -- those spans break adjacency. Apply display changes directly, and shift space spans into adjacent atoms. Requires updates to two screenshotter tests, LimitControls and SupSubLeftAlignReset. The new results for these tests are closer to TeX output than the old results. Also requires updates to Jasmine tests, since those assumed output structures that have changed. * Fix #136: Size commands generate fragments, not spans. This is so the size commands don't hide the types of their enclosed atoms. Addresses #136. This slightly changes the vertical position of the Sizing test. Not sure the vertical position matters, so change the test.
This commit is contained in:
committed by
Kevin Barabash
parent
be96695586
commit
9d3cdf694c
BIN
test/screenshotter/images/BoldSpacing-firefox.png
Normal file
BIN
test/screenshotter/images/BoldSpacing-firefox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
Reference in New Issue
Block a user