Dropping frames of sections and subsections titles for knitr beamer slides
Asked Answered
P

1

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?

Pazia answered 4/7, 2016 at 8:51 Comment(0)
K
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{}
---
Kensell answered 4/7, 2016 at 9:51 Comment(3)
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?Pazia
you could just add those two lines, without the leading -, in your header.txtKensell
Awesome. Worked a treat!Pazia

© 2022 - 2024 — McMap. All rights reserved.