TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

texlive 2012 debian package:

      &    \uparrow\sum F

compile with

htlatex report.tex "htm,mathml" " -cunihtf" 


! Bad mathchar (79119). <argument>  & \uparrow \sum F 
                               l.8 \end{align}

But when compile as

 htlatex report.tex "htm,xhtml" " -cunihtf" 


 htlatex report.tex "htm" " -cunihtf" 

No error.

What should I do? Is this a bug in htlatex? any workaround? The problem happens when using \uparrow with mathml and when using align. Without align there is no error.

    $\uparrow\sum F$


  htlatex report.tex "htm,mathml" " -cunihtf"

No error.


fyi, if you are using htlatex with mathml watch out for align. Workaround I found for now is to use eqnarray. Now the errors went away. I am trying to compile to HTML code generated by Scientific word, which generated the align Latex code. So I had to edit the code and change all the align to eqnarray as temporary fix for now to get HTML generated.

share|improve this question
up vote 3 down vote accepted

It's been a long time, but I think to have found the issue. In several places of mathltx.4ht there are \mathchar"<number> without a space at the end.

In particular the problem seems to be in line 1142:

1141 \def\:tempd#1#2{%
1142    \expandafter\def\csname #1\endcsname{\mathchar"13#2}%
1143    \MathSymbol\mathop{#1}%
1144    \expandafter\def\csname #1:limits\endcsname{\expandafter
1145                     \:same \math:sym\mathop{#1}\limits}%
1146    \expandafter\def\csname #1:nolimits\endcsname{\expandafter
1147                   \:same \math:sym\mathop{#1}\nolimits}%
1148    \expandafter\edef\csname n:#1:\endcsname{\noexpand\ifDisplayMath
1149           \noexpand\expandafter \expandafter\noexpand
1150                                         \csname #1:limits\endcsname
1151           \noexpand\else \noexpand\expandafter
1152                          \expandafter\noexpand
1153                          \csname #1:nolimits\endcsname\noexpand\fi}%
1154    \expandafter\pend:def\csname n:#1:\endcsname{\ifDisplayMath
1155           \mathop:prefix{mathsize="big"}\fi}%
1156 }

What happens is that \sum is redefined and at the end \o:sum: is expanded to


Now the F just after it makes TeX add it to the number, because F is a proper hexadecimal digit. And 0x1350F represents exactly the number 79119.

Solution: make the bug known to the maintainers; the line should be

1142    \expandafter\def\csname #1\endcsname{\mathchar"13#2\relax}%

In the interim you can add this to your preamble:


\ifcsname o:sum:\endcsname
  \expandafter\g@addto@macro\csname o:sum:\endcsname{\relax}


      &    \uparrow \sum F

but the problem might present also for other operators, for instance \bigcup: only when a hexadecimal digit follows (they are 0123456789ABCDEF).

share|improve this answer
I've submitted bug report, together with a patch: puszcza.gnu.org.ua/bugs/index.php?230 thank you for localising the issue – michal.h21 Sep 16 '14 at 20:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.