我使用自定义LaTex beamer theme
的一个rmarkdown::beamer_presentation
。
自定义主题包含标题框架。按照此SO post markdown可以欺骗使用来使用新标题框架header-includes: - \AtBeginDocument{\titleframe}
。
我的标题包含一个冒号,最好是一个换行符:First line of title:\n second line of title
。但是,如果我包含冒号,则演示文稿的编译将失败。
我如何才能逃脱结肠,并在可行的情况下立即强制换行?
---
# 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:
- \title{First line of the title: second line of the title}
- \AtBeginDocument{\titleframe}
---
有关MWE的其余部分(即beamertheme*.sty
文件),请参见提到的SO post。
您可以在.tex文件中从markdown隐藏标题:
---
# 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:
- \input{preamble}
- \AfterBeginDocument{\titleframe}
---
test
preamble.tex:
\title[short version]{First line of the title: second line of the title}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句