简体   繁体   English

R降价时投影仪的颜色变化

[英]Color change in beamer at R markdown

Esteemed,尊敬的,

I'm having trouble putting together a beamer presentation.我在整理投影仪演示文稿时遇到了麻烦。 I would like to put the title, the footer and the items in green tones.我想把标题、页脚和项目放在绿色调中。

I appreciate any help.我很感激任何帮助。

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.

Something like the following should do it.像下面这样的事情应该做。 You can use the \\definecolor function in the xcolor package to define named colors that can be used in setbeamercolor and setbeamertemplate declarations.您可以使用xcolor包中的\\definecolor函数来定义可在setbeamercolorsetbeamertemplate声明中使用的命名颜色。 I didn't have the image you were trying to include, so I removed that line from the code below.我没有您要包含的图像,因此我从下面的代码中删除了该行。 I'm also not sure what footer you are talking about.我也不确定你在说什么页脚。

---
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.

There are a couple of useful resources this wikibook identifies a number of different elements whose colors can be set with the setbeamercolor declaration.有一些有用的资源,这本 wikibook标识了许多不同的元素,它们的颜色可以用setbeamercolor声明来设置。 I also made use of this post in my answer.我也在我的回答中使用了这篇文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM