How to include LaTeX snippets directly in Doxygen comments?

天涯浪子 提交于 2019-12-03 15:18:00

You may use something like

\latexonly
\input <file>
\endlatexonly

where <file> is the path to the file to include, either absolute or relative to the directory in which the latex documentation is generated.

Chris

Have you tried the \verbinclude command? This command includes any file verbatim in the documentation (in contrast to \include, which is used to include source files).

From the doxygen manual:

\verbinclude <file-name>

This command includes the file <file-name> verbatim in the documentation. The command is equivalent to pasting the file in the documentation and placing \verbatim and \endverbatim commands around it.

Files or directories that doxygen should look for can be specified using the EXAMPLE_PATH tag of doxygen's configuration file.

Edit: I just had a thought that you may wish to strip the preamble from your .tex file before including the rest of the file in the documentation. you could do this using the \dontinclude command which, together with the \line, \skip, \skipline, and \until commands allows you to include specific lines/blocks of a particular file. See the example in the \dontinclude documentation.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!