commit
1e0e098095
@ -1 +1 @@
|
||||
nodejs 12.18.4
|
||||
nodejs 14.15.3
|
||||
|
@ -64,6 +64,14 @@ describe('#convert', () => {
|
||||
|
||||
expect(result).toMatch('+');
|
||||
});
|
||||
|
||||
it('converts bar divider preserving it', () => {
|
||||
const mathml = mathmlStrings.moDividerOperator;
|
||||
|
||||
const result = MathMLToLaTeX.convert(mathml);
|
||||
|
||||
expect(result).toMatch('x=4/5');
|
||||
});
|
||||
});
|
||||
|
||||
describe('with Glyph operator', () => {
|
||||
|
@ -64,6 +64,18 @@ export const moWithSimpleOperator = `
|
||||
</root>
|
||||
`;
|
||||
|
||||
export const moDividerOperator = `
|
||||
<math>
|
||||
<mi>x</mi>
|
||||
<mo>=</mo>
|
||||
<mn>4</mn>
|
||||
<mrow>
|
||||
<mo>/</mo>
|
||||
</mrow>
|
||||
<mn>5</mn>
|
||||
</math>
|
||||
`;
|
||||
|
||||
export const moWithGlyphOperator = `
|
||||
<root>
|
||||
<math>
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { MathMLToLaTeX } from './main';
|
||||
|
||||
export default MathMLToLaTeX;
|
||||
|
||||
module.exports = MathMLToLaTeX;
|
||||
|
@ -76,7 +76,7 @@ export const allMathOperatorsByChar: Record<string, string> = {
|
||||
'∡': '\\measuredangle',
|
||||
'∠': '\\angle',
|
||||
'÷': '\\div',
|
||||
'/': '//',
|
||||
'/': '/',
|
||||
'∖': '\\backslash',
|
||||
'\\': '\\backslash',
|
||||
'%': '\\%',
|
||||
|
@ -74,7 +74,7 @@ export const allMathOperatorsByGlyph: Record<string, string> = {
|
||||
'∡': '\\measuredangle',
|
||||
'∠': '\\angle',
|
||||
'÷': '\\div',
|
||||
'/': '//',
|
||||
'/': '/',
|
||||
'∖': '\\backslash',
|
||||
'\\': '\\backslash',
|
||||
'%': '\\%',
|
||||
|
Loading…
Reference in New Issue
Block a user