1

While I want to render my Rmarkdown file as beamer pdf with Latex. I get the error:

!Illegal parameter number in definiton of \beamer@doifinframe

I get this only within the columns Tag.

---
title: ""
output: 
  beamer_presentation: 
    toc: false
    keep_tex: false
params:
        one_touch_plot: NA
classoption: "aspectratio=169"   
---

```{r setup, include=FALSE}
library(ggplot2)
library(knitr)
library(markdown)

knitr::opts_chunk$set(echo = FALSE,
                      warning = FALSE,
                      message = FALSE)


```
\begin{frame}[fragile]
  \begin{columns}[T]
      \begin{column}{0.27\textwidth}
```{r, out.width='100%', out.height='38%'}
params$one_touch_plot
``` 
    \end{column}
    \hfill
  \end{columns}
\end{frame}

1 Answer 1

0

Afaik you can't use r chunks inside latex environments, like frame or columns. However rmarkdown has it's own syntax for columns:

---
title: ""
output: 
  beamer_presentation: 
    toc: false
    keep_tex: false
params:
        one_touch_plot: NA
classoption: "aspectratio=169"   
---

```{r setup, include=FALSE}
library(ggplot2)
library(knitr)
library(markdown)

knitr::opts_chunk$set(echo = FALSE,
                      warning = FALSE,
                      message = FALSE)
```

# {.fragile}
::: columns
:::: column
```{r, out.width='100%', out.height='38%'}
params$one_touch_plot
``` 
::::
:::

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .