【问题标题】:Pandoc: multiple footnotes next to one another?Pandoc:多个脚注并排?
【发布时间】:2016-10-16 23:09:23
【问题描述】:

如果我想让两个脚注并排引用,用逗号分隔,这样做的语法是什么? Pandoc documentation 似乎没有具体说明如何。

作为我想要完成的一个例子:

Some text here [^fn1, ^fn2] ## this clearly isn't the syntax, I've tried this.

变成:

这里有一些文字1, 2.

【问题讨论】:

    标签: latex pandoc pdflatex


    【解决方案1】:

    多个脚注的语法是:

    Some text here [^fn1][^fn2]
    
    [^fn1]: foo
    [^fn2]: bar
    

    但是,要在 PDF 输出中用逗号分隔它们,您必须在 pandoc template 中包含以下内容以 tell LaTeX to do so

    \usepackage[multiple]{footmisc}
    

    对于 HTML 输出,您必须在 CSS 中使用类似的东西:

    <style>
    .footnote-ref ~ .footnote-ref :before {
      content: ', '
    }
    </style>
    

    【讨论】:

    • 谢谢!万一其他人在这里发现 .footnoteRef 没有任何效果,在我的情况下 .footnote-ref 成功了。
    • 感谢@pataIt,确实这个类在旧版 pandoc 中是 footnoteRef,在新版本中是 footnote-ref(我在答案中更新了它)
    猜你喜欢
    • 2020-11-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-04
    • 1970-01-01
    • 2014-04-08
    • 1970-01-01
    相关资源
    最近更新 更多