在非 Doxygen 评论中,我经常有:
/* Lorem ipsum etc.
*
* Notes:
* - A first note.
* - Some other note note.
*/
但是对于 Doxygen,我有@note
(或\note
),而不是@notes
)。那么,我应该使用多个@note
s,还是将所有注释放在同一个 s 下@note
?
在非 Doxygen 评论中,我经常有:
/* Lorem ipsum etc.
*
* Notes:
* - A first note.
* - Some other note note.
*/
但是对于 Doxygen,我有@note
(或\note
),而不是@notes
)。那么,我应该使用多个@note
s,还是将所有注释放在同一个 s 下@note
?
@note 命令生成一个段落,使用 Latex 时可以在 CSS 文件或样式文件中自定义格式。因此,您可以像在“普通”文本中一样使用标记:
/**
* Bla bla...
*
* @note Even in a note you can use markups:
* - Your first note
* - Youre second note
*
* The note section ends with an empty line or the end of the comment.
*/
无论哪种方式,您都可以这样做;这真的是风格/偏好的问题。
正如您所指出的,Doxygen 有@note
命令,但没有@notes
. @notes
您可以通过编辑 Doxyfile 并修改ALIASES =
要读取的标签来创建自己的命令
ALIASES = "notes=@par Notes:\n"
有了这个,您可以将命令@notes
放入文档中,这将导致用户定义的带有标题的段落
笔记:
正如ALIAS 标记的 Doxygen 文档中所指出的,您可以将 \n 放在别名的值部分中以插入换行符。