如何在doxygen中添加脚注?

Sco*_*ter 7 doxygen

我想在我的doxygen输出中插入一个编号(或其他,我不挑剔)的脚注.该特殊命令的列表不包括任何东西,我可以认同为启用此.我希望有类似的东西:

This is my text.\footnote{This is my footnote}
Run Code Online (Sandbox Code Playgroud)

这将产生

这是我的文字.1

然后

1:这是我的脚注

在页面的底部.有没有办法实现这个或功能相同的东西?

Che*_*ner 8

好问题!以下是一些黑客攻击,但可能满足您的需求.

从页面底部的脚注文本开始,并使用\anchor标记来标记它.

\anchor wibble 1. Wibble is an unusual shade of pink.

然后,您可以使用a链接到脚注 \ref

Amongst the odder plants of the upper Amazon basin is the wibble rose (\ref wibble "1"). Water buffalo are particularly fond of wibble roses.

应该产生

在亚马逊河流域上游的奇特植物中,有一只穗状花序(1).水牛特别喜欢猥琐的玫瑰.

  1. Wibble是一种不寻常的粉红色.

是的,你必须手动做太多,但至少这提供了某种形式的超链接脚注.


dox*_*gen 5

您可以通过 doxygen 配置文件中的 ALIASES 选项定义自己的 \footnote 命令,如下所示:

ALIASES = footnote{1}="\latexonly\footnote\{\1\}\endlatexonly\htmlonly<sup title=\"\1\">*</sup>\endhtmlonly"
Run Code Online (Sandbox Code Playgroud)

这将在 LaTeX 输出中生成一个真正的脚注,并在 HTML 输出中生成一个带有工具提示的* 。


pmr*_*pmr 5

要用HTML生成脚注,我目前使用ALIASES命令和一些自定义JS的混合.

该命令如下所示:

ALIASES += "myFootnote{1}=<span class=\"footnote\">\1</span>"
Run Code Online (Sandbox Code Playgroud)

您可能希望改进此别名,以便通过a \latexonly\htmlonly.覆盖LaTeX中的脚注.

header.html我的项目中,我添加了这里找到的脚本.http://www.planetholt.com/articles/jQuery-Footnotes 要初始化脚注,我还在脚本标记内添加以下代码header.html:

$(document).ready(function() {
    $("#doc-content").append('<ol id="autoFootnotes0" class="footnotesList"></ol>');
    $("body").footnotes();
});
Run Code Online (Sandbox Code Playgroud)