【问题标题】:Color change in beamer at R markdownR降价时投影仪的颜色变化
【发布时间】:2021-01-25 13:59:38
【问题描述】:

尊敬的,

我在整理投影仪演示文稿时遇到了问题。我想把标题、页脚和项目用绿色调。

感谢您的帮助。

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.

【问题讨论】:

    标签: r latex r-markdown presentation beamer


    【解决方案1】:

    类似下面的东西应该可以做到。您可以使用xcolor 包中的\definecolor 函数来定义可在setbeamercolorsetbeamertemplate 声明中使用的命名颜色。我没有您要包含的图像,因此我从下面的代码中删除了该行。我也不确定你在说什么页脚。

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

    【讨论】:

    • 非常感谢@DaveArmstrong。他们的建议非常有用。例如,像“马德里”这样的主题会生成一个带有作者短名称、标题和日期的页脚。我也可以将页脚保持为绿色吗?
    • @VeltonSousa 看看this post,它讨论了在使用infolines 包的主题中更改脚线颜色。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-06-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-02
    • 2021-05-11
    • 1970-01-01
    相关资源
    最近更新 更多