simple/tex2mml-page
alex-mashin opened this issue · 3 comments
I am trying to convert all TeX fragments in a sample HTML file 1.html
(below) to MML by feeding it to the simple/tex2mml-page: ./tex2mml-page 1.html
. All I get in response is a copy of the HTML file printed by the first console.log()
call.
The function actionMML()
is never called; obviously, doc.math
is empty.
I have tried adding inlineMath
, displayMath
and processEnvironments
attributes to tex
object in require('mathjax-full').init(...)
, without success.
Am I doing anything wrong?
1.html
:
<html><head><title>Example</title><head>
<body><h1>Formulæ</h1>
<p>\(e = mc^2\)</p>
<p>$$e = mc^2$$</p>
<p>\begin{equation}
x' = \frac{x + vt}{\sqrt{1 - \frac{v^2}{c^2}}}
\end{equation}</p>
<p>
\begin{equation}
\delta t' = \frac{\delta t}{\sqrt{1 - \frac{v^2}{c^2}}}
\end{equation}
</p>
</body></html>
The <head>
at the end of your first line of the file should be </head>
. The LiteDOM parser is not too good at handling ill-formed HTML. If you fix that tag, it should work for you.
The
<head>
at the end of your first line of the file should be</head>
. The LiteDOM parser is not too got at handling ill-formed HTML. If you fix that tag, it should work for you.
Thank you very much. Should have guessed myself. Sorry for wasting your time.
No problem.