fix: a bracket typed without \left keeps its glyph height
The MathML operator dictionary makes ( [ { | stretchy, so a plain bracket grew
to the tallest thing in its row — next to a sum with a fraction, C(b) came out
in full row height. Only a fence node emits stretchy brackets now.
This commit is contained in:
1 parent
855cc24371
commit
d8be23cf68
10 files changed
+7
-1
No files matched your search
@@ -54,6 +54,8 @@ describe('MathML', () => {
|
||||
expect(astToMathml(parseLatex('\\int_{0}^{1} x'))).toContain('<msubsup>');
|
||||
// Brackets must be stretchy or they stay glyph-height next to a fraction.
|
||||
expect(astToMathml(parseLatex('\\left(x\\right)'))).toContain('<mo stretchy="true">(</mo>');
|
||||
// A plain bracket must not: the dictionary would stretch it to the row's tallest.
|
||||
expect(astToMathml(parseLatex('C(b) = \\frac{1}{2}'))).toContain('<mo stretchy="false">(</mo>');
|
||||
});
|
||||
|
||||
it('round-trips through the document element', () => {
|
||||
|
||||
Reference in new issue
Block a user