Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vertical alignment in beamer presentation generated with R markdown

When I use R Markdown to create slides for a beamer presentation, the text is vertically centered, which really looks odd if you only want to use 1-2 lines a slide. Is there anyway to align the text to the top of the slide (under the slide caption)?

Looking for answer, I found this post and tried to use it in R Markdown, but nothing I tried worked.

You can change the horizontal text alignment and font size for instance by using these commands

\begin{flushright}
\begin{tiny}

bla..

\end{tiny}
\end{flushright}

is there something similar for vertical text alignment? So far I've tried this:

Attempt 1:

---
title: "Untitled"
author: "Author"
date: "25 Januar 2017"
output: beamer_presentation
---
\documentclass[t]{beamer}

## Caption 1
test

Attempt 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}
like image 845
JAQuent Avatar asked Feb 06 '23 06:02

JAQuent


1 Answers

Include classoption: t with the title, author, etc. For example:

title: "Title"
author: "Author"
date: "Date"
output: beamer_presentation
classoption: t
like image 112
Ryan Avatar answered May 01 '23 17:05

Ryan