'Use max page width using rmdformats?
I'm trying to use the entire page width when rendering an R markdown document using rmdformats::readthedown. First, you can see that it isn't a problem using only html_document as the output (and the style definition below the YAML before the 1st chunk).
YAML and style:
---
title: "Data checks for table T32100359"
author: "Crop Reporting Unit, Statistics Canada"
date: "`r Sys.Date()`"
output:
html_document:
keep_md: true
runtime: shiny
---
<style type="text/css">
.main-container {
max-width: 1800px;
margin-left: auto;
margin-right: auto;
}
</style>
With rmdformats my figure is cut. In fact the whole page is:
YAML and style:
---
title: "Data checks for table T32100359"
author: "Crop Reporting Unit, Statistics Canada"
date: "`r Sys.Date()`"
output:
rmdformats::readthedown:
keep_md: true
runtime: shiny
---
<style type="text/css">
.main-container {
max-width: 1800px;
margin-left: auto;
margin-right: auto;
}
</style>
Note that I also tried
<style>
.main-container {
width: 100%;
max-width: unset;
}
</style>
How can I make sure full page width is used with rmdformats? Thanks!
Solution 1:[1]
I was having this exact problem!!! This is what I got to work:
---
title: "Data checks for table T32100359"
author: "Crop Reporting Unit, Statistics Canada"
date: "`r Sys.Date()`"
output:
rmdformats::readthedown:
keep_md: true
runtime: shiny
---
```{css, echo = FALSE}
#content{
max-width:1920px;
}
```
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Adam |