How to add a space to a comment in Doxygen

I was wondering if there is a way to insert a space in a comment in a Doxygen html? I searched the Internet and Doxygen for guidance, but I could not find anything to do this.

For example, I'm trying to add a comment as follows:

//!   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 a result similar to 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 empty space between two words will be automatically compressed to one place using doxygen. Does anyone know how to fix this? This will help a lot.

Many thanks.

+5
source share
2 answers

you can use

//! <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 first will allow doxygen to interpret commands inside the block, preserving spaces.

+8

HTML . , "motors.html", , doxygen , , motor.html :

@htmlinclude motors.html

motors.html - :

<center> 
<table border="0"> 
<tr> 
  <th>motor_id</th> 
  <th>motor direction</th> 
  <th>accel</th> 
  <th>min veloc</th> 
  <th>max veloc</th> 
<tr> 
<tr> 
  <td>GAUGE_MOTOR_1</td> 
  <td>CLOCKWISE</td> 
  <td>100</td> 
  <td>1</td> 
  <td>360</td> 
</tr> 
... 
</table> 
</center> 

CSS .

0

All Articles