如何在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
相关产品推荐
相关产品推荐

