在beamer 中处理从属关系的正确方法是通过\institute{}(参见tex.SE 上的this answer)。
当前解决方案(pandoc 版本 >= 1.17)
从pandoc 1.17 开始,institute 字段出现在默认的投影仪模板中,所以如果你有正确的版本,你需要做的就是:
---
title: "This is the title"
author: "Author"
institute: "Affiliation"
date: "Thursday, April 09, 2015"
---
旧答案
如果您使用较旧的 pandoc 版本 (
pandoc -D beamer > ~/.pandoc/templates/default.beamer
然后,打开文件并在作者信息后添加:
$if(institute)$
\institute[]{$institute$}
$endif$
最后,将机构选项添加到您的 yaml:
---
title: "This is the title"
author: "Author"
institute: "Affiliation"
date: "Thursday, April 09, 2015"
---
如果你使用 rmarkdown,你可能需要指定模板:
---
title: "This is the title"
author: "Author"
institute: "Affiliation"
date: "Thursday, April 09, 2015"
output:
beamer_presentation:
template: ~/.pandoc/templates/default.beamer
---
与多行作者相比,使用它有两个优点。
- 一些投影仪主题使用作者字段和/或研究所字段,例如在每张幻灯片的底部重复它。多行作者会搞砸这个。
- 这样可以更好地控制标题幻灯片元素:您可以为作者和附属机构信息设置不同的字体系列和大小:
\setbeamerfont{institute}{size={\fontsize{5}{20}}}