qute-html5 icon indicating copy to clipboard operation
qute-html5 copied to clipboard

math in HTML export broken

Open fbreuer opened this issue 12 years ago • 2 comments

E.g. "<" is exported as "<" which MathJax does not process properly.

This is caused by running first MathJax and then Showdown on the document.

I do not think I will fix this before the 0.4 release.

fbreuer avatar Oct 07 '11 03:10 fbreuer

Hi, Felix. I just discovered Qute, and tried it out on Mac OS X 10.8. It seems that exporting to html with Mathjax is adding extra tags so when displayed on the browser, it shows duplicate equations. One non-formated, and the other one formated properly. I know I could just manually delete the unformatted

block, but I was wondering if there is a fix or I'm doing something wrong. Here is a screenshot of the markdown content:
Trying a math equation: $$E = m \cdot c^2$$

Here is a screenshot of what's being published:

screen shot 2013-10-02 at 11 11 10 am

Here is what the html code reads like:

 <html><head><script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script></head><body>
<p>Trying a math equation: <span style="display: none;" class="MathJax_Preview"></span></p><div style="font-size: 100%;" class="MathJax_MathML"><math display="block"><mi>E</mi><mo stretchy="false">=</mo><mi>m</mi><mo stretchy="false">⋅</mo><msup><mi>c</mi><mn>2</mn></msup></math></div><script id="MathJax-Element-8" type="math/tex; mode=display">E = m \cdot c^2</script><p></p>

</body></html>

ubuntuslave avatar Oct 02 '13 15:10 ubuntuslave

Yes, MathJax is not officially intended to be used like that. The current HTML export via MathJax is sort of a hack. Currently, the best way to export to HTML is to use Pandoc - from the command line if necessary.

fbreuer avatar Oct 17 '13 09:10 fbreuer