在rmarkdown ioslides中包含blockquote

问题描述 投票:5回答:1

我想在RMarkdown blockquote演示文稿中包含ioslides,但blockquote的RMarkdown语法似乎不适用于ioslides_presentation输出。

这是我的代码:

---
title: "La recherche reproductible"
date: '2017-08-06'
output: 
  ioslides_presentation:
    css: style_presentation.css
---

## First slide 

> Every project you work on, always at least have one collaborator, and that's future you.
Hadley Wickham, chief scientist at RStudio

这是我输出的屏幕截图。

谢谢你的帮助!

r r-markdown ioslides
1个回答
1
投票

我现在只是偶然发现了1。5年前你的帖子,有类似的要求/问题(如何在ioslides演示中获得blockquotes)。

对于它(仍然)的价值,这就是我想出的。

首先,我们为CSS文件添加自定义blockquote样式(改编自here):

blockquote {
  background: #f9f9f9;
  border-left: 5px solid #ccc;
  margin: 1.5em 10px;
  padding: 0.5em 1.5em;
}

然后假设styles.css是包含以上blockquote样式的CSS文件

---
title: "La recherche reproductible"
date: '2017-08-06'
output:
  ioslides_presentation:
    css: styles.css
---

## First slide

<blockquote>
Every project you work on, always at least have one collaborator, and that's future you.
Hadley Wickham, chief scientist at RStudio
</blockquote>

产生

enter image description here

或者稍微简洁一点(感谢@KonradRudolph),我们可以使用通常的>语法和自定义CSS

> Every project you work on, always at least have one collaborator, and that's future you.
> Hadley Wickham, chief scientist at RStudio
© www.soinside.com 2019 - 2024. All rights reserved.