You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在HTML Quarto中重复使用单个脚注且不重复显示

在Quarto HTML中实现单个脚注多次引用不重复显示

针对重复生成脚注的问题,有两种直接可行的解决方法:

方法1:使用脚注交叉引用语法

给脚注定义自定义标签,引用时通过@标签名的方式调用,即可让多次引用指向同一个脚注,页面底部仅显示一次:

---
title: "Footnote multiple times"
format: html
---

Some example text for a footnote[^fn-example].

Some example text for same footnote[@fn-example].

[^fn-example]: Example footnote.

方法2:通过Pandoc参数合并重复脚注

在格式配置中添加Pandoc专属参数,强制合并相同编号的脚注引用:

---
title: "Footnote multiple times"
format:
  html:
    pandoc_args: ["--no-duplicate-footnotes"]
---

Some example text for a footnote[^1].

Some example text for same footnote[^1].

[^1]: Example footnote.

内容的提问来源于stack exchange,提问作者Quinten

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.10 10:35:25