在 Doxygen 中调试 Latex 错误的技巧
现在我收到一条错误消息:
No file _formulas.aux.
...
! Missing $ inserted.
...
我已尝试在代码中查找单个 @f$
标记,但到目前为止我尚未成功找到罪魁祸首。 我该如何解决这个具体问题?
另外,在 doxygen 中调试 Latex 错误有哪些一般技巧? 某处是否有日志文件?
Right now I get an error message saying:
No file _formulas.aux.
...
! Missing $ inserted.
...
I've tried looking for and single @f$
tags in the code, but I have not been successful in locating the culprit thus far. How can I go about solving this specific issue?
In addition, what are some general tips for debugging latex errors in doxygen? Are there any log files somewhere?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我同时使用 Doxygen 和 LaTeX。 编译公式时,Doxygen 会获取 LaTeX 方程的内容,将未生成的内容复制到
html/_formulas.tex
(相对于中指定的OUTPUT_DIRECTORY
) Doxyfile),尝试编译 tex 文件,然后将结果复制到 png 文件。如果使用
\f$ a+b \f$
,公式将内联显示; 如果您使用\f[ a+b \f]
公式将采用“显示”样式。听起来你的公式之一有错误。 如果在命令行显示错误时编辑 _formulas.tex 文件,则可能可以找到该错误。 “missing $”错误可能意味着您忘记在某处关闭一组大括号。
I use both Doxygen and LaTeX. When compiling formulas, Doxygen will take the contents of your LaTeX equations, copies the ones that haven't been generated to
html/_formulas.tex
(relative to theOUTPUT_DIRECTORY
specified in the Doxyfile), attempt to compile thetex
file, and then copies the result to png files.If you use
\f$ a+b \f$
, the formula will appear inline; and if you use\f[ a+b \f]
the formula will be in "display" style.It sounds like one of your formulas has an error. If, while the command line is displaying the error, you edit the _formulas.tex file, you can probably track down the error. A "missing $" error probably means you forgot to close a set of braces somewhere.
在 Latex 中,$ 符号打开数学模式,这通常意味着您正在排版某种方程。 如果你有方程,用 $ 包围它们,例如 $\frac{1}{2}$
我会假设 doxygen 只是将 .tex 文件传递到命令行,在这种情况下应该有一个包含特定内容的乳胶日志文件发生错误的行号。 .log、.aux 等与 .tex 文件位于同一目录中。
In latex, the $ symbol opens math mode, which usually means you're typesetting some sort of equation. If you have equations, surround them with $, e.g. $\frac{1}{2}$
i would assume that doxygen is just passing the .tex file to the command line, in which case there should be a latex log file with specific line numbers where errors occurred. The .log, .aux, etc. are in the same directory as your .tex file.