我正在使用的内容: 我使用了两种不同的 latex 发行版,结果相同。目前我使用的是最新版本的 MikTex 发行版:
MiKTeX-pdfTeX 4.1 (MiKTeX 20.11)
© 1982 D. E. Knuth, © 1996-2020 Hàn Thế Thành
TeX is a trademark of the American Mathematical Society.
using bzip2 version 1.0.8, 13-Jul-2019
compiled with curl version 7.72.0; using libcurl/7.72.0 Schannel
compiled with expat version 2.2.10; using expat_2.2.10
compiled with jpeg version 9.4
compiled with liblzma version 50020052; using 50020052
compiled with libpng version 1.6.37; using 1.6.37
compiled with libressl version LibreSSL 3.1.4; using LibreSSL 3.1.4
compiled with MiKTeX Application Framework version 4.0; using 4.0
compiled with MiKTeX Core version 4.2; using 4.2
compiled with MiKTeX Archive Extractor version 4.0; using 4.0
compiled with MiKTeX Package Manager version 4.0; using 4.0
compiled with uriparser version 0.9.4
compiled with xpdf version 4.02
compiled with zlib version 1.2.11; using 1.2.11
我正在做什么: 我正在使用 Doxygen 与 latex 创建一个记录 c 代码头文件的 pdf。
出了什么问题: 运行 doxygen 后,我在 latex 输出目录中调用 make。Latex 随后停止并输出以下错误:
! Missing } inserted.
<inserted text>
}
l.767 \end{DoxyEnumFields}
奇怪的是,即使我删除所有枚举以尝试找到导致错误的 doxygen 注释,错误也会发生变化:
! Missing } inserted.
<inserted text>
}
l.596 \end{longtabu}
如果我继续删除代码块,我几乎最终什么也剩不下,也不知道是什么导致了错误。
另外,当我尝试使用旧版本的 latex 生成 pdf 时,pdf 已成功生成。
最新已知工作版本:
MiKTeX-pdfTeX 2.9.7338 (1.40.21) (MiKTeX 2.9.7300 64-bit)
Copyright (C) 1982 D. E. Knuth, (C) 1996-2020 Han The Thanh
TeX is a trademark of the American Mathematical Society.
using bzip2 version 1.0.6, 6-Sept-2010
compiled with curl version 7.61.1; using libcurl/7.61.1 WinSSL
compiled with expat version 2.2.6; using expat_2.2.6
compiled with jpeg version 9.3
compiled with liblzma version 50020042; using 50020042
compiled with libpng version 1.6.37; using 1.6.37
compiled with libressl version LibreSSL 2.8.2; using LibreSSL 2.8.2
compiled with MiKTeX Application Framework version 4.7348; using 4.7348
compiled with MiKTeX Core version 16.7346; using 16.7346
compiled with MiKTeX Archive Extractor version 1.6882; using 1.6882
compiled with MiKTeX Package Manager version 8.7350; using 8.7350
compiled with poppler version 0.60.1
compiled with uriparser version 0.9.2
compiled with zlib version 1.2.11; using 1.2.11
如能提供任何帮助解决该问题,我们将不胜感激。
-马特
答案1
我原来的解决方案是错误的。当我将 doxygen 的最新版本 (1.8.20) 与 MiKTeX-pdfTeX 4.1 (MiKTeX 20.11) 结合使用时,问题仍然存在。
错误的解决方法:
我明白了,我输入到 doxygen 的文件的文件名是tx_commands.h
。
从这个帖子中得到线索(https://stackoverflow.com/questions/2476831/getting-the-error-missing-inserted-in-latex) 我注意到tx__commands_8h.tex
latex 目录中生成的文件没有转义__
。请参阅下面的 Hypertarget 和标签条目。
\raisebox{\heightof{T}}[0pt][0pt]{\index{CMD\_ADC\_CHANNELS\_0@{CMD\_ADC\_CHANNELS\_0}!tx\_commands.h@{tx\_commands.h}}\index{tx\_commands.h@{tx\_commands.h}!CMD\_ADC\_CHANNELS\_0@{CMD\_ADC\_CHANNELS\_0}}}\mbox{\Hypertarget{tx__commands_8h_a69486ad0c4d595da12aa42479799d0a0a81022dff03f2a26f7259059e9be47109}\label{tx__commands_8h_a69486ad0c4d595da12aa42479799d0a0a81022dff03f2a26f7259059e9be47109}}
当我从输入文件名中删除 _ 时,问题就消失了。这是一个潜在的错误吗?