1

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.

3
  • You need to use a filter to use fenced divs. Try: github.com/chdemko/pandoc-latex-environment
    – DG'
    Mar 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?
    – jarauh
    Mar 22 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.).
    – jarauh
    Mar 22 at 9:33
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.