如何翻译图书馆';是否将doxygen\mainpage转换为\page?
我有一个使用doxygen记录的库,它在一个更大的项目中使用我的库有一个很好的\main页面,当我在较大的项目上运行doxygen时,我希望将该页面降级为\page。有没有一种简单的方法可以做到这一点而不依赖于Doxygen安装的工具?举例说明,当Doxygen自己在库上运行Doxygen时,Doxygen应该看到:如何翻译图书馆';是否将doxygen\mainpage转换为\page?,doxygen,Doxygen,我有一个使用doxygen记录的库,它在一个更大的项目中使用我的库有一个很好的\main页面,当我在较大的项目上运行doxygen时,我希望将该页面降级为\page。有没有一种简单的方法可以做到这一点而不依赖于Doxygen安装的工具?举例说明,当Doxygen自己在库上运行Doxygen时,Doxygen应该看到: /** \mainpage \section main_introduction Introduction The Gen-MC (Generalised Monte-
/**
\mainpage
\section main_introduction Introduction
The Gen-MC (Generalised Monte-Carlo) simulation tool.
*/
/**
\page gen_MC_mainpage Gen-MC
\section main_introduction Introduction
The Gen-MC (Generalised Monte-Carlo) simulation tool.
*/
当我在较大的项目中运行doxygen时,应该会看到:
/**
\mainpage
\section main_introduction Introduction
The Gen-MC (Generalised Monte-Carlo) simulation tool.
*/
/**
\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
更多信息