Take the 2-minute tour ×

I am working on some 2D geometry code, in particular a line-class. I have made an enum to describe the relation of line (let's not get into detail concerning this). However to document this, I have something like this:

enum enumRELATION {

   /*!this line  #######
    * other line -------
    *     |             
    *  #######          
    *     |             
    *     |             



If I let doxygen parse that file, to generate an HTML-file, in the HTML-file this looks like crap (of course). In other words the 2D-plane I try to show is all wrong. I know I can use <br>, to at least get the line breaks, but that's only half the story, because the spaces are still not correct. And the <br>'s makes my documentation in the actual source/header-file look awful. Is there a nice way around this? Or am I too demanding?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You can surround your documentation with the <pre> ... </pre> element, which should nicely keep your line breaks and indentation.

pre is one of the HTML tags that can be safely used in Doxygen documentations, according to this page: http://www.stack.nl/~dimitri/doxygen/htmlcmds.html

Alternatively, you can embed images in your documentation, using the \image command: http://www.stack.nl/~dimitri/doxygen/commands.html#cmdimage

I believe the use of proper images might make the documentation clearer to understand than using 'ascii art' ;)

share|improve this answer
Thanks. I tried it. Works! I didn't know of the <pre>-HTML tag in general. This will be helpful in other contexts too. Cool. –  AudioDroid Feb 17 '11 at 16:25
add comment

Your Answer


