Question

I have a simple doxygen project consisting of Doxyfile and a configuration file, project.txt. In the project.txt file, I have some manually written documentation that uses cross-references to auto generated documentation from my code, and it all works fine.

I am trying to break down my project into subsections, like:

project.txt
disclaimer.txt
readme.txt

So, I've put Doxygen markup code into disclaimer.txt and readme.txt, and I updated the EXAMPLE_PATH in my Doxyfile to be:

EXAMPLE_PATH=./

Finally, in project.txt, I just added the lines:

\include disclaimer.txt
\include readme.txt

I expected disclaimer.txt and readme.txt to be imported into project.txt so they are treated as Doyxgen markup, but instead, they are interpreted as text, and are rendered as-is in a code block, as if wrapped by \code and \endcode tags, making the include operation useless.

Is there some way to include additional Doxygen configuration files and actually have them parsed?

Thank you.

Was it helpful?

Solution 2

I don't think you can include Doxygen config files at arbitrary points in your code like that. I know you could add it to you file list though, etc:

INPUT   = ../PATH_TO_SOURCE_CODE_HEADER_1.h  \
          ./project.txt                      \
          ./disclaimer.txt                   \
          ./readme.txt

Also, make sure each of your .txt files is wrapped with /** and */ if you're using C, for example.

OTHER TIPS

Quoting the docs:

\include This command can be used to include a source file as a block of code.

Which seems to agree with the behaviour you see.

I am not sure if you can include pages into others as you want.

The best solution I can see is to use \subpage instead, which will both create a link to the other pages and make them subpages of the main page (this will show in the html related pages section as a dropdown hierarchy).

Usage inside project.txt would be:

\subpage disclaimer
\subpage readme

Supposing that disclaimer.txt contains a line like \page disclaimer Disclaimer

Also make sure that *.txt is in your FILE_PATTERNS.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top