mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-12 06:28:40 +00:00
Make supsubs work correctly with character boxes
Summary: In rule 18a. of the TeX book, it says we're supposed to set `u` and `v` to 0 if the nucleus is a character box. Character boxes are loosely defined, but through experimentation they are anything that contains a single character, including ordgroups with a single element in them. This change makes KaTeX follow this rule, and fixes T2404. Test Plan: - Make sure the new huxley screenshot looks good - Make sure none of the huxley tests have changed Reviewers: alpert Reviewed By: alpert Maniphest Tasks: T2404 Differential Revision: http://phabricator.khanacademy.org/D8275
This commit is contained in:
@@ -42,3 +42,6 @@ url=http://localhost:7936/test/huxley/test.html?m=\KaTeX
|
||||
|
||||
[RlapBug]
|
||||
url=http://localhost:7936/test/huxley/test.html?m=\frac{\rlap{x}}{2}
|
||||
|
||||
[SupSubCharacterBox]
|
||||
url=http://localhost:7936/test/huxley/test.html?m=a_2f_2{f}_2{aa}_2{af}_2
|
||||
|
1
test/huxley/SupSubCharacterBox.huxley/record.json
Normal file
1
test/huxley/SupSubCharacterBox.huxley/record.json
Normal file
@@ -0,0 +1 @@
|
||||
{"py/object": "huxley.run.Test", "screen_size": {"py/tuple": [1024, 768]}, "steps": [{"py/object": "huxley.steps.ScreenshotTestStep", "index": 0, "offset_time": 0}]}
|
BIN
test/huxley/SupSubCharacterBox.huxley/screenshot0.png
Normal file
BIN
test/huxley/SupSubCharacterBox.huxley/screenshot0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.5 KiB |
Reference in New Issue
Block a user