问题描述
尊敬的
我在整理投影仪演示时遇到麻烦。我想将标题,页脚和项目设置为绿色。
感谢您的帮助。
title: "long title"
date: "10/10/2020"
output:
beamer_presentation:
theme: "CambridgeUS"
keep_tex: true
header-includes:
- \AtBeginDocument{\title[short title]{"long title"}}
- \AtBeginDocument{\author[author1; author2; author3; author4]{author1\\author2\\author3\\author4}}
- \addtobeamertemplate{headline}{\includegraphics[width=\paperwidth,height=2cm,page=2]{img.png}}
---
# Introduction
* text1;
* text2;
* text3;
* text4.
解决方法
应该执行以下操作。您可以使用\definecolor
包中的xcolor
函数来定义可以在setbeamercolor
和setbeamertemplate
声明中使用的命名颜色。我没有要尝试包含的图像,因此我从下面的代码中删除了该行。我也不确定您在说什么页脚。
---
title: "long title"
date: "10/10/2020"
output:
beamer_presentation:
theme: "CambridgeUS"
keep_tex: true
header-includes:
- \AtBeginDocument{\title[short title]{"long title"}}
- \AtBeginDocument{\author[author1; author2; author3; author4]{author1\\author2\\author3\\author4}}
- \usepackage{xcolor}
- \definecolor{olive}{rgb}{0.3,0.4,.1}
- \setbeamercolor{itemize/enumerate body}{fg=olive}
- \setbeamercolor{title}{fg=green}
- \setbeamercolor{frametitle}{fg=green}
- \setbeamertemplate{itemize item}{\color{green}$\blacktriangleright$}
- \setbeamertemplate{itemize subitem}{\color{green}$\blacktriangleright$}
---
# Introduction
* text1;
* text2;
* text3;
* text4.
有两个有用的资源this wikibook标识了许多不同的元素,可以使用setbeamercolor
声明来设置其颜色。我在回答中也使用了this post。