Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add white space in the comment in Doxygen

I was wondering is there any way to insert white space in the comment in html of Doxygen? I searched online and Doxygen manual, but I couldn't find anything to do that.

For example, I am trying to add comment as following:

//!   motor_id,          motor direction,   accel,     min veloc,     max veloc\n
//!   GAUGE_MOTOR_1,     CLOCKWISE,         100,       1,             360\n
//!   GAUGE_MOTOR_2,     CLOCKWISE,         100,       1,             360\n
//!   GAUGE_MOTOR_3,     CLOCKWISE,         100,       1,             360\n
//!   GAUGE_MOTOR_4,     CLOCKWISE,         100,       1,             360\n
//!   GAUGE_MOTOR_5,     CLOCKWISE,         400,       200,           350\n

But the html output shows the result like this

motor_id, motor direction, accel, min veloc, max veloc
GAUGE_MOTOR_1, CLOCKWISE, 100, 1, 360
GAUGE_MOTOR_2, CLOCKWISE, 100, 1, 360
GAUGE_MOTOR_3, CLOCKWISE, 100, 1, 360
GAUGE_MOTOR_4, CLOCKWISE, 100, 1, 360
GAUGE_MOTOR_5, CLOCKWISE, 400, 200, 350

The white space between two words will be shrinked to one space by doxygen automatically. Is there anybody know how to fix this? That will help a lot.

Thank you very much.

like image 405
Jason Avatar asked Aug 26 '11 13:08

Jason


1 Answers

You can use either

//! <pre>
//!   motor_id,          motor direction,   accel,     min veloc,     max veloc
//!   GAUGE_MOTOR_1,     CLOCKWISE,         100,       1,             360
//!   GAUGE_MOTOR_2,     CLOCKWISE,         100,       1,             360
//!   GAUGE_MOTOR_3,     CLOCKWISE,         100,       1,             360
//!   GAUGE_MOTOR_4,     CLOCKWISE,         100,       1,             360
//!   GAUGE_MOTOR_5,     CLOCKWISE,         400,       200,           350
//! </pre>

or

//! \verbatim
//!   motor_id,          motor direction,   accel,     min veloc,     max veloc
//!   GAUGE_MOTOR_1,     CLOCKWISE,         100,       1,             360
//!   GAUGE_MOTOR_2,     CLOCKWISE,         100,       1,             360
//!   GAUGE_MOTOR_3,     CLOCKWISE,         100,       1,             360
//!   GAUGE_MOTOR_4,     CLOCKWISE,         100,       1,             360
//!   GAUGE_MOTOR_5,     CLOCKWISE,         400,       200,           350
//! \endverbatim

The latter will really show the text as-is. The former will still let doxygen interpret commands inside the block, while preserving spaces.

like image 160
doxygen Avatar answered Sep 30 '22 20:09

doxygen