7

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?

guyabel
  • 8,014
  • 6
  • 57
  • 86

1 Answers1

9

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{}
---
scoa
  • 19,359
  • 5
  • 65
  • 80
  • Thanks @soca. In my non-simplified application I also have a `beamer_presentation: includes: in_header: header.txt` for my Beamer preamble. Your answer seems to make this call to `header.txt` no longer function. Any ideas how I can include both? – guyabel Jul 04 '16 at 10:57
  • 1
    you could just add those two lines, without the leading `-`, in your header.txt – scoa Jul 04 '16 at 11:52
  • Awesome. Worked a treat! – guyabel Jul 05 '16 at 04:38