# Pandoc Markdown: How to create overprint environments for beamer

I am creating slides in markdown that I want to process using pandoc and beamer. I wonder if there is a markdown way of creating an overprint environment?

I tried to do it with the fenced div extension, but it does not work:

---
title: 'Title'
author: Autor
output:
beamer_presentation:
slide_level: 3
latex_engine: lualatex
keep_tex: true
---

# Trouble Shooting

## {}

### One slide

::: {.overprint}
\onslide<1>
Some text
\onslide<2>
Some alternative text
:::


In the .tex-file, the "overprint" is simply ignored.

Note: I am looking for an answer that works with "plain pandoc" and does not use extra filters.

• You need to use a filter to use fenced divs. Try: github.com/chdemko/pandoc-latex-environment
– DG'
Mar 21 '21 at 14:54
• Thanks! According to pandoc.org/MANUAL.html, fenced divs are activated by default, so they should be read by pandoc. But you say that the divs do not get written without a filter? Mar 22 '21 at 9:30
• @DG The filter looks interesting. Unfortunately, I need a way that works without filters, since I want to share my markdown with other people (without telling them to install additional filters etc.). Mar 22 '21 at 9:33

One was that works is to use the extension raw_attribute (https://pandoc.org/MANUAL.html):

{=beamer}
\begin{overprint}


\onslide<1>
Some text
\onslide<2>
Some alternative text

{=beamer}
\end{overprint}



Not pretty, but it works.