如何将图书馆的 doxygen \mainpage 翻译成 \page?
How to translate a library's doxygen \mainpage into a \page?
我有一个库,它使用在一个更大的项目中使用的 doxygen 进行了记录。 我的图书馆有一个不错的 \mainpage,当我在更大的项目中 运行ning doxygen 时,我想将其降级为 \page。有没有一种简单的方法可以做到这一点而不依赖于 Doxygen 安装的工具? 为了说明,当 运行ning doxygen 本身在库上时 doxygen 应该看到:
/**
\mainpage
\section main_introduction Introduction
The Gen-MC (Generalised Monte-Carlo) simulation tool.
*/
当我在较大的项目中 运行 doxygen 时,它应该看到:
/**
\page gen_MC_mainpage Gen-MC
\section main_introduction Introduction
The Gen-MC (Generalised Monte-Carlo) simulation tool.
*/
我想我可以使用 INPUT_FILTER 和一个 perl 脚本来做到这一点,但是我必须让人们安装更多的工具来生成文档,他们使用它的可能性就越小。
这可以使用条件来实现
/**
\if USEMAINPAGE
\mainpage
\else
\page gen_MC_mainpage Gen-MC
\endif
\section main_introduction Introduction
The Gen-MC (Generalised Monte-Carlo) simulation tool.
*/
在您较小的项目的 Doxyfile 中添加 USEMAINPAGE 作为启用的部分:
ENABLED_SECTIONS = USEMAINPAGE
if command 了解更多信息。
我有一个库,它使用在一个更大的项目中使用的 doxygen 进行了记录。 我的图书馆有一个不错的 \mainpage,当我在更大的项目中 运行ning doxygen 时,我想将其降级为 \page。有没有一种简单的方法可以做到这一点而不依赖于 Doxygen 安装的工具? 为了说明,当 运行ning doxygen 本身在库上时 doxygen 应该看到:
/**
\mainpage
\section main_introduction Introduction
The Gen-MC (Generalised Monte-Carlo) simulation tool.
*/
当我在较大的项目中 运行 doxygen 时,它应该看到:
/**
\page gen_MC_mainpage Gen-MC
\section main_introduction Introduction
The Gen-MC (Generalised Monte-Carlo) simulation tool.
*/
我想我可以使用 INPUT_FILTER 和一个 perl 脚本来做到这一点,但是我必须让人们安装更多的工具来生成文档,他们使用它的可能性就越小。
这可以使用条件来实现
/**
\if USEMAINPAGE
\mainpage
\else
\page gen_MC_mainpage Gen-MC
\endif
\section main_introduction Introduction
The Gen-MC (Generalised Monte-Carlo) simulation tool.
*/
在您较小的项目的 Doxyfile 中添加 USEMAINPAGE 作为启用的部分:
ENABLED_SECTIONS = USEMAINPAGE
if command 了解更多信息。