Warm tip: This article is reproduced from serverfault.com, please click

Two column incremental beamer slide in RMarkdown

发布于 2020-12-01 04:04:25

I'm trying to get a two column layout in a beamer presentation slide in rmarkdown which shows differences between say, A and B, item by item. An MWE is as follows:

---
  title: "Presentation Title"
author: "Name"
institute: "Institute"
date: "date"
output:
  beamer_presentation:
  incremental: true
theme: "Berlin"
colortheme: "dove"
fonttheme: "structurebold"
classoption: "aspectratio=169"

# Section 1

## A vs B

::: columns

:::: column
### A
- Item A1
- Item A2
::::

:::: column
### B
- Item B1
- Item B2
::::

:::

This however, means that A1 appears, then A2, then B1, then B2. I am looking for a solution that will give A1, then B1; A2, then B2. Is that possible with beamer and rmarkdown?

Thanks

Questioner
wrahool
Viewed
0
samcarter_is_at_topanswers.xyz 2020-12-01 19:23:55

You could do the overlays manually:

---
title: "Presentation Title"
author: "Name"
institute: "Institute"
date: "date"
output:
  beamer_presentation:
    keep_tex: true
    incremental: true
    includes:
      in_header: preamble.tex
theme: "Berlin"
colortheme: "dove"
fonttheme: "structurebold"
classoption: "aspectratio=169"
---

# Section 1

## A vs B
::: columns

:::: column
### A 
\begin{itemize}
\item<1-> Item A1
\item<3-> Item A2
\end{itemize}
::::

:::: column
### B 
\begin{itemize}
\item<2-> Item A1
\item<4-> Item A2
\end{itemize}
::::

:::

enter image description here