test: add mmultiscripts preset only case

This commit is contained in:
Alexandre Nunes 2020-09-20 16:37:42 -03:00
parent 9fe8c5c677
commit 872a8c1db1
2 changed files with 20 additions and 0 deletions

@ -935,5 +935,15 @@ describe('#convert', () => {
expect(result).toBe('\\_{b}^{}X_{}^{c}');
});
});
describe('with preset only', () => {
it('add prescript and ignore subsup', () => {
const mathml = mathmlStrings.mmultiscriptPresetOnly;
const result = MathMLToLaTeX.convert(mathml);
expect(result).toBe('\\_{b}^{}X');
});
});
});
});

@ -1542,3 +1542,13 @@ export const mmultiscriptPresetWithNone = `<math xmlns="http://www.w3.org/1998/M
</mmultiscripts>
</math>`;
export const mmultiscriptPresetOnly = `<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mmultiscripts>
<mi>X</mi> <!-- base expression -->
<mprescripts />
<mi>b</mi> <!-- presubscript -->
<none /> <!-- presuperscript -->
</mmultiscripts>
</math>`;