如何使用doxygen对书籍"另见"

Pau*_*cas 6 doxygen

Javadoc @see允许一个简单的字符串作为参数来引用类似书的东西,例如:

@see "The Java Programming Language."
Run Code Online (Sandbox Code Playgroud)

据我所知,Doxygen \see没有相应的功能.有没有办法在文档中生成书籍参考,例如:

另请参见
The C++ Programming Language, Bjarne Stroustrup, Addison-Wesley, 2000, section 19.4.1: The Standard Allocator

?

Clarification

This question is about how to do a "See Also" as part of a comment, e.g.:

/**
 * Allocates memory in an amazing way.
 * \param size The number of bytes to allocate.
 * \return Returns a pointer to the start of the allocated memory.
 * \see MyOtherClass::alloc()
 * \see "The C++ Programming Language," Bjarne Stroustrup, Addison-Wesley, 2000,
 * section 19.4.1: The Standard Allocator.
 */
void* my_alloc( size_t size );
Run Code Online (Sandbox Code Playgroud)

Of course the above does not work in Doxygen. Note that if there are multiple \see标签,则应将它们合并为一个"另请参见"部分(与\see通常的方式一样).

Chr*_*ris 5

虽然我有点晚了,但希望以下内容对您有所帮助。

事实上,您可以在命令中使用字符串\see(包含它是为了与 Javadoc 兼容,并且只是 的别名\sa),正如 Dmitriy 所示,即使这没有记录。

或者,也许更合适,您可以尝试使用该\cite命令添加参考书目。

最后,你声明

请注意,如果有多个 \see 标签,则应将它们合并到单个“另请参阅”部分(就像 \see 通常的工作方式一样[)]。

正如 Dmitriy 演示的那样, Doxygen 确实将多个\see' 和\sa' 合并在一起。然而,在对德米特里的回答的评论中,你说

我从未声称 Doxygen 不会将多个 \see 合并在一起:我说过,如果我要定义自己的标签,它不会将其合并在一起,\see因为它将是我自己的标签而不是\see.

如果您的标签是\sa.


mou*_*iel 1

如果您的问题是关于样式的,您可以使用配置选项定义自己的标签ALIASES

如果您的问题是关于创建参考书目页面,您可以使用 tag 定义特定的交叉引用标签\xrefitem

当然,您可以将两者结合起来。

如果您的问题是关于处理参考书目数据库(例如 EndNote 或 BibTeX),恐怕 Doxygen 不是最好的工具。