首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rmarkdown beamer:如何左对齐标题页

Rmarkdown beamer:如何左对齐标题页
EN

Stack Overflow用户
提问于 2018-02-05 09:24:34
回答 2查看 1.8K关注 0票数 3

如何将我的Rmarkdown beamer演示文稿的标题页靠左对齐,而不是默认的居中?

例如,默认值为center:

代码语言:javascript
复制
---
title: "Untitled"
author: "S SS"
date: "2/4/2018"
output: beamer_presentation
---

```{r setup, include=FALSE}

knitr::opts_chunk$set(echo =假)

代码语言:javascript
复制
## 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.

EN

回答 2

Stack Overflow用户

发布于 2018-02-05 11:48:31

这里有一个技巧,直到有人提出更好的答案:我们将省去标准的beamer标题幻灯片,只需格式化第一张幻灯片,就像它是标题幻灯片一样:

代码语言:javascript
复制
---
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 =假)

代码语言:javascript
复制
## 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.

票数 0
EN

Stack Overflow用户

发布于 2019-10-30 21:45:10

您可以使用以下命令简单地切换到左对齐的标题页

代码语言:javascript
复制
\setbeamertemplate{title page}[default][left]

要在rmarkdown中使用它,请将该行放在一个名为preamble.tex的文件中,并使用

代码语言:javascript
复制
---
title: "Untitled"
author: "S SS"
date: "2/4/2018"
output: 
  beamer_presentation:
    includes:
      in_header: preamble.tex

---

test

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48614727

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档