😎 Give your xaringan slides some style
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

43 行
1.4KB

  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. knitr::include_graphics(here::here("vignettes/images/rmarkdown-template-screenshot.png"))
  32. ```
  33. </center>
  34. You can also skip the above and just create a *Ninja Themed Presentation* from the New R Markdown Document menu in RStudio.