1

I have created a Doxygne documentation for a python project. In-order to add a high level introduction about the project with a high level class architecture, I created a mainpage.dox file which has the following format.

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

\page addLinks
# Link information

*/

The issue with having all of the above content in one mainpage.dox is that, it is too long and feels not readable.

I actually want to separate everything into separate additional dox files and link it from the mainpage.dox file. For example:

  • Create a separate .dox file for Introduction

  • Create a separate .dox file for Class Architecture

And add then these linked files will show the content in the mainpage.dox file as below.

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

introduction.dox file contains: I haven't added any comments in here.

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

Unfortunately adding .dox file as above only add the information in text format. It does not display the content in a Doxygen formatted manner. I have tried \include introduction.dox and \include { introduction.dox} and \includedoc introduction.dox as well.

I am using Doxygen 1.8.17. Any idea what could be the reason?

Thanks a lot!!

radar101
  • 67
  • 10
  • Which version of doxygen? Did you look at e.g. `\subpage`, `\include{doc}`, `\snippet{doc}` ? – albert Aug 16 '21 at 10:25
  • I am using 1.8.17. I tried \subpage test.dox, \include test.dox and \snippet test.dox. And added the test.dox file in INPUT and EXAMPLE_PATH. Still it doesn't recognize the dox. file. – radar101 Aug 16 '21 at 10:42
  • Where is the e.g. `\include test.dox` and I think you should use `\includedoc` (not sure whether or not `\include{doc}` is already supported in 1.8.17). Did you get any warnings regarding e.g. `EXAMPLE_PATH` or another path? what is in test.dox? – albert Aug 16 '21 at 11:24
  • I added \includedoc test.dox, however then it adds the raw content in the test.dox file, not formatted. For example it simply prints /*!# test*/. I did not get any warning in the EXAMPLE_PATH. – radar101 Aug 16 '21 at 12:01
  • Did you read the documentation about the `\include` / `\includedoc` version for your version (I see the `\include{doc}` is supported for 1.8.17) as it states: "The included documentation should not have comment signs in it as they will appear in the documentation as well.". The fact that the "dox" has some comment signs is probably due to the fact the ".dox" file is set to be processed as a ".h" file. You could define it as a markdown file (see `EXTENSION_MAPPING`) so no comment signs are necessary. Please adjust your question with the relevant information / code. – albert Aug 16 '21 at 13:07
  • Hi, Thanks for the comment. It still shows the content in text format. I have updated the question accordingly. – radar101 Aug 16 '21 at 15:20

1 Answers1

2

When using:

mainpage.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=.

I get as output:

enter image description here

As far as I understood this is the type of output you would like to have.

albert
  • 8,285
  • 3
  • 19
  • 32