【问题标题】:Doxygen: \include test.dox in mainpage.dox adds as a textDoxygen: \include test.dox in mainpage.dox 添加为文本
【发布时间】:2021-10-18 09:00:21
【问题描述】:

我为一个 python 项目创建了一个 Doxygne 文档。为了添加对具有高级类架构的项目的高级介绍,我创建了一个 mainpage.dox 文件,其格式如下。

/* \mainpage
# Introduction
Description about the project
# Class Architecture
CLass architecture using plantuml.
# Additional Links
\ref addLinks "Additional Links Name"

\page addLinks
# Link information

*/

将上述所有内容放在一个 mainpage.dox 中的问题在于,它太长而且感觉不可读。

我实际上想将所有内容分成单独的附加 dox 文件并将其与 mainpage.dox 文件链接。例如:

  • 为简介创建一个单独的 .dox 文件

  • 为类架构创建一个单独的 .dox 文件

然后添加这些链接的文件将在 mainpage.dox 文件中显示如下内容。

/*! \mainpage
# Introduction
\include introduction.dox
# Architecture
\include architecture.dox
*/

introduction.dox 文件包含:我这里没有添加任何 cmets。

Introduction
===========
This is an introduction about this project. 

不幸的是,上面添加的 .dox 文件只添加了文本格式的信息。它不会以 Doxygen 格式的方式显示内容。 我也试过 \include Introduction.dox 和 \include { Introduction.dox} 和 \includedoc Introduction.dox。

我正在使用 Doxygen 1.8.17。 知道可能是什么原因吗?

非常感谢!!

【问题讨论】:

  • doxygen 的哪个版本?你看过例如\subpage, \include{doc}, \snippet{doc} ?
  • 我使用的是 1.8.17。我试过\subpage test.dox、\include test.dox 和\sn-p test.dox。并在INPUT 和EXAMPLE_PATH 中添加了test.dox 文件。它仍然不承认dox。文件。
  • 例如在哪里? \include test.dox 我认为你应该使用 \includedoc(不确定 1.8.17 是否已经支持 \include{doc})。您是否收到任何有关例如的警告? EXAMPLE_PATH 或其他路径? test.dox 中有什么?
  • 我添加了 \includedoc test.dox,然后它在 test.dox 文件中添加了原始内容,未格式化。例如,它只是打印 /*!# test*/。我在EXAMPLE_PATH 中没有收到任何警告。
  • 您是否阅读了有关您的版本的 \include / \includedoc 版本的文档(我看到 1.8.17 支持 \include{doc}),因为它指出:“包含的文档不应该有注释标志,因为它们也会出现在文档中。”。 “dox”有一些注释符号的事实可能是由于“.dox”文件被设置为“.h”文件处理的事实。您可以将其定义为降价文件(请参阅EXTENSION_MAPPING),因此不需要注释符号。请根据相关信息/代码调整您的问题。

标签: doxygen doxywizard


【解决方案1】:

使用时:

ma​​inpage.dox

\mainpage
# Introduction
\include{doc} introduction.dox
# Architecture
\include{doc} architecture.dox

architecture.dox

This is an architecture description

introduction.dox

This is an introduction about this package description

Doxyfile

INPUT=mainpage.dox
EXTENSION_MAPPING = dox=md
QUIET=YES
EXAMPLE_PATH=.

我得到输出:

据我了解,这是您想要的输出类型。

【讨论】:

  • 您好 Albert,非常感谢您提供的信息和支持。它现在也适用于我。
猜你喜欢
  • 1970-01-01
  • 2013-10-09
  • 1970-01-01
  • 2023-03-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多