Просмотр исходного кода

Add xaringanthemer_font_default()

Avoids note for long argument length and allows for more consistent checking if supplied arguments are default values
tags/v0.3.0
Garrick Aden-Buie 6 лет назад
Родитель
Сommit
78d38c2400
44 измененных файлов: 977 добавлений и 869 удалений
  1. +1
    -0
      NAMESPACE
  2. +1
    -1
      R/ggplot2.R
  3. +41
    -37
      R/style_duo.R
  4. +41
    -37
      R/style_duo_accent.R
  5. +41
    -37
      R/style_duo_accent_inverse.R
  6. +27
    -0
      R/style_font_default.R
  7. +41
    -37
      R/style_mono_accent.R
  8. +41
    -37
      R/style_mono_accent_inverse.R
  9. +41
    -37
      R/style_mono_dark.R
  10. +41
    -37
      R/style_mono_light.R
  11. +41
    -37
      R/style_solarized_dark.R
  12. +41
    -37
      R/style_solarized_light.R
  13. +74
    -60
      R/style_xaringan.R
  14. Двоичные данные
      R/sysdata.rda
  15. +10
    -10
      data-raw/theme_template_variables.R
  16. +5
    -0
      inst/rmarkdown/templates/xaringanthemer/skeleton/skeleton.Rmd
  17. +33
    -23
      inst/scripts/style_xaringan_body.R
  18. +42
    -42
      man/style_duo.Rd
  19. +42
    -42
      man/style_duo_accent.Rd
  20. +42
    -42
      man/style_duo_accent_inverse.Rd
  21. +42
    -42
      man/style_mono_accent.Rd
  22. +42
    -42
      man/style_mono_accent_inverse.Rd
  23. +42
    -42
      man/style_mono_dark.Rd
  24. +42
    -42
      man/style_mono_light.Rd
  25. +42
    -42
      man/style_solarized_dark.Rd
  26. +42
    -42
      man/style_solarized_light.Rd
  27. +55
    -43
      man/style_xaringan.Rd
  28. +1
    -1
      man/theme_xaringan_get_value.Rd
  29. +1
    -1
      tests/testthat/css/duo-header_bg.css
  30. +1
    -1
      tests/testthat/css/duo.css
  31. +1
    -1
      tests/testthat/css/duo_accent.css
  32. +1
    -1
      tests/testthat/css/duo_accent_inverse.css
  33. +1
    -1
      tests/testthat/css/google_fonts.css
  34. +1
    -1
      tests/testthat/css/mono_accent.css
  35. +1
    -1
      tests/testthat/css/mono_accent_inverse.css
  36. +1
    -1
      tests/testthat/css/mono_dark.css
  37. +1
    -1
      tests/testthat/css/mono_light-header_bg.css
  38. +1
    -1
      tests/testthat/css/mono_light.css
  39. +1
    -1
      tests/testthat/css/solarized_dark-header_bg.css
  40. +1
    -1
      tests/testthat/css/solarized_dark.css
  41. +1
    -1
      tests/testthat/css/solarized_light.css
  42. +1
    -1
      tests/testthat/css/xaringan.css
  43. +5
    -4
      tests/testthat/test-ggplot2.R
  44. +4
    -2
      tests/testthat/test-themes.R

+ 1
- 0
NAMESPACE Просмотреть файл

@@ -42,6 +42,7 @@ export(theme_xaringan_restore_defaults)
export(theme_xaringan_set_defaults)
export(write_extra_css)
export(write_xaringan_theme)
export(xaringanthemer_font_default)
importFrom(grDevices,col2rgb)
importFrom(grDevices,hsv)
importFrom(grDevices,rgb)

+ 1
- 1
R/ggplot2.R Просмотреть файл

@@ -913,7 +913,7 @@ requires_xaringanthemer_env <- function(
#' - `header_color`
#' - `header_font_family`
#' - `header_font_google`
#' - `hedaer_font_is_google`
#' - `header_font_is_google`
#' - `header_font_url`
#' - `header_font_weight`
#' - `header_h1_font_size`

+ 41
- 37
R/style_duo.R Просмотреть файл

@@ -195,23 +195,24 @@
#' @param text_font_google Use `google_font()` to specify body font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param text_font_family Body Text Font Family (xaringan default is
#' `'Droid Serif'`). Defaults to Noto Sans. Modifies the `body` element. The
#' value of this variable is also stored as a CSS variable that can be
#' referenced with `var(--text-font-family)` in any argument of a style
#' function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to normal. Modifies
#' the `body` element. Accepts CSS
#' `'Droid Serif'`). Defaults to
#' `xaringanthemer_font_default("text_font_family")`. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to
#' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body`
#' element. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param text_font_url Body Text Font URL(s). Defaults to
#' https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
#' Modifies the `@import url()` elements.
#' `xaringanthemer_font_default("text_font_url")`. Modifies the
#' `@import url()` elements.
#' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
#' -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
#' helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family-fallback)` in any argument
#' of a style function or in custom CSS.
#' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the
#' `body` element. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--text-font-family-fallback)` in
#' any argument of a style function or in custom CSS.
#' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
#' to sans-serif. Modifies the `body` element. The value of this variable is
#' also stored as a CSS variable that can be referenced with
@@ -220,22 +221,25 @@
#' @param header_font_google Use `google_font()` to specify header font.
#' Defaults to `NULL`. Modifies the `body` element.
#' @param header_font_family Header Font Family (xaringan default is
#' `'Yanone Kaffeesatz'`). Defaults to Cabin. Modifies the `h1, h2, h3`
#' elements. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--header-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to 600. Modifies the
#' `'Yanone Kaffeesatz'`). Defaults to
#' `xaringanthemer_font_default("header_font_family")`. Modifies the
#' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--header-font-family)` in any
#' argument of a style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to
#' `xaringanthemer_font_default("header_font_weight")`. Modifies the
#' `h1, h2, h3` elements. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param header_font_url Header Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
#' Modifies the `@import url` elements.
#' `xaringanthemer_font_default("header_font_url")`. Modifies the
#' `@import url` elements.
#' @param code_font_google Use `google_font()` to specify code font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param code_font_family Code Font Family. Defaults to Source Code Pro.
#' Modifies the `.remark-code, .remark-inline-code` classes. The value of
#' this variable is also stored as a CSS variable that can be referenced with
#' @param code_font_family Code Font Family. Defaults to
#' `xaringanthemer_font_default("code_font_family")`. Modifies the
#' `.remark-code, .remark-inline-code` classes. The value of this variable is
#' also stored as a CSS variable that can be referenced with
#' `var(--code-font-family)` in any argument of a style function or in custom
#' CSS.
#' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
@@ -245,10 +249,10 @@
#' variable that can be referenced with `var(--code-font-size)` in any
#' argument of a style function or in custom CSS.
#' @param code_font_url Code Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
#' Modifies the `@import url` elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to Menlo,
#' Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
#' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url`
#' elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to
#' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the
#' `.remark-code, .remark-inline-code` classes.
#' @template theme_params
#' @template style-usage
@@ -303,20 +307,20 @@ style_duo <- function(
header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,

+ 41
- 37
R/style_duo_accent.R Просмотреть файл

@@ -207,23 +207,24 @@
#' @param text_font_google Use `google_font()` to specify body font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param text_font_family Body Text Font Family (xaringan default is
#' `'Droid Serif'`). Defaults to Noto Sans. Modifies the `body` element. The
#' value of this variable is also stored as a CSS variable that can be
#' referenced with `var(--text-font-family)` in any argument of a style
#' function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to normal. Modifies
#' the `body` element. Accepts CSS
#' `'Droid Serif'`). Defaults to
#' `xaringanthemer_font_default("text_font_family")`. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to
#' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body`
#' element. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param text_font_url Body Text Font URL(s). Defaults to
#' https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
#' Modifies the `@import url()` elements.
#' `xaringanthemer_font_default("text_font_url")`. Modifies the
#' `@import url()` elements.
#' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
#' -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
#' helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family-fallback)` in any argument
#' of a style function or in custom CSS.
#' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the
#' `body` element. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--text-font-family-fallback)` in
#' any argument of a style function or in custom CSS.
#' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
#' to sans-serif. Modifies the `body` element. The value of this variable is
#' also stored as a CSS variable that can be referenced with
@@ -232,22 +233,25 @@
#' @param header_font_google Use `google_font()` to specify header font.
#' Defaults to `NULL`. Modifies the `body` element.
#' @param header_font_family Header Font Family (xaringan default is
#' `'Yanone Kaffeesatz'`). Defaults to Cabin. Modifies the `h1, h2, h3`
#' elements. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--header-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to 600. Modifies the
#' `'Yanone Kaffeesatz'`). Defaults to
#' `xaringanthemer_font_default("header_font_family")`. Modifies the
#' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--header-font-family)` in any
#' argument of a style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to
#' `xaringanthemer_font_default("header_font_weight")`. Modifies the
#' `h1, h2, h3` elements. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param header_font_url Header Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
#' Modifies the `@import url` elements.
#' `xaringanthemer_font_default("header_font_url")`. Modifies the
#' `@import url` elements.
#' @param code_font_google Use `google_font()` to specify code font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param code_font_family Code Font Family. Defaults to Source Code Pro.
#' Modifies the `.remark-code, .remark-inline-code` classes. The value of
#' this variable is also stored as a CSS variable that can be referenced with
#' @param code_font_family Code Font Family. Defaults to
#' `xaringanthemer_font_default("code_font_family")`. Modifies the
#' `.remark-code, .remark-inline-code` classes. The value of this variable is
#' also stored as a CSS variable that can be referenced with
#' `var(--code-font-family)` in any argument of a style function or in custom
#' CSS.
#' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
@@ -257,10 +261,10 @@
#' variable that can be referenced with `var(--code-font-size)` in any
#' argument of a style function or in custom CSS.
#' @param code_font_url Code Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
#' Modifies the `@import url` elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to Menlo,
#' Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
#' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url`
#' elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to
#' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the
#' `.remark-code, .remark-inline-code` classes.
#' @template theme_params
#' @template style-usage
@@ -317,20 +321,20 @@ style_duo_accent <- function(
header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,

+ 41
- 37
R/style_duo_accent_inverse.R Просмотреть файл

@@ -208,23 +208,24 @@
#' @param text_font_google Use `google_font()` to specify body font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param text_font_family Body Text Font Family (xaringan default is
#' `'Droid Serif'`). Defaults to Noto Sans. Modifies the `body` element. The
#' value of this variable is also stored as a CSS variable that can be
#' referenced with `var(--text-font-family)` in any argument of a style
#' function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to normal. Modifies
#' the `body` element. Accepts CSS
#' `'Droid Serif'`). Defaults to
#' `xaringanthemer_font_default("text_font_family")`. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to
#' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body`
#' element. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param text_font_url Body Text Font URL(s). Defaults to
#' https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
#' Modifies the `@import url()` elements.
#' `xaringanthemer_font_default("text_font_url")`. Modifies the
#' `@import url()` elements.
#' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
#' -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
#' helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family-fallback)` in any argument
#' of a style function or in custom CSS.
#' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the
#' `body` element. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--text-font-family-fallback)` in
#' any argument of a style function or in custom CSS.
#' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
#' to sans-serif. Modifies the `body` element. The value of this variable is
#' also stored as a CSS variable that can be referenced with
@@ -233,22 +234,25 @@
#' @param header_font_google Use `google_font()` to specify header font.
#' Defaults to `NULL`. Modifies the `body` element.
#' @param header_font_family Header Font Family (xaringan default is
#' `'Yanone Kaffeesatz'`). Defaults to Cabin. Modifies the `h1, h2, h3`
#' elements. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--header-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to 600. Modifies the
#' `'Yanone Kaffeesatz'`). Defaults to
#' `xaringanthemer_font_default("header_font_family")`. Modifies the
#' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--header-font-family)` in any
#' argument of a style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to
#' `xaringanthemer_font_default("header_font_weight")`. Modifies the
#' `h1, h2, h3` elements. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param header_font_url Header Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
#' Modifies the `@import url` elements.
#' `xaringanthemer_font_default("header_font_url")`. Modifies the
#' `@import url` elements.
#' @param code_font_google Use `google_font()` to specify code font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param code_font_family Code Font Family. Defaults to Source Code Pro.
#' Modifies the `.remark-code, .remark-inline-code` classes. The value of
#' this variable is also stored as a CSS variable that can be referenced with
#' @param code_font_family Code Font Family. Defaults to
#' `xaringanthemer_font_default("code_font_family")`. Modifies the
#' `.remark-code, .remark-inline-code` classes. The value of this variable is
#' also stored as a CSS variable that can be referenced with
#' `var(--code-font-family)` in any argument of a style function or in custom
#' CSS.
#' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
@@ -258,10 +262,10 @@
#' variable that can be referenced with `var(--code-font-size)` in any
#' argument of a style function or in custom CSS.
#' @param code_font_url Code Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
#' Modifies the `@import url` elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to Menlo,
#' Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
#' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url`
#' elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to
#' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the
#' `.remark-code, .remark-inline-code` classes.
#' @template theme_params
#' @template style-usage
@@ -318,20 +322,20 @@ style_duo_accent_inverse <- function(
header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,

+ 27
- 0
R/style_font_default.R Просмотреть файл

@@ -0,0 +1,27 @@
#' @describeIn style_xaringan Default values for font family, wieght, URLs and
#' font fallbacks.
#' @param font_arg A font argument from the \pkg{xaringanthemer} `style_`
#' function family.
#' @export
xaringanthemer_font_default <- function(font_arg) {
x <- switch(
font_arg,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
code_font_family = "Source Code Pro",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
stop("unknown font_arg: ", font_arg)
)
class(x) <- c("xaringanthemer_default", class(x))
x
}

print.xaringanthemer_default <- function(x) {
print(unclass(x))
}

+ 41
- 37
R/style_mono_accent.R Просмотреть файл

@@ -198,23 +198,24 @@
#' @param text_font_google Use `google_font()` to specify body font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param text_font_family Body Text Font Family (xaringan default is
#' `'Droid Serif'`). Defaults to Noto Sans. Modifies the `body` element. The
#' value of this variable is also stored as a CSS variable that can be
#' referenced with `var(--text-font-family)` in any argument of a style
#' function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to normal. Modifies
#' the `body` element. Accepts CSS
#' `'Droid Serif'`). Defaults to
#' `xaringanthemer_font_default("text_font_family")`. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to
#' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body`
#' element. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param text_font_url Body Text Font URL(s). Defaults to
#' https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
#' Modifies the `@import url()` elements.
#' `xaringanthemer_font_default("text_font_url")`. Modifies the
#' `@import url()` elements.
#' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
#' -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
#' helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family-fallback)` in any argument
#' of a style function or in custom CSS.
#' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the
#' `body` element. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--text-font-family-fallback)` in
#' any argument of a style function or in custom CSS.
#' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
#' to sans-serif. Modifies the `body` element. The value of this variable is
#' also stored as a CSS variable that can be referenced with
@@ -223,22 +224,25 @@
#' @param header_font_google Use `google_font()` to specify header font.
#' Defaults to `NULL`. Modifies the `body` element.
#' @param header_font_family Header Font Family (xaringan default is
#' `'Yanone Kaffeesatz'`). Defaults to Cabin. Modifies the `h1, h2, h3`
#' elements. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--header-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to 600. Modifies the
#' `'Yanone Kaffeesatz'`). Defaults to
#' `xaringanthemer_font_default("header_font_family")`. Modifies the
#' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--header-font-family)` in any
#' argument of a style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to
#' `xaringanthemer_font_default("header_font_weight")`. Modifies the
#' `h1, h2, h3` elements. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param header_font_url Header Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
#' Modifies the `@import url` elements.
#' `xaringanthemer_font_default("header_font_url")`. Modifies the
#' `@import url` elements.
#' @param code_font_google Use `google_font()` to specify code font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param code_font_family Code Font Family. Defaults to Source Code Pro.
#' Modifies the `.remark-code, .remark-inline-code` classes. The value of
#' this variable is also stored as a CSS variable that can be referenced with
#' @param code_font_family Code Font Family. Defaults to
#' `xaringanthemer_font_default("code_font_family")`. Modifies the
#' `.remark-code, .remark-inline-code` classes. The value of this variable is
#' also stored as a CSS variable that can be referenced with
#' `var(--code-font-family)` in any argument of a style function or in custom
#' CSS.
#' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
@@ -248,10 +252,10 @@
#' variable that can be referenced with `var(--code-font-size)` in any
#' argument of a style function or in custom CSS.
#' @param code_font_url Code Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
#' Modifies the `@import url` elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to Menlo,
#' Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
#' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url`
#' elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to
#' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the
#' `.remark-code, .remark-inline-code` classes.
#' @template theme_params
#' @template style-usage
@@ -307,20 +311,20 @@ style_mono_accent <- function(
header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,

+ 41
- 37
R/style_mono_accent_inverse.R Просмотреть файл

@@ -199,23 +199,24 @@
#' @param text_font_google Use `google_font()` to specify body font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param text_font_family Body Text Font Family (xaringan default is
#' `'Droid Serif'`). Defaults to Noto Sans. Modifies the `body` element. The
#' value of this variable is also stored as a CSS variable that can be
#' referenced with `var(--text-font-family)` in any argument of a style
#' function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to normal. Modifies
#' the `body` element. Accepts CSS
#' `'Droid Serif'`). Defaults to
#' `xaringanthemer_font_default("text_font_family")`. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to
#' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body`
#' element. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param text_font_url Body Text Font URL(s). Defaults to
#' https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
#' Modifies the `@import url()` elements.
#' `xaringanthemer_font_default("text_font_url")`. Modifies the
#' `@import url()` elements.
#' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
#' -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
#' helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family-fallback)` in any argument
#' of a style function or in custom CSS.
#' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the
#' `body` element. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--text-font-family-fallback)` in
#' any argument of a style function or in custom CSS.
#' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
#' to sans-serif. Modifies the `body` element. The value of this variable is
#' also stored as a CSS variable that can be referenced with
@@ -224,22 +225,25 @@
#' @param header_font_google Use `google_font()` to specify header font.
#' Defaults to `NULL`. Modifies the `body` element.
#' @param header_font_family Header Font Family (xaringan default is
#' `'Yanone Kaffeesatz'`). Defaults to Cabin. Modifies the `h1, h2, h3`
#' elements. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--header-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to 600. Modifies the
#' `'Yanone Kaffeesatz'`). Defaults to
#' `xaringanthemer_font_default("header_font_family")`. Modifies the
#' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--header-font-family)` in any
#' argument of a style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to
#' `xaringanthemer_font_default("header_font_weight")`. Modifies the
#' `h1, h2, h3` elements. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param header_font_url Header Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
#' Modifies the `@import url` elements.
#' `xaringanthemer_font_default("header_font_url")`. Modifies the
#' `@import url` elements.
#' @param code_font_google Use `google_font()` to specify code font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param code_font_family Code Font Family. Defaults to Source Code Pro.
#' Modifies the `.remark-code, .remark-inline-code` classes. The value of
#' this variable is also stored as a CSS variable that can be referenced with
#' @param code_font_family Code Font Family. Defaults to
#' `xaringanthemer_font_default("code_font_family")`. Modifies the
#' `.remark-code, .remark-inline-code` classes. The value of this variable is
#' also stored as a CSS variable that can be referenced with
#' `var(--code-font-family)` in any argument of a style function or in custom
#' CSS.
#' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
@@ -249,10 +253,10 @@
#' variable that can be referenced with `var(--code-font-size)` in any
#' argument of a style function or in custom CSS.
#' @param code_font_url Code Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
#' Modifies the `@import url` elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to Menlo,
#' Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
#' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url`
#' elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to
#' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the
#' `.remark-code, .remark-inline-code` classes.
#' @template theme_params
#' @template style-usage
@@ -308,20 +312,20 @@ style_mono_accent_inverse <- function(
header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,

+ 41
- 37
R/style_mono_dark.R Просмотреть файл

@@ -200,23 +200,24 @@
#' @param text_font_google Use `google_font()` to specify body font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param text_font_family Body Text Font Family (xaringan default is
#' `'Droid Serif'`). Defaults to Noto Sans. Modifies the `body` element. The
#' value of this variable is also stored as a CSS variable that can be
#' referenced with `var(--text-font-family)` in any argument of a style
#' function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to normal. Modifies
#' the `body` element. Accepts CSS
#' `'Droid Serif'`). Defaults to
#' `xaringanthemer_font_default("text_font_family")`. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to
#' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body`
#' element. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param text_font_url Body Text Font URL(s). Defaults to
#' https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
#' Modifies the `@import url()` elements.
#' `xaringanthemer_font_default("text_font_url")`. Modifies the
#' `@import url()` elements.
#' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
#' -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
#' helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family-fallback)` in any argument
#' of a style function or in custom CSS.
#' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the
#' `body` element. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--text-font-family-fallback)` in
#' any argument of a style function or in custom CSS.
#' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
#' to sans-serif. Modifies the `body` element. The value of this variable is
#' also stored as a CSS variable that can be referenced with
@@ -225,22 +226,25 @@
#' @param header_font_google Use `google_font()` to specify header font.
#' Defaults to `NULL`. Modifies the `body` element.
#' @param header_font_family Header Font Family (xaringan default is
#' `'Yanone Kaffeesatz'`). Defaults to Cabin. Modifies the `h1, h2, h3`
#' elements. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--header-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to 600. Modifies the
#' `'Yanone Kaffeesatz'`). Defaults to
#' `xaringanthemer_font_default("header_font_family")`. Modifies the
#' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--header-font-family)` in any
#' argument of a style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to
#' `xaringanthemer_font_default("header_font_weight")`. Modifies the
#' `h1, h2, h3` elements. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param header_font_url Header Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
#' Modifies the `@import url` elements.
#' `xaringanthemer_font_default("header_font_url")`. Modifies the
#' `@import url` elements.
#' @param code_font_google Use `google_font()` to specify code font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param code_font_family Code Font Family. Defaults to Source Code Pro.
#' Modifies the `.remark-code, .remark-inline-code` classes. The value of
#' this variable is also stored as a CSS variable that can be referenced with
#' @param code_font_family Code Font Family. Defaults to
#' `xaringanthemer_font_default("code_font_family")`. Modifies the
#' `.remark-code, .remark-inline-code` classes. The value of this variable is
#' also stored as a CSS variable that can be referenced with
#' `var(--code-font-family)` in any argument of a style function or in custom
#' CSS.
#' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
@@ -250,10 +254,10 @@
#' variable that can be referenced with `var(--code-font-size)` in any
#' argument of a style function or in custom CSS.
#' @param code_font_url Code Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
#' Modifies the `@import url` elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to Menlo,
#' Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
#' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url`
#' elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to
#' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the
#' `.remark-code, .remark-inline-code` classes.
#' @template theme_params
#' @template style-usage
@@ -309,20 +313,20 @@ style_mono_dark <- function(
header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,

+ 41
- 37
R/style_mono_light.R Просмотреть файл

@@ -200,23 +200,24 @@
#' @param text_font_google Use `google_font()` to specify body font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param text_font_family Body Text Font Family (xaringan default is
#' `'Droid Serif'`). Defaults to Noto Sans. Modifies the `body` element. The
#' value of this variable is also stored as a CSS variable that can be
#' referenced with `var(--text-font-family)` in any argument of a style
#' function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to normal. Modifies
#' the `body` element. Accepts CSS
#' `'Droid Serif'`). Defaults to
#' `xaringanthemer_font_default("text_font_family")`. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to
#' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body`
#' element. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param text_font_url Body Text Font URL(s). Defaults to
#' https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
#' Modifies the `@import url()` elements.
#' `xaringanthemer_font_default("text_font_url")`. Modifies the
#' `@import url()` elements.
#' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
#' -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
#' helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family-fallback)` in any argument
#' of a style function or in custom CSS.
#' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the
#' `body` element. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--text-font-family-fallback)` in
#' any argument of a style function or in custom CSS.
#' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
#' to sans-serif. Modifies the `body` element. The value of this variable is
#' also stored as a CSS variable that can be referenced with
@@ -225,22 +226,25 @@
#' @param header_font_google Use `google_font()` to specify header font.
#' Defaults to `NULL`. Modifies the `body` element.
#' @param header_font_family Header Font Family (xaringan default is
#' `'Yanone Kaffeesatz'`). Defaults to Cabin. Modifies the `h1, h2, h3`
#' elements. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--header-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to 600. Modifies the
#' `'Yanone Kaffeesatz'`). Defaults to
#' `xaringanthemer_font_default("header_font_family")`. Modifies the
#' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--header-font-family)` in any
#' argument of a style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to
#' `xaringanthemer_font_default("header_font_weight")`. Modifies the
#' `h1, h2, h3` elements. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param header_font_url Header Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
#' Modifies the `@import url` elements.
#' `xaringanthemer_font_default("header_font_url")`. Modifies the
#' `@import url` elements.
#' @param code_font_google Use `google_font()` to specify code font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param code_font_family Code Font Family. Defaults to Source Code Pro.
#' Modifies the `.remark-code, .remark-inline-code` classes. The value of
#' this variable is also stored as a CSS variable that can be referenced with
#' @param code_font_family Code Font Family. Defaults to
#' `xaringanthemer_font_default("code_font_family")`. Modifies the
#' `.remark-code, .remark-inline-code` classes. The value of this variable is
#' also stored as a CSS variable that can be referenced with
#' `var(--code-font-family)` in any argument of a style function or in custom
#' CSS.
#' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
@@ -250,10 +254,10 @@
#' variable that can be referenced with `var(--code-font-size)` in any
#' argument of a style function or in custom CSS.
#' @param code_font_url Code Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
#' Modifies the `@import url` elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to Menlo,
#' Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
#' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url`
#' elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to
#' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the
#' `.remark-code, .remark-inline-code` classes.
#' @template theme_params
#' @template style-usage
@@ -309,20 +313,20 @@ style_mono_light <- function(
header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,

+ 41
- 37
R/style_solarized_dark.R Просмотреть файл

@@ -185,23 +185,24 @@
#' @param text_font_google Use `google_font()` to specify body font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param text_font_family Body Text Font Family (xaringan default is
#' `'Droid Serif'`). Defaults to Noto Sans. Modifies the `body` element. The
#' value of this variable is also stored as a CSS variable that can be
#' referenced with `var(--text-font-family)` in any argument of a style
#' function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to normal. Modifies
#' the `body` element. Accepts CSS
#' `'Droid Serif'`). Defaults to
#' `xaringanthemer_font_default("text_font_family")`. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to
#' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body`
#' element. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param text_font_url Body Text Font URL(s). Defaults to
#' https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
#' Modifies the `@import url()` elements.
#' `xaringanthemer_font_default("text_font_url")`. Modifies the
#' `@import url()` elements.
#' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
#' -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
#' helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family-fallback)` in any argument
#' of a style function or in custom CSS.
#' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the
#' `body` element. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--text-font-family-fallback)` in
#' any argument of a style function or in custom CSS.
#' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
#' to sans-serif. Modifies the `body` element. The value of this variable is
#' also stored as a CSS variable that can be referenced with
@@ -210,22 +211,25 @@
#' @param header_font_google Use `google_font()` to specify header font.
#' Defaults to `NULL`. Modifies the `body` element.
#' @param header_font_family Header Font Family (xaringan default is
#' `'Yanone Kaffeesatz'`). Defaults to Cabin. Modifies the `h1, h2, h3`
#' elements. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--header-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to 600. Modifies the
#' `'Yanone Kaffeesatz'`). Defaults to
#' `xaringanthemer_font_default("header_font_family")`. Modifies the
#' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--header-font-family)` in any
#' argument of a style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to
#' `xaringanthemer_font_default("header_font_weight")`. Modifies the
#' `h1, h2, h3` elements. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param header_font_url Header Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
#' Modifies the `@import url` elements.
#' `xaringanthemer_font_default("header_font_url")`. Modifies the
#' `@import url` elements.
#' @param code_font_google Use `google_font()` to specify code font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param code_font_family Code Font Family. Defaults to Source Code Pro.
#' Modifies the `.remark-code, .remark-inline-code` classes. The value of
#' this variable is also stored as a CSS variable that can be referenced with
#' @param code_font_family Code Font Family. Defaults to
#' `xaringanthemer_font_default("code_font_family")`. Modifies the
#' `.remark-code, .remark-inline-code` classes. The value of this variable is
#' also stored as a CSS variable that can be referenced with
#' `var(--code-font-family)` in any argument of a style function or in custom
#' CSS.
#' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
@@ -235,10 +239,10 @@
#' variable that can be referenced with `var(--code-font-size)` in any
#' argument of a style function or in custom CSS.
#' @param code_font_url Code Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
#' Modifies the `@import url` elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to Menlo,
#' Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
#' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url`
#' elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to
#' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the
#' `.remark-code, .remark-inline-code` classes.
#' @template theme_params
#' @template style-usage
@@ -291,20 +295,20 @@ style_solarized_dark <- function(
header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,

+ 41
- 37
R/style_solarized_light.R Просмотреть файл

@@ -185,23 +185,24 @@
#' @param text_font_google Use `google_font()` to specify body font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param text_font_family Body Text Font Family (xaringan default is
#' `'Droid Serif'`). Defaults to Noto Sans. Modifies the `body` element. The
#' value of this variable is also stored as a CSS variable that can be
#' referenced with `var(--text-font-family)` in any argument of a style
#' function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to normal. Modifies
#' the `body` element. Accepts CSS
#' `'Droid Serif'`). Defaults to
#' `xaringanthemer_font_default("text_font_family")`. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to
#' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body`
#' element. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param text_font_url Body Text Font URL(s). Defaults to
#' https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
#' Modifies the `@import url()` elements.
#' `xaringanthemer_font_default("text_font_url")`. Modifies the
#' `@import url()` elements.
#' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
#' -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
#' helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family-fallback)` in any argument
#' of a style function or in custom CSS.
#' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the
#' `body` element. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--text-font-family-fallback)` in
#' any argument of a style function or in custom CSS.
#' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
#' to sans-serif. Modifies the `body` element. The value of this variable is
#' also stored as a CSS variable that can be referenced with
@@ -210,22 +211,25 @@
#' @param header_font_google Use `google_font()` to specify header font.
#' Defaults to `NULL`. Modifies the `body` element.
#' @param header_font_family Header Font Family (xaringan default is
#' `'Yanone Kaffeesatz'`). Defaults to Cabin. Modifies the `h1, h2, h3`
#' elements. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--header-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to 600. Modifies the
#' `'Yanone Kaffeesatz'`). Defaults to
#' `xaringanthemer_font_default("header_font_family")`. Modifies the
#' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--header-font-family)` in any
#' argument of a style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to
#' `xaringanthemer_font_default("header_font_weight")`. Modifies the
#' `h1, h2, h3` elements. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param header_font_url Header Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
#' Modifies the `@import url` elements.
#' `xaringanthemer_font_default("header_font_url")`. Modifies the
#' `@import url` elements.
#' @param code_font_google Use `google_font()` to specify code font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param code_font_family Code Font Family. Defaults to Source Code Pro.
#' Modifies the `.remark-code, .remark-inline-code` classes. The value of
#' this variable is also stored as a CSS variable that can be referenced with
#' @param code_font_family Code Font Family. Defaults to
#' `xaringanthemer_font_default("code_font_family")`. Modifies the
#' `.remark-code, .remark-inline-code` classes. The value of this variable is
#' also stored as a CSS variable that can be referenced with
#' `var(--code-font-family)` in any argument of a style function or in custom
#' CSS.
#' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
@@ -235,10 +239,10 @@
#' variable that can be referenced with `var(--code-font-size)` in any
#' argument of a style function or in custom CSS.
#' @param code_font_url Code Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
#' Modifies the `@import url` elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to Menlo,
#' Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
#' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url`
#' elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to
#' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the
#' `.remark-code, .remark-inline-code` classes.
#' @template theme_params
#' @template style-usage
@@ -291,20 +295,20 @@ style_solarized_light <- function(
header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,

+ 74
- 60
R/style_xaringan.R Просмотреть файл

@@ -185,23 +185,24 @@
#' @param text_font_google Use `google_font()` to specify body font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param text_font_family Body Text Font Family (xaringan default is
#' `'Droid Serif'`). Defaults to Noto Sans. Modifies the `body` element. The
#' value of this variable is also stored as a CSS variable that can be
#' referenced with `var(--text-font-family)` in any argument of a style
#' function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to normal. Modifies
#' the `body` element. Accepts CSS
#' `'Droid Serif'`). Defaults to
#' `xaringanthemer_font_default("text_font_family")`. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param text_font_weight Body Text Font Weight. Defaults to
#' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body`
#' element. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param text_font_url Body Text Font URL(s). Defaults to
#' https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
#' Modifies the `@import url()` elements.
#' `xaringanthemer_font_default("text_font_url")`. Modifies the
#' `@import url()` elements.
#' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
#' -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
#' helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the `body`
#' element. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--text-font-family-fallback)` in any argument
#' of a style function or in custom CSS.
#' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the
#' `body` element. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--text-font-family-fallback)` in
#' any argument of a style function or in custom CSS.
#' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
#' to sans-serif. Modifies the `body` element. The value of this variable is
#' also stored as a CSS variable that can be referenced with
@@ -210,22 +211,25 @@
#' @param header_font_google Use `google_font()` to specify header font.
#' Defaults to `NULL`. Modifies the `body` element.
#' @param header_font_family Header Font Family (xaringan default is
#' `'Yanone Kaffeesatz'`). Defaults to Cabin. Modifies the `h1, h2, h3`
#' elements. The value of this variable is also stored as a CSS variable that
#' can be referenced with `var(--header-font-family)` in any argument of a
#' style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to 600. Modifies the
#' `'Yanone Kaffeesatz'`). Defaults to
#' `xaringanthemer_font_default("header_font_family")`. Modifies the
#' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
#' variable that can be referenced with `var(--header-font-family)` in any
#' argument of a style function or in custom CSS.
#' @param header_font_weight Header Font Weight. Defaults to
#' `xaringanthemer_font_default("header_font_weight")`. Modifies the
#' `h1, h2, h3` elements. Accepts CSS
#' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
#' property values.
#' @param header_font_url Header Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
#' Modifies the `@import url` elements.
#' `xaringanthemer_font_default("header_font_url")`. Modifies the
#' `@import url` elements.
#' @param code_font_google Use `google_font()` to specify code font. Defaults
#' to `NULL`. Modifies the `body` element.
#' @param code_font_family Code Font Family. Defaults to Source Code Pro.
#' Modifies the `.remark-code, .remark-inline-code` classes. The value of
#' this variable is also stored as a CSS variable that can be referenced with
#' @param code_font_family Code Font Family. Defaults to
#' `xaringanthemer_font_default("code_font_family")`. Modifies the
#' `.remark-code, .remark-inline-code` classes. The value of this variable is
#' also stored as a CSS variable that can be referenced with
#' `var(--code-font-family)` in any argument of a style function or in custom
#' CSS.
#' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
@@ -235,10 +239,10 @@
#' variable that can be referenced with `var(--code-font-size)` in any
#' argument of a style function or in custom CSS.
#' @param code_font_url Code Font URL. Defaults to
#' https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
#' Modifies the `@import url` elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to Menlo,
#' Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
#' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url`
#' elements.
#' @param code_font_family_fallback Code Font Fallback. Defaults to
#' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the
#' `.remark-code, .remark-inline-code` classes.
#' @template theme_params
#' @template style-usage
@@ -290,26 +294,55 @@ style_xaringan <- function(
header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,
outfile = "xaringan-themer.css"
) {
# DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
force(text_font_family)
force(text_font_weight)
force(text_font_url)
force(text_font_family_fallback)
force(header_font_family)
force(header_font_weight)
force(header_font_url)
force(code_font_family)
force(code_font_url)
force(code_font_family_fallback)
# the defaults are google fonts
is_default <- function(type, suffix) {
# check if font arg value is from xaringanthemer_font_default
var <- paste0(type, "_", suffix)
inherits(
get(var, envir = parent.frame(2), inherits = FALSE),
"xaringanthemer_default"
)
}
for (var in c("text", "header", "code")) {
suffixes <- c("font_family", "font_weight", "font_url")
if (var == "code") suffixes <- setdiff(suffixes, "font_weight")
var_is_google <- all(vapply(suffixes, is_default, logical(1), type = var))
var_is_google <- as.integer(var_is_google)
r_set_font_is_google <- glue::glue("{var}_font_is_google <- {var_is_google}")
eval(parse(text = r_set_font_is_google))
}
# Make sure font names are wrapped in quotes if they have spaces
f_args <- names(formals(sys.function()))
for (var in f_args[grepl("font_family$", f_args)]) {
@@ -317,8 +350,6 @@ style_xaringan <- function(
if (!is.null(var_value)) {
eval(parse(text = paste0(var, "<-quote_elements_w_spaces(", var, ")")))
}
# set an is_google flag default of FALSE that is possibly overwritten later
eval(parse(text = paste0(sub("font_family$", "font_is_google", var), "<-0")))
}
# Warn if base_font_size isn't absolute
@@ -346,7 +377,10 @@ style_xaringan <- function(
if (group == "text") {
text_font_family <- quote_elements_w_spaces(gf$family)
text_font_weight <- gf$weights %||% "normal"
text_font_weight <- substr(text_font_weight, 1, regexpr(",", text_font_weight)[1] - 1)
if (grepl(",", text_font_weight)) {
# Use first font weight if multiple are imported
text_font_weight <- substr(text_font_weight, 1, regexpr(",", text_font_weight)[1] - 1)
}
text_font_url <- gf$url
} else {
eval(parse(text = paste0(group, "_font_family <- quote_elements_w_spaces(gf$family)")))
@@ -355,26 +389,6 @@ style_xaringan <- function(
eval(parse(text = paste0(group, "_font_is_google <- 1")))
}
is_default <- function(type, suffix, reference = style_xaringan) {
var <- paste0(type, "_", suffix)
default_value <- formals(reference)[[var]]
if (suffix == "font_family") {
default_value <- quote_elements_w_spaces(default_value)
}
get(var, envir = parent.frame(2), inherits = FALSE) == default_value
}
# the defaults are google fonts
for (var in c("text", "header", "code")) {
suffixes <- c("font_family", "font_weight", "font_url")
if (var == "code") suffixes <- setdiff(suffixes, "font_weight")
var_is_google <- all(vapply(suffixes, is_default, logical(1), type = var))
if (var_is_google) {
eval(parse(text = paste0(var, "_font_is_google <- 1")))
}
}
extra_font_imports <- if (is.null(extra_fonts)) "" else list2fonts(extra_fonts)
extra_font_imports <- paste(extra_font_imports, collapse = "\n")

Двоичные данные
R/sysdata.rda Просмотреть файл


+ 10
- 10
data-raw/theme_template_variables.R Просмотреть файл

@@ -46,20 +46,20 @@ template_variables <- tibble::tribble(
, "header_background_ignore_classes", "{c('normal', 'inverse', 'title', 'middle', 'bottom')}", ".remark-slide-content", "Slide Classes Where Header with Background will not be Applied", NA_character_
, "text_slide_number_font_size", "0.9em", ".remark-slide-number", "Slide Number Text Font Size", NA_character_
, "text_font_google", "{NULL}", "body", "Use `google_font()` to specify body font", NA_character_
, "text_font_family", "Noto Sans", "body", "Body Text Font Family (xaringan default is `'Droid Serif'`)", "--text-font-family"
, "text_font_weight", "normal", "body", "Body Text Font Weight", NA_character_
, "text_font_url", "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap", "@import url()", "Body Text Font URL(s)", NA_character_
, "text_font_family_fallback", "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial", "body", "Body Text Font Fallbacks", "--text-font-family-fallback"
, "text_font_family", '{xaringanthemer_font_default("text_font_family")}', "body", "Body Text Font Family (xaringan default is `'Droid Serif'`)", "--text-font-family"
, "text_font_weight", '{xaringanthemer_font_default("text_font_weight")}', "body", "Body Text Font Weight", NA_character_
, "text_font_url", '{xaringanthemer_font_default("text_font_url")}', "@import url()", "Body Text Font URL(s)", NA_character_
, "text_font_family_fallback", '{xaringanthemer_font_default("text_font_family_fallback")}', "body", "Body Text Font Fallbacks", "--text-font-family-fallback"
, "text_font_base", "sans-serif", "body", "Body Text Base Font (Total Failure Fallback)", "--text-font-base"
, "header_font_google", "{NULL}", "body", "Use `google_font()` to specify header font", NA_character_
, "header_font_family", "Cabin", "h1, h2, h3", "Header Font Family (xaringan default is `'Yanone Kaffeesatz'`)", "--header-font-family"
, "header_font_weight", "600", "h1, h2, h3", "Header Font Weight", NA_character_
, "header_font_url", "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap", "@import url", "Header Font URL", NA_character_
, "header_font_family", '{xaringanthemer_font_default("header_font_family")}', "h1, h2, h3", "Header Font Family (xaringan default is `'Yanone Kaffeesatz'`)", "--header-font-family"
, "header_font_weight", '{xaringanthemer_font_default("header_font_weight")}', "h1, h2, h3", "Header Font Weight", NA_character_
, "header_font_url", '{xaringanthemer_font_default("header_font_url")}', "@import url", "Header Font URL", NA_character_
, "code_font_google", "{NULL}", "body", "Use `google_font()` to specify code font", NA_character_
, "code_font_family", "Source Code Pro", ".remark-code, .remark-inline-code", "Code Font Family", "--code-font-family"
, "code_font_family", '{xaringanthemer_font_default("code_font_family")}', ".remark-code, .remark-inline-code", "Code Font Family", "--code-font-family"
, "code_font_size", "0.9rem", ".remark-inline", "Code Text Font Size", "--code-font-size"
, "code_font_url", "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap", "@import url", "Code Font URL", NA_character_
, "code_font_family_fallback", "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console", ".remark-code, .remark-inline-code", "Code Font Fallback", NA_character_
, "code_font_url", '{xaringanthemer_font_default("code_font_url")}', "@import url", "Code Font URL", NA_character_
, "code_font_family_fallback", '{xaringanthemer_font_default("code_font_family_fallback")}', ".remark-code, .remark-inline-code", "Code Font Fallback", NA_character_
)

set_default <- function(tv, ..., set_var = "default") {

+ 5
- 0
inst/rmarkdown/templates/xaringanthemer/skeleton/skeleton.Rmd Просмотреть файл

@@ -48,6 +48,11 @@ class: inverse, center, middle

---

```{r xaringan-themer, include=FALSE}
library(xaringanthemer)

```

# Hello World

Install the **xaringan** package from [Github](https://github.com/yihui/xaringan):

+ 33
- 23
inst/scripts/style_xaringan_body.R Просмотреть файл

@@ -1,3 +1,32 @@
force(text_font_family)
force(text_font_weight)
force(text_font_url)
force(text_font_family_fallback)
force(header_font_family)
force(header_font_weight)
force(header_font_url)
force(code_font_family)
force(code_font_url)
force(code_font_family_fallback)

# the defaults are google fonts
is_default <- function(type, suffix) {
# check if font arg value is from xaringanthemer_font_default
var <- paste0(type, "_", suffix)
inherits(
get(var, envir = parent.frame(2), inherits = FALSE),
"xaringanthemer_default"
)
}
for (var in c("text", "header", "code")) {
suffixes <- c("font_family", "font_weight", "font_url")
if (var == "code") suffixes <- setdiff(suffixes, "font_weight")
var_is_google <- all(vapply(suffixes, is_default, logical(1), type = var))
var_is_google <- as.integer(var_is_google)
r_set_font_is_google <- glue::glue("{var}_font_is_google <- {var_is_google}")
eval(parse(text = r_set_font_is_google))
}

# Make sure font names are wrapped in quotes if they have spaces
f_args <- names(formals(sys.function()))
for (var in f_args[grepl("font_family$", f_args)]) {
@@ -5,8 +34,6 @@ for (var in f_args[grepl("font_family$", f_args)]) {
if (!is.null(var_value)) {
eval(parse(text = paste0(var, "<-quote_elements_w_spaces(", var, ")")))
}
# set an is_google flag default of FALSE that is possibly overwritten later
eval(parse(text = paste0(sub("font_family$", "font_is_google", var), "<-0")))
}

# Warn if base_font_size isn't absolute
@@ -34,7 +61,10 @@ for (var in f_args[grepl("font_google$", f_args)]) {
if (group == "text") {
text_font_family <- quote_elements_w_spaces(gf$family)
text_font_weight <- gf$weights %||% "normal"
text_font_weight <- substr(text_font_weight, 1, regexpr(",", text_font_weight)[1] - 1)
if (grepl(",", text_font_weight)) {
# Use first font weight if multiple are imported
text_font_weight <- substr(text_font_weight, 1, regexpr(",", text_font_weight)[1] - 1)
}
text_font_url <- gf$url
} else {
eval(parse(text = paste0(group, "_font_family <- quote_elements_w_spaces(gf$family)")))
@@ -43,26 +73,6 @@ for (var in f_args[grepl("font_google$", f_args)]) {
eval(parse(text = paste0(group, "_font_is_google <- 1")))
}

is_default <- function(type, suffix, reference = style_xaringan) {
var <- paste0(type, "_", suffix)
default_value <- formals(reference)[[var]]
if (suffix == "font_family") {
default_value <- quote_elements_w_spaces(default_value)
}

get(var, envir = parent.frame(2), inherits = FALSE) == default_value
}

# the defaults are google fonts
for (var in c("text", "header", "code")) {
suffixes <- c("font_family", "font_weight", "font_url")
if (var == "code") suffixes <- setdiff(suffixes, "font_weight")
var_is_google <- all(vapply(suffixes, is_default, logical(1), type = var))
if (var_is_google) {
eval(parse(text = paste0(var, "_font_is_google <- 1")))
}
}

extra_font_imports <- if (is.null(extra_fonts)) "" else list2fonts(extra_fonts)
extra_font_imports <- paste(extra_font_imports, collapse = "\n")


+ 42
- 42
man/style_duo.Rd Просмотреть файл

@@ -53,24 +53,20 @@ style_duo(
header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,
@@ -320,26 +316,27 @@ property values.}
to \code{NULL}. Modifies the \code{body} element.}

\item{text_font_family}{Body Text Font Family (xaringan default is
\code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
value of this variable is also stored as a CSS variable that can be
referenced with \code{var(--text-font-family)} in any argument of a style
function or in custom CSS.}
\code{'Droid Serif'}). Defaults to
\code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family)} in any argument of a
style function or in custom CSS.}

\item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
the \code{body} element. Accepts CSS
\item{text_font_weight}{Body Text Font Weight. Defaults to
\code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body}
element. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{text_font_url}{Body Text Font URL(s). Defaults to
https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
Modifies the \verb{@import url()} elements.}
\code{xaringanthemer_font_default("text_font_url")}. Modifies the
\verb{@import url()} elements.}

\item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family-fallback)} in any argument
of a style function or in custom CSS.}
\code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the
\code{body} element. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--text-font-family-fallback)} in
any argument of a style function or in custom CSS.}

\item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
to sans-serif. Modifies the \code{body} element. The value of this variable is
@@ -351,26 +348,29 @@ CSS.}
Defaults to \code{NULL}. Modifies the \code{body} element.}

\item{header_font_family}{Header Font Family (xaringan default is
\code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
elements. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--header-font-family)} in any argument of a
style function or in custom CSS.}
\code{'Yanone Kaffeesatz'}). Defaults to
\code{xaringanthemer_font_default("header_font_family")}. Modifies the
\verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--header-font-family)} in any
argument of a style function or in custom CSS.}

\item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
\item{header_font_weight}{Header Font Weight. Defaults to
\code{xaringanthemer_font_default("header_font_weight")}. Modifies the
\verb{h1, h2, h3} elements. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{header_font_url}{Header Font URL. Defaults to
https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("header_font_url")}. Modifies the
\verb{@import url} elements.}

\item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
to \code{NULL}. Modifies the \code{body} element.}

\item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
this variable is also stored as a CSS variable that can be referenced with
\item{code_font_family}{Code Font Family. Defaults to
\code{xaringanthemer_font_default("code_font_family")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes. The value of this variable is
also stored as a CSS variable that can be referenced with
\code{var(--code-font-family)} in any argument of a style function or in custom
CSS.}

@@ -382,11 +382,11 @@ variable that can be referenced with \code{var(--code-font-size)} in any
argument of a style function or in custom CSS.}

\item{code_font_url}{Code Font URL. Defaults to
https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url}
elements.}

\item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
\item{code_font_family_fallback}{Code Font Fallback. Defaults to
\code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes.}

\item{colors}{A named vector of custom colors. The names of the colors
@@ -447,7 +447,7 @@ Other themes:
\code{\link{style_mono_light}()},
\code{\link{style_solarized_dark}()},
\code{\link{style_solarized_light}()},
\code{\link{style_xaringan}()}
\code{\link{xaringanthemer_font_default}()}

Other Duotone themes:
\code{\link{style_duo_accent_inverse}()},

+ 42
- 42
man/style_duo_accent.Rd Просмотреть файл

@@ -56,24 +56,20 @@ style_duo_accent(
header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,
@@ -337,26 +333,27 @@ property values.}
to \code{NULL}. Modifies the \code{body} element.}

\item{text_font_family}{Body Text Font Family (xaringan default is
\code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
value of this variable is also stored as a CSS variable that can be
referenced with \code{var(--text-font-family)} in any argument of a style
function or in custom CSS.}
\code{'Droid Serif'}). Defaults to
\code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family)} in any argument of a
style function or in custom CSS.}

\item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
the \code{body} element. Accepts CSS
\item{text_font_weight}{Body Text Font Weight. Defaults to
\code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body}
element. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{text_font_url}{Body Text Font URL(s). Defaults to
https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
Modifies the \verb{@import url()} elements.}
\code{xaringanthemer_font_default("text_font_url")}. Modifies the
\verb{@import url()} elements.}

\item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family-fallback)} in any argument
of a style function or in custom CSS.}
\code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the
\code{body} element. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--text-font-family-fallback)} in
any argument of a style function or in custom CSS.}

\item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
to sans-serif. Modifies the \code{body} element. The value of this variable is
@@ -368,26 +365,29 @@ CSS.}
Defaults to \code{NULL}. Modifies the \code{body} element.}

\item{header_font_family}{Header Font Family (xaringan default is
\code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
elements. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--header-font-family)} in any argument of a
style function or in custom CSS.}
\code{'Yanone Kaffeesatz'}). Defaults to
\code{xaringanthemer_font_default("header_font_family")}. Modifies the
\verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--header-font-family)} in any
argument of a style function or in custom CSS.}

\item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
\item{header_font_weight}{Header Font Weight. Defaults to
\code{xaringanthemer_font_default("header_font_weight")}. Modifies the
\verb{h1, h2, h3} elements. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{header_font_url}{Header Font URL. Defaults to
https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("header_font_url")}. Modifies the
\verb{@import url} elements.}

\item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
to \code{NULL}. Modifies the \code{body} element.}

\item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
this variable is also stored as a CSS variable that can be referenced with
\item{code_font_family}{Code Font Family. Defaults to
\code{xaringanthemer_font_default("code_font_family")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes. The value of this variable is
also stored as a CSS variable that can be referenced with
\code{var(--code-font-family)} in any argument of a style function or in custom
CSS.}

@@ -399,11 +399,11 @@ variable that can be referenced with \code{var(--code-font-size)} in any
argument of a style function or in custom CSS.}

\item{code_font_url}{Code Font URL. Defaults to
https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url}
elements.}

\item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
\item{code_font_family_fallback}{Code Font Fallback. Defaults to
\code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes.}

\item{colors}{A named vector of custom colors. The names of the colors
@@ -464,7 +464,7 @@ Other themes:
\code{\link{style_mono_light}()},
\code{\link{style_solarized_dark}()},
\code{\link{style_solarized_light}()},
\code{\link{style_xaringan}()}
\code{\link{xaringanthemer_font_default}()}

Other Duotone themes:
\code{\link{style_duo_accent_inverse}()},

+ 42
- 42
man/style_duo_accent_inverse.Rd Просмотреть файл

@@ -57,24 +57,20 @@ style_duo_accent_inverse(
header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,
@@ -339,26 +335,27 @@ property values.}
to \code{NULL}. Modifies the \code{body} element.}

\item{text_font_family}{Body Text Font Family (xaringan default is
\code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
value of this variable is also stored as a CSS variable that can be
referenced with \code{var(--text-font-family)} in any argument of a style
function or in custom CSS.}
\code{'Droid Serif'}). Defaults to
\code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family)} in any argument of a
style function or in custom CSS.}

\item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
the \code{body} element. Accepts CSS
\item{text_font_weight}{Body Text Font Weight. Defaults to
\code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body}
element. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{text_font_url}{Body Text Font URL(s). Defaults to
https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
Modifies the \verb{@import url()} elements.}
\code{xaringanthemer_font_default("text_font_url")}. Modifies the
\verb{@import url()} elements.}

\item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family-fallback)} in any argument
of a style function or in custom CSS.}
\code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the
\code{body} element. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--text-font-family-fallback)} in
any argument of a style function or in custom CSS.}

\item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
to sans-serif. Modifies the \code{body} element. The value of this variable is
@@ -370,26 +367,29 @@ CSS.}
Defaults to \code{NULL}. Modifies the \code{body} element.}

\item{header_font_family}{Header Font Family (xaringan default is
\code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
elements. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--header-font-family)} in any argument of a
style function or in custom CSS.}
\code{'Yanone Kaffeesatz'}). Defaults to
\code{xaringanthemer_font_default("header_font_family")}. Modifies the
\verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--header-font-family)} in any
argument of a style function or in custom CSS.}

\item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
\item{header_font_weight}{Header Font Weight. Defaults to
\code{xaringanthemer_font_default("header_font_weight")}. Modifies the
\verb{h1, h2, h3} elements. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{header_font_url}{Header Font URL. Defaults to
https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("header_font_url")}. Modifies the
\verb{@import url} elements.}

\item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
to \code{NULL}. Modifies the \code{body} element.}

\item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
this variable is also stored as a CSS variable that can be referenced with
\item{code_font_family}{Code Font Family. Defaults to
\code{xaringanthemer_font_default("code_font_family")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes. The value of this variable is
also stored as a CSS variable that can be referenced with
\code{var(--code-font-family)} in any argument of a style function or in custom
CSS.}

@@ -401,11 +401,11 @@ variable that can be referenced with \code{var(--code-font-size)} in any
argument of a style function or in custom CSS.}

\item{code_font_url}{Code Font URL. Defaults to
https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url}
elements.}

\item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
\item{code_font_family_fallback}{Code Font Fallback. Defaults to
\code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes.}

\item{colors}{A named vector of custom colors. The names of the colors
@@ -466,7 +466,7 @@ Other themes:
\code{\link{style_mono_light}()},
\code{\link{style_solarized_dark}()},
\code{\link{style_solarized_light}()},
\code{\link{style_xaringan}()}
\code{\link{xaringanthemer_font_default}()}

Other Duotone themes:
\code{\link{style_duo_accent}()},

+ 42
- 42
man/style_mono_accent.Rd Просмотреть файл

@@ -53,24 +53,20 @@ style_mono_accent(
header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,
@@ -324,26 +320,27 @@ property values.}
to \code{NULL}. Modifies the \code{body} element.}

\item{text_font_family}{Body Text Font Family (xaringan default is
\code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
value of this variable is also stored as a CSS variable that can be
referenced with \code{var(--text-font-family)} in any argument of a style
function or in custom CSS.}
\code{'Droid Serif'}). Defaults to
\code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family)} in any argument of a
style function or in custom CSS.}

\item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
the \code{body} element. Accepts CSS
\item{text_font_weight}{Body Text Font Weight. Defaults to
\code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body}
element. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{text_font_url}{Body Text Font URL(s). Defaults to
https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
Modifies the \verb{@import url()} elements.}
\code{xaringanthemer_font_default("text_font_url")}. Modifies the
\verb{@import url()} elements.}

\item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family-fallback)} in any argument
of a style function or in custom CSS.}
\code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the
\code{body} element. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--text-font-family-fallback)} in
any argument of a style function or in custom CSS.}

\item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
to sans-serif. Modifies the \code{body} element. The value of this variable is
@@ -355,26 +352,29 @@ CSS.}
Defaults to \code{NULL}. Modifies the \code{body} element.}

\item{header_font_family}{Header Font Family (xaringan default is
\code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
elements. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--header-font-family)} in any argument of a
style function or in custom CSS.}
\code{'Yanone Kaffeesatz'}). Defaults to
\code{xaringanthemer_font_default("header_font_family")}. Modifies the
\verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--header-font-family)} in any
argument of a style function or in custom CSS.}

\item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
\item{header_font_weight}{Header Font Weight. Defaults to
\code{xaringanthemer_font_default("header_font_weight")}. Modifies the
\verb{h1, h2, h3} elements. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{header_font_url}{Header Font URL. Defaults to
https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("header_font_url")}. Modifies the
\verb{@import url} elements.}

\item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
to \code{NULL}. Modifies the \code{body} element.}

\item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
this variable is also stored as a CSS variable that can be referenced with
\item{code_font_family}{Code Font Family. Defaults to
\code{xaringanthemer_font_default("code_font_family")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes. The value of this variable is
also stored as a CSS variable that can be referenced with
\code{var(--code-font-family)} in any argument of a style function or in custom
CSS.}

@@ -386,11 +386,11 @@ variable that can be referenced with \code{var(--code-font-size)} in any
argument of a style function or in custom CSS.}

\item{code_font_url}{Code Font URL. Defaults to
https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url}
elements.}

\item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
\item{code_font_family_fallback}{Code Font Fallback. Defaults to
\code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes.}

\item{colors}{A named vector of custom colors. The names of the colors
@@ -450,7 +450,7 @@ Other themes:
\code{\link{style_mono_light}()},
\code{\link{style_solarized_dark}()},
\code{\link{style_solarized_light}()},
\code{\link{style_xaringan}()}
\code{\link{xaringanthemer_font_default}()}

Other Monotone themes:
\code{\link{style_mono_accent_inverse}()},

+ 42
- 42
man/style_mono_accent_inverse.Rd Просмотреть файл

@@ -53,24 +53,20 @@ style_mono_accent_inverse(
header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,
@@ -325,26 +321,27 @@ property values.}
to \code{NULL}. Modifies the \code{body} element.}

\item{text_font_family}{Body Text Font Family (xaringan default is
\code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
value of this variable is also stored as a CSS variable that can be
referenced with \code{var(--text-font-family)} in any argument of a style
function or in custom CSS.}
\code{'Droid Serif'}). Defaults to
\code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family)} in any argument of a
style function or in custom CSS.}

\item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
the \code{body} element. Accepts CSS
\item{text_font_weight}{Body Text Font Weight. Defaults to
\code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body}
element. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{text_font_url}{Body Text Font URL(s). Defaults to
https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
Modifies the \verb{@import url()} elements.}
\code{xaringanthemer_font_default("text_font_url")}. Modifies the
\verb{@import url()} elements.}

\item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family-fallback)} in any argument
of a style function or in custom CSS.}
\code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the
\code{body} element. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--text-font-family-fallback)} in
any argument of a style function or in custom CSS.}

\item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
to sans-serif. Modifies the \code{body} element. The value of this variable is
@@ -356,26 +353,29 @@ CSS.}
Defaults to \code{NULL}. Modifies the \code{body} element.}

\item{header_font_family}{Header Font Family (xaringan default is
\code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
elements. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--header-font-family)} in any argument of a
style function or in custom CSS.}
\code{'Yanone Kaffeesatz'}). Defaults to
\code{xaringanthemer_font_default("header_font_family")}. Modifies the
\verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--header-font-family)} in any
argument of a style function or in custom CSS.}

\item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
\item{header_font_weight}{Header Font Weight. Defaults to
\code{xaringanthemer_font_default("header_font_weight")}. Modifies the
\verb{h1, h2, h3} elements. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{header_font_url}{Header Font URL. Defaults to
https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("header_font_url")}. Modifies the
\verb{@import url} elements.}

\item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
to \code{NULL}. Modifies the \code{body} element.}

\item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
this variable is also stored as a CSS variable that can be referenced with
\item{code_font_family}{Code Font Family. Defaults to
\code{xaringanthemer_font_default("code_font_family")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes. The value of this variable is
also stored as a CSS variable that can be referenced with
\code{var(--code-font-family)} in any argument of a style function or in custom
CSS.}

@@ -387,11 +387,11 @@ variable that can be referenced with \code{var(--code-font-size)} in any
argument of a style function or in custom CSS.}

\item{code_font_url}{Code Font URL. Defaults to
https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url}
elements.}

\item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
\item{code_font_family_fallback}{Code Font Fallback. Defaults to
\code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes.}

\item{colors}{A named vector of custom colors. The names of the colors
@@ -451,7 +451,7 @@ Other themes:
\code{\link{style_mono_light}()},
\code{\link{style_solarized_dark}()},
\code{\link{style_solarized_light}()},
\code{\link{style_xaringan}()}
\code{\link{xaringanthemer_font_default}()}

Other Monotone themes:
\code{\link{style_mono_accent}()},

+ 42
- 42
man/style_mono_dark.Rd Просмотреть файл

@@ -53,24 +53,20 @@ style_mono_dark(
header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,
@@ -326,26 +322,27 @@ property values.}
to \code{NULL}. Modifies the \code{body} element.}

\item{text_font_family}{Body Text Font Family (xaringan default is
\code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
value of this variable is also stored as a CSS variable that can be
referenced with \code{var(--text-font-family)} in any argument of a style
function or in custom CSS.}
\code{'Droid Serif'}). Defaults to
\code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family)} in any argument of a
style function or in custom CSS.}

\item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
the \code{body} element. Accepts CSS
\item{text_font_weight}{Body Text Font Weight. Defaults to
\code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body}
element. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{text_font_url}{Body Text Font URL(s). Defaults to
https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
Modifies the \verb{@import url()} elements.}
\code{xaringanthemer_font_default("text_font_url")}. Modifies the
\verb{@import url()} elements.}

\item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family-fallback)} in any argument
of a style function or in custom CSS.}
\code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the
\code{body} element. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--text-font-family-fallback)} in
any argument of a style function or in custom CSS.}

\item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
to sans-serif. Modifies the \code{body} element. The value of this variable is
@@ -357,26 +354,29 @@ CSS.}
Defaults to \code{NULL}. Modifies the \code{body} element.}

\item{header_font_family}{Header Font Family (xaringan default is
\code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
elements. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--header-font-family)} in any argument of a
style function or in custom CSS.}
\code{'Yanone Kaffeesatz'}). Defaults to
\code{xaringanthemer_font_default("header_font_family")}. Modifies the
\verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--header-font-family)} in any
argument of a style function or in custom CSS.}

\item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
\item{header_font_weight}{Header Font Weight. Defaults to
\code{xaringanthemer_font_default("header_font_weight")}. Modifies the
\verb{h1, h2, h3} elements. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{header_font_url}{Header Font URL. Defaults to
https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("header_font_url")}. Modifies the
\verb{@import url} elements.}

\item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
to \code{NULL}. Modifies the \code{body} element.}

\item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
this variable is also stored as a CSS variable that can be referenced with
\item{code_font_family}{Code Font Family. Defaults to
\code{xaringanthemer_font_default("code_font_family")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes. The value of this variable is
also stored as a CSS variable that can be referenced with
\code{var(--code-font-family)} in any argument of a style function or in custom
CSS.}

@@ -388,11 +388,11 @@ variable that can be referenced with \code{var(--code-font-size)} in any
argument of a style function or in custom CSS.}

\item{code_font_url}{Code Font URL. Defaults to
https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url}
elements.}

\item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
\item{code_font_family_fallback}{Code Font Fallback. Defaults to
\code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes.}

\item{colors}{A named vector of custom colors. The names of the colors
@@ -451,7 +451,7 @@ Other themes:
\code{\link{style_mono_light}()},
\code{\link{style_solarized_dark}()},
\code{\link{style_solarized_light}()},
\code{\link{style_xaringan}()}
\code{\link{xaringanthemer_font_default}()}

Other Monotone themes:
\code{\link{style_mono_accent_inverse}()},

+ 42
- 42
man/style_mono_light.Rd Просмотреть файл

@@ -53,24 +53,20 @@ style_mono_light(
header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,
@@ -326,26 +322,27 @@ property values.}
to \code{NULL}. Modifies the \code{body} element.}

\item{text_font_family}{Body Text Font Family (xaringan default is
\code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
value of this variable is also stored as a CSS variable that can be
referenced with \code{var(--text-font-family)} in any argument of a style
function or in custom CSS.}
\code{'Droid Serif'}). Defaults to
\code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family)} in any argument of a
style function or in custom CSS.}

\item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
the \code{body} element. Accepts CSS
\item{text_font_weight}{Body Text Font Weight. Defaults to
\code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body}
element. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{text_font_url}{Body Text Font URL(s). Defaults to
https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
Modifies the \verb{@import url()} elements.}
\code{xaringanthemer_font_default("text_font_url")}. Modifies the
\verb{@import url()} elements.}

\item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family-fallback)} in any argument
of a style function or in custom CSS.}
\code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the
\code{body} element. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--text-font-family-fallback)} in
any argument of a style function or in custom CSS.}

\item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
to sans-serif. Modifies the \code{body} element. The value of this variable is
@@ -357,26 +354,29 @@ CSS.}
Defaults to \code{NULL}. Modifies the \code{body} element.}

\item{header_font_family}{Header Font Family (xaringan default is
\code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
elements. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--header-font-family)} in any argument of a
style function or in custom CSS.}
\code{'Yanone Kaffeesatz'}). Defaults to
\code{xaringanthemer_font_default("header_font_family")}. Modifies the
\verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--header-font-family)} in any
argument of a style function or in custom CSS.}

\item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
\item{header_font_weight}{Header Font Weight. Defaults to
\code{xaringanthemer_font_default("header_font_weight")}. Modifies the
\verb{h1, h2, h3} elements. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{header_font_url}{Header Font URL. Defaults to
https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("header_font_url")}. Modifies the
\verb{@import url} elements.}

\item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
to \code{NULL}. Modifies the \code{body} element.}

\item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
this variable is also stored as a CSS variable that can be referenced with
\item{code_font_family}{Code Font Family. Defaults to
\code{xaringanthemer_font_default("code_font_family")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes. The value of this variable is
also stored as a CSS variable that can be referenced with
\code{var(--code-font-family)} in any argument of a style function or in custom
CSS.}

@@ -388,11 +388,11 @@ variable that can be referenced with \code{var(--code-font-size)} in any
argument of a style function or in custom CSS.}

\item{code_font_url}{Code Font URL. Defaults to
https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url}
elements.}

\item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
\item{code_font_family_fallback}{Code Font Fallback. Defaults to
\code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes.}

\item{colors}{A named vector of custom colors. The names of the colors
@@ -451,7 +451,7 @@ Other themes:
\code{\link{style_mono_dark}()},
\code{\link{style_solarized_dark}()},
\code{\link{style_solarized_light}()},
\code{\link{style_xaringan}()}
\code{\link{xaringanthemer_font_default}()}

Other Monotone themes:
\code{\link{style_mono_accent_inverse}()},

+ 42
- 42
man/style_solarized_dark.Rd Просмотреть файл

@@ -50,24 +50,20 @@ style_solarized_dark(
header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,
@@ -305,26 +301,27 @@ property values.}
to \code{NULL}. Modifies the \code{body} element.}

\item{text_font_family}{Body Text Font Family (xaringan default is
\code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
value of this variable is also stored as a CSS variable that can be
referenced with \code{var(--text-font-family)} in any argument of a style
function or in custom CSS.}
\code{'Droid Serif'}). Defaults to
\code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family)} in any argument of a
style function or in custom CSS.}

\item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
the \code{body} element. Accepts CSS
\item{text_font_weight}{Body Text Font Weight. Defaults to
\code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body}
element. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{text_font_url}{Body Text Font URL(s). Defaults to
https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
Modifies the \verb{@import url()} elements.}
\code{xaringanthemer_font_default("text_font_url")}. Modifies the
\verb{@import url()} elements.}

\item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family-fallback)} in any argument
of a style function or in custom CSS.}
\code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the
\code{body} element. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--text-font-family-fallback)} in
any argument of a style function or in custom CSS.}

\item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
to sans-serif. Modifies the \code{body} element. The value of this variable is
@@ -336,26 +333,29 @@ CSS.}
Defaults to \code{NULL}. Modifies the \code{body} element.}

\item{header_font_family}{Header Font Family (xaringan default is
\code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
elements. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--header-font-family)} in any argument of a
style function or in custom CSS.}
\code{'Yanone Kaffeesatz'}). Defaults to
\code{xaringanthemer_font_default("header_font_family")}. Modifies the
\verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--header-font-family)} in any
argument of a style function or in custom CSS.}

\item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
\item{header_font_weight}{Header Font Weight. Defaults to
\code{xaringanthemer_font_default("header_font_weight")}. Modifies the
\verb{h1, h2, h3} elements. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{header_font_url}{Header Font URL. Defaults to
https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("header_font_url")}. Modifies the
\verb{@import url} elements.}

\item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
to \code{NULL}. Modifies the \code{body} element.}

\item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
this variable is also stored as a CSS variable that can be referenced with
\item{code_font_family}{Code Font Family. Defaults to
\code{xaringanthemer_font_default("code_font_family")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes. The value of this variable is
also stored as a CSS variable that can be referenced with
\code{var(--code-font-family)} in any argument of a style function or in custom
CSS.}

@@ -367,11 +367,11 @@ variable that can be referenced with \code{var(--code-font-size)} in any
argument of a style function or in custom CSS.}

\item{code_font_url}{Code Font URL. Defaults to
https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url}
elements.}

\item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
\item{code_font_family_fallback}{Code Font Fallback. Defaults to
\code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes.}

\item{colors}{A named vector of custom colors. The names of the colors
@@ -434,7 +434,7 @@ Other themes:
\code{\link{style_mono_dark}()},
\code{\link{style_mono_light}()},
\code{\link{style_solarized_light}()},
\code{\link{style_xaringan}()}
\code{\link{xaringanthemer_font_default}()}

Other Solarized themes:
\code{\link{style_solarized_light}()}

+ 42
- 42
man/style_solarized_light.Rd Просмотреть файл

@@ -50,24 +50,20 @@ style_solarized_light(
header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,
@@ -305,26 +301,27 @@ property values.}
to \code{NULL}. Modifies the \code{body} element.}

\item{text_font_family}{Body Text Font Family (xaringan default is
\code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
value of this variable is also stored as a CSS variable that can be
referenced with \code{var(--text-font-family)} in any argument of a style
function or in custom CSS.}
\code{'Droid Serif'}). Defaults to
\code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family)} in any argument of a
style function or in custom CSS.}

\item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
the \code{body} element. Accepts CSS
\item{text_font_weight}{Body Text Font Weight. Defaults to
\code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body}
element. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{text_font_url}{Body Text Font URL(s). Defaults to
https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
Modifies the \verb{@import url()} elements.}
\code{xaringanthemer_font_default("text_font_url")}. Modifies the
\verb{@import url()} elements.}

\item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family-fallback)} in any argument
of a style function or in custom CSS.}
\code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the
\code{body} element. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--text-font-family-fallback)} in
any argument of a style function or in custom CSS.}

\item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
to sans-serif. Modifies the \code{body} element. The value of this variable is
@@ -336,26 +333,29 @@ CSS.}
Defaults to \code{NULL}. Modifies the \code{body} element.}

\item{header_font_family}{Header Font Family (xaringan default is
\code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
elements. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--header-font-family)} in any argument of a
style function or in custom CSS.}
\code{'Yanone Kaffeesatz'}). Defaults to
\code{xaringanthemer_font_default("header_font_family")}. Modifies the
\verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--header-font-family)} in any
argument of a style function or in custom CSS.}

\item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
\item{header_font_weight}{Header Font Weight. Defaults to
\code{xaringanthemer_font_default("header_font_weight")}. Modifies the
\verb{h1, h2, h3} elements. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{header_font_url}{Header Font URL. Defaults to
https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("header_font_url")}. Modifies the
\verb{@import url} elements.}

\item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
to \code{NULL}. Modifies the \code{body} element.}

\item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
this variable is also stored as a CSS variable that can be referenced with
\item{code_font_family}{Code Font Family. Defaults to
\code{xaringanthemer_font_default("code_font_family")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes. The value of this variable is
also stored as a CSS variable that can be referenced with
\code{var(--code-font-family)} in any argument of a style function or in custom
CSS.}

@@ -367,11 +367,11 @@ variable that can be referenced with \code{var(--code-font-size)} in any
argument of a style function or in custom CSS.}

\item{code_font_url}{Code Font URL. Defaults to
https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url}
elements.}

\item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
\item{code_font_family_fallback}{Code Font Fallback. Defaults to
\code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes.}

\item{colors}{A named vector of custom colors. The names of the colors
@@ -434,7 +434,7 @@ Other themes:
\code{\link{style_mono_dark}()},
\code{\link{style_mono_light}()},
\code{\link{style_solarized_dark}()},
\code{\link{style_xaringan}()}
\code{\link{xaringanthemer_font_default}()}

Other Solarized themes:
\code{\link{style_solarized_dark}()}

+ 55
- 43
man/style_xaringan.Rd Просмотреть файл

@@ -1,9 +1,12 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/style_xaringan.R
\name{style_xaringan}
% Please edit documentation in R/style_font_default.R, R/style_xaringan.R
\name{xaringanthemer_font_default}
\alias{xaringanthemer_font_default}
\alias{style_xaringan}
\title{Write A Customized Xaringan Theme}
\usage{
xaringanthemer_font_default(font_arg)

style_xaringan(
text_color = "#000",
header_color = "#000",
@@ -50,24 +53,20 @@ style_xaringan(
header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"),
text_slide_number_font_size = "0.9em",
text_font_google = NULL,
text_font_family = "Noto Sans",
text_font_weight = "normal",
text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
text_font_family = xaringanthemer_font_default("text_font_family"),
text_font_weight = xaringanthemer_font_default("text_font_weight"),
text_font_url = xaringanthemer_font_default("text_font_url"),
text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
text_font_base = "sans-serif",
header_font_google = NULL,
header_font_family = "Cabin",
header_font_weight = "600",
header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
header_font_family = xaringanthemer_font_default("header_font_family"),
header_font_weight = xaringanthemer_font_default("header_font_weight"),
header_font_url = xaringanthemer_font_default("header_font_url"),
code_font_google = NULL,
code_font_family = "Source Code Pro",
code_font_family = xaringanthemer_font_default("code_font_family"),
code_font_size = "0.9rem",
code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
code_font_url = xaringanthemer_font_default("code_font_url"),
code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
colors = NULL,
extra_css = NULL,
extra_fonts = NULL,
@@ -75,6 +74,9 @@ style_xaringan(
)
}
\arguments{
\item{font_arg}{A font argument from the \pkg{xaringanthemer} \code{style_}
function family.}

\item{text_color}{Text Color. Defaults to #000. Modifies the \code{body} element.
The value of this variable is also stored as a CSS variable that can be
referenced with \code{var(--text_color)} in any argument of a style function or
@@ -305,26 +307,27 @@ property values.}
to \code{NULL}. Modifies the \code{body} element.}

\item{text_font_family}{Body Text Font Family (xaringan default is
\code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
value of this variable is also stored as a CSS variable that can be
referenced with \code{var(--text-font-family)} in any argument of a style
function or in custom CSS.}
\code{'Droid Serif'}). Defaults to
\code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family)} in any argument of a
style function or in custom CSS.}

\item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
the \code{body} element. Accepts CSS
\item{text_font_weight}{Body Text Font Weight. Defaults to
\code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body}
element. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{text_font_url}{Body Text Font URL(s). Defaults to
https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
Modifies the \verb{@import url()} elements.}
\code{xaringanthemer_font_default("text_font_url")}. Modifies the
\verb{@import url()} elements.}

\item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
element. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--text-font-family-fallback)} in any argument
of a style function or in custom CSS.}
\code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the
\code{body} element. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--text-font-family-fallback)} in
any argument of a style function or in custom CSS.}

\item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
to sans-serif. Modifies the \code{body} element. The value of this variable is
@@ -336,26 +339,29 @@ CSS.}
Defaults to \code{NULL}. Modifies the \code{body} element.}

\item{header_font_family}{Header Font Family (xaringan default is
\code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
elements. The value of this variable is also stored as a CSS variable that
can be referenced with \code{var(--header-font-family)} in any argument of a
style function or in custom CSS.}
\code{'Yanone Kaffeesatz'}). Defaults to
\code{xaringanthemer_font_default("header_font_family")}. Modifies the
\verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
variable that can be referenced with \code{var(--header-font-family)} in any
argument of a style function or in custom CSS.}

\item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
\item{header_font_weight}{Header Font Weight. Defaults to
\code{xaringanthemer_font_default("header_font_weight")}. Modifies the
\verb{h1, h2, h3} elements. Accepts CSS
\href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
property values.}

\item{header_font_url}{Header Font URL. Defaults to
https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("header_font_url")}. Modifies the
\verb{@import url} elements.}

\item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
to \code{NULL}. Modifies the \code{body} element.}

\item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
this variable is also stored as a CSS variable that can be referenced with
\item{code_font_family}{Code Font Family. Defaults to
\code{xaringanthemer_font_default("code_font_family")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes. The value of this variable is
also stored as a CSS variable that can be referenced with
\code{var(--code-font-family)} in any argument of a style function or in custom
CSS.}

@@ -367,11 +373,11 @@ variable that can be referenced with \code{var(--code-font-size)} in any
argument of a style function or in custom CSS.}

\item{code_font_url}{Code Font URL. Defaults to
https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
Modifies the \verb{@import url} elements.}
\code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url}
elements.}

\item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
\item{code_font_family_fallback}{Code Font Fallback. Defaults to
\code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the
\verb{.remark-code, .remark-inline-code} classes.}

\item{colors}{A named vector of custom colors. The names of the colors
@@ -397,6 +403,12 @@ class with the \code{font-family} property. See the \strong{Fonts} section of
\description{
Creates a customized Xaringan theme CSS file.
}
\section{Functions}{
\itemize{
\item \code{xaringanthemer_font_default}: Default values for font family, wieght, URLs and
font fallbacks.
}}

\section{Usage}{
To use the styles created by this theme function, make sure
that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML

+ 1
- 1
man/theme_xaringan_get_value.Rd Просмотреть файл

@@ -53,7 +53,7 @@ Style settings used by xaringanthemer include:
\item \code{header_color}
\item \code{header_font_family}
\item \code{header_font_google}
\item \code{hedaer_font_is_google}
\item \code{header_font_is_google}
\item \code{header_font_url}
\item \code{header_font_weight}
\item \code{header_h1_font_size}

+ 1
- 1
tests/testthat/css/duo-header_bg.css Просмотреть файл

@@ -65,7 +65,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 1
- 1
tests/testthat/css/duo.css Просмотреть файл

@@ -65,7 +65,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 1
- 1
tests/testthat/css/duo_accent.css Просмотреть файл

@@ -67,7 +67,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 1
- 1
tests/testthat/css/duo_accent_inverse.css Просмотреть файл

@@ -67,7 +67,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 1
- 1
tests/testthat/css/google_fonts.css Просмотреть файл

@@ -62,7 +62,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 1
- 1
tests/testthat/css/mono_accent.css Просмотреть файл

@@ -66,7 +66,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 1
- 1
tests/testthat/css/mono_accent_inverse.css Просмотреть файл

@@ -66,7 +66,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 1
- 1
tests/testthat/css/mono_dark.css Просмотреть файл

@@ -66,7 +66,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 1
- 1
tests/testthat/css/mono_light-header_bg.css Просмотреть файл

@@ -66,7 +66,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 1
- 1
tests/testthat/css/mono_light.css Просмотреть файл

@@ -66,7 +66,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 1
- 1
tests/testthat/css/solarized_dark-header_bg.css Просмотреть файл

@@ -63,7 +63,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 1
- 1
tests/testthat/css/solarized_dark.css Просмотреть файл

@@ -63,7 +63,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 1
- 1
tests/testthat/css/solarized_light.css Просмотреть файл

@@ -63,7 +63,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 1
- 1
tests/testthat/css/xaringan.css Просмотреть файл

@@ -63,7 +63,7 @@ html {

body {
font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base);
font-weight: ;
font-weight: normal;
color: var(--text-color);
}
h1, h2, h3 {

+ 5
- 4
tests/testthat/test-ggplot2.R Просмотреть файл

@@ -483,16 +483,17 @@ describe("scale_xaringan_*", {
})

test_that("register_font() returns the name of the font family if font pkgs are missing", {
text_font_family <- xaringanthemer_font_default("text_font_family")
family_showtext_missing <- testthat::with_mock(
`xaringanthemer:::requires_package` = function(pkg, ...) pkg != "showtext",
register_font(formals(style_xaringan)$text_font_family, google = TRUE)
register_font(text_font_family, google = TRUE)
)

expect_equal(family_showtext_missing, formals(style_xaringan)$text_font_family)
expect_equal(family_showtext_missing, text_font_family)

family_sysfonts_missing <- testthat::with_mock(
`xaringanthemer:::requires_package` = function(pkg, ...) pkg != "sysfonts",
register_font(formals(style_xaringan)$text_font_family, google = TRUE)
register_font(text_font_family, google = TRUE)
)
expect_equal(family_sysfonts_missing, formals(style_xaringan)$text_font_family)
expect_equal(family_sysfonts_missing, text_font_family)
})

+ 4
- 2
tests/testthat/test-themes.R Просмотреть файл

@@ -74,9 +74,11 @@ test_that("default fonts are correctly identified as google font", {
xaringanthemer:::read_css_vars(xf)
})

expect_equal(theme_vars$text_font_family, quote_elements_w_spaces(formals(style_xaringan)$text_font_family))
expect_equal(theme_vars$text_font_family,
quote_elements_w_spaces(xaringanthemer_font_default("text_font_family")))
expect_true(theme_vars$text_font_is_google)
expect_equal(theme_vars$header_font_family, quote_elements_w_spaces(formals(style_xaringan)$header_font_family))
expect_equal(theme_vars$header_font_family,
quote_elements_w_spaces(xaringanthemer_font_default("header_font_family")))
expect_true(theme_vars$header_font_is_google)
})


Загрузка…
Отмена
Сохранить