-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_init.qmd
46 lines (36 loc) · 960 Bytes
/
_init.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
```{r include=FALSE}
# Execute in other qmd files by calling {{< include _init.qmd >}}
library(knitr)
library(flextable)
# Additions to temp file paths so they don't cause latex error with "C:"
tempfile <- function(...) {
base::tempfile(...) |> normalizePath(winslash = '/', mustWork = FALSE)
}
tempdir <- function(...) {
base::tempdir(...)|> normalizePath(winslash = '/', mustWork = FALSE)
}
gdtools::register_gfont("Open Sans")
opts_chunk$set(ft.tabcolsep = 2)
flextable::set_flextable_defaults(
font.family = "Open Sans",
scroll = list()
)
if (is_latex_output()) {
flextable::set_flextable_defaults(
font.size = 9,
arraystretch = 1.3,
table.layout = "autofit"
)
}
# The old scripts/rmd-scripts.R that was pasted into each script
library(knitr)
opts_chunk$set(
dev = "ragg_png", dpi = 150,
collapse = TRUE,
dev.args = list(
background = "transparent",
pointsize = 12
)
)
use_df_printer()
```