😎 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.

59 lines
1.8KB

  1. <!-- Set link to theme-settings, template-variables, theme functions -->
  2. First, add the `xaringan-themer.css` file to the YAML header of your xaringan slides.
  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. ### Tab Completion
  29. **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!
  30. ```{r}
  31. if (exists('IS_README') && IS_README) {
  32. knitr::include_graphics("vignettes/images/example-rstudio-completion.gif")
  33. } else {
  34. knitr::include_graphics(here::here("vignettes/images/example-rstudio-completion.gif"))
  35. }
  36. ```
  37. ### R Markdown Template in RStudio
  38. You can also skip the above and just create a *Ninja Themed Presentation* from the New R Markdown Document menu in RStudio.
  39. <center>
  40. ```{r out.width="350px"}
  41. if (exists('IS_README') && IS_README) {
  42. knitr::include_graphics("vignettes/images/rmarkdown-template-screenshot.png")
  43. } else {
  44. knitr::include_graphics(here::here("vignettes/images/rmarkdown-template-screenshot.png"))
  45. }
  46. ```
  47. </center>