使用R Markdown生成的Beamer演示文稿中的垂直对齐

7
当我使用R Markdown创建beamer演示文稿幻灯片时,文本垂直居中,如果您只想在一到两行幻灯片上使用,则看起来非常奇怪。是否有任何方法将文本与幻灯片顶部对齐(在幻灯片标题下方)?
寻找答案时,我发现了这个post并尝试在R Markdown中使用它,但我尝试的所有方法都没有起作用。
例如,您可以使用这些命令更改水平文本对齐方式和字体大小。
\begin{flushright}
\begin{tiny}

bla..

\end{tiny}
\end{flushright}

有类似于垂直文本对齐的功能吗? 我已经尝试过以下内容: 尝试1:
---
title: "Untitled"
author: "Author"
date: "25 Januar 2017"
output: beamer_presentation
---
\documentclass[t]{beamer}

## Caption 1
test

尝试2:
---
title: "Untitled"
author: "Author"
date: "25 Januar 2017"
output: beamer_presentation
---

## Caption 1
\begin{frame}[t]
test
\end{frame}

"Attempt 3":
---
title: "Untitled"
author: "Author"
date: "25 Januar 2017"
output: beamer_presentation
---

## Caption 1
\begin{flushleft}[t]
test
\end{flushleft}
1个回答

13

在标题、作者等信息中加入classoption: t。例如:

title: "Title"
author: "Author"
date: "Date"
output: beamer_presentation
classoption: t

7
如果其他人有类似的问题,这个答案适用于整个幻灯片集并应用类选项。但是,如果您只想将其应用于特定幻灯片,则可以使用# New Slide {.t}。我无法相信我使用Rmd/Beamer这么长时间,却没有意识到这是如此简单明了! - Twitch_City
@Twitch_City 非常感谢您提供的非常有用的提示!如果我想要一个幻灯片是“plain”,并且其内容也是顶部对齐的,应该怎么做呢?请参见我的SO Q here - mavericks

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接