Output sympy equation to word using mathml
<p>It seems that MathML works OK with my word with simple copy and paste for strings such as</p>

<pre><code>&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/mfrac&gt;&lt;/math&gt;
</code></pre>

<p>But when I try to use <code>sympy</code>'s mathml printer:</p>

<pre><code>from sympy import S
from sympy.printing.mathml import mathml
my_eqn = S(1) / 2
print(mathml(my_eqn))
</code></pre>

<p>The output is:</p>

<pre><code>&lt;apply&gt;&lt;divide/&gt;&lt;cn&gt;1&lt;/cn&gt;&lt;cn&gt;2&lt;/cn&gt;&lt;/apply&gt;
</code></pre>

<p>And I cannot copy and paste it into word to make it a Word equation.</p>

<p>Could anyone please help?</p>