I use a custom LaTex beamer theme
in an rmarkdown::beamer_presentation
.
The custom theme contains a title frame. As per this SO post markdown can be tricked to use the new title frame using header-includes: - AtBeginDocument{itleframe}
.
My title contains a colon and ideally a linebreak: First line of title:
second line of title
.
However, if I include the colon, the compilation of the presentation fails.
How can I escape the colon and, if feasible, force a linebreak right after it?
MWE (YAML header)
---
# do not add title here, else markdown generates a second title page
# ==> add title manually below with header-includes
subtitle: "Beamer presentation with R-markdown"
institute: "some place"
date: "`r format(Sys.time(), '%B %d, %Y')`"
author: "Donald Duck"
output:
bookdown::pdf_book:
base_format: rmarkdown::beamer_presentation
theme: "THEMENAME"
latex_engine: xelatex
toc: false
slide_level: 2
keep_tex: true
header-includes:
- itle{First line of the title: second line of the title}
- AtBeginDocument{itleframe}
---
For remainder of MWE, i.e. the beamertheme*.sty
files, see the mentioned SO post.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…