| @@ -93,7 +93,7 @@ duo <- function( | |||
| code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css" | |||
| outfile = "xaringan-themer.css" | |||
| ) { | |||
| # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R | |||
| eval(parse(text = call_write_xaringan_theme())) | |||
| @@ -97,7 +97,7 @@ duo_accent <- function( | |||
| code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css" | |||
| outfile = "xaringan-themer.css" | |||
| ) { | |||
| # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R | |||
| eval(parse(text = call_write_xaringan_theme())) | |||
| @@ -97,7 +97,7 @@ duo_accent_inverse <- function( | |||
| code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css" | |||
| outfile = "xaringan-themer.css" | |||
| ) { | |||
| # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R | |||
| eval(parse(text = call_write_xaringan_theme())) | |||
| @@ -95,7 +95,7 @@ mono_accent <- function( | |||
| code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css" | |||
| outfile = "xaringan-themer.css" | |||
| ) { | |||
| # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R | |||
| eval(parse(text = call_write_xaringan_theme())) | |||
| @@ -95,7 +95,7 @@ mono_accent_inverse <- function( | |||
| code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css" | |||
| outfile = "xaringan-themer.css" | |||
| ) { | |||
| # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R | |||
| eval(parse(text = call_write_xaringan_theme())) | |||
| @@ -95,7 +95,7 @@ mono_dark <- function( | |||
| code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css" | |||
| outfile = "xaringan-themer.css" | |||
| ) { | |||
| # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R | |||
| eval(parse(text = call_write_xaringan_theme())) | |||
| @@ -95,7 +95,7 @@ mono_light <- function( | |||
| code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css" | |||
| outfile = "xaringan-themer.css" | |||
| ) { | |||
| # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R | |||
| eval(parse(text = call_write_xaringan_theme())) | |||
| @@ -89,7 +89,7 @@ solarized_dark <- function( | |||
| code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css" | |||
| outfile = "xaringan-themer.css" | |||
| ) { | |||
| # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R | |||
| eval(parse(text = call_write_xaringan_theme())) | |||
| @@ -89,7 +89,7 @@ solarized_light <- function( | |||
| code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css" | |||
| outfile = "xaringan-themer.css" | |||
| ) { | |||
| # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R | |||
| eval(parse(text = call_write_xaringan_theme())) | |||
| @@ -88,7 +88,7 @@ write_xaringan_theme <- function( | |||
| code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css" | |||
| outfile = "xaringan-themer.css" | |||
| ) { | |||
| # Make sure font names are wrapped in quotes if they have spaces | |||
| f_args <- names(formals(sys.function())) | |||
| @@ -37,20 +37,21 @@ devtools::install_github("gadenbuie/xaringanthemer") | |||
| ## Quick Intro | |||
| First, add `css: xaringan-themed.css` to your xaringan slides YAML header under `xaringan::moonreader:`. | |||
| First, add `css: xaringan-themer.css` to your xaringan slides YAML header under `xaringan::moonreader:`. | |||
| ```yaml | |||
| output: | |||
| xaringan::moon_reader: | |||
| lib_dir: libs | |||
| css: xaringan-themed.css | |||
| css: xaringan-themer.css | |||
| ``` | |||
| Then, in the first knitr chunk, load **xaringanthemer** and try one of the [theme functions](#themes). | |||
| Then, in the knitr setup chunk, load **xaringanthemer** and try one of the [theme functions](#themes). | |||
| ````markdown | |||
| ```{r setup, include = FALSE}`r ""` | |||
| options(htmltools.dir.version = FALSE) | |||
| library(xaringanthemer) | |||
| mono_light( | |||
| base_color = "#1c5253", | |||
| @@ -73,25 +74,25 @@ Use these functions to automatically create a consistent color palette for your | |||
| #### `mono_light()` | |||
| A light theme based around a single color | |||
| A light theme based around a single color. | |||
|  | |||
| #### `mono_dark()` | |||
| A dark theme based around a single color | |||
| A dark theme based around a single color. | |||
|  | |||
| #### `mono_accent()` | |||
| The default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.) | |||
| The default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.). | |||
|  | |||
| #### `mono_accent_inverse()` | |||
| An "inverted" default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.) | |||
| An "inverted" default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.). | |||
|  | |||
| @@ -138,7 +139,7 @@ To do this, your YAML header should look more-or-less like this: | |||
| output: | |||
| xaringan::moon_reader: | |||
| lib_dir: libs | |||
| css: ["xaringan-themed.css"] | |||
| css: ["xaringan-themer.css"] | |||
| nature: | |||
| highlightStyle: solarized-dark | |||
| highlightLines: true | |||
| @@ -28,22 +28,23 @@ devtools::install_github("gadenbuie/xaringanthemer") | |||
| ## Quick Intro | |||
| First, add `css: xaringan-themed.css` to your xaringan slides YAML | |||
| First, add `css: xaringan-themer.css` to your xaringan slides YAML | |||
| header under `xaringan::moonreader:`. | |||
| ``` yaml | |||
| output: | |||
| xaringan::moon_reader: | |||
| lib_dir: libs | |||
| css: xaringan-themed.css | |||
| css: xaringan-themer.css | |||
| ``` | |||
| Then, in the first knitr chunk, load **xaringanthemer** and try one of | |||
| Then, in the knitr setup chunk, load **xaringanthemer** and try one of | |||
| the [theme functions](#themes). | |||
| ```` markdown | |||
| ```{r setup, include = FALSE} | |||
| options(htmltools.dir.version = FALSE) | |||
| library(xaringanthemer) | |||
| mono_light( | |||
| base_color = "#1c5253", | |||
| @@ -68,27 +69,27 @@ for your slides, based around a single color. | |||
| #### `mono_light()` | |||
| A light theme based around a single color | |||
| A light theme based around a single color. | |||
|  | |||
| #### `mono_dark()` | |||
| A dark theme based around a single color | |||
| A dark theme based around a single color. | |||
|  | |||
| #### `mono_accent()` | |||
| The default xaringan theme with a single color used for color accents on | |||
| select elements (headers, bold text, etc.) | |||
| select elements (headers, bold text, etc.). | |||
|  | |||
| #### `mono_accent_inverse()` | |||
| An “inverted” default xaringan theme with a single color used for color | |||
| accents on select elements (headers, bold text, etc.) | |||
| accents on select elements (headers, bold text, etc.). | |||
|  | |||
| @@ -136,7 +137,7 @@ To do this, your YAML header should look more-or-less like this: | |||
| output: | |||
| xaringan::moon_reader: | |||
| lib_dir: libs | |||
| css: ["xaringan-themed.css"] | |||
| css: ["xaringan-themer.css"] | |||
| nature: | |||
| highlightStyle: solarized-dark | |||
| highlightLines: true | |||
| @@ -21,7 +21,7 @@ setup_theme_function <- function( | |||
| glue::glue("{f_name} <- function(") %,% | |||
| as.character(glue::glue_data( | |||
| tv, " {variable} = {ifelse(!stringr::str_detect(default, '^[{].+[}]$'), paste0('\"', default, '\"'), stringr::str_replace_all(default, '[{}]', ''))},")) %,% | |||
| " outfile = \"xaringan-themed.css\"" %,% | |||
| " outfile = \"xaringan-themer.css\"" %,% | |||
| ") {" | |||
| if (!is.null(body)) x <- c(x, body, "}") | |||
| if (file == "clip") { | |||
| @@ -35,7 +35,7 @@ duo(primary_color = "#1F4257", secondary_color = "#F97B64", | |||
| code_font_google = NULL, code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css") | |||
| outfile = "xaringan-themer.css") | |||
| } | |||
| \arguments{ | |||
| \item{primary_color}{Duotone Primary Color, defaults to #1F4257} | |||
| @@ -39,7 +39,7 @@ duo_accent(primary_color = "#006747", secondary_color = "#CFC493", | |||
| code_font_google = NULL, code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css") | |||
| outfile = "xaringan-themer.css") | |||
| } | |||
| \arguments{ | |||
| \item{primary_color}{Duotone Primary Color, defaults to #006747} | |||
| @@ -39,7 +39,7 @@ duo_accent_inverse(primary_color = "#006747", secondary_color = "#CFC493", | |||
| code_font_google = NULL, code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css") | |||
| outfile = "xaringan-themer.css") | |||
| } | |||
| \arguments{ | |||
| \item{primary_color}{Duotone Primary Color, defaults to #006747} | |||
| @@ -34,7 +34,7 @@ mono_accent(base_color = "#43418A", white_color = "#FFFFFF", | |||
| code_font_google = NULL, code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css") | |||
| outfile = "xaringan-themer.css") | |||
| } | |||
| \arguments{ | |||
| \item{base_color}{Monotone Base Color, works best with a strong color., defaults to #43418A} | |||
| @@ -34,7 +34,7 @@ mono_accent_inverse(base_color = "#3C989E", white_color = "#FFFFFF", | |||
| code_font_google = NULL, code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css") | |||
| outfile = "xaringan-themer.css") | |||
| } | |||
| \arguments{ | |||
| \item{base_color}{Monotone Base Color, works best with a light color., defaults to #3C989E} | |||
| @@ -34,7 +34,7 @@ mono_dark(base_color = "#cbf7ed", white_color = lighten_color(base_color, | |||
| code_font_google = NULL, code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css") | |||
| outfile = "xaringan-themer.css") | |||
| } | |||
| \arguments{ | |||
| \item{base_color}{Monotone Base Color, works best with a light color., defaults to #cbf7ed} | |||
| @@ -34,7 +34,7 @@ mono_light(base_color = "#23395b", white_color = lighten_color(base_color, | |||
| code_font_google = NULL, code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css") | |||
| outfile = "xaringan-themer.css") | |||
| } | |||
| \arguments{ | |||
| \item{base_color}{Monotone base color, works best with a strong color, defaults to #23395b} | |||
| @@ -29,7 +29,7 @@ solarized_dark(text_color = "#839496", header_color = "#dc322f", | |||
| code_font_google = NULL, code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css") | |||
| outfile = "xaringan-themer.css") | |||
| } | |||
| \arguments{ | |||
| \item{text_color}{Text Color, defaults to #839496} | |||
| @@ -29,7 +29,7 @@ solarized_light(text_color = "#657b83", header_color = "#dc322f", | |||
| code_font_google = NULL, code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css") | |||
| outfile = "xaringan-themer.css") | |||
| } | |||
| \arguments{ | |||
| \item{text_color}{Text Color, defaults to #657b83} | |||
| @@ -29,7 +29,7 @@ write_xaringan_theme(text_color = "#000", header_color = "#000", | |||
| code_font_google = NULL, code_font_family = "'Source Code Pro'", | |||
| code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700", | |||
| code_font_family_fallback = "'Lucida Console', Monaco", | |||
| outfile = "xaringan-themed.css") | |||
| outfile = "xaringan-themer.css") | |||
| } | |||
| \arguments{ | |||
| \item{text_color}{Text Color, defaults to #000} | |||