如何在Doxygen注释中直接包含LaTeX片段? [英] How to include LaTeX snippets directly in Doxygen comments?
问题描述
我希望能够使用某些合适的编辑器在外部编辑某些Doxygen注释的LaTeX部分.我只会将其用于复杂的环境.为此,我认为我可以拥有仅LaTeX的文件,并将其包含在Doxygen中.我确实为\begin
和\end
创建了Doxygen别名以使语法兼容.
I would like to be able to edit LaTeX parts of some Doxygen comments externally with some suitable editor. I would use that only for complex environments. To do that, I figured I can have LaTeX-only files and include them from Doxygen. I did create Doxygen aliases for \begin
and \end
to make the syntax compatible.
(例如,我知道如何设置Emacs/AUCTex来处理没有序言和文档结构的LaTeX代码段.)
(For example, I know how to set-up Emacs/AUCTex for working with LaTeX snippets that have no preamble and document structure.)
是否可以在Doxygen注释中包含.tex文件的内容?我正在寻找类似于\htmlinclude
的东西,但要查找TeX文件.鉴于我对仅使用TeX的外部源的要求,是否可以通过某种方式来仿真该功能?
Is there a way to include the contents of a .tex file inside a Doxygen comment? I look for something analogous to \htmlinclude
, but for TeX files. Is there some way to emulate the functionality, given my requirements for having a TeX-only external source?
推荐答案
您可以使用类似的
\latexonly
\input <file>
\endlatexonly
其中<file>
是要包含的文件的路径,可以是绝对路径,也可以是相对于生成乳胶文档的目录的路径.
where <file>
is the path to the file to include, either absolute or relative to the directory in which the latex documentation is generated.
这篇关于如何在Doxygen注释中直接包含LaTeX片段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!