Co-authored-by: gadenbuie <gadenbuie@users.noreply.github.com>tags/v0.4.1
| Title: Custom 'xaringan' CSS Themes | Title: Custom 'xaringan' CSS Themes | ||||
| Version: 0.4.0.9000 | Version: 0.4.0.9000 | ||||
| Authors@R: | Authors@R: | ||||
| person(given = "Garrick", | |||||
| family = "Aden-Buie", | |||||
| role = c("aut", "cre"), | |||||
| email = "garrick@adenbuie.com", | |||||
| person("Garrick", "Aden-Buie", , "garrick@adenbuie.com", role = c("aut", "cre"), | |||||
| comment = c(ORCID = "0000-0002-7111-0077")) | comment = c(ORCID = "0000-0002-7111-0077")) | ||||
| Description: Create beautifully color-coordinated and customized | |||||
| themes for your 'xaringan' slides, without writing any CSS. Complete | |||||
| your slide theme with 'ggplot2' themes that match the font and colors | |||||
| used in your slides. Customized styles can be created directly in | |||||
| your slides' 'R Markdown' source file or in a separate external | |||||
| script. | |||||
| Description: Create beautifully color-coordinated and customized themes | |||||
| for your 'xaringan' slides, without writing any CSS. Complete your | |||||
| slide theme with 'ggplot2' themes that match the font and colors used | |||||
| in your slides. Customized styles can be created directly in your | |||||
| slides' 'R Markdown' source file or in a separate external script. | |||||
| License: MIT + file LICENSE | License: MIT + file LICENSE | ||||
| URL: https://pkg.garrickadenbuie.com/xaringanthemer/, | URL: https://pkg.garrickadenbuie.com/xaringanthemer/, | ||||
| https://github.com/gadenbuie/xaringanthemer | https://github.com/gadenbuie/xaringanthemer | ||||
| utils, | utils, | ||||
| whisker | whisker | ||||
| Suggests: | Suggests: | ||||
| mockery, | |||||
| callr, | callr, | ||||
| ggplot2, | ggplot2, | ||||
| knitr, | knitr, | ||||
| mockery, | |||||
| rmarkdown, | rmarkdown, | ||||
| scales, | scales, | ||||
| showtext, | showtext, | ||||
| xaringan | xaringan | ||||
| VignetteBuilder: | VignetteBuilder: | ||||
| knitr | knitr | ||||
| Config/testthat/edition: 3 | |||||
| Config/Needs/website: pkgdown | Config/Needs/website: pkgdown | ||||
| Config/testthat/edition: 3 | |||||
| Encoding: UTF-8 | Encoding: UTF-8 | ||||
| Roxygen: list(markdown = TRUE) | Roxygen: list(markdown = TRUE) | ||||
| RoxygenNote: 7.1.1 | |||||
| RoxygenNote: 7.1.2 |
| ## Features | ## Features | ||||
| There’s a lot more that **xaringanthemer** can do! [Discover | |||||
| There’s a lot more that **xaringanthemer** can do\! [Discover | |||||
| xaringanthemer’s | xaringanthemer’s | ||||
| features.](https://pkg.garrickadenbuie.com/xaringanthemer/articles/xaringanthemer.html) | features.](https://pkg.garrickadenbuie.com/xaringanthemer/articles/xaringanthemer.html) |
| **xaringanthemer** is <kbd>Tab</kbd> friendly – [use autocomplete to | **xaringanthemer** is <kbd>Tab</kbd> friendly – [use autocomplete to | ||||
| explore](#theme-settings) the [template | explore](#theme-settings) the [template | ||||
| variables](vignettes/template-variables.md) that you can adjust in each | variables](vignettes/template-variables.md) that you can adjust in each | ||||
| of the themes! | |||||
| of the themes\! | |||||
| <img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example-rstudio-completion.gif" alt="Demonstration of argument auto-completion with RStudio" data-external="1" /> | <img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example-rstudio-completion.gif" alt="Demonstration of argument auto-completion with RStudio" data-external="1" /> | ||||
| Presentation* from the New R Markdown Document menu in RStudio. | Presentation* from the New R Markdown Document menu in RStudio. | ||||
| <center> | <center> | ||||
| <img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/rmarkdown-template-screenshot.png" alt="The 'New R Markdown Document' menu in RStudio" data-external="1" /> | <img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/rmarkdown-template-screenshot.png" alt="The 'New R Markdown Document' menu in RStudio" data-external="1" /> | ||||
| </center> | </center> | ||||
| ## Features | ## Features | ||||
| There’s a lot more that **xaringanthemer** can do! [Discover | |||||
| There’s a lot more that **xaringanthemer** can do\! [Discover | |||||
| xaringanthemer’s | xaringanthemer’s | ||||
| features.](https://pkg.garrickadenbuie.com/xaringanthemer/articles/xaringanthemer.html) | features.](https://pkg.garrickadenbuie.com/xaringanthemer/articles/xaringanthemer.html) |
| if (requireNamespace("scales", quietly = TRUE)) { | if (requireNamespace("scales", quietly = TRUE)) { | ||||
| scales::show_col(c(blue, blue_transparent)) | scales::show_col(c(blue, blue_transparent)) | ||||
| } | } | ||||
| } | } |
| if (requireNamespace("scales", quietly = TRUE)) { | if (requireNamespace("scales", quietly = TRUE)) { | ||||
| scales::show_col(c(light_green, contrast_green, dark_purple, contrast_purple)) | scales::show_col(c(light_green, contrast_green, dark_purple, contrast_purple)) | ||||
| } | } | ||||
| } | } | ||||
| \references{ | \references{ | ||||
| \url{https://stackoverflow.com/a/3943023/2022615} | \url{https://stackoverflow.com/a/3943023/2022615} |
| if (requireNamespace("scales", quietly = TRUE)) { | if (requireNamespace("scales", quietly = TRUE)) { | ||||
| scales::show_col(c(blue_light, blue, blue_dark)) | scales::show_col(c(blue_light, blue, blue_dark)) | ||||
| } | } | ||||
| } | } |
| # Fill color matches teal text | # Fill color matches teal text | ||||
| scale_xaringan_color_discrete(direction = -1) | scale_xaringan_color_discrete(direction = -1) | ||||
| } | } | ||||
| } | } |
| To use the styles created by this theme function, make sure | 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 | that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the \code{outfile} | header. If you change the name of the output file using the \code{outfile} | ||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output: | |||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{output: | |||||
| xaringan::moon_reader: | xaringan::moon_reader: | ||||
| css: xaringan-themer.css | css: xaringan-themer.css | ||||
| }\if{html}{\out{</div>}} | }\if{html}{\out{</div>}} |
| To use the styles created by this theme function, make sure | 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 | that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the \code{outfile} | header. If you change the name of the output file using the \code{outfile} | ||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output: | |||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{output: | |||||
| xaringan::moon_reader: | xaringan::moon_reader: | ||||
| css: xaringan-themer.css | css: xaringan-themer.css | ||||
| }\if{html}{\out{</div>}} | }\if{html}{\out{</div>}} |
| To use the styles created by this theme function, make sure | 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 | that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the \code{outfile} | header. If you change the name of the output file using the \code{outfile} | ||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output: | |||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{output: | |||||
| xaringan::moon_reader: | xaringan::moon_reader: | ||||
| css: xaringan-themer.css | css: xaringan-themer.css | ||||
| }\if{html}{\out{</div>}} | }\if{html}{\out{</div>}} |
| To use the styles created by this theme function, make sure | 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 | that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the \code{outfile} | header. If you change the name of the output file using the \code{outfile} | ||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output: | |||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{output: | |||||
| xaringan::moon_reader: | xaringan::moon_reader: | ||||
| css: xaringan-themer.css | css: xaringan-themer.css | ||||
| }\if{html}{\out{</div>}} | }\if{html}{\out{</div>}} |
| To use the styles created by this theme function, make sure | 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 | that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the \code{outfile} | header. If you change the name of the output file using the \code{outfile} | ||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output: | |||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{output: | |||||
| xaringan::moon_reader: | xaringan::moon_reader: | ||||
| css: xaringan-themer.css | css: xaringan-themer.css | ||||
| }\if{html}{\out{</div>}} | }\if{html}{\out{</div>}} |
| To use the styles created by this theme function, make sure | 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 | that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the \code{outfile} | header. If you change the name of the output file using the \code{outfile} | ||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output: | |||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{output: | |||||
| xaringan::moon_reader: | xaringan::moon_reader: | ||||
| css: xaringan-themer.css | css: xaringan-themer.css | ||||
| }\if{html}{\out{</div>}} | }\if{html}{\out{</div>}} |
| To use the styles created by this theme function, make sure | 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 | that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the \code{outfile} | header. If you change the name of the output file using the \code{outfile} | ||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output: | |||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{output: | |||||
| xaringan::moon_reader: | xaringan::moon_reader: | ||||
| css: xaringan-themer.css | css: xaringan-themer.css | ||||
| }\if{html}{\out{</div>}} | }\if{html}{\out{</div>}} |
| To use the styles created by this theme function, make sure | 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 | that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the \code{outfile} | header. If you change the name of the output file using the \code{outfile} | ||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output: | |||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{output: | |||||
| xaringan::moon_reader: | xaringan::moon_reader: | ||||
| css: xaringan-themer.css | css: xaringan-themer.css | ||||
| }\if{html}{\out{</div>}} | }\if{html}{\out{</div>}} |
| To use the styles created by this theme function, make sure | 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 | that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the \code{outfile} | header. If you change the name of the output file using the \code{outfile} | ||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output: | |||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{output: | |||||
| xaringan::moon_reader: | xaringan::moon_reader: | ||||
| css: xaringan-themer.css | css: xaringan-themer.css | ||||
| }\if{html}{\out{</div>}} | }\if{html}{\out{</div>}} |
| To use the styles created by this theme function, make sure | 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 | that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the \code{outfile} | header. If you change the name of the output file using the \code{outfile} | ||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output: | |||||
| argument, use that name instead of the default file name.\if{html}{\out{<div class="sourceCode yaml">}}\preformatted{output: | |||||
| xaringan::moon_reader: | xaringan::moon_reader: | ||||
| css: xaringan-themer.css | css: xaringan-themer.css | ||||
| }\if{html}{\out{</div>}} | }\if{html}{\out{</div>}} |
| theme_xaringan_get_value("background_color") | theme_xaringan_get_value("background_color") | ||||
| theme_xaringan_get_value("header_color") | theme_xaringan_get_value("header_color") | ||||
| theme_xaringan_get_value("text_bold_color") | theme_xaringan_get_value("text_bold_color") | ||||
| } | } |
| \description{ | \description{ | ||||
| \if{html}{\figure{logo.png}{options: align='right' alt='logo' width='120'}} | \if{html}{\figure{logo.png}{options: align='right' alt='logo' width='120'}} | ||||
| Create beautifully color-coordinated and customized | |||||
| themes for your 'xaringan' slides, without writing any CSS. Complete | |||||
| your slide theme with 'ggplot2' themes that match the font and colors | |||||
| used in your slides. Customized styles can be created directly in | |||||
| your slides' 'R Markdown' source file or in a separate external | |||||
| script. | |||||
| Create beautifully color-coordinated and customized themes for your 'xaringan' slides, without writing any CSS. Complete your slide theme with 'ggplot2' themes that match the font and colors used in your slides. Customized styles can be created directly in your slides' 'R Markdown' source file or in a separate external script. | |||||
| } | } | ||||
| \seealso{ | \seealso{ | ||||
| Useful links: | Useful links: |