How to have multiple note page in Rmarkdown beamer presentation

Viewed 602

In Markdown beamer presentation output, my multiple notes pages are being combined into one note page. When I looked into the .tex file (from my keep_text=TRUE option), it is because the notes commands are put between \begin{frame} ... \end{frame} instead of outside \end{frame}. Below is my reproducible code in Rmarkdown beamer presentation document. Any help will be appreciated.

---
output:
   beamer_presentation
   keep_tex: yes
--- 

## slide title 

- item 1

- item 2

\note{
long paragraph 1
}

\note{ 
long paragraph 2 
}

I get this output

snip 1

But what I wanted was:

snip 2

1 Answers

You can temporarily switch from markdown to real latex and end the frame before adding the notes:

---
output:
  beamer_presentation:
    keep_tex: true
header-includes:
  - \setbeameroption{show notes}   
---

## slide title 

- item 1

- item 2

``` {=latex}
\end{frame}
\note{
long paragraph 1
}

\note{ 
long paragraph 2 
}
\begin{frame}
```

normal slide

https://rstudio.cloud/project/1051204

enter image description here

Related