I am looking for a solution on how to force slides numbering in R's beamer_presentation with theme set at "default".
So far, I have found a solution but under them "metropolis". If I just type "default" instead of "metropolis", there is an error.
---
title: "**TITLE**"
subtitle: "Subtitle"
author: "Name"
institute: ""
date: January 25, 2022
output:
beamer_presentation:
theme: "default"
keep_md: true
keep_tex: no
latex_engine: xelatex
includes:
in_header:
incremental: no
classoption: aspectratio=169
header-includes:
- \usetheme[numbering=fraction]{metropolis}
- \def\ps@navigation@titlepage{\setbeamertemplate{footline}{}\@nameuse{ps@navigation}}
---
CodePudding user response:
Beamer actually has a very handy macro to add frame numbers, \setbeamertemplate{footline}[frame numbers]
, but unfortunately rmarkdown butchers this up if used in the header includes, so here an unnecessarily complicate workaround:
---
title: "**TITLE**"
subtitle: "Subtitle"
author: "Name"
institute: ""
date: January 25, 2022
output:
beamer_presentation:
theme: "default"
keep_md: true
keep_tex: true
latex_engine: xelatex
includes:
in_header:
incremental: no
classoption: aspectratio=169
header-includes:
- \setbeamertemplate{footline}{\hfill\usebeamercolor[fg]{page number in head/foot}\usebeamerfont{page number in head/foot}\setbeamertemplate{page number in head/foot}[totalpagenumber]\usebeamertemplate*{page number in head/foot}\kern1em\vskip2pt}
---
ttt