在Doxygen标识符后使用“'s”

时间:2017-09-13 11:47:02

标签: doxygen

我正在使用Doxygen编写C项目的文档。 在函数的文档中,可以使用\p来引用函数的参数。我想在我的文本中使用“s”所有格成语,例如:写the object's name。以下是触发此问题的代码示例:

/**
 * @file
 * @brief Main C entry point
 * @author Vincent Siles
 */
#include <stdio.h>

typedef struct {
    int foo;
    int bar;
} foobar;

/**
 * @brief blabla
 *
 * toto \p in's field foo.
 * toto \p in 's field foo.
 *
 * @param in    input
 */
void test(foobar *in)
{
    printf("%d %d\n", in->foo, in->bar);
}

int main(void)
{
    foobar xxx = { .foo = 0, .bar = 0};

    test(&xxx);
    return 0;
}

生成的HTML功能:

<p>blabla </p>
<p>toto <code>in's</code> field foo. toto <code>in</code> 's field foo.</p>

正如你所看到的,<code>部分都不令人满意:第一部分内部有“s”,感觉不对,第二部分有额外的空间。

在这种情况下,我可以改写为the field of \p in,但这并不总是可行的。有没有办法输出<code>in</code>'s field

为了记录,我使用的是版本1.8.11,我有这个问题的默认配置,由doxywizard + optimize for C / PHP创建。完整配置可以找到here

1 个答案:

答案 0 :(得分:0)

使用\p命令是不可能的。
但是,作为解决方法,您可以使用`in`'s代替\p in's

但是请注意,由于<code>in</code>部分将使用与's不同的字体,因此看起来可能有些怪异:

code and normal text using different font