Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Override rmarkdown theme in order to change html page width

Tags:

I'm trying to widen the output of rmarkdown to html. I've been trying this solution with no success (although I'm using the cerulean theme, that should be responsive according to comments). Also tried adding a css element as described here - no effect.

How can I make this work?

like image 689
Yonatan Lazar Telem Avatar asked Jul 14 '16 06:07

Yonatan Lazar Telem


1 Answers

Create a file styles.css with your styles:

<style>
.main-container {
  width: 100%;
    max-width: unset;
  }
</style>

And include it in your rmarkdown as described here:

---
output:
  html_document:
    css: styles.css
---

Both options work for me.

like image 70
Martin Schmelzer Avatar answered Nov 26 '22 17:11

Martin Schmelzer