I am interested to learn that is the best way to convert a formula of a text found in math class of a MathML code . This is usually the format used when publishing a formula in the web. Here is a example of the code for
(\!\(TraditionalForm\`\*
SubscriptBox[r, "\[UpTee]"] \*= \*
SubscriptBox[n, "1"] \*cos \*
SubscriptBox[\[Theta], "1"] \*
SubscriptBox[\[Minus]n, "2"] \*cos \*
SubscriptBox[\[Theta], "2"] \*
SubscriptBox[n, "1"] \*cos \*
SubscriptBox[\[Theta], "1"] \*
SubscriptBox[+n, "2"] \*cos \*
SubscriptBox[\[Theta], "2"]\))
Here is the ML code which I will like to convert.
<math class="math" xmlns="http://www.w3.org/1998/Math/MathML">
<mtext>r</mtext>
<msub>
<mi></mi>
<mn>⊥</mn>
</msub>
<mtext>=</mtext>
<mtext>n</mtext>
<msub>
<mi></mi>
<mn>1</mn>
</msub>
<mspace sp="0.25" width="2px" linebreak="nobreak" is="true" />
<mtext>cos</mtext>
<mspace sp="0.25" width="2px" linebreak="nobreak" is="true" />
<mtext>θ</mtext>
<msub>
<mi></mi>
<mn>1</mn>
</msub>
<mtext>−n</mtext>
<msub>
<mi></mi>
<mn>2</mn>
</msub>
<mspace sp="0.25" width="2px" linebreak="nobreak" is="true" />
<mtext>cos</mtext>
<mspace sp="0.25" width="2px" linebreak="nobreak" is="true" />
<mtext>θ</mtext>
<msub>
<mi></mi>
<mn>2</mn>
</msub>
<mtext>n</mtext>
<msub>
<mi></mi>
<mn>1</mn>
</msub>
<mspace sp="0.25" width="2px" linebreak="nobreak" is="true" />
<mtext>cos</mtext>
<mspace sp="0.25" width="2px" linebreak="nobreak" is="true" />
<mtext>θ</mtext>
<msub>
<mi></mi>
<mn>1</mn>
</msub>
<mtext>+n</mtext>
<msub>
<mi></mi>
<mn>2</mn>
</msub>
<mspace sp="0.25" width="2px" linebreak="nobreak" is="true" />
<mtext>cos</mtext>
<mspace sp="0.25" width="2px" linebreak="nobreak" is="true" />
<mtext>θ</mtext>
<msub>
<mi></mi>
<mn>2</mn>
</msub>
</math>