😎 Give your xaringan slides some style
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.5KB

  1. ---
  2. title: "Template Variables"
  3. output:
  4. rmarkdown::html_vignette: default
  5. vignette: >
  6. %\VignetteIndexEntry{Template Variables}
  7. %\VignetteEncoding{UTF-8}
  8. %\VignetteEngine{knitr::rmarkdown}
  9. ---
  10. ```{r setup, include = FALSE}
  11. knitr::opts_chunk$set(
  12. collapse = TRUE,
  13. comment = "#>"
  14. )
  15. ```
  16. The following table shows the template variables, their default values in the standard `xaringan` theme, the primary element to which the property is applied, and a brief description of the template variable.
  17. For example, `background_color` by default sets the `background-color` CSS property of the `.remark-slide-content` class to `#FFF`.
  18. Use this table to find the template variable you would like to modify.
  19. You can also use this table to find the CSS class or element associated with a particular template item.
  20. Note that themes, like `mono_accent()`, have additional parameters, but with any theme function you can override the theme by directly setting the arguments below when calling the theme function.
  21. For example, to use `mono_accent()` with a different slide background color, you can call `mono_accent(background_color = "#abc123")`.
  22. ```{r table, results = "asis", echo=FALSE}
  23. template_variables <- xaringanthemer:::template_variables
  24. template_variables$variable <- glue::glue_data(template_variables, "`{variable}`")
  25. template_variables$default <- gsub("[{}]", "", template_variables$default)
  26. template_variables <- template_variables[, c(
  27. "variable", "description", "element", "default"
  28. )]
  29. knitr::kable(template_variables)
  30. ```