我尝试通过以下非常简单的代码进行编译tex4eboot
:
\documentclass{amsart}
\begin{document}
\[
x=y\label{t1}\tag{Test}
\]
Look at equation \ref{t1}.
\end{document}
它给了我错误:
[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.
但是,我可以使用 pdflatex 来编译它。我知道我可以用 替换\[
和。但是,由于文章通常很长,\]
并且equation
要替换的正则表达式会导致意外结果。我想知道如何解决这个问题。谢谢!