I try to compile the following very simple code by tex4eboot
:
\documentclass{amsart}
\begin{document}
\[
x=y\label{t1}\tag{Test}
\]
Look at equation \ref{t1}.
\end{document}
It gives me errors:
[ERROR] htlatex: Compilation errors in the htlatex run
[ERROR] htlatex: Filename Line Message
[ERROR] htlatex: ./test.tex 5 Package amsmath Error: \tag not allowed here.
[ERROR] htlatex: Compilation errors in the htlatex run
[ERROR] htlatex: Filename Line Message
[ERROR] htlatex: ./test.tex 5 Package amsmath Error: \tag not allowed here.
[ERROR] htlatex: Compilation errors in the htlatex run
[ERROR] htlatex: Filename Line Message
[ERROR] htlatex: ./test.tex 5 Package amsmath Error: \tag not allowed here.
However, I can use pdflatex to compile it.
I know that I can replace \[
and \]
by equation
. However, since usually the article is long and a regexpr to replace will lead to unexpected results. I wonder a workaround for this. Thanks!