😎 Give your xaringan slides some style
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

47 lines
1.5KB

  1. <!-- Set link to theme-settings, template-variables, theme functions -->
  2. First, add `css: xaringan-themer.css` to your xaringan slides YAML header under `xaringan::moonreader:`.
  3. ```yaml
  4. output:
  5. xaringan::moon_reader:
  6. lib_dir: libs
  7. css: xaringan-themer.css
  8. ```
  9. Then, in a hidden chunk just after the knitr setup chunk, load **xaringanthemer** and try one of the [theme functions][theme-functions].
  10. ````markdown
  11. ```{r xaringan-themer, include = FALSE}`r ""`
  12. library(xaringanthemer)
  13. mono_light(
  14. base_color = "#1c5253",
  15. header_font_google = google_font("Josefin Sans"),
  16. text_font_google = google_font("Montserrat", "300", "300i"),
  17. code_font_google = google_font("Droid Mono")
  18. )
  19. ```
  20. ````
  21. ```{r echo=FALSE}
  22. if (exists('IS_README') && IS_README) {
  23. knitr::include_graphics("vignettes/images/example_mono_light_1c5253.png")
  24. } else {
  25. knitr::include_graphics(here::here("vignettes/images/example_mono_light_1c5253.png"))
  26. }
  27. ```
  28. **xaringanthemer** is <kbd>Tab</kbd> friendly -- [use autocomplete to explore][theme-settings] the [template variables][template-variables] that you can adjust in each of the themes!
  29. <center>
  30. ```{r out.width="350px"}
  31. if (exists('IS_README') && IS_README) {
  32. knitr::include_graphics("vignettes/images/rmarkdown-template-screenshot.png")
  33. } else {
  34. knitr::include_graphics(here::here("vignettes/images/rmarkdown-template-screenshot.png"))
  35. }
  36. ```
  37. </center>
  38. You can also skip the above and just create a *Ninja Themed Presentation* from the New R Markdown Document menu in RStudio.