[tex4ht] tex4ht gives package amsmath error tag not allowed here

Michal Hoftich michal.h21 at gmail.com
Tue Jul 25 14:08:03 CEST 2017

Hi Nasser,

> Not sure if this is known or not? Should I create a bug report?
> There was a related issue
> https://puszcza.gnu.org.ua/bugs/?225
> But it does not look they are same error, Or may be they are
> the same?

I think they are the same error, at least the attached test.tex file in
the related issue contains:

    x=y    ag{*}

I think that     ag should be used only in asmmath's equation
environments, because it is meant to redefine equation number with
custom text. As ordinary display math doesn't produce any label, it
doesn't really make sense to do that. 

For tagged display math, I would use custom environment. Something like:

    \newenvironment{taggedmath}[1]{\def    aggedmathpar{#1}    abular{p{.8    extwidth}r}\(\displaystyle}{\)&\printtaggedmath{    aggedmathpar}\endtabular}
      a = b

And some tex4ht configuration for \printtaggedmath to get it right

> I changed the code to use \begin{align} etc... and now tex4ht does
> not complain about     ag any more

This is of course the best solution, IMHO.

Best regards,

More information about the tex4ht mailing list