我正在尝试制作一个带有 Metropolis 主题的投影仪演示文稿。我调整了颜色,如下所示:
output:
beamer_presentation:
latex_engine: xelatex
theme: "metropolis"
slide_level: 3
navigation: horizontal
classoption: "aspectratio=169"
header-includes:
- \metroset{block=fill}
- \useoutertheme{infolines}
- \usepackage{xcolor}
- \definecolor{GreenM}{RGB}{107, 169, 36}
- \definecolor{BlueM}{RGB}{6, 48, 96}
- \setbeamercolor{title}{fg=BlueM}
- \setbeamercolor{title separator}{fg = GreenM}
- \setbeamercolor{author}{fg=BlueM}
- \setbeamercolor{date}{fg=BlueM}
- \setbeamercolor{progress bar in section page}{fg = GreenM,bg = gray}
- \setbeamercolor{frametitle}{bg=GreenM, fg = white}
- \setbeamercolor{normal text}{fg=BlueM}
- \setbeamercolor{structure}{fg=BlueM}
- \setbeamercolor{item}{fg=GreenM}
- \setbeamercolor{block title alerted}{fg=red}
- \setbeamercolor{section in head/foot}{fg=BlueM, bg=white}
- \setbeamercolor{subsection in head/foot}{fg=white,bg=BlueM}
- \setbeamercolor{author in head/foot}{fg=BlueM}
- \setbeamercolor{date in head/foot}{fg=white, bg=BlueM}
- \setbeamertemplate{page number in head/foot}{}
现在日期显示为 2022/2023。我想在标题幻灯片和页脚中将其设置为“2023 年 5 月 27 日”(不是今天的日期)。我正在使用 Rmarkdown 制作此演示文稿。有人知道我该怎么做吗?
答案1
尝试\AtBeginDocument{\date{May 27, 2023}}
在标题中包含:
---
title: "Title"
author: "Author"
output:
beamer_presentation:
latex_engine: xelatex
theme: "moloch" # modern fork of the metropolis theme
slide_level: 3
navigation: horizontal
classoption: "aspectratio=169"
header-includes:
- \useoutertheme{infolines}
- \usepackage{xcolor}
- \definecolor{GreenM}{RGB}{107, 169, 36}
- \definecolor{BlueM}{RGB}{6, 48, 96}
- \setbeamercolor{title}{fg=BlueM}
- \setbeamercolor{title separator}{fg = GreenM}
- \setbeamercolor{author}{fg=BlueM}
- \setbeamercolor{date}{fg=BlueM}
- \setbeamercolor{progress bar in section page}{fg = GreenM,bg = gray}
- \setbeamercolor{frametitle}{bg=GreenM, fg = white}
- \setbeamercolor{normal text}{fg=BlueM}
- \setbeamercolor{structure}{fg=BlueM}
- \setbeamercolor{item}{fg=GreenM}
- \setbeamercolor{block title alerted}{fg=red}
- \setbeamercolor{section in head/foot}{fg=BlueM, bg=white}
- \setbeamercolor{subsection in head/foot}{fg=white,bg=BlueM}
- \setbeamercolor{author in head/foot}{fg=BlueM}
- \setbeamercolor{date in head/foot}{fg=white, bg=BlueM}
- \setbeamertemplate{page number in head/foot}{}
- \AtBeginDocument{\date{May 27, 2023}}
---