"Unexpected text node" error with tex4ht generated inline math

355 views
Skip to first unread message

set...@gmail.com

unread,
Feb 18, 2016, 9:41:31 AM2/18/16
to MathJax Users
Hello,

we are using MathJax on page generated by latex tex4ht tool. Tex4ht produce HTML with MathML which is then processed by MathJax. The problem is with latex inline math - the most simple case $X$ is translated to trivial MathML like this:

  <math xmlns="http://www.w3.org/1998/Math/MathML"   display="inline" >
    X
  </math>

which leads to "Unexpected text node: 'X'" MathJax error. Such MathML can be rendered by Firefox with no problem. I found related issues:

- https://github.com/mathjax/MathJax/issues/1149
- http://tug.org/pipermail/tex4ht/2014q3/001012.html

and this seems to be expected bahaviour as the MathML above is not fully valid. If I enclose the X inside <mi> tag, MathJax works OK.

Any idea how to configure latex tex4ht or MathJax to get such trivial use of inline math working, please?

William F Hammond

unread,
Feb 18, 2016, 12:55:31 PM2/18/16
to mathja...@googlegroups.com

On Thu, Feb 18, 2016 at 6:41 AM, <set...@gmail.com> wrote:
Any idea how to configure latex tex4ht or MathJax to get such trivial use of inline math working, please?

If foo.tex is your LaTeX file, then

   mk4ht xhmlatex foo

should get you started.

There are many ways to make adjustments.  Also, aside from the building interface called "mk4ht", there is a newer building interface called "make4ht" that you might want to explore.

Reply all
Reply to author
Forward
0 new messages