How to include image on left side and text on the right side for rmarkdown presentation

wolfsatthedoor picture wolfsatthedoor · Jul 8, 2017 · Viewed 17.9k times · Source

How can this be done in Markdown?

I am using the beamer presentation in Rmarkdown, and I want an image on the left side of a slide and text on the right side of a slide.

Basically, what this does: https://tex.stackexchange.com/questions/165475/figure-next-to-text-in-beamer

But for Markdown not latex.

Answer

Martin Schmelzer picture Martin Schmelzer · Jul 9, 2017

Use the multicol package:

---
title: "Untitled"
author: "Martin"
date: "7/9/2017"
output: 
  beamer_presentation: 
    keep_tex: yes
header-includes:
  - \usepackage{multicol}
---

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

## R Markdow

\begin{multicols}{2}

  \null \vfill
  \includegraphics[width=.3\textwidth]{unnamed.png}
  \vfill \null

\columnbreak

  \null \vfill
  \begin{itemize}
    \item Item 1
    \item Item 2
  \end{itemize}
  \vfill \null
\end{multicols}

enter image description here