Doxygen 可以处理 MainPage.dox 以外的页面吗

发布于 2024-11-30 23:45:30 字数 118 浏览 0 评论 0原文

如果您将 MainPage.dox 文件放入 Doxygen 的搜索路径中,它会将其添加到源文档上方的 Doxygen/html 中的输出中。但是你可以拥有像 MainPage.dox 这样的多个文件吗?或者你仅限于一个?

If you put a MainPage.dox file in Doxygen's search path, it will add it to the output in Doxygen/html above the source documentation. But can you have multiple files like MainPage.dox? Or are you limited to one?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深居我梦 2024-12-07 23:45:30

Doxygen 将识别并解析任何具有 *.dox 扩展名的文件,并将其包含在生成的文档中。这些文件将生成的内容由文件中的 doxygen 注释决定。例如,如果您想修改主页,则需要如下注释:

/**
 * @mainpage
 * Documentation you want to occur on the main page.
 */

您还可以使用此技术创建应出现在其他页面上的文档:

/**
 * @page another_page Another Page
 * Documentation that will occur on another page.
 */

假设 HTML 输出,此表单将创建一个名为 another_page 的文件.htmlindex.html 处于同一级别。标题将为另一页,后面将引用内容。还将生成一个名为“相关页面”的附加选项卡,其中包含指向以这种方式创建的所有相关页面的链接。

像这样的块可以出现在 doxygen 解析的任何文件中(包括头文件或源文件),并且可以包含多个页面的定义(上面的两个注释都可以在单个文件中)。它们所在的文件不会对生成的输出产生影响。

Doxygen will recognize and parse any file that has a *.dox extension and include it in the resulting documentation. What those files will produce is dictated by the doxygen comments located in the file. For example, if you want to modify the main page, you'll need a comment like:

/**
 * @mainpage
 * Documentation you want to occur on the main page.
 */

You can also create documentation that should appear on other pages using this technique:

/**
 * @page another_page Another Page
 * Documentation that will occur on another page.
 */

Assuming HTML output, this form will create a file named another_page.html at the same level as index.html. The title will be Another Page, and the content referenced will follow. An additional tab will also be produced named Related Pages which will have links to all of the related pages created in this manner.

Blocks like this can occur in any file that doxygen parses (including header or source files), and can contain definitions for multiple pages (both of the comments above could be in a single file). The file they're located in does not have an impact on the output that is produced.

千纸鹤 2024-12-07 23:45:30

从 1.8.4 开始,.md markdown 页面也可以作为单独的页面包含在内,而无需 .dox C++ 之类的注释 /** */ 如果 doxygen 根据您的 INPUTFILE_PATTERNS 配置考虑它们。

使用 .md.dox 之间的一个区别是,.md 文件生成一个与基本名称同名的相关页面,但没有扩展名.md 文件,而 .dox 只生成由 \page 命令指定名称的页面。

仍然可以使用 .md 文件中的 \page 命令。

例如,如果文件 md_page.md 包含:

Inside md_page.

\page md_page2 Md Page 2

Inside md_page2

这将在“相关页面”下生成 2 个页面,标题为:

  • md_page
  • Md Page 2

As of 1.8.4, .md markdown pages can also be included as separate pages without need for .dox C++ like comments /** */ if they are to be considered by doxygen according to your INPUT and FILE_PATTERNS configs.

One difference between using .md and .dox is that .md files produce a Related page with the same name as the basename without extension of the .md file, while .dox only produces pages with names given by \page commands.

It is still possible to use \page commands from .md files.

For example, if file md_page.md contains:

Inside md_page.

\page md_page2 Md Page 2

Inside md_page2

this will generate 2 pages under "Related Pages" entitled:

  • md_page
  • Md Page 2
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文