Edward R. Mazurek
Edward R. Mazurek

Reputation: 2177

How do I attach more than one stylesheet to an rmarkdown document?

If I'm creating a .rmd report and this is my example YAML, how do I attach another stylesheet to this report's output?

---
title: "Example Report"
author: "Cool guy 62"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
  html_document:
    theme: null
    css: 'style.css'
---

Upvotes: 9

Views: 1565

Answers (1)

Edward R. Mazurek
Edward R. Mazurek

Reputation: 2177

Place the multiple css files into a bracketed array like so:

---
title: "Example Report"
author: "Cool guy 62"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
  html_document:
    theme: null
    css: ['browserreset.css', 'style.css', 'C:/Users/coolguy62/webpages/styles/bootstrap-modified.css']
---

Upvotes: 18

Related Questions