/
document-preamble.Rmd
executable file
·106 lines (93 loc) · 2.77 KB
/
document-preamble.Rmd
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
```{R, setup, include = F}
library(tidyverse)
library(svglite)
library(knitr)
library(here)
library(gt)
library(patchwork)
# library(kfbmisc)
# Knitr options
opts_chunk$set(
comment = "#>",
fig.align = "center",
fig.height = 7,
fig.width = 10.5,
warning = F,
message = F
)
# Use svg for figures
opts_chunk$set(dev = "svglite")
options(device = function(file, width, height) {
svglite::svglite(tempfile(), width = width, height = height)
})
# HTML output for knitr
options(knitr.table.format = "html")
```
<!-- Custom css -->
```{css, echo = F, code=xfun::read_utf8(here::here("document.css"))}
```
<!-- From xaringancolor -->
<div style = "position:fixed; visibility: hidden">
$$
\require{color}
\definecolor{purple}{rgb}{0.337254901960784, 0.00392156862745098, 0.643137254901961}
\definecolor{navy}{rgb}{0.0509803921568627, 0.23921568627451, 0.337254901960784}
\definecolor{ruby}{rgb}{0.603921568627451, 0.145098039215686, 0.0823529411764706}
\definecolor{alice}{rgb}{0.0627450980392157, 0.470588235294118, 0.584313725490196}
\definecolor{daisy}{rgb}{0.92156862745098, 0.788235294117647, 0.266666666666667}
\definecolor{coral}{rgb}{0.949019607843137, 0.427450980392157, 0.129411764705882}
\definecolor{kelly}{rgb}{0.509803921568627, 0.576470588235294, 0.337254901960784}
\definecolor{jet}{rgb}{0.0745098039215686, 0.0823529411764706, 0.0862745098039216}
\definecolor{asher}{rgb}{0.333333333333333, 0.372549019607843, 0.380392156862745}
\definecolor{slate}{rgb}{0.192156862745098, 0.309803921568627, 0.309803921568627}
\definecolor{cranberry}{rgb}{0.901960784313726, 0.254901960784314, 0.450980392156863}
$$
</div>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
Macros: {
purple: ["{\\color{purple}{#1}}", 1],
navy: ["{\\color{navy}{#1}}", 1],
ruby: ["{\\color{ruby}{#1}}", 1],
alice: ["{\\color{alice}{#1}}", 1],
daisy: ["{\\color{daisy}{#1}}", 1],
coral: ["{\\color{coral}{#1}}", 1],
kelly: ["{\\color{kelly}{#1}}", 1],
jet: ["{\\color{jet}{#1}}", 1],
asher: ["{\\color{asher}{#1}}", 1],
slate: ["{\\color{slate}{#1}}", 1],
cranberry: ["{\\color{cranberry}{#1}}", 1]
},
loader: {load: ['[tex]/color']},
tex: {packages: {'[+]': ['color']}}
}
});
</script>
<style>
.purple {color: #5601A4;}
.navy {color: #0D3D56;}
.ruby {color: #9A2515;}
.alice {color: #107895;}
.daisy {color: #EBC944;}
.coral {color: #F26D21;}
.kelly {color: #829356;}
.jet {color: #131516;}
.asher {color: #555F61;}
.slate {color: #314F4F;}
.cranberry {color: #E64173;}
</style>
```{r flair_color, echo=FALSE}
library(flair)
purple <- "#5601A4"
navy <- "#0D3D56"
ruby <- "#9A2515"
alice <- "#107895"
daisy <- "#EBC944"
coral <- "#F26D21"
kelly <- "#829356"
jet <- "#131516"
asher <- "#555F61"
slate <- "#314F4F"
cranberry <- "#E64173"
```