Rmarkdown beamer:如何左对齐标题页

时间:2018-02-05 01:24:34

标签: r latex r-markdown beamer

如何将我的Rmarkdown beamer演示文稿的标题页与LEFT而不是默认中心对齐?

示例,默认为center:

---
title: "Untitled"
author: "S SS"
date: "2/4/2018"
output: beamer_presentation
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

## R Markdown

This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.

enter image description here

2 个答案:

答案 0 :(得分:0)

这是一个黑客,直到有人得到一个更好的答案:我们将免除一个标准的投影机标题幻灯片,只是格式化第一张幻灯片,就好像它是一个标题幻灯片:

---
output: beamer_presentation
header-includes:
  - \usepackage{color}
---

\color{blue}
\LARGE{\textbf{This is the title}}  
\color{black}
\vspace{0.2cm}
\large{Author Name}  
\large{February 4, 2018}

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

## R Markdown

This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.

enter image description here

答案 1 :(得分:0)

您只需使用

即可切换到左对齐的标题页
\setbeamertemplate{title page}[default][left]

要在rmarkdown中使用此功能,请将此行放置在名为preamble.tex的文件中并使用

---
title: "Untitled"
author: "S SS"
date: "2/4/2018"
output: 
  beamer_presentation:
    includes:
      in_header: preamble.tex

---

test

enter image description here