Question

Suppose you have a rather complicated README you want Doxygen to process to produce the mainpage of the documentation, something along the lines of

/*! 
    \mainpage Welcome to this code

    \section S1 Introduction
    Some stuff to explain why you coded all this

    \section S2 Examples
    Many examples of how the code can be used
    !!! some line which you wouldn't write in a documentation

    \section S3 Some other stuff
*/

AND you want doxygen to ignore the line beginning with !!! BUT you don't want to erase the line because you plan on editing it later.

Well, how can you do that?

EDIT: The following:

/*! 
    \mainpage Welcome to this code

    \section S1 Introduction
    Some stuff to explain why you coded all this

    \section S2 Examples
    Many examples of how the code can be used
    \cond NEVER
    !!! some line which you wouldn't write in a documentation
    \endcond

    \section S3 Some other stuff
*/

fails to put section S3 in the mainpage...

Was it helpful?

Solution 2

The following:

/*! 
    \mainpage Welcome to this code

    \section S1 Introduction
    Some stuff to explain why you coded all this

    \section S2 Examples
    Many examples of how the code can be used
    \internal
    !!! some line which you wouldn't write in a documentation
    \endinternal

    \section S3 Some other stuff
*/

achieves the desired goal, provided your doxyfile is set correctly ( INTERNAL_DOCS tag set to NO ). I aknowledge @albert for the tip.

OTHER TIPS

From the HTML commands section in the manual:

Finally, to put invisible comments inside comment blocks, HTML style comments can be used:

/*! <!-- This is a comment with a comment block --> Visible text */
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top