【问题标题】:Customise Beamer templates for RMarkdown为 RMarkdown 自定义 Beamer 模板
【发布时间】:2020-06-19 03:18:38
【问题描述】:

我正在使用 RMarkdown 编写投影仪演示文稿。我从this website 中选择了一个模板。我真的很喜欢模板的功能,但是,我想将基色更改为更接近与我的大学相匹配的颜色。是否可以以某种方式编辑 yaml 或样式文件来做到这一点?

我的 Rmd 文件有以下 yaml 信息。

---
title: "My title"
author: "My name"
date: "06/03/2020"
output:
  beamer_presentation:
    slide_level: 2
    toc: true
    theme: "Berkeley"
    colortheme: "seagull"
    fonttheme: "structurebold"
---

我想对颜色主题“seagull”进行更改,我认为它必须包含在 RMarkdown 文件结构中的某个位置。或者这可以使用样式表进行更改吗?

谢谢

【问题讨论】:

  • 您能否创建一个minimal reproducible example 来显示您选择的主题?可能像 \setbeamercolor{structure}{fg=yourcolourname} 这样的东西已经可以自定义大多数东西了
  • 嗨@samcarter_is_at_topanswers.xyz 请查看我的编辑。

标签: r latex r-markdown beamer


【解决方案1】:

如果你去掉海鸥颜色主题,你可以简单地用\setbeamercolor{structure}{fg=yourcolourname}改变大多数颜色

---
title: "My title"
author: "My name"
date: "06/03/2020"
output:
  beamer_presentation:
    slide_level: 2
    toc: true
    theme: "Berkeley"
    fonttheme: "structurebold"
    keep_tex: true
header-includes: 
- \definecolor{yourcolourname}{rgb}{1,0.5,0}
- \setbeamercolor{structure}{fg=yourcolourname}
---

test

https://rstudio.cloud/project/1016900

【讨论】:

猜你喜欢
  • 2017-04-22
  • 2017-05-31
  • 1970-01-01
  • 1970-01-01
  • 2017-07-30
  • 1970-01-01
  • 2017-03-24
  • 2017-08-01
  • 1970-01-01
相关资源
最近更新 更多