【发布时间】:2014-05-29 11:55:09
【问题描述】:
下面的 C 代码中显示的注释块开头的标题在 HTML 和 PDF 输出中都被错误地格式化为 \verbatim 文本。
我在这个文件中拥有的所有其他 Doxygen cmets 都可以正常工作(它们都非常相似,因为文件提供了符合某种类型的函数)。
我已尝试从文件中删除所有前面的 Doxygen cmets(@name 除外)以排除不正确的块格式关闭,删除标题规范(#'s)更改标题文本(例如“foo”)以防万一不正确的字符,删除后面的 \verbatim 块,删除 this 整个评论块本身,看看问题是否转移到下一个,但似乎没有任何改变!!
我怎样才能让标题的格式正确?谢谢。
代码:
/** # *IDN? - Identification query #
* This query allows the instrument to identify itself. It responds with a `<`string`>` consisting of four fields
* separated by commas. The four fields are determined by constants defined in the application
* specific settings in config.h and appear in the following order:
* \verbatim MANUF,MODEL,SERIAL,FIRMW \endverbatim
* See the config.h file description for information on each of these fields.
*
* @param parameters None
* @param query `*IDN?`
*/
extern int16_t IDN (double * parameters, bool query);
这在 PDF 中的外观:
这在 HTML 中的样子:
编辑: OPC 功能的 cmets:
/** # *OPC - Operation Complete Command. #
* This command causes the device to set the operation complete bit in the standard event status register when
* all pending device operations have completed.
*
* The query responds with an ASCII "1" when all pending device operations are complete.
*
* @param parameters None
* @param query `*OPC?`
*/
extern int16_t OPC (double * parameters, bool query);
【问题讨论】:
-
查看
OPC的文档来源会很有用。无论OPC和IDN的注释块之间有什么区别,都将是您正在寻找的答案。我猜你需要在第一行和第二行文本之间换行,但这只是一个猜测。 -
@Chris,ta,在问题底部通过编辑添加。
-
@Toby 哪个版本的 doxygen。我将 2 个代码片段放在 .h 文件中,在默认 Doxyfile 中将 EXTRACT_ALL 设置为 YES,在 Windows 上使用 1.8.7 运行,没有发现问题。
-
@albert v 1.8.4,新版本中是否有任何可能影响这一点的内容?
-
@Toby 我不知道这件事,但是对于 1.8.4 和上面给出的设置,我也认为没有问题。
标签: formatting doxygen