【问题标题】:Change font sizes with style sheets for RStudio presentation使用 RStudio 演示文稿的样式表更改字体大小
【发布时间】:2015-03-28 06:39:19
【问题描述】:

我正在使用 RStudio 演示文稿,我想更改主要元素的字体大小(例如:标题、项目符号和子项目符号)。我能够将样式表添加到我的 rmd 文件中,但我不知道在 css 文件中要更改什么。我尝试在 css 文件中的各个位置更改字体大小,但没有任何效果。

## Slide with Bullets

- Bullet 1
    + Sub bullet
- Bullet 2
- Bullet 3

【问题讨论】:

  • 对于标题# This is an H1, ## This is an H2 ###### This is an H6

标签: css r markdown rstudio presentation


【解决方案1】:

rstudio 演示文稿的默认样式表是here

你当然可以有一个样式表,但你也可以像下面这样即时更改设置。

Untitled
========================================================

Slide title
========================================================

<style>

/* slide titles */
.reveal h3 { 
  font-size: 100px;
  color: blue;
}

/* heading for slides with two hashes ## */
.reveal .slides section .slideContent h2 {
   font-size: 40px;
   font-weight: bold;
   color: green;
}

/* ordered and unordered list styles */
.reveal ul, 
.reveal ol {
    font-size: 50px;
    color: red;
    list-style-type: square;
}

</style>

## Slide with Bullets

- Bullet 1
    + Sub bullet
- Bullet 2
- Bullet 3

给我这个

###### 等对应于h1h2h3 等。显然h3 与幻灯片标题一致。如果要更改 rstudio 样式表,请将 .reveal 放在每个项目的前面也很重要。

【讨论】:

  • R 是否支持 Css 代码来生成更具吸引力和自定义的幻灯片。
  • yes。还有很受欢迎的ioslidesslidify。你可以在每个中指定一个css文件的路径
猜你喜欢
  • 2014-12-09
  • 2019-10-31
  • 2015-06-18
  • 1970-01-01
  • 2016-07-17
  • 2014-07-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多