2

My MWE is the file test.tex here:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{mathtools}

\begin{document}
        \begin{equation}
        y[n] = \begin{cases} 
                x[n/2], & \text{when~} n/2 \text{ is an integer} \\
                0, & \text{otherwise} \end{cases}
        \end{equation}
        
        $\cos(a)$ \\
        $\sin(a)$ \\
        $ \lim_{x\to\infty} f(x) $
\end{document}

When I try to compile using "make4ht test.tex "mathml, mathjax" the error "Math input error" appear in the cos, sin and limit, also they say "Unexpected text node 'cos'/'sin'/'lim'", for each of them. Also, the cases equation doesn't render right:

make4ht error

The pdf compilation with "pdflatex test.tex" is fine, with cos, sin, lim and cases equation correctly rendering:

PDF output

I'm using MiKTeX with make4ht 0.3m!

0

1 Answer 1

2

This is an error in TeX4ht MathML code. This configuration file should fix it:

\Preamble{xhtml}
\catcode`\:=11
\Configure{qopname}
   {\Configure{mathop}{*}
      {<\a:mathml mtext \mml:class="qopname">}
  {</\a:mathml mtext><mo> &\#x2061;<!--FUNCTION APPLICATION--> </mo>}
      {}}
\catcode`\:=12
\begin{document}
\EndPreamble

This is the result:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .