I'd like to use the full page width when rendering a quarto file to PDF without modifying the margins for the entire document or the paper size. I have a table I've built using the {gt} package that is running off the page along with some screen shots that I'd like set side by side.
The workaround I have now is saving the {gt} table as a png and knitr::include_graphics('..')
which still doesn't look great.
The quarto-documentation describes how to achieve this when rendering to HTML, but it is not working when outputting to PDF.
tldr: I want a code chunk to take the full page width when rendering a quarto document to pdf.
Below is what I've tried - also open to a latex solution.
---
title: "test-file"
format:
pdf:
keep-tex: false
echo: false
warning: false
documentclass: scrreprt
classoption: [landscape]
papersize: letter
pagestyle: plain
geometry:
- left=1in
- right=1in
---
# Quarto
::: {.column-screen-inset}
```{r}
library(tidyverse)
cbind(mtcars, mtcars[,2:10]) %>%
as_tibble(.name_repair = 'unique') %>%
gt::gt()
```
:::
```{r}
#| column: screen-inset-shaded
#| layout-nrow: 1
cbind(mtcars, mtcars[,2:10]) %>%
as_tibble(.name_repair = 'unique') %>%
gt::gt()
```
::: {.column-margin}
We know from *the first fundamental theorem of calculus* that for $x$ in $[a, b]$:
$$\frac{d}{dx}\left( \int_{a}^{x} f(u)\,du\right)=f(x).$$
:::
Has no effect on output...
::: {.column-screen-left}
```{r}
#| column: screen-inset-left
mtcars %>%
gt::gt()
```
:::