Include blockquote in rmarkdown ioslides

1.3k views Asked by At

I would like to include a blockquote in an RMarkdown ioslides presentation but the RMarkdown syntax for blockquote doesn't seem to work for ioslides_presentation output.

This is my code:

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

Here is a screenshot of my output. enter image description here

Thanks for your help!

1

There are 1 answers

2
Maurits Evers On

I've only now stumbled across your post from 1.5 years ago, with a similar requirement/question (how to get blockquotes in an ioslides presentation).

For what it's (still) worth, here's what I've come up with.

First we add a custom blockquote style to the CSS file (adapted from here):

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

Then assuming styles.css is the CSS file containing above blockquote styling

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

produces

enter image description here

Or slightly more concise (thanks to @KonradRudolph), we can use the usual > syntax with the custom CSS

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