-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.qmd
121 lines (93 loc) · 4.2 KB
/
index.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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
---
title: "🎨 xaringanthemer"
description: "Give your xaringan slides some style without (much) CSS"
author: Garrick Aden-Buie
date: '2018-05-12'
slug: xaringanthemer
image: examples.gif
categories: ["Project"]
tags:
- xaringan
- R Package
- Slides
- Presentation
- R
- RStudio
links:
- icon: book # icon name without the 'fa-'
name: Docs
url: https://pkg.garrickadenbuie.com/xaringanthemer
- icon: braces-asterisk # icon name without the 'fa-'
name: CRAN
url: https://cran.r-project.org/package=xrainganthemer
- icon: robot # icon name without the 'fa-'
name: r-universe
url: https://gadenbuie.r-universe.dev/ui#package:xaringanthemer
- icon: github # icon name without the 'fa-'
name: Source
url: https://github.com/gadenbuie/xaringanthemer
- icon: download
name: Installation
url: "#installation"
- icon: info-circle-fill
name: Usage
url: "#usage"
---
[xt-src]: https://github.com/gadenbuie/xaringanthemer
[devtools]: https://github.com/r-lib/devtools
[xaringan]: https://github.com/yihui/xaringan
[xt-docs]: https://pkg.garrickadenbuie.com/xaringanthemer
<!-- https://buttons.github.io/ -->
<a class="github-button" href="https://github.com/gadenbuie" data-show-count="true" aria-label="Follow @gadenbuie on GitHub">Follow @gadenbuie</a>
<a class="github-button" href="https://github.com/gadenbuie/xaringanthemer" data-icon="octicon-star" data-show-count="true" aria-label="Star gadenbuie/xaringanthemer on GitHub">Star</a>
<a class="github-button" href="https://github.com/gadenbuie/xaringanthemer/fork" data-icon="octicon-repo-forked" data-show-count="true" aria-label="Fork gadenbuie/xaringanthemer on GitHub">Fork</a>
Give your [xaringan] slides some style with **xaringanthemer** within your `slides.Rmd` file without (much) CSS.

## Installation
**xaringanthemer** currently [lives on GitHub][xt-src].
```r
# install.packages("devtools")
devtools::install_github("gadenbuie/xaringanthemer")
```
Read on for a quick overview, or read through the [xaringanthemer documentation][xt-docs] for more information.
## Usage
<!-- Set link to theme-settings, template-variables, theme functions -->
[theme-settings]: https://pkg.garrickadenbuie.com/xaringanthemer/articles/xaringanthemer.html#theme-settings
[template-variables]: https://pkg.garrickadenbuie.com/xaringanthemer/articles/template-variables.html
[theme-functions]: https://pkg.garrickadenbuie.com/xaringanthemer/articles/singles/themes.html
First, add the `xaringan-themer.css` file to the YAML header of your xaringan slides.
```yaml
output:
xaringan::moon_reader:
lib_dir: libs
css: xaringan-themer.css
```
Then, in a hidden chunk just after the knitr setup chunk, load **xaringanthemer** and try one of the [theme functions][theme-functions].
````markdown
```{r xaringan-themer, include = FALSE}`r ""`
library(xaringanthemer)
mono_light(
base_color = "#1c5253",
header_font_google = google_font("Josefin Sans"),
text_font_google = google_font("Montserrat", "300", "300i"),
code_font_google = google_font("Droid Mono")
)
```
````

### Tab Completion
**xaringanthemer** is <kbd>Tab</kbd> friendly -- [use autocomplete to explore][theme-settings] the [template variables][template-variables] that you can adjust in each of the themes!

### R Markdown Template in RStudio
You can also skip the above and just create a *Ninja Themed Presentation* from the New R Markdown Document menu in RStudio.
<center>
{width=350px}
</center>
***
[xaringan]: https://github.com/yihui/xaringan
[remarkjs]: https://github.com/gnab/remark
**xaringanthemer** was built by [Garrick Aden-Buie](https://www.garrickadenbuie.com) ([@grrrck](https://twitter.com/grrrck)).
Big thank you to [Yihui Xie](https://yihui.name), especially for [xaringan].
Also thanks to [Ole Petter Bang](http://gnab.org) for [remark.js][remarkjs].
Feel free to [file an issue](https://github.com/gadenbuie/xaringanthemer/issues)
if you find a bug or have a theme suggestion -- or better yet, submit a pull request!