Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 250
guyabel Avatar asked Jul 04 '16 08:07

guyabel


1 Answers

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{}
---
like image 61
scoa Avatar answered Sep 27 '22 20:09

scoa