jck21
jck21

Reputation: 811

How to add page numbers on rmarkdown beamer slide under theme: "boxes"?

Using rmarkdown beamer, I try to add slide number at the bottom of each slide but keep failing. Is there anyway I can add slide number on each page under beamer theme called "boxes"?

---
title: "Big Business" 
author: |
| Mr. Bean
| Sunny College
output: 
beamer_presentation:
    theme: "boxes"
    citation_package: natbib
biblio-style: apalike 
incremental: TRUE
header-includes:
- \usepackage{makecell}
- \usepackage{booktabs}
- \usepackage{adjustbox}
---
# Motivation
Big business

# Motivation 2
Small business 

Upvotes: 2

Views: 1168

Answers (1)

The boxes theme has a special syntax to add things to the footline:

 \addfootbox{normal text}{\hfill\insertframenumber\quad}

(replace <normal text> with any other beamer colour you like)

MWE:

---
title: "Big Business" 
author: |
  | Mr. Bean
  | Sunny College
output: 
  beamer_presentation:
    theme: "boxes"
    citation_package: natbib
biblio-style: apalike 
incremental: TRUE
header-includes:
  - \usepackage{makecell}
  - \usepackage{booktabs}
  - \usepackage{adjustbox}
  - \addfootbox{normal text}{\hfill\insertframenumber\quad}
---

# Motivation
Big business

# Motivation 2
Small business 

Upvotes: 3

Related Questions