如何在 Doxygen 中的注释中添加空格
我想知道有没有办法在 Doxygen 的 html 注释中插入空格?我在网上搜索了 Doxygen 手册,但找不到任何可以做到这一点的东西。
例如,我尝试添加如下注释:
//! 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
但是 html 输出显示的结果是这样的
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
两个单词之间的空格将被 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用
或
后者将真正按原样显示文本。
前者仍然会让 doxygen 解释块内的命令,同时保留空格。
You can use either
or
The latter will really show the text as-is.
The former will still let doxygen interpret commands inside the block, while preserving spaces.
在这种情况下,我发现使用 HTML 表格并将内容放在单独的文件中很有用。例如,您可以创建一个名为“motors.html”的文件,将其放在 doxygen 配置为查找输入文件的位置,然后使用以下命令将 motors.html 包含到源代码
中 : ,您可以使用以下内容:
您可以使用 CSS 文件来设置表格的样式。
In cases like this, I find it useful to use an HTML table, and put the content in a separate file. For instance, you could create a file named "motors.html", put it in a place where your doxygen is configured to find input files, and then use the following command to include motors.html into your source code:
In motors.html, you could have something along the following lines:
You can use a CSS file to style the table.