4 ms·
As promised, here is my config setup for all of my quarto scripts. In RStudio, you can simply click the "Render" button on source pane of the script to render a
by j_bum 2y ago
As promised, here is my config setup for all of my quarto scripts. In RStudio, you can simply click the "Render" button on source pane of the script to render a pdf. You can also call `rmarkdown::render("file_path.qmd", output_format = "pdf_document")` to render a PDF.
FWIW, when you click "Render", this is the output command that RStudio shows: `quarto preview FILE.qmd --to pdf --no-watch-inputs --no-browse`
Of course, you will have to remember to properly format tables, omit `&` where possible in tables, figure titles, etc. There are so many nuances, but once you've got them figured out, report generation is very smooth.
---
title: Title
author: Author Name
date: today
date-format: long
pdf-engine: xelatex
format:
pdf:
number-sections: true
toc: true
toc-depth: 3
mainfont: Roboto # available fonts are dependent on your machine/environment
sansfont: Roboto
include-in-header:
text: |
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{float}
\pagestyle{fancy}
\fancyhead[L]{\empty}
\fancyfoot[R]{[Company] Confidential}
\fancyfoot[C]{\thepage\ of \pageref*{LastPage}}
---
```{r setup, echo=FALSE, include=FALSE}
knitr::opts_chunk$set(fig.align = "center",
warning = FALSE,
echo = FALSE,
message = FALSE,
dev = "cairo_pdf")
```
{{< include 001_QC.qmd >}}
{{< include 002_ANALYSIS_FILE.qmd >}}
<!-- And so on. -->