yes 99 -> yes 99 -> yes 99 ->

How to convert numbers or characters to MathML format?

110 Views Asked by At

Sample examples,

yes -> <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>y</mi><mi>e</mi><mi>s</mi></math>
99  -> <math xmlns="http://www.w3.org/1998/Math/MathML"><mn>99</mn></math>

For those given inputs, I would like to get the corresponding mathml expressions. I'm doing this because mathtype.setMathML(99) won't work, it should be mathtype.setMathML(<math xmlns="http://www.w3.org/1998/Math/MathML"><mn>99</mn></math>) I'm using mathtype_web.

1

There are 1 best solutions below

0
Henok Tesfaye On BEST ANSWER

<mtext> comes into the rescue. we can use it to render either numbers or characters.

mathtype.setMathML(<math xmlns="http://www.w3.org/1998/Math/MathML"><mtext>{NUMBER or CHARACTERS}</mtext></math>)