I often write Markdown in VSCode. I use "Markdown Preview Enhanced(MPE)" as an extension. It is useful to use TeX to write mathematical expressions.
However, when I use MPE to convert to ePub and display it on Kindle, it goes wrong. The reason was that Kindle only supports MathML.
So I decided to change the method. If I embed MathML directly in Markdown and convert it to ePub, I can display it on Kindle.
However, I couldn't preview it in MPE.
Is there any way to display MathML correctly in MPE? Or is there any way to output TeX formulas as MathML when converting them to ePub in MPE?
TeX:
$$
y = (\frac{1}{2})^{-2}
$$
MathML:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mi>y</mi>
<mo>=</mo>
<mo stretchy="false">(</mo>
<mfrac>
<mn>1</mn>
<mn>2</mn>
</mfrac>
<msup>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo>−<!-- − --></mo>
<mn>2</mn>
</mrow>
</msup>
</math>