plurimath / mathml2asciimath

Convert MathML to AsciiMath
https://www.metanorma.com
BSD 2-Clause "Simplified" License
4 stars 0 forks source link

MathML conversions often lead to extra whitespaces inside AsciiMath output #15

Closed ronaldtse closed 4 years ago

ronaldtse commented 4 years ago

e.g.

    . for stem:[n] quantities stem:[x_1 ,   x_2 ,     ...       x_n], by the quotient of the sum of the quantities by stem:[n]:

It should be easy to strip double whitespaces.

ronaldtse commented 4 years ago

MathML:

<math> <semantics> <mrow> <msub> <mi>x</mi> <mn>1</mn> </msub> <mo>,</mo><mtext> </mtext><msub> <mi>x</mi> <mn>2</mn> </msub> <mo>,</mo><mtext> </mtext><mtext> </mtext><mo>…</mo><mtext> </mtext><mtext> </mtext><mtext> </mtext><msub> <mi>x</mi> <mi>n</mi> </msub> </mrow> <annotation encoding='MathType-MTEF'>MathType@MTEF@5@5@+= feaagKart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbbjxAHX garuavP1wzZbItLDhis9wBH5garmWu51MyVXgarqqtubsr4rNCHbGe aGqipG0dh9qqWrVepG0dbbL8F4rqqrVepeea0xe9LqFf0xc9q8qqaq Fn0lXdHiVcFbIOFHK8Feea0dXdar=Jb9hs0dXdHuk9fr=xfr=xfrpe WZqaaeGaciWaamGadaGadeaabaGaaqaaaOqaaiaadIhadaWgaaWcba GaaGymaaqabaGccaGGSaGaaGjbVlaadIhadaWgaaWcbaGaaGOmaaqa baGccaGGSaGaaGjbVlaaykW7cqWIMaYscaaMc8UaaGPaVlaaysW7ca WG4bWaaSbaaSqaaiaad6gaaeqaaaaa@4713@ </annotation> </semantics> </math>
...