sabrina
sabrina

Reputation: 53

Don't want appendix to show as a section in the navigation in Beamer (knit with R Markdown) Berlin theme

I have an appendix section in my Beamer presentation that I'm creating with R markdown, using the Berlin theme. Currently, this section is showing in the navigation bar, but I would like it not to. I've been able to suppress the Appendix from printing in the toc by specifying {-}, but this had no effect on the navigation bar. I've also tried including \apppendix as well as the package appendixnumberbeamer but neither worked. Any suggestions? (Reproducible example below- in my presentation, the code chunks are calls to knitr::include_graphics(mylocalfilepath))

---
author: 
- Me
output:   
  beamer_presentation:
    theme: "Berlin"
    colortheme: "beaver"
    fonttheme: "structurebold"
    toc: true
    slide_level: 2
---

# Introduction 

# Section One
# Slide Two
- Words

# Appendix {-}
## Slide One
```{r}
4+4
```

Upvotes: 1

Views: 2226

Answers (1)

tarleb
tarleb

Reputation: 22649

Instead of writing # Appendix {-}, insert the appropriate LaTeX command directly:

---
author: 
- Me
output:   
  beamer_presentation:
    theme: "Berlin"
    colortheme: "beaver"
    fonttheme: "structurebold"
    toc: true
    slide_level: 2
---

# Introduction 

# Section One
## Slide Two
- Words

``` {=latex}
\end{frame}
\appendix
\begin{frame}<0| handout:0>
```

## Slide One
```{r}
4+4
```

This will close the final frame, mark the start of the appendix, and then insert an empty frame which will never be shown. This is hacky, but works.

Upvotes: 1

Related Questions