添加脚注/感谢Rmarkdown标题幻灯片

Mic*_*ico 14 r beamer pandoc knitr r-markdown

我必须在我的标题幻灯片中添加一个注释,声明我的资金来源.我能够通过以下方式在LyX/LaTeX中执行此操作:

\author{Michael Chirico\thanks{These people gave me money}, Other Authors}
Run Code Online (Sandbox Code Playgroud)

我无法在Rmarkdown中重现这一点.该网站提到使用[^]锚定来标记脚注,这在其他幻灯片中工作正常,但我无法在标题中使用它:

---
title: "Title"
author: "Michael Chirico[^thanks], Other Authors"
date: "February 10, 2016"
output: beamer_presentation

[^thanks]: These people gave me money
---
Run Code Online (Sandbox Code Playgroud)

.pdf编译但没有标题幻灯片.我认为这是编译日志的相关部分:

pandoc:无法解析YAML标头:UnexpectedEvent {_received = Just(EventSequenceStart Nothing),_ expected = Nothing}"source"(第1行,第1列)

如果我移动[^thanks]到标题之外,.pdf会编译,但标题页上没有页脚(也没有其他地方),并且[^thanks]标题幻灯片上显示为as-is.

如何在标题幻灯片中添加脚注/感谢部分?

sco*_*coa 16

您可以使用内联注释.常规脚注语法是[^note_call]然后[^note_call]: note_content在新行上.内联注释的语法就是这样^[note_content]

---
title: "Title"
author: "Michael Chirico^[These people gave me money], Other Authors"
date: "February 10, 2016"
output: beamer_presentation
---
Run Code Online (Sandbox Code Playgroud)

另一种允许更灵活但但仅限于投影仪输出的解决方案是更改模板.

  • 截至 2017 年 11 月,也不适用于一般 Rmarkdown 文档。 (3认同)