![tex4ht:`\[` `\]` 环境和标签之间存在冲突,参考?](https://linux22.com/image/405889/tex4ht%EF%BC%9A%60%5C%5B%60%20%60%5C%5D%60%20%E7%8E%AF%E5%A2%83%E5%92%8C%E6%A0%87%E7%AD%BE%E4%B9%8B%E9%97%B4%E5%AD%98%E5%9C%A8%E5%86%B2%E7%AA%81%EF%BC%8C%E5%8F%82%E8%80%83%EF%BC%9F.png)
我尝试通过以下非常简单的代码进行编译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
要替换的正则表达式会导致意外结果。我想知道如何解决这个问题。谢谢!