guyabel
guyabel

Reputation: 8366

Dropping frames of sections and subsections titles for knitr beamer slides

When making beamer slides with knitr using the Frankfurt theme the PDF output includes slides with the section and subsection names.

---
title: Movies
author: Chewy
output:
  beamer_presentation:
  slide_level: 3
theme: "Frankfurt"
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

#Introduction

##Background

###History

A long time ago ...

###History

... in a galaxy far far away

#The End

##This the end

### My only friend, the end 

Giving this output...

Slides 1-4:

enter image description here

Slides 5-8:

enter image description here

How do I get rid of the slides (2,3,6 and 7) with the section and subsection titles whilst maintaining the document structure displayed at the top of the slides?

Upvotes: 7

Views: 2852

Answers (1)

scoa
scoa

Reputation: 19857

Those frames are produced by the commands \AtBeginSubsection{} and \AtBeginSection{}, which you can redefine in your YAML front matter to do nothing instead:

---
header-includes: 
- \AtBeginSubsection{}
- \AtBeginSection{}
---

Upvotes: 10

Related Questions