在R markdown投影仪演示文稿中添加作者隶属关系 [英] Add author affiliation in R markdown beamer presentation
问题描述
如何在rmarkdown投影仪演示文稿的新行中添加作者隶属关系?
How to add author affiliation in a new line in an rmarkdown beamer presentation?
---
title: "This is the title"
author: "Author"
date: "Thursday, April 09, 2015"
output: beamer_presentation
---
## Slide with Bullets
- Bullet 1
- Bullet 2
- Bullet 3
愿望标题幻灯片应为
这是标题
作者
隶属关系
2015年4月9日,星期四
推荐答案
如果使用管道|
,则可以将作者行分成多行:
If you use pipes |
you can break the author line into multiple lines:
---
title: "The title"
author: |
| The author
| The affiliation
date: "9 April 2015"
output: beamer_presentation
---
输出:
编辑(我们可以使用标题和作者/从属字体吗?):
如果要更改不同的字体大小,建议您使用演示文稿标题的includes: in_header
选项(请检查
If you want to change the different font sizes, I recommend playing with the includes: in_header
option of your presentation's header (check this RStudio link for specifics).
这指向计算机上的一个简单的.tex
文件,您可以在其中添加专门用于演示文稿前言的LaTeX命令.因此,您可能在桌面中有一个名为preamble.tex
的文件,并使用\setbeamerfont{XX}{size={\fontsize{YY}{ZZ}}}
命令,其中XX是您要更改的特定内容(标题,作者); YY是要应用的字体大小; ZZ是跳过线(以pt为单位)(另请参见此链接以获取更多详细信息).
This points to a simple .tex
file on your computer where you can add LaTeX commands specifically for your presentation's preamble. You could therefore have a file called preamble.tex
in your Desktop, and use the \setbeamerfont{XX}{size={\fontsize{YY}{ZZ}}}
command, where XX is the specific thing you want to change (title, author); YY is the font size to apply; and ZZ is the skip line (in pt) (also see this link for more details).
因此,以您的示例为例,
So for your example, we have:
preamble.tex
在桌面(或任意位置)上的文件,仅包含两行:
preamble.tex
file at your Desktop (or wherever you want) containing just two lines:
\setbeamerfont{title}{size={\fontsize{30}{25}}}
\setbeamerfont{author}{size={\fontsize{5}{20}}}
您的 foo.Rmd
文件:
Your foo.Rmd
file:
---
title: "The title"
author: |
| The author
| The affiliation
output:
beamer_presentation:
includes:
in_header: ~/Desktop/preamble.tex
---
## R Markdown
This is an R Markdown presentation.
Markdown is a simple formatting syntax for
authoring HTML, PDF, and MS Word documents.
输出将是:
这篇关于在R markdown投影仪演示文稿中添加作者隶属关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!