1 Introduction
Creating presentations with Quarto’s Reveal.js format comes with great flexibility, but navigating tabsets and exporting polished PDFs can be challenging.
In this post, you’ll learn how to streamline these tasks, making your workflow smoother and ensuring your slides are both interactive and well-formatted for sharing. With the right techniques, you can:
- Craft slides with tabset navigation that flows as naturally as your ideas.
- Transform your interactive presentations into sleek, professionally polished PDFs.
Let’s dive in and start elevating your slide game!
2 Setting Up the Presentation
Let’s kick off by creating a basic Reveal.js presentation with the essential YAML header.
title: "A Title"
subtitle: "A Subtitle"
author: "Mickaël Canouil, *Ph.D.*"
institute: "mickael.canouil.fr"
date: today
format: revealjs
3 Structuring Your Content
Break free from linear storytelling by organising your slides into engaging segments. Use the .panel-tabset
class in your markdown content to create a dynamic, tabbed interface that keeps your audience on the edge of their seats:
## New slide {.smaller}
{{< lipsum 1 >}}
## Tabset {.smaller}
:::: {.panel-tabset}
### Lipsum
{{< lipsum 1-1 >}}
### Placeholder
{{< placeholder 600 400 >}}
### Lipsum 2
{{< lipsum 2-2 >}}
### Placeholder 2
{{< placeholder 600 400 >}}
:::
## Another slide {.smaller}

6 Exporting to PDF
To export your presentation to PDF, you can use the decktape
tool, which is a headless Chrome utility for capturing web pages as PDFs.
Your interactive masterpiece deserves to be preserved. With the decktape
tool, you can convert your dynamic Reveal.js slides into a beautifully formatted PDF that retains every engaging detail and nuance of your presentation.
-
Install
decktape
usingnpm
:bash
npm install -g decktape
-
Use the following command to generate a PDF from your Reveal.js presentation:
bash
npx -y decktape reveal \ --chrome-arg=--no-sandbox \ --chrome-arg=--disable-setuid-sandbox \ --fragments \ "my-slides.html" "my-slides.pdf"
This command ensures every fragment and tab is captured in the PDF, preserving the aesthetic and functionality of your presentation.
7 Conclusion
By blending Quarto’s interactive Reveal.js tabset navigation with the crisp sophistication of PDF exports, you’re not merely creating presentations—you’re crafting immersive experiences. Whether delivered live or shared as a document, your slides will captivate and inspire.
And now, instead of wrestling with LaTeX or Typst and losing your hard-earned theming, you can focus entirely on refining your content and delivering a presentation that truly shines.
Elevate your storytelling and let your slides flow!
Footnotes
Or download the file directly using the link under the table of contents.↩︎