Build URL: https://github.com/gadenbuie/xaringanthemer/actions/runs/253291691
Commit: 99af06835c
gh-pages
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <p>These fonts are easier to read on screens and at a distance during presentations, and they support a wide variety of languages and weights. Another reason for the change is that the xaringan (remarkjs) default body font, <em>Droid Serif</em>, is no longer officially included in Google Fonts.</p> | <p>These fonts are easier to read on screens and at a distance during presentations, and they support a wide variety of languages and weights. Another reason for the change is that the xaringan (remarkjs) default body font, <em>Droid Serif</em>, is no longer officially included in Google Fonts.</p> | ||||
| <p>If you would like to use the fonts from the <a href="https://slides.yihui.name/xaringan/">default xaringan theme</a>, you can use the following arguments in your style function.</p> | <p>If you would like to use the fonts from the <a href="https://slides.yihui.name/xaringan/">default xaringan theme</a>, you can use the following arguments in your style function.</p> | ||||
| <div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="fu"><a href="../reference/style_xaringan.html">style_xaringan</a></span>( | |||||
| <span class="kw">text_font_family</span> <span class="kw">=</span> <span class="st">"Droid Serif"</span>, | |||||
| <span class="kw">text_font_url</span> <span class="kw">=</span> <span class="st">"https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic"</span>, | |||||
| <span class="kw">header_font_google</span> <span class="kw">=</span> <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Yanone Kaffeesatz"</span>) | |||||
| )</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb1"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/xaringanthemer_font_default.html">style_xaringan</a></span>( | |||||
| text_font_family = <span class="st">"Droid Serif"</span>, | |||||
| text_font_url = <span class="st">"https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic"</span>, | |||||
| header_font_google = <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Yanone Kaffeesatz"</span>) | |||||
| ) | |||||
| </pre></div> | |||||
| </div> | </div> | ||||
| <div id="custom-and-google-font-fonts" class="section level3"> | <div id="custom-and-google-font-fonts" class="section level3"> | ||||
| <h3 class="hasAnchor"> | <h3 class="hasAnchor"> | ||||
| <a href="#custom-and-google-font-fonts" class="anchor"></a>Custom and <em>Google Font</em> Fonts</h3> | <a href="#custom-and-google-font-fonts" class="anchor"></a>Custom and <em>Google Font</em> Fonts</h3> | ||||
| <p><strong>xaringanthemer</strong> makes it easy to use <a href="https://fonts.google.com">Google Fonts</a> in your presentations (provided you have an internet connection during the presentation) or to fully specify your font files.</p> | <p><strong>xaringanthemer</strong> makes it easy to use <a href="https://fonts.google.com">Google Fonts</a> in your presentations (provided you have an internet connection during the presentation) or to fully specify your font files.</p> | ||||
| <p>To use <a href="https://fonts.google.com">Google Fonts</a>, set the <code><type>_font_google</code> theme arguments – <code>text_font_google</code>, <code>header_font_google</code>, <code>code_font_google</code> — using the <code><a href="../reference/google_font.html">google_font()</a></code> helper. The help documentation in <code><a href="../reference/google_font.html">?google_font</a></code> provides more info.</p> | <p>To use <a href="https://fonts.google.com">Google Fonts</a>, set the <code><type>_font_google</code> theme arguments – <code>text_font_google</code>, <code>header_font_google</code>, <code>code_font_google</code> — using the <code><a href="../reference/google_font.html">google_font()</a></code> helper. The help documentation in <code><a href="../reference/google_font.html">?google_font</a></code> provides more info.</p> | ||||
| <div class="sourceCode" id="cb2"><html><body><pre class="r"><span class="fu"><a href="../reference/style_mono_light.html">style_mono_light</a></span>( | |||||
| <span class="kw">header_font_google</span> <span class="kw">=</span> <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Josefin Slab"</span>, <span class="st">"600"</span>), | |||||
| <span class="kw">text_font_google</span> <span class="kw">=</span> <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Work Sans"</span>, <span class="st">"300"</span>, <span class="st">"300i"</span>), | |||||
| <span class="kw">code_font_google</span> <span class="kw">=</span> <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"IBM Plex Mono"</span>) | |||||
| )</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb2"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_mono_light.html">style_mono_light</a></span>( | |||||
| header_font_google = <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Josefin Slab"</span>, <span class="st">"600"</span>), | |||||
| text_font_google = <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Work Sans"</span>, <span class="st">"300"</span>, <span class="st">"300i"</span>), | |||||
| code_font_google = <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"IBM Plex Mono"</span>) | |||||
| ) | |||||
| </pre></div> | |||||
| <p>If you set an <code><type>_font_google</code> theme arguments, then <code><type>_font_family</code>, <code><type>_font_weight</code> and <code><type>_font_url</code> are overwritten – where <code><type></code> is one of <code>header</code>, <code>text</code>, or <code>code</code>.</p> | <p>If you set an <code><type>_font_google</code> theme arguments, then <code><type>_font_family</code>, <code><type>_font_weight</code> and <code><type>_font_url</code> are overwritten – where <code><type></code> is one of <code>header</code>, <code>text</code>, or <code>code</code>.</p> | ||||
| <p>To use a font hosted outside of Google fonts, you need to provide both <code><type>_font_family</code> and <code><type>_font_url</code>. For example, suppose you want to use a code font with ligatures for your code chunks, such as <a href="https://github.com/tonsky/FiraCode">Fira Code</a>, which would be declared with <code>code_font_family</code>. The <a href="https://github.com/tonsky/FiraCode#browser-support">browser usage</a> section of the Fira Code README provides a CSS URL to be used with an <code>@import</code> statement that you can use with the <code>code_font_url</code> argument.</p> | <p>To use a font hosted outside of Google fonts, you need to provide both <code><type>_font_family</code> and <code><type>_font_url</code>. For example, suppose you want to use a code font with ligatures for your code chunks, such as <a href="https://github.com/tonsky/FiraCode">Fira Code</a>, which would be declared with <code>code_font_family</code>. The <a href="https://github.com/tonsky/FiraCode#browser-support">browser usage</a> section of the Fira Code README provides a CSS URL to be used with an <code>@import</code> statement that you can use with the <code>code_font_url</code> argument.</p> | ||||
| <div class="sourceCode" id="cb3"><html><body><pre class="r"><span class="fu"><a href="../reference/style_solarized_dark.html">style_solarized_dark</a></span>( | |||||
| <span class="kw">code_font_family</span> <span class="kw">=</span> <span class="st">"Fira Code"</span>, | |||||
| <span class="kw">code_font_url</span> <span class="kw">=</span> <span class="st">"https://cdn.jsdelivr.net/gh/tonsky/FiraCode@2/distr/fira_code.css"</span> | |||||
| )</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb3"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_solarized_dark.html">style_solarized_dark</a></span>( | |||||
| code_font_family = <span class="st">"Fira Code"</span>, | |||||
| code_font_url = <span class="st">"https://cdn.jsdelivr.net/gh/tonsky/FiraCode@2/distr/fira_code.css"</span> | |||||
| ) | |||||
| </pre></div> | |||||
| <p>Remember that you need to supply either <code><type>_google_font</code> using the <code><a href="../reference/google_font.html">google_font()</a></code> helper <em>or both</em> <code><type>_font_family</code> and <code><type>_font_url</code>.</p> | <p>Remember that you need to supply either <code><type>_google_font</code> using the <code><a href="../reference/google_font.html">google_font()</a></code> helper <em>or both</em> <code><type>_font_family</code> and <code><type>_font_url</code>.</p> | ||||
| </div> | </div> | ||||
| <div id="using-additional-fonts" class="section level3"> | <div id="using-additional-fonts" class="section level3"> | ||||
| <h3 class="hasAnchor"> | <h3 class="hasAnchor"> | ||||
| <a href="#using-additional-fonts" class="anchor"></a>Using Additional Fonts</h3> | <a href="#using-additional-fonts" class="anchor"></a>Using Additional Fonts</h3> | ||||
| <p>If you want to use additional fonts for use in <a href="xaringanthemer.html#adding-custom-css">custom CSS definitions</a>, use the <code>extra_fonts</code> argument to pass a list of URLs or <code><a href="../reference/google_font.html">google_font()</a></code>s. Notice that you will need to add custom CSS (for example, via <code>extra_css</code>) to use the fonts imported in <code>extra_fonts</code>.</p> | <p>If you want to use additional fonts for use in <a href="xaringanthemer.html#adding-custom-css">custom CSS definitions</a>, use the <code>extra_fonts</code> argument to pass a list of URLs or <code><a href="../reference/google_font.html">google_font()</a></code>s. Notice that you will need to add custom CSS (for example, via <code>extra_css</code>) to use the fonts imported in <code>extra_fonts</code>.</p> | ||||
| <div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="fu"><a href="../reference/style_mono_light.html">style_mono_light</a></span>( | |||||
| <span class="kw">extra_fonts</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>( | |||||
| <div class="sourceCode" id="cb4"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_mono_light.html">style_mono_light</a></span>( | |||||
| extra_fonts = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>( | |||||
| <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Sofia"</span>), | <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Sofia"</span>), | ||||
| <span class="co"># Young Serif by uplaod.fr</span> | <span class="co"># Young Serif by uplaod.fr</span> | ||||
| <span class="st">"https://cdn.jsdelivr.net/gh/uplaod/YoungSerif/fonts/webfonts/fontface.css"</span>, | <span class="st">"https://cdn.jsdelivr.net/gh/uplaod/YoungSerif/fonts/webfonts/fontface.css"</span>, | ||||
| ), | ), | ||||
| <span class="kw">extra_css</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>( | |||||
| <span class="st">".title-slide h2"</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"font-family"</span> <span class="kw">=</span> <span class="st">"Sofia"</span>), | |||||
| <span class="kw">blockquote</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"font-family"</span> <span class="kw">=</span> <span class="st">"youngserifregular"</span>) | |||||
| extra_css = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>( | |||||
| <span class="st">".title-slide h2"</span> = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"font-family"</span> = <span class="st">"Sofia"</span>), | |||||
| blockquote = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"font-family"</span> = <span class="st">"youngserifregular"</span>) | |||||
| ) | ) | ||||
| )</pre></body></html></div> | |||||
| ) | |||||
| </pre></div> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| <span id="cb1-12"><a href="#cb1-12"></a><span class="bn">```</span></span></code></pre></div> | <span id="cb1-12"><a href="#cb1-12"></a><span class="bn">```</span></span></code></pre></div> | ||||
| <p>If you use a hidden chunk like this one inside your slides’ R Markdown source file, <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> will know which colors and fonts you’ve picked.</p> | <p>If you use a hidden chunk like this one inside your slides’ R Markdown source file, <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> will know which colors and fonts you’ve picked.</p> | ||||
| <p>Adding <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> to a ggplot, like this demonstration plot using the <code>mpg</code> dataset from ggplot2, changes the colors and fonts of your plot theme.</p> | <p>Adding <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> to a ggplot, like this demonstration plot using the <code>mpg</code> dataset from ggplot2, changes the colors and fonts of your plot theme.</p> | ||||
| <div class="sourceCode" id="cb2"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="no">ggplot2</span>) | |||||
| <div class="sourceCode" id="cb2"><pre class="downlit"> | |||||
| <span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="kw"><a href="http://ggplot2.tidyverse.org">ggplot2</a></span>) | |||||
| <span class="no">g_base</span> <span class="kw"><-</span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="no">mpg</span>) + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="no">hwy</span>, <span class="no">cty</span>) + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_point.html">geom_point</a></span>() + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(<span class="kw">x</span> <span class="kw">=</span> <span class="st">"Highway MPG"</span>, <span class="kw">y</span> <span class="kw">=</span> <span class="st">"City MPG"</span>, <span class="kw">title</span> <span class="kw">=</span> <span class="st">"Fuel Efficiency"</span>) | |||||
| <span class="kw">g_base</span> <span class="op"><-</span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="kw">mpg</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="kw">hwy</span>, <span class="kw">cty</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_point.html">geom_point</a></span>() <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(x = <span class="st">"Highway MPG"</span>, y = <span class="st">"City MPG"</span>, title = <span class="st">"Fuel Efficiency"</span>) | |||||
| <span class="co"># Basic plot with default theme</span> | <span class="co"># Basic plot with default theme</span> | ||||
| <span class="no">g_base</span></pre></body></html></div> | |||||
| <div class="sourceCode" id="cb3"><html><body><pre class="r"><span class="co"># Fancy slide-matching themed plot</span> | |||||
| <span class="no">g_base</span> + <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>()</pre></body></html></div> | |||||
| <span class="kw">g_base</span> | |||||
| </pre></div> | |||||
| <div class="sourceCode" id="cb3"><pre class="downlit"> | |||||
| <span class="co"># Fancy slide-matching themed plot</span> | |||||
| <span class="kw">g_base</span> <span class="op">+</span> <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>() | |||||
| </pre></div> | |||||
| <p><img src="ggplot2-themes_files/figure-html/ggplot2-demo-1-1.png" width="48%"><img src="ggplot2-themes_files/figure-html/ggplot2-demo-2-1.png" width="48%"></p> | <p><img src="ggplot2-themes_files/figure-html/ggplot2-demo-1-1.png" width="48%"><img src="ggplot2-themes_files/figure-html/ggplot2-demo-2-1.png" width="48%"></p> | ||||
| <p>With <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> the fonts and colors match the slide theme. The default colors of points (like other geometries) has been changed as well to match the slide colors.</p> | <p>With <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> the fonts and colors match the slide theme. The default colors of points (like other geometries) has been changed as well to match the slide colors.</p> | ||||
| <p>To restore the previous default colors of ggplot2 geoms, call</p> | <p>To restore the previous default colors of ggplot2 geoms, call</p> | ||||
| <div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="fu"><a href="../reference/theme_xaringan_set_defaults.html">theme_xaringan_restore_defaults</a></span>()</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb4"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/theme_xaringan_set_defaults.html">theme_xaringan_restore_defaults</a></span>() | |||||
| </pre></div> | |||||
| <p>Add <code><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse()</a></code> to automatically create a plot that matches the inverse slide style.</p> | <p>Add <code><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse()</a></code> to automatically create a plot that matches the inverse slide style.</p> | ||||
| <div class="sourceCode" id="cb5"><html><body><pre class="r"><span class="co"># theme_xaringan() on the left, theme_xaringan_inverse() on the right</span> | |||||
| <span class="no">g_base</span> + <span class="fu"><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse</a></span>()</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb5"><pre class="downlit"> | |||||
| <span class="co"># theme_xaringan() on the left, theme_xaringan_inverse() on the right</span> | |||||
| <span class="kw">g_base</span> <span class="op">+</span> <span class="fu"><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse</a></span>() | |||||
| </pre></div> | |||||
| <p><img src="ggplot2-themes_files/figure-html/ggplot2-demo-2-1.png" width="48%"><img src="ggplot2-themes_files/figure-html/ggplot2-demo-inverse-1.png" width="48%"></p> | <p><img src="ggplot2-themes_files/figure-html/ggplot2-demo-2-1.png" width="48%"><img src="ggplot2-themes_files/figure-html/ggplot2-demo-inverse-1.png" width="48%"></p> | ||||
| </div> | </div> | ||||
| <div id="using-xaringan-themer-css" class="section level2"> | <div id="using-xaringan-themer-css" class="section level2"> | ||||
| <p>Once you’ve set up your custom xaringan theme, you might want to use the theme’s CSS file for new presentations instead of rebuilding your theme with every new slide deck.</p> | <p>Once you’ve set up your custom xaringan theme, you might want to use the theme’s CSS file for new presentations instead of rebuilding your theme with every new slide deck.</p> | ||||
| <p>In these cases, <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> will look for a CSS file written by <strong>xaringanthemer</strong> in your slides’ directory or in a sub-folder under the same directory that it can use to determine the colors and fonts used in your slides.</p> | <p>In these cases, <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> will look for a CSS file written by <strong>xaringanthemer</strong> in your slides’ directory or in a sub-folder under the same directory that it can use to determine the colors and fonts used in your slides.</p> | ||||
| <p>If you happen to have multiple slide themes written by <strong>xaringanthemer</strong> in the same directory, the one named <code>xaringan-themer.css</code> will be used. If xaringanthemer picks the wrong file, you can use the <code>css_file</code> in <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> to specify exactly which CSS file to use.</p> | <p>If you happen to have multiple slide themes written by <strong>xaringanthemer</strong> in the same directory, the one named <code>xaringan-themer.css</code> will be used. If xaringanthemer picks the wrong file, you can use the <code>css_file</code> in <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> to specify exactly which CSS file to use.</p> | ||||
| <div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>(<span class="kw">css_file</span> <span class="kw">=</span> <span class="st">"my-slide-style.css"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb6"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>(css_file = <span class="st">"my-slide-style.css"</span>) | |||||
| </pre></div> | |||||
| <p>Note that you can use <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> anywhere you want, not just in xaringan slides! (For example, <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> is working great in these vignettes!) This means that you can use your plot theme in reports and websites while maintaining a consistent look and feel or brand.</p> | <p>Note that you can use <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> anywhere you want, not just in xaringan slides! (For example, <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> is working great in these vignettes!) This means that you can use your plot theme in reports and websites while maintaining a consistent look and feel or brand.</p> | ||||
| <p>Finally, you don’t even need a xaringanthemer CSS file. You can specify the key ingredients for the theme as arguments to <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code>, namely text, background, and accent colors as well as text and title fonts.</p> | <p>Finally, you don’t even need a xaringanthemer CSS file. You can specify the key ingredients for the theme as arguments to <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code>, namely text, background, and accent colors as well as text and title fonts.</p> | ||||
| <p>The R chunk below replicated the demonstrated theme, but doesn’t require a slide style to be set or stored in a CSS file.</p> | <p>The R chunk below replicated the demonstrated theme, but doesn’t require a slide style to be set or stored in a CSS file.</p> | ||||
| <div class="sourceCode" id="cb7"><html><body><pre class="r"><span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>( | |||||
| <span class="kw">text_color</span> <span class="kw">=</span> <span class="st">"#3D3E38"</span>, | |||||
| <span class="kw">background_color</span> <span class="kw">=</span> <span class="st">"#FFFFFF"</span>, | |||||
| <span class="kw">accent_color</span> <span class="kw">=</span> <span class="st">"#DC322F"</span>, | |||||
| <span class="kw">text_font</span> <span class="kw">=</span> <span class="st">"Kelly Slab"</span>, | |||||
| <span class="kw">text_font_use_google</span> <span class="kw">=</span> <span class="fl">TRUE</span>, | |||||
| <span class="kw">title_font</span> <span class="kw">=</span> <span class="st">"Oleo Script"</span>, | |||||
| <span class="kw">title_font_use_google</span> <span class="kw">=</span> <span class="fl">TRUE</span> | |||||
| )</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb7"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>( | |||||
| text_color = <span class="st">"#3D3E38"</span>, | |||||
| background_color = <span class="st">"#FFFFFF"</span>, | |||||
| accent_color = <span class="st">"#DC322F"</span>, | |||||
| text_font = <span class="st">"Kelly Slab"</span>, | |||||
| text_font_use_google = <span class="fl">TRUE</span>, | |||||
| title_font = <span class="st">"Oleo Script"</span>, | |||||
| title_font_use_google = <span class="fl">TRUE</span> | |||||
| ) | |||||
| </pre></div> | |||||
| </div> | </div> | ||||
| <div id="colors" class="section level2"> | <div id="colors" class="section level2"> | ||||
| <h2 class="hasAnchor"> | <h2 class="hasAnchor"> | ||||
| <a href="#colors" class="anchor"></a>Colors</h2> | <a href="#colors" class="anchor"></a>Colors</h2> | ||||
| <p>As demonstrated above, <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> and <code><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse()</a></code> modify the default colors and fonts of geometries. This means that <code><a href="https://ggplot2.tidyverse.org/reference/geom_point.html">geom_point()</a></code>, <code><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_bar()</a></code>, <code><a href="https://ggplot2.tidyverse.org/reference/geom_text.html">geom_text()</a></code> and other geoms used in your plots will reasonably match your slide themes with no extra work.</p> | <p>As demonstrated above, <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> and <code><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse()</a></code> modify the default colors and fonts of geometries. This means that <code><a href="https://ggplot2.tidyverse.org/reference/geom_point.html">geom_point()</a></code>, <code><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_bar()</a></code>, <code><a href="https://ggplot2.tidyverse.org/reference/geom_text.html">geom_text()</a></code> and other geoms used in your plots will reasonably match your slide themes with no extra work.</p> | ||||
| <div class="sourceCode" id="cb8"><html><body><pre class="r"><span class="no">g_diamonds</span> <span class="kw"><-</span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="no">diamonds</span>, <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="kw">x</span> <span class="kw">=</span> <span class="no">cut</span>)) + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_bar</a></span>() + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(<span class="kw">x</span> <span class="kw">=</span> <span class="kw">NULL</span>, <span class="kw">y</span> <span class="kw">=</span> <span class="kw">NULL</span>, <span class="kw">title</span> <span class="kw">=</span> <span class="st">"Diamond Cut Quality"</span>) + | |||||
| <div class="sourceCode" id="cb8"><pre class="downlit"> | |||||
| <span class="kw">g_diamonds</span> <span class="op"><-</span> <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="kw">diamonds</span>, <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(x = <span class="kw">cut</span>)) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_bar</a></span>() <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(x = <span class="kw">NULL</span>, y = <span class="kw">NULL</span>, title = <span class="st">"Diamond Cut Quality"</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/lims.html">ylim</a></span>(<span class="fl">0</span>, <span class="fl">25000</span>) | <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/lims.html">ylim</a></span>(<span class="fl">0</span>, <span class="fl">25000</span>) | ||||
| <span class="no">g_diamonds</span> + <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>()</pre></body></html></div> | |||||
| <span class="kw">g_diamonds</span> <span class="op">+</span> <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>() | |||||
| </pre></div> | |||||
| <p><img src="ggplot2-themes_files/figure-html/demo-geom-defaults-1.png" width="960"></p> | <p><img src="ggplot2-themes_files/figure-html/demo-geom-defaults-1.png" width="960"></p> | ||||
| <p>Whenever <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> or <code><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse()</a></code> are called, the default values of many of ggplot2 geoms are set by default. You can opt out of this by setting <code>set_ggplot_defaults = FALSE</code> when using either theme. You can also restore the geom aesthetic defaults to their original values before the first time <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> or <code><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse()</a></code> were used by running</p> | <p>Whenever <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> or <code><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse()</a></code> are called, the default values of many of ggplot2 geoms are set by default. You can opt out of this by setting <code>set_ggplot_defaults = FALSE</code> when using either theme. You can also restore the geom aesthetic defaults to their original values before the first time <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> or <code><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse()</a></code> were used by running</p> | ||||
| <div class="sourceCode" id="cb9"><html><body><pre class="r"><span class="fu"><a href="../reference/theme_xaringan_set_defaults.html">theme_xaringan_restore_defaults</a></span>()</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb9"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/theme_xaringan_set_defaults.html">theme_xaringan_restore_defaults</a></span>() | |||||
| </pre></div> | |||||
| <div id="scale-xaringan" class="section level3"> | <div id="scale-xaringan" class="section level3"> | ||||
| <h3 class="hasAnchor"> | <h3 class="hasAnchor"> | ||||
| <a href="#scale-xaringan" class="anchor"></a>Custom Color and Fill Scales</h3> | <a href="#scale-xaringan" class="anchor"></a>Custom Color and Fill Scales</h3> | ||||
| <p>xaringanthemer includes monotone color and fill scales to match your ggplot2 theme. The scale functions all follow the naming pattern <code>scale_xaringan_<aes>_<data_type>()</code>, where <code><aes></code> is replaced with either <code>color</code> or <code>fill</code> and <code><data_type></code> is one of <code>discrete</code> or <code>continuous</code>.</p> | <p>xaringanthemer includes monotone color and fill scales to match your ggplot2 theme. The scale functions all follow the naming pattern <code>scale_xaringan_<aes>_<data_type>()</code>, where <code><aes></code> is replaced with either <code>color</code> or <code>fill</code> and <code><data_type></code> is one of <code>discrete</code> or <code>continuous</code>.</p> | ||||
| <p>These scales use <code><a href="http://colorspace.R-Forge.R-project.org//reference/hcl_palettes.html">colorspace::sequential_hcl()</a></code> to create a sequential, monotone color scale based on the primary accent color in your slides. Color scales matching the inverse slides are possible by setting the argument <code>inverse = TRUE</code>.</p> | <p>These scales use <code><a href="http://colorspace.R-Forge.R-project.org//reference/hcl_palettes.html">colorspace::sequential_hcl()</a></code> to create a sequential, monotone color scale based on the primary accent color in your slides. Color scales matching the inverse slides are possible by setting the argument <code>inverse = TRUE</code>.</p> | ||||
| <div class="sourceCode" id="cb10"><html><body><pre class="r"><span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="no">diamonds</span>, <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="kw">x</span> <span class="kw">=</span> <span class="no">cut</span>)) + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_bar</a></span>(<span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="kw">fill</span> <span class="kw">=</span> <span class="no">..count..</span>), <span class="kw">show.legend</span> <span class="kw">=</span> <span class="fl">FALSE</span>) + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(<span class="kw">x</span> <span class="kw">=</span> <span class="kw">NULL</span>, <span class="kw">y</span> <span class="kw">=</span> <span class="st">"Count"</span>, <span class="kw">title</span> <span class="kw">=</span> <span class="st">"Diamond Cut Quality"</span>) + | |||||
| <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>() + | |||||
| <div class="sourceCode" id="cb10"><pre class="downlit"> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="kw">diamonds</span>, <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(x = <span class="kw">cut</span>)) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_bar</a></span>(<span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(fill = <span class="kw">..count..</span>), show.legend = <span class="fl">FALSE</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(x = <span class="kw">NULL</span>, y = <span class="st">"Count"</span>, title = <span class="st">"Diamond Cut Quality"</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>() <span class="op">+</span> | |||||
| <span class="fu"><a href="../reference/scale_xaringan.html">scale_xaringan_fill_continuous</a></span>() | <span class="fu"><a href="../reference/scale_xaringan.html">scale_xaringan_fill_continuous</a></span>() | ||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="no">mpg</span>, <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="kw">x</span> <span class="kw">=</span> <span class="no">hwy</span>, <span class="kw">y</span> <span class="kw">=</span> <span class="no">cty</span>)) + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_count.html">geom_count</a></span>(<span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="kw">color</span> <span class="kw">=</span> <span class="no">..n..</span>), <span class="kw">show.legend</span> <span class="kw">=</span> <span class="fl">FALSE</span>) + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(<span class="kw">x</span> <span class="kw">=</span> <span class="st">"Highway MPG"</span>, <span class="kw">y</span> <span class="kw">=</span> <span class="st">"City MPG"</span>, <span class="kw">title</span> <span class="kw">=</span> <span class="st">"Fuel Efficiency"</span>) + | |||||
| <span class="fu"><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse</a></span>() + | |||||
| <span class="fu"><a href="../reference/scale_xaringan.html">scale_xaringan_color_continuous</a></span>(<span class="kw">breaks</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html">seq</a></span>(<span class="fl">3</span>, <span class="fl">12</span>, <span class="fl">2</span>), <span class="kw">inverse</span> <span class="kw">=</span> <span class="fl">TRUE</span>, <span class="kw">begin</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">end</span> <span class="kw">=</span> <span class="fl">0</span>)</pre></body></html></div> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="kw">mpg</span>, <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(x = <span class="kw">hwy</span>, y = <span class="kw">cty</span>)) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_count.html">geom_count</a></span>(<span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(color = <span class="kw">..n..</span>), show.legend = <span class="fl">FALSE</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(x = <span class="st">"Highway MPG"</span>, y = <span class="st">"City MPG"</span>, title = <span class="st">"Fuel Efficiency"</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse</a></span>() <span class="op">+</span> | |||||
| <span class="fu"><a href="../reference/scale_xaringan.html">scale_xaringan_color_continuous</a></span>(breaks = <span class="fu"><a href="https://rdrr.io/r/base/seq.html">seq</a></span>(<span class="fl">3</span>, <span class="fl">12</span>, <span class="fl">2</span>), inverse = <span class="fl">TRUE</span>, begin = <span class="fl">1</span>, end = <span class="fl">0</span>) | |||||
| </pre></div> | |||||
| <p><img src="ggplot2-themes_files/figure-html/scale-xaringan-1.png" width="48%"><img src="ggplot2-themes_files/figure-html/scale-xaringan-2.png" width="48%"></p> | <p><img src="ggplot2-themes_files/figure-html/scale-xaringan-1.png" width="48%"><img src="ggplot2-themes_files/figure-html/scale-xaringan-2.png" width="48%"></p> | ||||
| <p>In general, these color scales aren’t great at representing the underlying data. In both examples above, the color and fill scales duplicate information displayed via other aesthetics (the height of the bar or the size of the point). I recommend using these scales primarily for style, although the scales can be more or less effective depending on your color scheme.</p> | <p>In general, these color scales aren’t great at representing the underlying data. In both examples above, the color and fill scales duplicate information displayed via other aesthetics (the height of the bar or the size of the point). I recommend using these scales primarily for style, although the scales can be more or less effective depending on your color scheme.</p> | ||||
| <p>The scales come with a few more options:</p> | <p>The scales come with a few more options:</p> | ||||
| <li> | <li> | ||||
| <code>header_font_google = google_font("Oleo Script")</code>.</li> | <code>header_font_google = google_font("Oleo Script")</code>.</li> | ||||
| </ul> | </ul> | ||||
| <div class="sourceCode" id="cb11"><html><body><pre class="r"><span class="no">g_diamonds_with_text</span> <span class="kw"><-</span> | |||||
| <span class="no">g_diamonds</span> + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_text.html">geom_text</a></span>(<span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="kw">y</span> <span class="kw">=</span> <span class="no">..count..</span>, <span class="kw">label</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/format.html">format</a></span>(<span class="no">..count..</span>, <span class="kw">big.mark</span> <span class="kw">=</span> <span class="st">","</span>)), | |||||
| <span class="kw">vjust</span> <span class="kw">=</span> -<span class="fl">0.30</span>, <span class="kw">size</span> <span class="kw">=</span> <span class="fl">8</span>, <span class="kw">stat</span> <span class="kw">=</span> <span class="st">"count"</span>) + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(<span class="kw">x</span> <span class="kw">=</span> <span class="st">"Cut"</span>, <span class="kw">y</span> <span class="kw">=</span> <span class="st">"Count"</span>) | |||||
| <div class="sourceCode" id="cb11"><pre class="downlit"> | |||||
| <span class="kw">g_diamonds_with_text</span> <span class="op"><-</span> | |||||
| <span class="kw">g_diamonds</span> <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_text.html">geom_text</a></span>(<span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(y = <span class="kw">..count..</span>, label = <span class="fu"><a href="https://rdrr.io/r/base/format.html">format</a></span>(<span class="kw">..count..</span>, big.mark = <span class="st">","</span>)), | |||||
| vjust = <span class="op">-</span><span class="fl">0.30</span>, size = <span class="fl">8</span>, stat = <span class="st">"count"</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(x = <span class="st">"Cut"</span>, y = <span class="st">"Count"</span>) | |||||
| <span class="no">g_diamonds_with_text</span> + <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>()</pre></body></html></div> | |||||
| <span class="kw">g_diamonds_with_text</span> <span class="op">+</span> <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>() | |||||
| </pre></div> | |||||
| <p><img src="ggplot2-themes_files/figure-html/text%20demo-1.png" width="960"></p> | <p><img src="ggplot2-themes_files/figure-html/text%20demo-1.png" width="960"></p> | ||||
| <p><code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> applies the header font to the plot and axis titles and the text font to the axis ticks labels and any text geoms or annotations.</p> | <p><code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> applies the header font to the plot and axis titles and the text font to the axis ticks labels and any text geoms or annotations.</p> | ||||
| </div> | </div> | ||||
| <h3 class="hasAnchor"> | <h3 class="hasAnchor"> | ||||
| <a href="#manually-specify-plot-fonts" class="anchor"></a>Manually specify plot fonts</h3> | <a href="#manually-specify-plot-fonts" class="anchor"></a>Manually specify plot fonts</h3> | ||||
| <p>You can also specify specific fonts for your plot theme. Both <code>text_font</code> and <code>title_font</code> in <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> and <code><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse()</a></code> accept <code><a href="../reference/google_font.html">google_font()</a></code>s directly.</p> | <p>You can also specify specific fonts for your plot theme. Both <code>text_font</code> and <code>title_font</code> in <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> and <code><a href="../reference/theme_xaringan_inverse.html">theme_xaringan_inverse()</a></code> accept <code><a href="../reference/google_font.html">google_font()</a></code>s directly.</p> | ||||
| <div class="sourceCode" id="cb12"><html><body><pre class="r"><span class="no">g_diamonds_with_text</span> + | |||||
| <div class="sourceCode" id="cb12"><pre class="downlit"> | |||||
| <span class="kw">g_diamonds_with_text</span> <span class="op">+</span> | |||||
| <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>( | <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>( | ||||
| <span class="kw">text_font</span> <span class="kw">=</span> <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Ranga"</span>), | |||||
| <span class="kw">title_font</span> <span class="kw">=</span> <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Holtwood One SC"</span>) | |||||
| )</pre></body></html></div> | |||||
| text_font = <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Ranga"</span>), | |||||
| title_font = <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Holtwood One SC"</span>) | |||||
| ) | |||||
| </pre></div> | |||||
| <p><img src="ggplot2-themes_files/figure-html/text-demo-2-1.png" width="960"></p> | <p><img src="ggplot2-themes_files/figure-html/text-demo-2-1.png" width="960"></p> | ||||
| </div> | </div> | ||||
| <div id="using-fonts-not-in-google-fonts" class="section level3"> | <div id="using-fonts-not-in-google-fonts" class="section level3"> | ||||
| <p>but sysfonts won’t know where to find the TTF font files for this font.</p> | <p>but sysfonts won’t know where to find the TTF font files for this font.</p> | ||||
| <p>To register the font with sysfonts, we use <code><a href="https://rdrr.io/pkg/sysfonts/man/font_add.html">sysfonts::font_add()</a></code>, but first we need to download the font file — the <code><a href="https://rdrr.io/pkg/sysfonts/man/font_add.html">sysfonts::font_add()</a></code> function requires the font file to be local.</p> | <p>To register the font with sysfonts, we use <code><a href="https://rdrr.io/pkg/sysfonts/man/font_add.html">sysfonts::font_add()</a></code>, but first we need to download the font file — the <code><a href="https://rdrr.io/pkg/sysfonts/man/font_add.html">sysfonts::font_add()</a></code> function requires the font file to be local.</p> | ||||
| <p>By inspecting the CSS file at the link I used in <code>text_font_url</code>, I found a direct URL for the <code>.ttf</code> files for <em>GlacialIndifferenceRegular</em>. I’ve included the code I used to download the font to a temporary file below, but in case the URL breaks, I’ve included <em>Glacial Indifference</em> in the xaringanthemer package.</p> | <p>By inspecting the CSS file at the link I used in <code>text_font_url</code>, I found a direct URL for the <code>.ttf</code> files for <em>GlacialIndifferenceRegular</em>. I’ve included the code I used to download the font to a temporary file below, but in case the URL breaks, I’ve included <em>Glacial Indifference</em> in the xaringanthemer package.</p> | ||||
| <div class="sourceCode" id="cb14"><html><body><pre class="r"><span class="no">font_url</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/file.path.html">file.path</a></span>( | |||||
| <div class="sourceCode" id="cb14"><pre class="downlit"> | |||||
| <span class="kw">font_url</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/file.path.html">file.path</a></span>( | |||||
| <span class="st">"https://fontlibrary.org/assets/fonts/glacial-indifference"</span>, | <span class="st">"https://fontlibrary.org/assets/fonts/glacial-indifference"</span>, | ||||
| <span class="st">"5f2cf277506e19ec77729122f27b1faf/0820b3c58fed35de298219f314635982"</span>, | |||||
| <span class="st">"5f2cf277506e19ec77729122f27b1faf/0820b3c58fed35de298219f314635982"</span>, | |||||
| <span class="st">"GlacialIndifferenceRegular.ttf"</span> | <span class="st">"GlacialIndifferenceRegular.ttf"</span> | ||||
| ) | ) | ||||
| <span class="no">font_temp</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/tempfile.html">tempfile</a></span>() | |||||
| <span class="fu"><a href="https://rdrr.io/r/utils/download.file.html">download.file</a></span>(<span class="no">font_url</span>, <span class="no">font_temp</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb15"><html><body><pre class="r"><span class="co"># Path to the local custom font file</span> | |||||
| <span class="no">font_temp</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.file.html">system.file</a></span>( | |||||
| <span class="st">"fonts/GlacialIndifferenceRegular.ttf"</span>, <span class="kw">package</span> <span class="kw">=</span> <span class="st">"xaringanthemer"</span> | |||||
| <span class="kw">font_temp</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/tempfile.html">tempfile</a></span>() | |||||
| <span class="fu"><a href="https://rdrr.io/r/utils/download.file.html">download.file</a></span>(<span class="kw">font_url</span>, <span class="kw">font_temp</span>) | |||||
| </pre></div> | |||||
| <div class="sourceCode" id="cb15"><pre class="downlit"> | |||||
| <span class="co"># Path to the local custom font file</span> | |||||
| <span class="kw">font_temp</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.file.html">system.file</a></span>( | |||||
| <span class="st">"fonts/GlacialIndifferenceRegular.ttf"</span>, package = <span class="st">"xaringanthemer"</span> | |||||
| ) | ) | ||||
| <span class="co"># Register the font with sysfonts/showtext</span> | <span class="co"># Register the font with sysfonts/showtext</span> | ||||
| <span class="kw pkg">sysfonts</span><span class="kw ns">::</span><span class="fu"><a href="https://rdrr.io/pkg/sysfonts/man/font_add.html">font_add</a></span>(<span class="kw">family</span> <span class="kw">=</span> <span class="st">"GlacialIndifferenceRegular"</span>, <span class="kw">regular</span> <span class="kw">=</span> <span class="no">font_temp</span>) | |||||
| <span class="kw">sysfonts</span>::<span class="fu"><a href="https://rdrr.io/pkg/sysfonts/man/font_add.html">font_add</a></span>(family = <span class="st">"GlacialIndifferenceRegular"</span>, regular = <span class="kw">font_temp</span>) | |||||
| <span class="co"># Now it's available for use!</span> | <span class="co"># Now it's available for use!</span> | ||||
| <span class="no">g_diamonds_with_text</span> + | |||||
| <span class="kw">g_diamonds_with_text</span> <span class="op">+</span> | |||||
| <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>( | <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>( | ||||
| <span class="kw">text_font</span> <span class="kw">=</span> <span class="st">"GlacialIndifferenceRegular"</span>, | |||||
| <span class="kw">title_font</span> <span class="kw">=</span> <span class="st">"GlacialIndifferenceRegular"</span> | |||||
| )</pre></body></html></div> | |||||
| text_font = <span class="st">"GlacialIndifferenceRegular"</span>, | |||||
| title_font = <span class="st">"GlacialIndifferenceRegular"</span> | |||||
| ) | |||||
| </pre></div> | |||||
| <p><img src="ggplot2-themes_files/figure-html/sysfonts-custom-font-1.png" width="960"></p> | <p><img src="ggplot2-themes_files/figure-html/sysfonts-custom-font-1.png" width="960"></p> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <a href="#in-rstudio" class="anchor"></a>In RStudio</h3> | <a href="#in-rstudio" class="anchor"></a>In RStudio</h3> | ||||
| <p>showtext and RStudio’s graphic device don’t always work well together. Depending on your version of RStudio, if you try to preview plots that use <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code>, the fonts in the preview will still be the default sans font or you may not see a plot at all.</p> | <p>showtext and RStudio’s graphic device don’t always work well together. Depending on your version of RStudio, if you try to preview plots that use <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code>, the fonts in the preview will still be the default sans font or you may not see a plot at all.</p> | ||||
| <p>To work around this, open a new <code><a href="https://rdrr.io/r/grDevices/quartz.html">quartz()</a></code> (MacOS) or <code><a href="https://rdrr.io/r/grDevices/x11.html">x11()</a></code> (Windows/Unix) plot device. The plots will then render in a separate window. I usually create a <code><a href="https://rdrr.io/r/grDevices/quartz.html">quartz()</a></code> device with a similar size ratio to my slides.</p> | <p>To work around this, open a new <code><a href="https://rdrr.io/r/grDevices/quartz.html">quartz()</a></code> (MacOS) or <code><a href="https://rdrr.io/r/grDevices/x11.html">x11()</a></code> (Windows/Unix) plot device. The plots will then render in a separate window. I usually create a <code><a href="https://rdrr.io/r/grDevices/quartz.html">quartz()</a></code> device with a similar size ratio to my slides.</p> | ||||
| <div class="sourceCode" id="cb18"><html><body><pre class="r"><span class="co">## On Windows</span> | |||||
| <div class="sourceCode" id="cb18"><pre class="downlit"> | |||||
| <span class="co">## On Windows</span> | |||||
| <span class="co"># x11(width = 16 * 2/3, height = 9 * 2/3)</span> | <span class="co"># x11(width = 16 * 2/3, height = 9 * 2/3)</span> | ||||
| <span class="co">## On MacOS</span> | <span class="co">## On MacOS</span> | ||||
| <span class="fu"><a href="https://rdrr.io/r/grDevices/quartz.html">quartz</a></span>(<span class="kw">width</span> <span class="kw">=</span> <span class="fl">16</span> * <span class="fl">2</span>/<span class="fl">3</span>, <span class="kw">height</span> <span class="kw">=</span> <span class="fl">9</span> * <span class="fl">2</span>/<span class="fl">3</span>) | |||||
| <span class="fu"><a href="https://rdrr.io/r/grDevices/quartz.html">quartz</a></span>(width = <span class="fl">16</span> <span class="op">*</span> <span class="fl">2</span><span class="op">/</span><span class="fl">3</span>, height = <span class="fl">9</span> <span class="op">*</span> <span class="fl">2</span><span class="op">/</span><span class="fl">3</span>) | |||||
| <span class="co">## run plot code to preview in separate window</span> | <span class="co">## run plot code to preview in separate window</span> | ||||
| <span class="fu"><a href="https://rdrr.io/r/grDevices/dev.html">dev.off</a></span>() <span class="co"># call when done to close the device</span></pre></body></html></div> | |||||
| <span class="fu"><a href="https://rdrr.io/r/grDevices/dev.html">dev.off</a></span>() <span class="co"># call when done to close the device</span> | |||||
| </pre></div> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| <a href="#style_mono_light" class="anchor"></a><code>style_mono_light()</code> | <a href="#style_mono_light" class="anchor"></a><code>style_mono_light()</code> | ||||
| </h4> | </h4> | ||||
| <p>A light theme based around a single color.</p> | <p>A light theme based around a single color.</p> | ||||
| <div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="fu"><a href="../reference/style_mono_light.html">style_mono_light</a></span>(<span class="kw">base_color</span> <span class="kw">=</span> <span class="st">"#23395b"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb1"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_mono_light.html">style_mono_light</a></span>(base_color = <span class="st">"#23395b"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_light.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_light.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| <div id="style_mono_dark" class="section level4"> | <div id="style_mono_dark" class="section level4"> | ||||
| <a href="#style_mono_dark" class="anchor"></a><code>style_mono_dark()</code> | <a href="#style_mono_dark" class="anchor"></a><code>style_mono_dark()</code> | ||||
| </h4> | </h4> | ||||
| <p>A dark theme based around a single color.</p> | <p>A dark theme based around a single color.</p> | ||||
| <div class="sourceCode" id="cb2"><html><body><pre class="r"><span class="fu"><a href="../reference/style_mono_dark.html">style_mono_dark</a></span>(<span class="kw">base_color</span> <span class="kw">=</span> <span class="st">"#cbf7ed"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb2"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_mono_dark.html">style_mono_dark</a></span>(base_color = <span class="st">"#cbf7ed"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_dark.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_dark.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| <div id="style_mono_accent" class="section level4"> | <div id="style_mono_accent" class="section level4"> | ||||
| <a href="#style_mono_accent" class="anchor"></a><code>style_mono_accent()</code> | <a href="#style_mono_accent" class="anchor"></a><code>style_mono_accent()</code> | ||||
| </h4> | </h4> | ||||
| <p>The default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.).</p> | <p>The default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.).</p> | ||||
| <div class="sourceCode" id="cb3"><html><body><pre class="r"><span class="fu"><a href="../reference/style_mono_accent.html">style_mono_accent</a></span>(<span class="kw">base_color</span> <span class="kw">=</span> <span class="st">"#43418A"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb3"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_mono_accent.html">style_mono_accent</a></span>(base_color = <span class="st">"#43418A"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_accent.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_accent.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| <div id="style_mono_accent_inverse" class="section level4"> | <div id="style_mono_accent_inverse" class="section level4"> | ||||
| <a href="#style_mono_accent_inverse" class="anchor"></a><code>style_mono_accent_inverse()</code> | <a href="#style_mono_accent_inverse" class="anchor"></a><code>style_mono_accent_inverse()</code> | ||||
| </h4> | </h4> | ||||
| <p>An “inverted” default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.).</p> | <p>An “inverted” default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.).</p> | ||||
| <div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="fu"><a href="../reference/style_mono_accent_inverse.html">style_mono_accent_inverse</a></span>(<span class="kw">base_color</span> <span class="kw">=</span> <span class="st">"#3C989E"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb4"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_mono_accent_inverse.html">style_mono_accent_inverse</a></span>(base_color = <span class="st">"#3C989E"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_accent_inverse.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_accent_inverse.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <a href="#style_duo" class="anchor"></a><code>style_duo()</code> | <a href="#style_duo" class="anchor"></a><code>style_duo()</code> | ||||
| </h4> | </h4> | ||||
| <p>A two-colored theme based on a primary and secondary color.</p> | <p>A two-colored theme based on a primary and secondary color.</p> | ||||
| <div class="sourceCode" id="cb5"><html><body><pre class="r"><span class="fu"><a href="../reference/style_duo.html">style_duo</a></span>(<span class="kw">primary_color</span> <span class="kw">=</span> <span class="st">"#1F4257"</span>, <span class="kw">secondary_color</span> <span class="kw">=</span> <span class="st">"#F97B64"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb5"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_duo.html">style_duo</a></span>(primary_color = <span class="st">"#1F4257"</span>, secondary_color = <span class="st">"#F97B64"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_duo.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_duo.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| <div id="style_duo_accent" class="section level4"> | <div id="style_duo_accent" class="section level4"> | ||||
| <a href="#style_duo_accent" class="anchor"></a><code>style_duo_accent()</code> | <a href="#style_duo_accent" class="anchor"></a><code>style_duo_accent()</code> | ||||
| </h4> | </h4> | ||||
| <p>The default Xaringan theme with two accent colors.</p> | <p>The default Xaringan theme with two accent colors.</p> | ||||
| <div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="fu"><a href="../reference/style_duo_accent.html">style_duo_accent</a></span>(<span class="kw">primary_color</span> <span class="kw">=</span> <span class="st">"#035AA6"</span>, <span class="kw">secondary_color</span> <span class="kw">=</span> <span class="st">"#03A696"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb6"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_duo_accent.html">style_duo_accent</a></span>(primary_color = <span class="st">"#035AA6"</span>, secondary_color = <span class="st">"#03A696"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_duo_accent.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_duo_accent.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| <div id="style_duo_accent_inverse" class="section level4"> | <div id="style_duo_accent_inverse" class="section level4"> | ||||
| <a href="#style_duo_accent_inverse" class="anchor"></a><code>style_duo_accent_inverse()</code> | <a href="#style_duo_accent_inverse" class="anchor"></a><code>style_duo_accent_inverse()</code> | ||||
| </h4> | </h4> | ||||
| <p>An “inverted” default Xaringan theme with two accent colors.</p> | <p>An “inverted” default Xaringan theme with two accent colors.</p> | ||||
| <div class="sourceCode" id="cb7"><html><body><pre class="r"><span class="fu"><a href="../reference/style_duo_accent_inverse.html">style_duo_accent_inverse</a></span>(<span class="kw">primary_color</span> <span class="kw">=</span> <span class="st">"#035AA6"</span>, <span class="kw">secondary_color</span> <span class="kw">=</span> <span class="st">"#03A696"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb7"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_duo_accent_inverse.html">style_duo_accent_inverse</a></span>(primary_color = <span class="st">"#035AA6"</span>, secondary_color = <span class="st">"#03A696"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_duo_accent_inverse.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_duo_accent_inverse.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <h4 class="hasAnchor"> | <h4 class="hasAnchor"> | ||||
| <a href="#style_solarized_light" class="anchor"></a><code>style_solarized_light()</code> | <a href="#style_solarized_light" class="anchor"></a><code>style_solarized_light()</code> | ||||
| </h4> | </h4> | ||||
| <div class="sourceCode" id="cb8"><html><body><pre class="r"><span class="fu"><a href="../reference/style_solarized_light.html">style_solarized_light</a></span>()</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb8"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_solarized_light.html">style_solarized_light</a></span>() | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_solarized_light.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_solarized_light.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| <div id="style_solarized_dark" class="section level4"> | <div id="style_solarized_dark" class="section level4"> | ||||
| <h4 class="hasAnchor"> | <h4 class="hasAnchor"> | ||||
| <a href="#style_solarized_dark" class="anchor"></a><code>style_solarized_dark()</code> | <a href="#style_solarized_dark" class="anchor"></a><code>style_solarized_dark()</code> | ||||
| </h4> | </h4> | ||||
| <div class="sourceCode" id="cb9"><html><body><pre class="r"><span class="fu"><a href="../reference/style_solarized_dark.html">style_solarized_dark</a></span>()</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb9"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_solarized_dark.html">style_solarized_dark</a></span>() | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_solarized_dark.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_solarized_dark.png" data-external="1"></p> | ||||
| <p>To do this, your YAML header should look more-or-less like this:</p> | <p>To do this, your YAML header should look more-or-less like this:</p> | ||||
| <div class="sourceCode" id="cb10"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb10-1"><a href="#cb10-1"></a><span class="fu">output</span><span class="kw">:</span></span> | <div class="sourceCode" id="cb10"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb10-1"><a href="#cb10-1"></a><span class="fu">output</span><span class="kw">:</span></span> | ||||
| <a href="#colors" class="anchor"></a>Colors</h2> | <a href="#colors" class="anchor"></a>Colors</h2> | ||||
| <p>When designing your xaringan theme, you may have additional colors in your desired color palette beyond those used in the accent colors of the mono and duotone styles.</p> | <p>When designing your xaringan theme, you may have additional colors in your desired color palette beyond those used in the accent colors of the mono and duotone styles.</p> | ||||
| <p>The <code>style*()</code> functions in xaringanthemer include a <code>colors</code> argument that lets you quickly define additional colors to use in your slides. This argument takes a vector of named colors</p> | <p>The <code>style*()</code> functions in xaringanthemer include a <code>colors</code> argument that lets you quickly define additional colors to use in your slides. This argument takes a vector of named colors</p> | ||||
| <div class="sourceCode" id="cb11"><html><body><pre class="r"><span class="no">colors</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>( | |||||
| <span class="kw">red</span> <span class="kw">=</span> <span class="st">"#f34213"</span>, | |||||
| <span class="kw">purple</span> <span class="kw">=</span> <span class="st">"#3e2f5b"</span>, | |||||
| <span class="kw">orange</span> <span class="kw">=</span> <span class="st">"#ff8811"</span>, | |||||
| <span class="kw">green</span> <span class="kw">=</span> <span class="st">"#136f63"</span>, | |||||
| <span class="kw">white</span> <span class="kw">=</span> <span class="st">"#FFFFFF"</span>, | |||||
| )</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb11"><pre class="downlit"> | |||||
| <span class="kw">colors</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>( | |||||
| red = <span class="st">"#f34213"</span>, | |||||
| purple = <span class="st">"#3e2f5b"</span>, | |||||
| orange = <span class="st">"#ff8811"</span>, | |||||
| green = <span class="st">"#136f63"</span>, | |||||
| white = <span class="st">"#FFFFFF"</span>, | |||||
| ) | |||||
| </pre></div> | |||||
| <p>and creates CSS classes from the color name that set the text color — e.g. <code>.red</code> — or that set the background color — e.g. <code>.bg-red</code>. If you use custom CSS in your slides, the color name is also stored in a CSS variable — e.g. <code><a href="https://rdrr.io/r/stats/cor.html">var(--red)</a></code>.</p> | <p>and creates CSS classes from the color name that set the text color — e.g. <code>.red</code> — or that set the background color — e.g. <code>.bg-red</code>. If you use custom CSS in your slides, the color name is also stored in a CSS variable — e.g. <code><a href="https://rdrr.io/r/stats/cor.html">var(--red)</a></code>.</p> | ||||
| <p>So slide text like this</p> | <p>So slide text like this</p> | ||||
| <div class="sourceCode" id="cb12"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb12-1"><a href="#cb12-1"></a>This **.red[simple]** .white.bg-purple[demo] </span> | <div class="sourceCode" id="cb12"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb12-1"><a href="#cb12-1"></a>This **.red[simple]** .white.bg-purple[demo] </span> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| <p><strong>xaringanthemer</strong> even provides a [ggplot2] theme with <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> that uses the colors and fonts from your slide theme. Built on the <a href="https://github.com/yixuan/showtext">showtext</a> package, and designed to work seamlessly with <a href="https://fonts.google.com">Google Fonts</a>.</p> | <p><strong>xaringanthemer</strong> even provides a [ggplot2] theme with <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code> that uses the colors and fonts from your slide theme. Built on the <a href="https://github.com/yixuan/showtext">showtext</a> package, and designed to work seamlessly with <a href="https://fonts.google.com">Google Fonts</a>.</p> | ||||
| <p>Color and fill scales are also provided for matching sequential color scales based on the primary color used in your slides. See <code><a href="../reference/scale_xaringan.html">?scale_xaringan</a></code> for more details.</p> | <p>Color and fill scales are also provided for matching sequential color scales based on the primary color used in your slides. See <code><a href="../reference/scale_xaringan.html">?scale_xaringan</a></code> for more details.</p> | ||||
| <p>More details and examples can be found in <code><a href="../articles/ggplot2-themes.html">vignette("ggplot2-themes")</a></code>.</p> | <p>More details and examples can be found in <code><a href="../articles/ggplot2-themes.html">vignette("ggplot2-themes")</a></code>.</p> | ||||
| <div class="sourceCode" id="cb3"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="no">ggplot2</span>) | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="no">diamonds</span>) + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="no">cut</span>, <span class="kw">fill</span> <span class="kw">=</span> <span class="no">cut</span>) + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_bar</a></span>(<span class="kw">show.legend</span> <span class="kw">=</span> <span class="fl">FALSE</span>) + | |||||
| <div class="sourceCode" id="cb3"><pre class="downlit"> | |||||
| <span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="kw"><a href="http://ggplot2.tidyverse.org">ggplot2</a></span>) | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="kw">diamonds</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="kw">cut</span>, fill = <span class="kw">cut</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_bar</a></span>(show.legend = <span class="fl">FALSE</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>( | <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>( | ||||
| <span class="kw">x</span> <span class="kw">=</span> <span class="st">"Cut"</span>, | |||||
| <span class="kw">y</span> <span class="kw">=</span> <span class="st">"Count"</span>, | |||||
| <span class="kw">title</span> <span class="kw">=</span> <span class="st">"A Fancy diamonds Plot"</span> | |||||
| ) + | |||||
| <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>(<span class="kw">background_color</span> <span class="kw">=</span> <span class="st">"#FFFFFF"</span>) + | |||||
| <span class="fu"><a href="../reference/scale_xaringan.html">scale_xaringan_fill_discrete</a></span>()</pre></body></html></div> | |||||
| x = <span class="st">"Cut"</span>, | |||||
| y = <span class="st">"Count"</span>, | |||||
| title = <span class="st">"A Fancy diamonds Plot"</span> | |||||
| ) <span class="op">+</span> | |||||
| <span class="fu"><a href="../reference/theme_xaringan.html">theme_xaringan</a></span>(background_color = <span class="st">"#FFFFFF"</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="../reference/scale_xaringan.html">scale_xaringan_fill_discrete</a></span>() | |||||
| </pre></div> | |||||
| <p><img src="../reference/figures/index-theme_xaringan_demo-1.png"></p> | <p><img src="../reference/figures/index-theme_xaringan_demo-1.png"></p> | ||||
| </div> | </div> | ||||
| <div id="tab-completion" class="section level3"> | <div id="tab-completion" class="section level3"> | ||||
| <a href="#style_mono_light" class="anchor"></a><code>style_mono_light()</code> | <a href="#style_mono_light" class="anchor"></a><code>style_mono_light()</code> | ||||
| </h4> | </h4> | ||||
| <p>A light theme based around a single color.</p> | <p>A light theme based around a single color.</p> | ||||
| <div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="fu"><a href="../reference/style_mono_light.html">style_mono_light</a></span>(<span class="kw">base_color</span> <span class="kw">=</span> <span class="st">"#23395b"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb4"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_mono_light.html">style_mono_light</a></span>(base_color = <span class="st">"#23395b"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_light.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_light.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| <div id="style_mono_dark" class="section level4"> | <div id="style_mono_dark" class="section level4"> | ||||
| <a href="#style_mono_dark" class="anchor"></a><code>style_mono_dark()</code> | <a href="#style_mono_dark" class="anchor"></a><code>style_mono_dark()</code> | ||||
| </h4> | </h4> | ||||
| <p>A dark theme based around a single color.</p> | <p>A dark theme based around a single color.</p> | ||||
| <div class="sourceCode" id="cb5"><html><body><pre class="r"><span class="fu"><a href="../reference/style_mono_dark.html">style_mono_dark</a></span>(<span class="kw">base_color</span> <span class="kw">=</span> <span class="st">"#cbf7ed"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb5"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_mono_dark.html">style_mono_dark</a></span>(base_color = <span class="st">"#cbf7ed"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_dark.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_dark.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| <div id="style_mono_accent" class="section level4"> | <div id="style_mono_accent" class="section level4"> | ||||
| <a href="#style_mono_accent" class="anchor"></a><code>style_mono_accent()</code> | <a href="#style_mono_accent" class="anchor"></a><code>style_mono_accent()</code> | ||||
| </h4> | </h4> | ||||
| <p>The default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.).</p> | <p>The default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.).</p> | ||||
| <div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="fu"><a href="../reference/style_mono_accent.html">style_mono_accent</a></span>(<span class="kw">base_color</span> <span class="kw">=</span> <span class="st">"#43418A"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb6"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_mono_accent.html">style_mono_accent</a></span>(base_color = <span class="st">"#43418A"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_accent.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_accent.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| <div id="style_mono_accent_inverse" class="section level4"> | <div id="style_mono_accent_inverse" class="section level4"> | ||||
| <a href="#style_mono_accent_inverse" class="anchor"></a><code>style_mono_accent_inverse()</code> | <a href="#style_mono_accent_inverse" class="anchor"></a><code>style_mono_accent_inverse()</code> | ||||
| </h4> | </h4> | ||||
| <p>An “inverted” default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.).</p> | <p>An “inverted” default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.).</p> | ||||
| <div class="sourceCode" id="cb7"><html><body><pre class="r"><span class="fu"><a href="../reference/style_mono_accent_inverse.html">style_mono_accent_inverse</a></span>(<span class="kw">base_color</span> <span class="kw">=</span> <span class="st">"#3C989E"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb7"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_mono_accent_inverse.html">style_mono_accent_inverse</a></span>(base_color = <span class="st">"#3C989E"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_accent_inverse.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_mono_accent_inverse.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <a href="#style_duo" class="anchor"></a><code>style_duo()</code> | <a href="#style_duo" class="anchor"></a><code>style_duo()</code> | ||||
| </h4> | </h4> | ||||
| <p>A two-colored theme based on a primary and secondary color.</p> | <p>A two-colored theme based on a primary and secondary color.</p> | ||||
| <div class="sourceCode" id="cb8"><html><body><pre class="r"><span class="fu"><a href="../reference/style_duo.html">style_duo</a></span>(<span class="kw">primary_color</span> <span class="kw">=</span> <span class="st">"#1F4257"</span>, <span class="kw">secondary_color</span> <span class="kw">=</span> <span class="st">"#F97B64"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb8"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_duo.html">style_duo</a></span>(primary_color = <span class="st">"#1F4257"</span>, secondary_color = <span class="st">"#F97B64"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_duo.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_duo.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| <div id="style_duo_accent" class="section level4"> | <div id="style_duo_accent" class="section level4"> | ||||
| <a href="#style_duo_accent" class="anchor"></a><code>style_duo_accent()</code> | <a href="#style_duo_accent" class="anchor"></a><code>style_duo_accent()</code> | ||||
| </h4> | </h4> | ||||
| <p>The default Xaringan theme with two accent colors.</p> | <p>The default Xaringan theme with two accent colors.</p> | ||||
| <div class="sourceCode" id="cb9"><html><body><pre class="r"><span class="fu"><a href="../reference/style_duo_accent.html">style_duo_accent</a></span>(<span class="kw">primary_color</span> <span class="kw">=</span> <span class="st">"#035AA6"</span>, <span class="kw">secondary_color</span> <span class="kw">=</span> <span class="st">"#03A696"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb9"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_duo_accent.html">style_duo_accent</a></span>(primary_color = <span class="st">"#035AA6"</span>, secondary_color = <span class="st">"#03A696"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_duo_accent.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_duo_accent.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| <div id="style_duo_accent_inverse" class="section level4"> | <div id="style_duo_accent_inverse" class="section level4"> | ||||
| <a href="#style_duo_accent_inverse" class="anchor"></a><code>style_duo_accent_inverse()</code> | <a href="#style_duo_accent_inverse" class="anchor"></a><code>style_duo_accent_inverse()</code> | ||||
| </h4> | </h4> | ||||
| <p>An “inverted” default Xaringan theme with two accent colors.</p> | <p>An “inverted” default Xaringan theme with two accent colors.</p> | ||||
| <div class="sourceCode" id="cb10"><html><body><pre class="r"><span class="fu"><a href="../reference/style_duo_accent_inverse.html">style_duo_accent_inverse</a></span>(<span class="kw">primary_color</span> <span class="kw">=</span> <span class="st">"#035AA6"</span>, <span class="kw">secondary_color</span> <span class="kw">=</span> <span class="st">"#03A696"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb10"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_duo_accent_inverse.html">style_duo_accent_inverse</a></span>(primary_color = <span class="st">"#035AA6"</span>, secondary_color = <span class="st">"#03A696"</span>) | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_duo_accent_inverse.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_duo_accent_inverse.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <h4 class="hasAnchor"> | <h4 class="hasAnchor"> | ||||
| <a href="#style_solarized_light" class="anchor"></a><code>style_solarized_light()</code> | <a href="#style_solarized_light" class="anchor"></a><code>style_solarized_light()</code> | ||||
| </h4> | </h4> | ||||
| <div class="sourceCode" id="cb11"><html><body><pre class="r"><span class="fu"><a href="../reference/style_solarized_light.html">style_solarized_light</a></span>()</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb11"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_solarized_light.html">style_solarized_light</a></span>() | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_solarized_light.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_solarized_light.png" data-external="1"></p> | ||||
| </div> | </div> | ||||
| <div id="style_solarized_dark" class="section level4"> | <div id="style_solarized_dark" class="section level4"> | ||||
| <h4 class="hasAnchor"> | <h4 class="hasAnchor"> | ||||
| <a href="#style_solarized_dark" class="anchor"></a><code>style_solarized_dark()</code> | <a href="#style_solarized_dark" class="anchor"></a><code>style_solarized_dark()</code> | ||||
| </h4> | </h4> | ||||
| <div class="sourceCode" id="cb12"><html><body><pre class="r"><span class="fu"><a href="../reference/style_solarized_dark.html">style_solarized_dark</a></span>()</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb12"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_solarized_dark.html">style_solarized_dark</a></span>() | |||||
| </pre></div> | |||||
| <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_solarized_dark.png" data-external="1"></p> | <p><img src="https://raw.githubusercontent.com/gadenbuie/xaringanthemer/assets/example_solarized_dark.png" data-external="1"></p> | ||||
| <p>To do this, your YAML header should look more-or-less like this:</p> | <p>To do this, your YAML header should look more-or-less like this:</p> | ||||
| <div class="sourceCode" id="cb13"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb13-1"><a href="#cb13-1"></a><span class="fu">output</span><span class="kw">:</span></span> | <div class="sourceCode" id="cb13"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb13-1"><a href="#cb13-1"></a><span class="fu">output</span><span class="kw">:</span></span> | ||||
| <div id="theme-settings" class="section level2"> | <div id="theme-settings" class="section level2"> | ||||
| <h2 class="hasAnchor"> | <h2 class="hasAnchor"> | ||||
| <a href="#theme-settings" class="anchor"></a>Theme Settings</h2> | <a href="#theme-settings" class="anchor"></a>Theme Settings</h2> | ||||
| <p>The theme functions listed above are just wrappers around the central function of this package, <code><a href="../reference/style_xaringan.html">style_xaringan()</a></code>. If you want to start from the default <strong>xaringan</strong> theme and make a few modifications, start there.</p> | |||||
| <p>All of the theme template variables are repeated in each of the theme functions (instead of relying on <code>...</code>) so that you can use autocompletion to find and change the defaults for any theme function. To override the default value of any theme functions, set the appropriate argument in the theme function. A table of all template variables is included in <a href="template-variables.html"><code><a href="../articles/template-variables.html">vignette("template-variables", "xaringanthemer")</a></code></a>.</p> | |||||
| <p>The theme functions listed above are just wrappers around the central function of this package, <code><a href="../reference/xaringanthemer_font_default.html">style_xaringan()</a></code>. If you want to start from the default <strong>xaringan</strong> theme and make a few modifications, start there.</p> | |||||
| <p>All of the theme template variables are repeated in each of the theme functions (instead of relying on <code>...</code>) so that you can use autocompletion to find and change the defaults for any theme function. To override the default value of any theme functions, set the appropriate argument in the theme function. A table of all template variables is included in <a href="template-variables.html"><code>vignette("template-variables", "xaringanthemer")</code></a>.</p> | |||||
| <p>As an example, try loading <code>xaringanthemer</code>, type out <code>style_duo_theme(</code> and then press <kbd>Tab</kbd> to see all of the theme options.</p> | <p>As an example, try loading <code>xaringanthemer</code>, type out <code>style_duo_theme(</code> and then press <kbd>Tab</kbd> to see all of the theme options.</p> | ||||
| <p>All of the theme options are named so that you first think of the element you want to change, then the property of that element.</p> | <p>All of the theme options are named so that you first think of the element you want to change, then the property of that element.</p> | ||||
| <p>Here are some of the <code>text_</code> theme options:</p> | <p>Here are some of the <code>text_</code> theme options:</p> | ||||
| </div> | </div> | ||||
| <p>These fonts are easier to read on screens and at a distance during presentations, and they support a wide variety of languages and weights. Another reason for the change is that the xaringan (remarkjs) default body font, <em>Droid Serif</em>, is no longer officially included in Google Fonts.</p> | <p>These fonts are easier to read on screens and at a distance during presentations, and they support a wide variety of languages and weights. Another reason for the change is that the xaringan (remarkjs) default body font, <em>Droid Serif</em>, is no longer officially included in Google Fonts.</p> | ||||
| <p>If you would like to use the fonts from the <a href="https://slides.yihui.name/xaringan/">default xaringan theme</a>, you can use the following arguments in your style function.</p> | <p>If you would like to use the fonts from the <a href="https://slides.yihui.name/xaringan/">default xaringan theme</a>, you can use the following arguments in your style function.</p> | ||||
| <div class="sourceCode" id="cb14"><html><body><pre class="r"><span class="fu"><a href="../reference/style_xaringan.html">style_xaringan</a></span>( | |||||
| <span class="kw">text_font_family</span> <span class="kw">=</span> <span class="st">"Droid Serif"</span>, | |||||
| <span class="kw">text_font_url</span> <span class="kw">=</span> <span class="st">"https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic"</span>, | |||||
| <span class="kw">header_font_google</span> <span class="kw">=</span> <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Yanone Kaffeesatz"</span>) | |||||
| )</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb14"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/xaringanthemer_font_default.html">style_xaringan</a></span>( | |||||
| text_font_family = <span class="st">"Droid Serif"</span>, | |||||
| text_font_url = <span class="st">"https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic"</span>, | |||||
| header_font_google = <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Yanone Kaffeesatz"</span>) | |||||
| ) | |||||
| </pre></div> | |||||
| </div> | </div> | ||||
| <div id="custom-and-google-font-fonts" class="section level3"> | <div id="custom-and-google-font-fonts" class="section level3"> | ||||
| <h3 class="hasAnchor"> | <h3 class="hasAnchor"> | ||||
| <a href="#custom-and-google-font-fonts" class="anchor"></a>Custom and <em>Google Font</em> Fonts</h3> | <a href="#custom-and-google-font-fonts" class="anchor"></a>Custom and <em>Google Font</em> Fonts</h3> | ||||
| <p><strong>xaringanthemer</strong> makes it easy to use <a href="https://fonts.google.com">Google Fonts</a> in your presentations (provided you have an internet connection during the presentation) or to fully specify your font files.</p> | <p><strong>xaringanthemer</strong> makes it easy to use <a href="https://fonts.google.com">Google Fonts</a> in your presentations (provided you have an internet connection during the presentation) or to fully specify your font files.</p> | ||||
| <p>To use <a href="https://fonts.google.com">Google Fonts</a>, set the <code><type>_font_google</code> theme arguments – <code>text_font_google</code>, <code>header_font_google</code>, <code>code_font_google</code> — using the <code><a href="../reference/google_font.html">google_font()</a></code> helper. The help documentation in <code><a href="../reference/google_font.html">?google_font</a></code> provides more info.</p> | <p>To use <a href="https://fonts.google.com">Google Fonts</a>, set the <code><type>_font_google</code> theme arguments – <code>text_font_google</code>, <code>header_font_google</code>, <code>code_font_google</code> — using the <code><a href="../reference/google_font.html">google_font()</a></code> helper. The help documentation in <code><a href="../reference/google_font.html">?google_font</a></code> provides more info.</p> | ||||
| <div class="sourceCode" id="cb15"><html><body><pre class="r"><span class="fu"><a href="../reference/style_mono_light.html">style_mono_light</a></span>( | |||||
| <span class="kw">header_font_google</span> <span class="kw">=</span> <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Josefin Slab"</span>, <span class="st">"600"</span>), | |||||
| <span class="kw">text_font_google</span> <span class="kw">=</span> <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Work Sans"</span>, <span class="st">"300"</span>, <span class="st">"300i"</span>), | |||||
| <span class="kw">code_font_google</span> <span class="kw">=</span> <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"IBM Plex Mono"</span>) | |||||
| )</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb15"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_mono_light.html">style_mono_light</a></span>( | |||||
| header_font_google = <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Josefin Slab"</span>, <span class="st">"600"</span>), | |||||
| text_font_google = <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Work Sans"</span>, <span class="st">"300"</span>, <span class="st">"300i"</span>), | |||||
| code_font_google = <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"IBM Plex Mono"</span>) | |||||
| ) | |||||
| </pre></div> | |||||
| <p>If you set an <code><type>_font_google</code> theme arguments, then <code><type>_font_family</code>, <code><type>_font_weight</code> and <code><type>_font_url</code> are overwritten – where <code><type></code> is one of <code>header</code>, <code>text</code>, or <code>code</code>.</p> | <p>If you set an <code><type>_font_google</code> theme arguments, then <code><type>_font_family</code>, <code><type>_font_weight</code> and <code><type>_font_url</code> are overwritten – where <code><type></code> is one of <code>header</code>, <code>text</code>, or <code>code</code>.</p> | ||||
| <p>To use a font hosted outside of Google fonts, you need to provide both <code><type>_font_family</code> and <code><type>_font_url</code>. For example, suppose you want to use a code font with ligatures for your code chunks, such as <a href="https://github.com/tonsky/FiraCode">Fira Code</a>, which would be declared with <code>code_font_family</code>. The <a href="https://github.com/tonsky/FiraCode#browser-support">browser usage</a> section of the Fira Code README provides a CSS URL to be used with an <code>@import</code> statement that you can use with the <code>code_font_url</code> argument.</p> | <p>To use a font hosted outside of Google fonts, you need to provide both <code><type>_font_family</code> and <code><type>_font_url</code>. For example, suppose you want to use a code font with ligatures for your code chunks, such as <a href="https://github.com/tonsky/FiraCode">Fira Code</a>, which would be declared with <code>code_font_family</code>. The <a href="https://github.com/tonsky/FiraCode#browser-support">browser usage</a> section of the Fira Code README provides a CSS URL to be used with an <code>@import</code> statement that you can use with the <code>code_font_url</code> argument.</p> | ||||
| <div class="sourceCode" id="cb16"><html><body><pre class="r"><span class="fu"><a href="../reference/style_solarized_dark.html">style_solarized_dark</a></span>( | |||||
| <span class="kw">code_font_family</span> <span class="kw">=</span> <span class="st">"Fira Code"</span>, | |||||
| <span class="kw">code_font_url</span> <span class="kw">=</span> <span class="st">"https://cdn.jsdelivr.net/gh/tonsky/FiraCode@2/distr/fira_code.css"</span> | |||||
| )</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb16"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_solarized_dark.html">style_solarized_dark</a></span>( | |||||
| code_font_family = <span class="st">"Fira Code"</span>, | |||||
| code_font_url = <span class="st">"https://cdn.jsdelivr.net/gh/tonsky/FiraCode@2/distr/fira_code.css"</span> | |||||
| ) | |||||
| </pre></div> | |||||
| <p>Remember that you need to supply either <code><type>_google_font</code> using the <code><a href="../reference/google_font.html">google_font()</a></code> helper <em>or both</em> <code><type>_font_family</code> and <code><type>_font_url</code>.</p> | <p>Remember that you need to supply either <code><type>_google_font</code> using the <code><a href="../reference/google_font.html">google_font()</a></code> helper <em>or both</em> <code><type>_font_family</code> and <code><type>_font_url</code>.</p> | ||||
| </div> | </div> | ||||
| <div id="using-additional-fonts" class="section level3"> | <div id="using-additional-fonts" class="section level3"> | ||||
| <h3 class="hasAnchor"> | <h3 class="hasAnchor"> | ||||
| <a href="#using-additional-fonts" class="anchor"></a>Using Additional Fonts</h3> | <a href="#using-additional-fonts" class="anchor"></a>Using Additional Fonts</h3> | ||||
| <p>If you want to use additional fonts for use in <a href="#adding-custom-css">custom CSS definitions</a>, use the <code>extra_fonts</code> argument to pass a list of URLs or <code><a href="../reference/google_font.html">google_font()</a></code>s. Notice that you will need to add custom CSS (for example, via <code>extra_css</code>) to use the fonts imported in <code>extra_fonts</code>.</p> | <p>If you want to use additional fonts for use in <a href="#adding-custom-css">custom CSS definitions</a>, use the <code>extra_fonts</code> argument to pass a list of URLs or <code><a href="../reference/google_font.html">google_font()</a></code>s. Notice that you will need to add custom CSS (for example, via <code>extra_css</code>) to use the fonts imported in <code>extra_fonts</code>.</p> | ||||
| <div class="sourceCode" id="cb17"><html><body><pre class="r"><span class="fu"><a href="../reference/style_mono_light.html">style_mono_light</a></span>( | |||||
| <span class="kw">extra_fonts</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>( | |||||
| <div class="sourceCode" id="cb17"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_mono_light.html">style_mono_light</a></span>( | |||||
| extra_fonts = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>( | |||||
| <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Sofia"</span>), | <span class="fu"><a href="../reference/google_font.html">google_font</a></span>(<span class="st">"Sofia"</span>), | ||||
| <span class="co"># Young Serif by uplaod.fr</span> | <span class="co"># Young Serif by uplaod.fr</span> | ||||
| <span class="st">"https://cdn.jsdelivr.net/gh/uplaod/YoungSerif/fonts/webfonts/fontface.css"</span>, | <span class="st">"https://cdn.jsdelivr.net/gh/uplaod/YoungSerif/fonts/webfonts/fontface.css"</span>, | ||||
| ), | ), | ||||
| <span class="kw">extra_css</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>( | |||||
| <span class="st">".title-slide h2"</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"font-family"</span> <span class="kw">=</span> <span class="st">"Sofia"</span>), | |||||
| <span class="kw">blockquote</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"font-family"</span> <span class="kw">=</span> <span class="st">"youngserifregular"</span>) | |||||
| extra_css = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>( | |||||
| <span class="st">".title-slide h2"</span> = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"font-family"</span> = <span class="st">"Sofia"</span>), | |||||
| blockquote = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"font-family"</span> = <span class="st">"youngserifregular"</span>) | |||||
| ) | ) | ||||
| )</pre></body></html></div> | |||||
| ) | |||||
| </pre></div> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div id="colors" class="section level2"> | <div id="colors" class="section level2"> | ||||
| <a href="#colors" class="anchor"></a>Colors</h2> | <a href="#colors" class="anchor"></a>Colors</h2> | ||||
| <p>When designing your xaringan theme, you may have additional colors in your desired color palette beyond those used in the accent colors of the mono and duotone styles.</p> | <p>When designing your xaringan theme, you may have additional colors in your desired color palette beyond those used in the accent colors of the mono and duotone styles.</p> | ||||
| <p>The <code>style*()</code> functions in xaringanthemer include a <code>colors</code> argument that lets you quickly define additional colors to use in your slides. This argument takes a vector of named colors</p> | <p>The <code>style*()</code> functions in xaringanthemer include a <code>colors</code> argument that lets you quickly define additional colors to use in your slides. This argument takes a vector of named colors</p> | ||||
| <div class="sourceCode" id="cb18"><html><body><pre class="r"><span class="no">colors</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>( | |||||
| <span class="kw">red</span> <span class="kw">=</span> <span class="st">"#f34213"</span>, | |||||
| <span class="kw">purple</span> <span class="kw">=</span> <span class="st">"#3e2f5b"</span>, | |||||
| <span class="kw">orange</span> <span class="kw">=</span> <span class="st">"#ff8811"</span>, | |||||
| <span class="kw">green</span> <span class="kw">=</span> <span class="st">"#136f63"</span>, | |||||
| <span class="kw">white</span> <span class="kw">=</span> <span class="st">"#FFFFFF"</span>, | |||||
| )</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb18"><pre class="downlit"> | |||||
| <span class="kw">colors</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>( | |||||
| red = <span class="st">"#f34213"</span>, | |||||
| purple = <span class="st">"#3e2f5b"</span>, | |||||
| orange = <span class="st">"#ff8811"</span>, | |||||
| green = <span class="st">"#136f63"</span>, | |||||
| white = <span class="st">"#FFFFFF"</span>, | |||||
| ) | |||||
| </pre></div> | |||||
| <p>and creates CSS classes from the color name that set the text color — e.g. <code>.red</code> — or that set the background color — e.g. <code>.bg-red</code>. If you use custom CSS in your slides, the color name is also stored in a CSS variable — e.g. <code><a href="https://rdrr.io/r/stats/cor.html">var(--red)</a></code>.</p> | <p>and creates CSS classes from the color name that set the text color — e.g. <code>.red</code> — or that set the background color — e.g. <code>.bg-red</code>. If you use custom CSS in your slides, the color name is also stored in a CSS variable — e.g. <code><a href="https://rdrr.io/r/stats/cor.html">var(--red)</a></code>.</p> | ||||
| <p>So slide text like this</p> | <p>So slide text like this</p> | ||||
| <div class="sourceCode" id="cb19"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb19-1"><a href="#cb19-1"></a>This **.red[simple]** .white.bg-purple[demo] </span> | <div class="sourceCode" id="cb19"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb19-1"><a href="#cb19-1"></a>This **.red[simple]** .white.bg-purple[demo] </span> | ||||
| <h2 class="hasAnchor"> | <h2 class="hasAnchor"> | ||||
| <a href="#adding-custom-css" class="anchor"></a>Adding Custom CSS</h2> | <a href="#adding-custom-css" class="anchor"></a>Adding Custom CSS</h2> | ||||
| <p>You can also add custom CSS classes using the <code>extra_css</code> argument in the theme functions. This argument takes a named list of CSS definitions each containing a named list of CSS property-value pairs.</p> | <p>You can also add custom CSS classes using the <code>extra_css</code> argument in the theme functions. This argument takes a named list of CSS definitions each containing a named list of CSS property-value pairs.</p> | ||||
| <div class="sourceCode" id="cb20"><html><body><pre class="r"><span class="no">extra_css</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>( | |||||
| <span class="st">".small"</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"font-size"</span> <span class="kw">=</span> <span class="st">"90%"</span>), | |||||
| <span class="st">".full-width"</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>( | |||||
| <span class="kw">display</span> <span class="kw">=</span> <span class="st">"flex"</span>, | |||||
| <span class="kw">width</span> <span class="kw">=</span> <span class="st">"100%"</span>, | |||||
| <span class="kw">flex</span> <span class="kw">=</span> <span class="st">"1 1 auto"</span> | |||||
| <div class="sourceCode" id="cb20"><pre class="downlit"> | |||||
| <span class="kw">extra_css</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>( | |||||
| <span class="st">".small"</span> = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"font-size"</span> = <span class="st">"90%"</span>), | |||||
| <span class="st">".full-width"</span> = <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>( | |||||
| display = <span class="st">"flex"</span>, | |||||
| width = <span class="st">"100%"</span>, | |||||
| flex = <span class="st">"1 1 auto"</span> | |||||
| ) | ) | ||||
| )</pre></body></html></div> | |||||
| ) | |||||
| </pre></div> | |||||
| <p>If you would rather keep your additional css definitions in a separate file, you can call <code><a href="../reference/style_extra_css.html">style_extra_css()</a></code> separately. Just be sure to include your new CSS file in the list of applied files in your YAML header.</p> | <p>If you would rather keep your additional css definitions in a separate file, you can call <code><a href="../reference/style_extra_css.html">style_extra_css()</a></code> separately. Just be sure to include your new CSS file in the list of applied files in your YAML header.</p> | ||||
| <div class="sourceCode" id="cb21"><html><body><pre class="r"><span class="fu"><a href="../reference/style_extra_css.html">style_extra_css</a></span>(<span class="kw">css</span> <span class="kw">=</span> <span class="no">extra_css</span>, <span class="kw">outfile</span> <span class="kw">=</span> <span class="st">"custom.css"</span>)</pre></body></html></div> | |||||
| <div class="sourceCode" id="cb21"><pre class="downlit"> | |||||
| <span class="fu"><a href="../reference/style_extra_css.html">style_extra_css</a></span>(css = <span class="kw">extra_css</span>, outfile = <span class="st">"custom.css"</span>) | |||||
| </pre></div> | |||||
| <div class="sourceCode" id="cb22"><pre class="sourceCode css"><code class="sourceCode css"><span id="cb22-1"><a href="#cb22-1"></a><span class="co">/* Extra CSS */</span></span> | <div class="sourceCode" id="cb22"><pre class="sourceCode css"><code class="sourceCode css"><span id="cb22-1"><a href="#cb22-1"></a><span class="co">/* Extra CSS */</span></span> | ||||
| <span id="cb22-2"><a href="#cb22-2"></a><span class="fu">.small</span> {</span> | <span id="cb22-2"><a href="#cb22-2"></a><span class="fu">.small</span> {</span> | ||||
| <span id="cb22-3"><a href="#cb22-3"></a> <span class="kw">font-size</span>: <span class="dv">90</span><span class="dt">%</span><span class="op">;</span></span> | <span id="cb22-3"><a href="#cb22-3"></a> <span class="kw">font-size</span>: <span class="dv">90</span><span class="dt">%</span><span class="op">;</span></span> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| <h2 class="hasAnchor"> | <h2 class="hasAnchor"> | ||||
| <a href="#installation" class="anchor"></a>Installation</h2> | <a href="#installation" class="anchor"></a>Installation</h2> | ||||
| <p>You can install <strong>xaringanthemer</strong> from CRAN</p> | <p>You can install <strong>xaringanthemer</strong> from CRAN</p> | ||||
| <div class="sourceCode" id="cb1"><pre class="r"><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span>(<span class="st">"xaringanthemer"</span>)</pre></div> | |||||
| <div class="sourceCode" id="cb1"><pre class="downlit"> | |||||
| <span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span>(<span class="st">"xaringanthemer"</span>) | |||||
| </pre></div> | |||||
| <p>or you can install the development version of xaringanthemer from <a href="https://github.com/gadenbuie/xaringanthemer">GitHub</a>.</p> | <p>or you can install the development version of xaringanthemer from <a href="https://github.com/gadenbuie/xaringanthemer">GitHub</a>.</p> | ||||
| <div class="sourceCode" id="cb2"><pre class="r"><span class="co"># install.packages("remotes")</span> | |||||
| <span class="kw pkg">remotes</span><span class="kw ns">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html">install_github</a></span>(<span class="st">"gadenbuie/xaringanthemer"</span>)</pre></div> | |||||
| <div class="sourceCode" id="cb2"><pre class="downlit"> | |||||
| <span class="co"># install.packages("remotes")</span> | |||||
| <span class="kw">remotes</span>::<span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html">install_github</a></span>(<span class="st">"gadenbuie/xaringanthemer"</span>) | |||||
| </pre></div> | |||||
| </div> | </div> | ||||
| <div id="quick-intro" class="section level2"> | <div id="quick-intro" class="section level2"> | ||||
| <h2 class="hasAnchor"> | <h2 class="hasAnchor"> | ||||
| <p><strong>xaringanthemer</strong> even provides a <a href="https://ggplot2.tidyverse.org">ggplot2</a> theme with <code><a href="reference/theme_xaringan.html">theme_xaringan()</a></code> that uses the colors and fonts from your slide theme. Built on the <a href="https://github.com/yixuan/showtext">showtext</a> package, and designed to work seamlessly with <a href="https://fonts.google.com">Google Fonts</a>.</p> | <p><strong>xaringanthemer</strong> even provides a <a href="https://ggplot2.tidyverse.org">ggplot2</a> theme with <code><a href="reference/theme_xaringan.html">theme_xaringan()</a></code> that uses the colors and fonts from your slide theme. Built on the <a href="https://github.com/yixuan/showtext">showtext</a> package, and designed to work seamlessly with <a href="https://fonts.google.com">Google Fonts</a>.</p> | ||||
| <p>Color and fill scales are also provided for matching sequential color scales based on the primary color used in your slides. See <code><a href="reference/scale_xaringan.html">?scale_xaringan</a></code> for more details.</p> | <p>Color and fill scales are also provided for matching sequential color scales based on the primary color used in your slides. See <code><a href="reference/scale_xaringan.html">?scale_xaringan</a></code> for more details.</p> | ||||
| <p>More details and examples can be found in <code><a href="articles/ggplot2-themes.html">vignette("ggplot2-themes")</a></code>.</p> | <p>More details and examples can be found in <code><a href="articles/ggplot2-themes.html">vignette("ggplot2-themes")</a></code>.</p> | ||||
| <div class="sourceCode" id="cb5"><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="no">ggplot2</span>) | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="no">diamonds</span>) + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="no">cut</span>, <span class="kw">fill</span> <span class="kw">=</span> <span class="no">cut</span>) + | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_bar</a></span>(<span class="kw">show.legend</span> <span class="kw">=</span> <span class="fl">FALSE</span>) + | |||||
| <div class="sourceCode" id="cb5"><pre class="downlit"> | |||||
| <span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="kw"><a href="http://ggplot2.tidyverse.org">ggplot2</a></span>) | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="kw">diamonds</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="kw">cut</span>, fill = <span class="kw">cut</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_bar</a></span>(show.legend = <span class="fl">FALSE</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>( | <span class="fu"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>( | ||||
| <span class="kw">x</span> <span class="kw">=</span> <span class="st">"Cut"</span>, | |||||
| <span class="kw">y</span> <span class="kw">=</span> <span class="st">"Count"</span>, | |||||
| <span class="kw">title</span> <span class="kw">=</span> <span class="st">"A Fancy diamonds Plot"</span> | |||||
| ) + | |||||
| <span class="fu"><a href="reference/theme_xaringan.html">theme_xaringan</a></span>(<span class="kw">background_color</span> <span class="kw">=</span> <span class="st">"#FFFFFF"</span>) + | |||||
| <span class="fu"><a href="reference/scale_xaringan.html">scale_xaringan_fill_discrete</a></span>()</pre></div> | |||||
| x = <span class="st">"Cut"</span>, | |||||
| y = <span class="st">"Count"</span>, | |||||
| title = <span class="st">"A Fancy diamonds Plot"</span> | |||||
| ) <span class="op">+</span> | |||||
| <span class="fu"><a href="reference/theme_xaringan.html">theme_xaringan</a></span>(background_color = <span class="st">"#FFFFFF"</span>) <span class="op">+</span> | |||||
| <span class="fu"><a href="reference/scale_xaringan.html">scale_xaringan_fill_discrete</a></span>() | |||||
| </pre></div> | |||||
| <p><img src="reference/figures/index-theme_xaringan_demo-1.png" width="100%"></p> | <p><img src="reference/figures/index-theme_xaringan_demo-1.png" width="100%"></p> | ||||
| </div> | </div> | ||||
| <div id="tab-completion" class="section level3"> | <div id="tab-completion" class="section level3"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </h1> | </h1> | ||||
| <ul> | <ul> | ||||
| <li><p>Adds <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code>, a ggplot2 theme that automatically uses the colors and font styles of your xaringanthemer style. Also adds <code><a href="../reference/scale_xaringan.html">scale_xaringan_discrete()</a></code> and <code><a href="../reference/scale_xaringan.html">scale_xaringan_continuous()</a></code> functions that use your slides’ primary colors for the color or fill aesthetics. These theme functions can recover the primary colors used in a xaringanthemer (>= 0.3.0) CSS file even if you don’t call the style function directly in your slides.</p></li> | <li><p>Adds <code><a href="../reference/theme_xaringan.html">theme_xaringan()</a></code>, a ggplot2 theme that automatically uses the colors and font styles of your xaringanthemer style. Also adds <code><a href="../reference/scale_xaringan.html">scale_xaringan_discrete()</a></code> and <code><a href="../reference/scale_xaringan.html">scale_xaringan_continuous()</a></code> functions that use your slides’ primary colors for the color or fill aesthetics. These theme functions can recover the primary colors used in a xaringanthemer (>= 0.3.0) CSS file even if you don’t call the style function directly in your slides.</p></li> | ||||
| <li><p>Renamed all xaringanthemer functions that create CSS styles to use the prefix “<code>style_</code>”. For example, <code><a href="../reference/xaringanthemer-deprecated.html">mono_light()</a></code> is now <code><a href="../reference/style_mono_light.html">style_mono_light()</a></code>. Additionally, <code><a href="../reference/xaringanthemer-deprecated.html">write_xaringan_theme()</a></code> is now <code><a href="../reference/style_xaringan.html">style_xaringan()</a></code> and <code><a href="../reference/xaringanthemer-deprecated.html">write_extra_css()</a></code> is <code><a href="../reference/style_extra_css.html">style_extra_css()</a></code>. Overall, this change makes the xarignanthemer API much cleaner and easier to navigate. Previous function names are deprecated but still work.</p></li> | |||||
| <li><p>Renamed all xaringanthemer functions that create CSS styles to use the prefix “<code>style_</code>”. For example, <code><a href="../reference/xaringanthemer-deprecated.html">mono_light()</a></code> is now <code><a href="../reference/style_mono_light.html">style_mono_light()</a></code>. Additionally, <code><a href="../reference/xaringanthemer-deprecated.html">write_xaringan_theme()</a></code> is now <code><a href="../reference/xaringanthemer_font_default.html">style_xaringan()</a></code> and <code><a href="../reference/xaringanthemer-deprecated.html">write_extra_css()</a></code> is <code><a href="../reference/style_extra_css.html">style_extra_css()</a></code>. Overall, this change makes the xarignanthemer API much cleaner and easier to navigate. Previous function names are deprecated but still work.</p></li> | |||||
| <li><p>Added <code>background_header_auto</code> parameter that adds a background under the first <code>h1</code> element (i.e. <code># Slide Title</code>) on a slide. When enabled, the background is added automatically to slides, as long as they aren’t <code>inverse</code>, <code>center</code>, <code>middle</code>, or <code>bottom</code>-styled slides. When disabled, you can still enable slide title headers by adding the <code>header_background</code> class to a slide. (thanks, <a href='https://github.com/Btibert3'>@Btibert3</a>, <a href='https://github.com/gadenbuie/xaringanthemer/issues/10'>#10</a>)</p></li> | <li><p>Added <code>background_header_auto</code> parameter that adds a background under the first <code>h1</code> element (i.e. <code># Slide Title</code>) on a slide. When enabled, the background is added automatically to slides, as long as they aren’t <code>inverse</code>, <code>center</code>, <code>middle</code>, or <code>bottom</code>-styled slides. When disabled, you can still enable slide title headers by adding the <code>header_background</code> class to a slide. (thanks, <a href='https://github.com/Btibert3'>@Btibert3</a>, <a href='https://github.com/gadenbuie/xaringanthemer/issues/10'>#10</a>)</p></li> | ||||
| <li><p>The underlying template now uses the <code>whisker</code> package.</p></li> | <li><p>The underlying template now uses the <code>whisker</code> package.</p></li> | ||||
| <li><p>xaringanthemer styles now use CSS variables throughout. Most of the settings used in defining a style are stored in CSS variables. The variable names are documented in their corresponding arguments. For example, the color selected for <code>background_color</code> is stored in the variable <code>--background-color</code>. These variables can be used in custom CSS rules or in other arguments in any style functions, for example as <code><a href="https://rdrr.io/r/stats/cor.html">var(--background-color)</a></code>.</p></li> | <li><p>xaringanthemer styles now use CSS variables throughout. Most of the settings used in defining a style are stored in CSS variables. The variable names are documented in their corresponding arguments. For example, the color selected for <code>background_color</code> is stored in the variable <code>--background-color</code>. These variables can be used in custom CSS rules or in other arguments in any style functions, for example as <code><a href="https://rdrr.io/r/stats/cor.html">var(--background-color)</a></code>.</p></li> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| .ref-index th {font-weight: normal;} | .ref-index th {font-weight: normal;} | ||||
| .ref-index td {vertical-align: top;} | |||||
| .ref-index td {vertical-align: top; min-width: 100px} | |||||
| .ref-index .icon {width: 40px;} | .ref-index .icon {width: 40px;} | ||||
| .ref-index .alias {width: 40%;} | .ref-index .alias {width: 40%;} | ||||
| .ref-index-icons .alias {width: calc(40% - 40px);} | .ref-index-icons .alias {width: calc(40% - 40px);} | ||||
| .ref-index .title {width: 60%;} | .ref-index .title {width: 60%;} | ||||
| .ref-arguments th {text-align: right; padding-right: 10px;} | .ref-arguments th {text-align: right; padding-right: 10px;} | ||||
| .ref-arguments th, .ref-arguments td {vertical-align: top;} | |||||
| .ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} | |||||
| .ref-arguments .name {width: 20%;} | .ref-arguments .name {width: 20%;} | ||||
| .ref-arguments .desc {width: 80%;} | .ref-arguments .desc {width: 80%;} | ||||
| pandoc: 2.7.3 | pandoc: 2.7.3 | ||||
| pkgdown: 1.5.1 | |||||
| pkgdown: 1.6.1 | |||||
| pkgdown_sha: ~ | pkgdown_sha: ~ | ||||
| articles: | articles: | ||||
| fonts: fonts.html | fonts: fonts.html | ||||
| template-variables: template-variables.html | template-variables: template-variables.html | ||||
| themes: themes.html | themes: themes.html | ||||
| xaringanthemer: xaringanthemer.html | xaringanthemer: xaringanthemer.html | ||||
| last_built: 2020-09-07T06:16Z | |||||
| last_built: 2020-09-14T06:17Z | |||||
| urls: | urls: | ||||
| reference: https://pkg.garrickadenbuie.com/xaringanthemer//reference | reference: https://pkg.garrickadenbuie.com/xaringanthemer//reference | ||||
| article: https://pkg.garrickadenbuie.com/xaringanthemer//articles | article: https://pkg.garrickadenbuie.com/xaringanthemer//articles |
| and appending to the hex color.</p> | and appending to the hex color.</p> | ||||
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>apply_alpha</span>(<span class='no'>color_hex</span>, <span class='kw'>opacity</span> <span class='kw'>=</span> <span class='fl'>0.5</span>)</pre> | |||||
| <pre class="usage"><span class='fu'>apply_alpha</span>(<span class='kw'>color_hex</span>, opacity = <span class='fl'>0.5</span>)</pre> | |||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <table class="ref-arguments"> | <table class="ref-arguments"> | ||||
| <p>A character string with added opacity level as hexadecimal characters.</p> | <p>A character string with added opacity level as hexadecimal characters.</p> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='no'>blue</span> <span class='kw'><-</span> <span class='st'>"#0e6ba8"</span> | |||||
| <span class='no'>blue_transparent</span> <span class='kw'><-</span> <span class='fu'>apply_alpha</span>(<span class='no'>blue</span>) | |||||
| <pre class="examples"><div class='input'><span class='kw'>blue</span> <span class='op'><-</span> <span class='st'>"#0e6ba8"</span> | |||||
| <span class='kw'>blue_transparent</span> <span class='op'><-</span> <span class='fu'>apply_alpha</span>(<span class='kw'>blue</span>) | |||||
| <span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"scales"</span>, <span class='kw'>quietly</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) { | |||||
| <span class='kw pkg'>scales</span><span class='kw ns'>::</span><span class='fu'><a href='https://scales.r-lib.org//reference/show_col.html'>show_col</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='no'>blue</span>, <span class='no'>blue_transparent</span>)) | |||||
| }</div><div class='img'><img src='apply_alpha-1.png' alt='' width='700' height='433' /></div><div class='input'> | |||||
| <span class='co'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"scales"</span>, quietly = <span class='fl'>TRUE</span>)) { | |||||
| <span class='kw'>scales</span>::<span class='fu'><a href='https://scales.r-lib.org//reference/show_col.html'>show_col</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>blue</span>, <span class='kw'>blue_transparent</span>)) | |||||
| } | |||||
| </div><div class='img'><img src='apply_alpha-1.png' alt='' width='700' height='433' /></div><div class='input'> | |||||
| </div></pre> | </div></pre> | ||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| best contrast. Follows W3C Recommendations.</p> | best contrast. Follows W3C Recommendations.</p> | ||||
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>choose_dark_or_light</span>(<span class='no'>x</span>, <span class='kw'>black</span> <span class='kw'>=</span> <span class='st'>"#000000"</span>, <span class='kw'>white</span> <span class='kw'>=</span> <span class='st'>"#FFFFFF"</span>)</pre> | |||||
| <pre class="usage"><span class='fu'>choose_dark_or_light</span>(<span class='kw'>x</span>, black = <span class='st'>"#000000"</span>, white = <span class='st'>"#FFFFFF"</span>)</pre> | |||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <table class="ref-arguments"> | <table class="ref-arguments"> | ||||
| <p><a href='https://stackoverflow.com/a/3943023/2022615'>https://stackoverflow.com/a/3943023/2022615</a></p> | <p><a href='https://stackoverflow.com/a/3943023/2022615'>https://stackoverflow.com/a/3943023/2022615</a></p> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='no'>light_green</span> <span class='kw'><-</span> <span class='st'>"#c4d6b0"</span> | |||||
| <span class='no'>contrast_green</span> <span class='kw'><-</span> <span class='fu'>choose_dark_or_light</span>(<span class='no'>light_green</span>) | |||||
| <span class='no'>dark_purple</span> <span class='kw'><-</span> <span class='st'>"#381d2a"</span> | |||||
| <span class='no'>contrast_purple</span> <span class='kw'><-</span> <span class='fu'>choose_dark_or_light</span>(<span class='no'>dark_purple</span>) | |||||
| <span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"scales"</span>, <span class='kw'>quietly</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) { | |||||
| <span class='kw pkg'>scales</span><span class='kw ns'>::</span><span class='fu'><a href='https://scales.r-lib.org//reference/show_col.html'>show_col</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='no'>light_green</span>, <span class='no'>contrast_green</span>, <span class='no'>dark_purple</span>, <span class='no'>contrast_purple</span>)) | |||||
| }</div><div class='img'><img src='choose_dark_or_light-1.png' alt='' width='700' height='433' /></div><div class='input'> | |||||
| <pre class="examples"><div class='input'><span class='kw'>light_green</span> <span class='op'><-</span> <span class='st'>"#c4d6b0"</span> | |||||
| <span class='kw'>contrast_green</span> <span class='op'><-</span> <span class='fu'>choose_dark_or_light</span>(<span class='kw'>light_green</span>) | |||||
| <span class='kw'>dark_purple</span> <span class='op'><-</span> <span class='st'>"#381d2a"</span> | |||||
| <span class='kw'>contrast_purple</span> <span class='op'><-</span> <span class='fu'>choose_dark_or_light</span>(<span class='kw'>dark_purple</span>) | |||||
| <span class='co'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"scales"</span>, quietly = <span class='fl'>TRUE</span>)) { | |||||
| <span class='kw'>scales</span>::<span class='fu'><a href='https://scales.r-lib.org//reference/show_col.html'>show_col</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>light_green</span>, <span class='kw'>contrast_green</span>, <span class='kw'>dark_purple</span>, <span class='kw'>contrast_purple</span>)) | |||||
| } | |||||
| </div><div class='img'><img src='choose_dark_or_light-1.png' alt='' width='700' height='433' /></div><div class='input'> | |||||
| </div></pre> | </div></pre> | ||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| more of the language codes as given by <code><a href='google_language_codes.html'>google_language_codes()</a></code>.</p> | more of the language codes as given by <code><a href='google_language_codes.html'>google_language_codes()</a></code>.</p> | ||||
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>google_font</span>(<span class='no'>family</span>, <span class='no'>...</span>, <span class='kw'>languages</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre> | |||||
| <pre class="usage"><span class='fu'>google_font</span>(<span class='kw'>family</span>, <span class='kw'>...</span>, languages = <span class='kw'>NULL</span>)</pre> | |||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <table class="ref-arguments"> | <table class="ref-arguments"> | ||||
| <p>A <code>"google_font"</code> object.</p> | <p>A <code>"google_font"</code> object.</p> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='fu'>google_font</span>(<span class='st'>"Josefin Sans"</span>, <span class='st'>"400"</span>, <span class='st'>"400i"</span>, <span class='st'>"600i"</span>, <span class='st'>"700"</span>)</div><div class='output co'>#> $family | |||||
| <pre class="examples"><div class='input'><span class='fu'>google_font</span>(<span class='st'>"Josefin Sans"</span>, <span class='st'>"400"</span>, <span class='st'>"400i"</span>, <span class='st'>"600i"</span>, <span class='st'>"700"</span>) | |||||
| </div><div class='output co'>#> $family | |||||
| #> [1] "Josefin Sans" | #> [1] "Josefin Sans" | ||||
| #> | #> | ||||
| #> $weights | #> $weights | ||||
| #> [1] "https://fonts.googleapis.com/css?family=Josefin+Sans:400,400i,600i,700&display=swap" | #> [1] "https://fonts.googleapis.com/css?family=Josefin+Sans:400,400i,600i,700&display=swap" | ||||
| #> | #> | ||||
| #> attr(,"class") | #> attr(,"class") | ||||
| #> [1] "google_font"</div><div class='input'><span class='fu'>google_font</span>(<span class='st'>"Josefin Sans"</span>, <span class='kw'>languages</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"latin-ext"</span>, <span class='st'>"vietnamese"</span>))</div><div class='output co'>#> $family | |||||
| #> [1] "google_font"</div><div class='input'><span class='fu'>google_font</span>(<span class='st'>"Josefin Sans"</span>, languages = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"latin-ext"</span>, <span class='st'>"vietnamese"</span>)) | |||||
| </div><div class='output co'>#> $family | |||||
| #> [1] "Josefin Sans" | #> [1] "Josefin Sans" | ||||
| #> | #> | ||||
| #> $weights | #> $weights | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>google_language_codes</span>( | <pre class="usage"><span class='fu'>google_language_codes</span>( | ||||
| <span class='kw'>language_codes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"latin"</span>, <span class='st'>"latin-ext"</span>, <span class='st'>"sinhala"</span>, <span class='st'>"greek"</span>, <span class='st'>"hebrew"</span>, <span class='st'>"vietnamese"</span>, | |||||
| language_codes = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"latin"</span>, <span class='st'>"latin-ext"</span>, <span class='st'>"sinhala"</span>, <span class='st'>"greek"</span>, <span class='st'>"hebrew"</span>, <span class='st'>"vietnamese"</span>, | |||||
| <span class='st'>"cyrillic"</span>, <span class='st'>"cyrillic-ext"</span>, <span class='st'>"devanagari"</span>, <span class='st'>"arabic"</span>, <span class='st'>"khmer"</span>, <span class='st'>"tamil"</span>, <span class='st'>"greek-ext"</span>, | <span class='st'>"cyrillic"</span>, <span class='st'>"cyrillic-ext"</span>, <span class='st'>"devanagari"</span>, <span class='st'>"arabic"</span>, <span class='st'>"khmer"</span>, <span class='st'>"tamil"</span>, <span class='st'>"greek-ext"</span>, | ||||
| <span class='st'>"thai"</span>, <span class='st'>"bengali"</span>, <span class='st'>"gujarati"</span>, <span class='st'>"oriya"</span>, <span class='st'>"malayalam"</span>, <span class='st'>"gurmukhi"</span>, <span class='st'>"kannada"</span>, <span class='st'>"telugu"</span>, | <span class='st'>"thai"</span>, <span class='st'>"bengali"</span>, <span class='st'>"gujarati"</span>, <span class='st'>"oriya"</span>, <span class='st'>"malayalam"</span>, <span class='st'>"gurmukhi"</span>, <span class='st'>"kannada"</span>, <span class='st'>"telugu"</span>, | ||||
| <span class='st'>"myanmar"</span>) | <span class='st'>"myanmar"</span>) | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| <p>Produces a linear blend of the color with white or black.</p> | <p>Produces a linear blend of the color with white or black.</p> | ||||
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>lighten_color</span>(<span class='no'>color_hex</span>, <span class='kw'>strength</span> <span class='kw'>=</span> <span class='fl'>0.7</span>) | |||||
| <pre class="usage"><span class='fu'>lighten_color</span>(<span class='kw'>color_hex</span>, strength = <span class='fl'>0.7</span>) | |||||
| <span class='fu'>darken_color</span>(<span class='no'>color_hex</span>, <span class='kw'>strength</span> <span class='kw'>=</span> <span class='fl'>0.8</span>)</pre> | |||||
| <span class='fu'>darken_color</span>(<span class='kw'>color_hex</span>, strength = <span class='fl'>0.8</span>)</pre> | |||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <table class="ref-arguments"> | <table class="ref-arguments"> | ||||
| hexadecimal format.</p> | hexadecimal format.</p> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='no'>blue</span> <span class='kw'><-</span> <span class='st'>"#0e6ba8"</span> | |||||
| <span class='no'>blue_light</span> <span class='kw'><-</span> <span class='fu'>lighten_color</span>(<span class='no'>blue</span>, <span class='kw'>strength</span> <span class='kw'>=</span> <span class='fl'>0.33</span>) | |||||
| <span class='no'>blue_dark</span> <span class='kw'><-</span> <span class='fu'>darken_color</span>(<span class='no'>blue</span>, <span class='kw'>strength</span> <span class='kw'>=</span> <span class='fl'>0.33</span>) | |||||
| <span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"scales"</span>, <span class='kw'>quietly</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) { | |||||
| <span class='kw pkg'>scales</span><span class='kw ns'>::</span><span class='fu'><a href='https://scales.r-lib.org//reference/show_col.html'>show_col</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='no'>blue_light</span>, <span class='no'>blue</span>, <span class='no'>blue_dark</span>)) | |||||
| }</div><div class='img'><img src='lighten_darken_color-1.png' alt='' width='700' height='433' /></div><div class='input'> | |||||
| <pre class="examples"><div class='input'><span class='kw'>blue</span> <span class='op'><-</span> <span class='st'>"#0e6ba8"</span> | |||||
| <span class='kw'>blue_light</span> <span class='op'><-</span> <span class='fu'>lighten_color</span>(<span class='kw'>blue</span>, strength = <span class='fl'>0.33</span>) | |||||
| <span class='kw'>blue_dark</span> <span class='op'><-</span> <span class='fu'>darken_color</span>(<span class='kw'>blue</span>, strength = <span class='fl'>0.33</span>) | |||||
| <span class='co'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"scales"</span>, quietly = <span class='fl'>TRUE</span>)) { | |||||
| <span class='kw'>scales</span>::<span class='fu'><a href='https://scales.r-lib.org//reference/show_col.html'>show_col</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>blue_light</span>, <span class='kw'>blue</span>, <span class='kw'>blue_dark</span>)) | |||||
| } | |||||
| </div><div class='img'><img src='lighten_darken_color-1.png' alt='' width='700' height='433' /></div><div class='input'> | |||||
| </div></pre> | </div></pre> | ||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>scale_xaringan_discrete</span>( | <pre class="usage"><span class='fu'>scale_xaringan_discrete</span>( | ||||
| <span class='kw'>aes_type</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"color"</span>, <span class='st'>"colour"</span>, <span class='st'>"fill"</span>), | |||||
| <span class='no'>...</span>, | |||||
| <span class='kw'>color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>direction</span> <span class='kw'>=</span> <span class='fl'>1</span>, | |||||
| <span class='kw'>inverse</span> <span class='kw'>=</span> <span class='fl'>FALSE</span> | |||||
| aes_type = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"color"</span>, <span class='st'>"colour"</span>, <span class='st'>"fill"</span>), | |||||
| <span class='kw'>...</span>, | |||||
| color = <span class='kw'>NULL</span>, | |||||
| direction = <span class='fl'>1</span>, | |||||
| inverse = <span class='fl'>FALSE</span> | |||||
| ) | ) | ||||
| <span class='fu'>scale_xaringan_fill_discrete</span>(<span class='no'>...</span>, <span class='kw'>color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>direction</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>inverse</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) | |||||
| <span class='fu'>scale_xaringan_fill_discrete</span>(<span class='kw'>...</span>, color = <span class='kw'>NULL</span>, direction = <span class='fl'>1</span>, inverse = <span class='fl'>FALSE</span>) | |||||
| <span class='fu'>scale_xaringan_color_discrete</span>( | <span class='fu'>scale_xaringan_color_discrete</span>( | ||||
| <span class='no'>...</span>, | |||||
| <span class='kw'>color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>direction</span> <span class='kw'>=</span> <span class='fl'>1</span>, | |||||
| <span class='kw'>inverse</span> <span class='kw'>=</span> <span class='fl'>FALSE</span> | |||||
| <span class='kw'>...</span>, | |||||
| color = <span class='kw'>NULL</span>, | |||||
| direction = <span class='fl'>1</span>, | |||||
| inverse = <span class='fl'>FALSE</span> | |||||
| ) | ) | ||||
| <span class='fu'>scale_xaringan_colour_discrete</span>( | <span class='fu'>scale_xaringan_colour_discrete</span>( | ||||
| <span class='no'>...</span>, | |||||
| <span class='kw'>color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>direction</span> <span class='kw'>=</span> <span class='fl'>1</span>, | |||||
| <span class='kw'>inverse</span> <span class='kw'>=</span> <span class='fl'>FALSE</span> | |||||
| <span class='kw'>...</span>, | |||||
| color = <span class='kw'>NULL</span>, | |||||
| direction = <span class='fl'>1</span>, | |||||
| inverse = <span class='fl'>FALSE</span> | |||||
| ) | ) | ||||
| <span class='fu'>scale_xaringan_continuous</span>( | <span class='fu'>scale_xaringan_continuous</span>( | ||||
| <span class='kw'>aes_type</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"color"</span>, <span class='st'>"colour"</span>, <span class='st'>"fill"</span>), | |||||
| <span class='no'>...</span>, | |||||
| <span class='kw'>color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>begin</span> <span class='kw'>=</span> <span class='fl'>0</span>, | |||||
| <span class='kw'>end</span> <span class='kw'>=</span> <span class='fl'>1</span>, | |||||
| <span class='kw'>inverse</span> <span class='kw'>=</span> <span class='fl'>FALSE</span> | |||||
| aes_type = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"color"</span>, <span class='st'>"colour"</span>, <span class='st'>"fill"</span>), | |||||
| <span class='kw'>...</span>, | |||||
| color = <span class='kw'>NULL</span>, | |||||
| begin = <span class='fl'>0</span>, | |||||
| end = <span class='fl'>1</span>, | |||||
| inverse = <span class='fl'>FALSE</span> | |||||
| ) | ) | ||||
| <span class='fu'>scale_xaringan_fill_continuous</span>( | <span class='fu'>scale_xaringan_fill_continuous</span>( | ||||
| <span class='no'>...</span>, | |||||
| <span class='kw'>color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>begin</span> <span class='kw'>=</span> <span class='fl'>0</span>, | |||||
| <span class='kw'>end</span> <span class='kw'>=</span> <span class='fl'>1</span>, | |||||
| <span class='kw'>inverse</span> <span class='kw'>=</span> <span class='fl'>FALSE</span> | |||||
| <span class='kw'>...</span>, | |||||
| color = <span class='kw'>NULL</span>, | |||||
| begin = <span class='fl'>0</span>, | |||||
| end = <span class='fl'>1</span>, | |||||
| inverse = <span class='fl'>FALSE</span> | |||||
| ) | ) | ||||
| <span class='fu'>scale_xaringan_color_continuous</span>( | <span class='fu'>scale_xaringan_color_continuous</span>( | ||||
| <span class='no'>...</span>, | |||||
| <span class='kw'>color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>begin</span> <span class='kw'>=</span> <span class='fl'>0</span>, | |||||
| <span class='kw'>end</span> <span class='kw'>=</span> <span class='fl'>1</span>, | |||||
| <span class='kw'>inverse</span> <span class='kw'>=</span> <span class='fl'>FALSE</span> | |||||
| <span class='kw'>...</span>, | |||||
| color = <span class='kw'>NULL</span>, | |||||
| begin = <span class='fl'>0</span>, | |||||
| end = <span class='fl'>1</span>, | |||||
| inverse = <span class='fl'>FALSE</span> | |||||
| ) | ) | ||||
| <span class='fu'>scale_xaringan_colour_continuous</span>( | <span class='fu'>scale_xaringan_colour_continuous</span>( | ||||
| <span class='no'>...</span>, | |||||
| <span class='kw'>color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>begin</span> <span class='kw'>=</span> <span class='fl'>0</span>, | |||||
| <span class='kw'>end</span> <span class='kw'>=</span> <span class='fl'>1</span>, | |||||
| <span class='kw'>inverse</span> <span class='kw'>=</span> <span class='fl'>FALSE</span> | |||||
| <span class='kw'>...</span>, | |||||
| color = <span class='kw'>NULL</span>, | |||||
| begin = <span class='fl'>0</span>, | |||||
| end = <span class='fl'>1</span>, | |||||
| inverse = <span class='fl'>FALSE</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Requires ggplot2</span> | <pre class="examples"><div class='input'><span class='co'># Requires ggplot2</span> | ||||
| <span class='no'>has_ggplot2</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"ggplot2"</span>, <span class='kw'>quietly</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) | |||||
| <span class='kw'>has_ggplot2</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"ggplot2"</span>, quietly = <span class='fl'>TRUE</span>) | |||||
| <span class='kw'>if</span> (<span class='no'>has_ggplot2</span>) { | |||||
| <span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>ggplot2</span>) | |||||
| <span class='co'>if</span> (<span class='kw'>has_ggplot2</span>) { | |||||
| <span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='kw'><a href='http://ggplot2.tidyverse.org'>ggplot2</a></span>) | |||||
| <span class='co'># Saving the theme to a temp file because this is an example</span> | <span class='co'># Saving the theme to a temp file because this is an example</span> | ||||
| <span class='no'>path_to_css_file</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>path_to_css_file</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(fileext = <span class='st'>".css"</span>) | |||||
| <span class='co'># Create the xaringan theme: dark blue background with teal green accents</span> | <span class='co'># Create the xaringan theme: dark blue background with teal green accents</span> | ||||
| <span class='fu'><a href='style_duo.html'>style_duo</a></span>( | <span class='fu'><a href='style_duo.html'>style_duo</a></span>( | ||||
| <span class='kw'>primary_color</span> <span class='kw'>=</span> <span class='st'>"#002b36"</span>, | |||||
| <span class='kw'>secondary_color</span> <span class='kw'>=</span> <span class='st'>"#31b09e"</span>, | |||||
| primary_color = <span class='st'>"#002b36"</span>, | |||||
| secondary_color = <span class='st'>"#31b09e"</span>, | |||||
| <span class='co'># Using basic fonts for this example, but the plot theme will</span> | <span class='co'># Using basic fonts for this example, but the plot theme will</span> | ||||
| <span class='co'># automatically use your theme font if you use Google fonts</span> | <span class='co'># automatically use your theme font if you use Google fonts</span> | ||||
| <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='st'>"sans"</span>, | |||||
| <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='st'>"serif"</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>path_to_css_file</span> | |||||
| text_font_family = <span class='st'>"sans"</span>, | |||||
| header_font_family = <span class='st'>"serif"</span>, | |||||
| outfile = <span class='kw'>path_to_css_file</span> | |||||
| ) | ) | ||||
| <span class='co'># Here's some very basic example data</span> | <span class='co'># Here's some very basic example data</span> | ||||
| <span class='no'>ex</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span>( | |||||
| <span class='kw'>name</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"Couple"</span>, <span class='st'>"Few"</span>, <span class='st'>"Lots"</span>, <span class='st'>"Many"</span>), | |||||
| <span class='kw'>n</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>2</span>, <span class='fl'>3</span>, <span class='fl'>5</span>, <span class='fl'>7</span>) | |||||
| <span class='kw'>ex</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span>( | |||||
| name = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"Couple"</span>, <span class='st'>"Few"</span>, <span class='st'>"Lots"</span>, <span class='st'>"Many"</span>), | |||||
| n = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>2</span>, <span class='fl'>3</span>, <span class='fl'>5</span>, <span class='fl'>7</span>) | |||||
| ) | ) | ||||
| <span class='co'># Fill color scales demo</span> | <span class='co'># Fill color scales demo</span> | ||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='no'>ex</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='no'>name</span>, <span class='no'>n</span>, <span class='kw'>fill</span> <span class='kw'>=</span> <span class='no'>n</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_bar.html'>geom_col</a></span>() + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>ggtitle</a></span>(<span class='st'>"Matching fill scales"</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='kw'>ex</span>) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='kw'>name</span>, <span class='kw'>n</span>, fill = <span class='kw'>n</span>) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_bar.html'>geom_col</a></span>() <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>ggtitle</a></span>(<span class='st'>"Matching fill scales"</span>) <span class='op'>+</span> | |||||
| <span class='co'># themed to match the slides: dark blue background with teal text</span> | <span class='co'># themed to match the slides: dark blue background with teal text</span> | ||||
| <span class='fu'><a href='theme_xaringan.html'>theme_xaringan</a></span>() + | |||||
| <span class='fu'><a href='theme_xaringan.html'>theme_xaringan</a></span>() <span class='op'>+</span> | |||||
| <span class='co'># Fill color matches teal text</span> | <span class='co'># Fill color matches teal text</span> | ||||
| <span class='fu'>scale_xaringan_fill_continuous</span>() | <span class='fu'>scale_xaringan_fill_continuous</span>() | ||||
| <span class='co'># Color scales demo</span> | <span class='co'># Color scales demo</span> | ||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='no'>ex</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='no'>name</span>, <span class='kw'>y</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>color</span> <span class='kw'>=</span> <span class='no'>name</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_point.html'>geom_point</a></span>(<span class='kw'>size</span> <span class='kw'>=</span> <span class='fl'>10</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>ggtitle</a></span>(<span class='st'>"Matching color scales"</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='kw'>ex</span>) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='kw'>name</span>, y = <span class='fl'>1</span>, color = <span class='kw'>name</span>) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_point.html'>geom_point</a></span>(size = <span class='fl'>10</span>) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>ggtitle</a></span>(<span class='st'>"Matching color scales"</span>) <span class='op'>+</span> | |||||
| <span class='co'># themed to match the slides: dark blue background with teal text</span> | <span class='co'># themed to match the slides: dark blue background with teal text</span> | ||||
| <span class='fu'><a href='theme_xaringan.html'>theme_xaringan</a></span>() + | |||||
| <span class='fu'><a href='theme_xaringan.html'>theme_xaringan</a></span>() <span class='op'>+</span> | |||||
| <span class='co'># Fill color matches teal text</span> | <span class='co'># Fill color matches teal text</span> | ||||
| <span class='fu'>scale_xaringan_color_discrete</span>(<span class='kw'>direction</span> <span class='kw'>=</span> -<span class='fl'>1</span>) | |||||
| }</div><div class='img'><img src='scale_xaringan-1.png' alt='' width='700' height='433' /></div><div class='input'> | |||||
| <span class='fu'>scale_xaringan_color_discrete</span>(direction = <span class='op'>-</span><span class='fl'>1</span>) | |||||
| } | |||||
| </div><div class='img'><img src='scale_xaringan-1.png' alt='' width='700' height='433' /></div><div class='input'> | |||||
| </div></pre> | </div></pre> | ||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>style_duo</span>( | <pre class="usage"><span class='fu'>style_duo</span>( | ||||
| <span class='kw'>primary_color</span> <span class='kw'>=</span> <span class='st'>"#1F4257"</span>, | |||||
| <span class='kw'>secondary_color</span> <span class='kw'>=</span> <span class='st'>"#F97B64"</span>, | |||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>primary_color</span>, <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='no'>primary_color</span>, <span class='fl'>0.9</span>), | |||||
| <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='no'>secondary_color</span>, <span class='fl'>0.99</span>)), | |||||
| <span class='kw'>header_color</span> <span class='kw'>=</span> <span class='no'>secondary_color</span>, | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='no'>primary_color</span>, | |||||
| <span class='kw'>link_color</span> <span class='kw'>=</span> <span class='no'>secondary_color</span>, | |||||
| <span class='kw'>text_bold_color</span> <span class='kw'>=</span> <span class='no'>secondary_color</span>, | |||||
| <span class='kw'>text_slide_number_color</span> <span class='kw'>=</span> <span class='no'>text_color</span>, | |||||
| <span class='kw'>padding</span> <span class='kw'>=</span> <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| <span class='kw'>background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_highlight_color</span> <span class='kw'>=</span> <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| <span class='kw'>code_inline_color</span> <span class='kw'>=</span> <span class='no'>secondary_color</span>, | |||||
| <span class='kw'>code_inline_background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_inline_font_size</span> <span class='kw'>=</span> <span class='st'>"1em"</span>, | |||||
| <span class='kw'>inverse_background_color</span> <span class='kw'>=</span> <span class='no'>secondary_color</span>, | |||||
| <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='no'>primary_color</span>, | |||||
| <span class='kw'>inverse_text_shadow</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>inverse_header_color</span> <span class='kw'>=</span> <span class='no'>primary_color</span>, | |||||
| <span class='kw'>title_slide_text_color</span> <span class='kw'>=</span> <span class='no'>secondary_color</span>, | |||||
| <span class='kw'>title_slide_background_color</span> <span class='kw'>=</span> <span class='no'>primary_color</span>, | |||||
| <span class='kw'>title_slide_background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>footnote_position_bottom</span> <span class='kw'>=</span> <span class='st'>"60px"</span>, | |||||
| <span class='kw'>left_column_subtle_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>secondary_color</span>, <span class='fl'>0.6</span>), | |||||
| <span class='kw'>left_column_selected_color</span> <span class='kw'>=</span> <span class='no'>secondary_color</span>, | |||||
| <span class='kw'>blockquote_left_border_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>secondary_color</span>, <span class='fl'>0.5</span>), | |||||
| <span class='kw'>table_border_color</span> <span class='kw'>=</span> <span class='st'>"#666"</span>, | |||||
| <span class='kw'>table_row_border_color</span> <span class='kw'>=</span> <span class='st'>"#ddd"</span>, | |||||
| <span class='kw'>table_row_even_background_color</span> <span class='kw'>=</span> <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='no'>primary_color</span>, <span class='fl'>0.9</span>), | |||||
| <span class='kw'>base_font_size</span> <span class='kw'>=</span> <span class='st'>"20px"</span>, | |||||
| <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='st'>"1rem"</span>, | |||||
| <span class='kw'>header_h1_font_size</span> <span class='kw'>=</span> <span class='st'>"2.75rem"</span>, | |||||
| <span class='kw'>header_h2_font_size</span> <span class='kw'>=</span> <span class='st'>"2.25rem"</span>, | |||||
| <span class='kw'>header_h3_font_size</span> <span class='kw'>=</span> <span class='st'>"1.75rem"</span>, | |||||
| <span class='kw'>header_background_auto</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>header_background_color</span> <span class='kw'>=</span> <span class='no'>header_color</span>, | |||||
| <span class='kw'>header_background_text_color</span> <span class='kw'>=</span> <span class='no'>background_color</span>, | |||||
| <span class='kw'>header_background_padding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_background_content_padding_top</span> <span class='kw'>=</span> <span class='st'>"7rem"</span>, | |||||
| <span class='kw'>header_background_ignore_classes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| primary_color = <span class='st'>"#1F4257"</span>, | |||||
| secondary_color = <span class='st'>"#F97B64"</span>, | |||||
| text_color = <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>primary_color</span>, <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='kw'>primary_color</span>, <span class='fl'>0.9</span>), | |||||
| <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='kw'>secondary_color</span>, <span class='fl'>0.99</span>)), | |||||
| header_color = <span class='kw'>secondary_color</span>, | |||||
| background_color = <span class='kw'>primary_color</span>, | |||||
| link_color = <span class='kw'>secondary_color</span>, | |||||
| text_bold_color = <span class='kw'>secondary_color</span>, | |||||
| text_slide_number_color = <span class='kw'>text_color</span>, | |||||
| padding = <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| background_image = <span class='kw'>NULL</span>, | |||||
| background_size = <span class='kw'>NULL</span>, | |||||
| background_position = <span class='kw'>NULL</span>, | |||||
| code_highlight_color = <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| code_inline_color = <span class='kw'>secondary_color</span>, | |||||
| code_inline_background_color = <span class='kw'>NULL</span>, | |||||
| code_inline_font_size = <span class='st'>"1em"</span>, | |||||
| inverse_background_color = <span class='kw'>secondary_color</span>, | |||||
| inverse_text_color = <span class='kw'>primary_color</span>, | |||||
| inverse_text_shadow = <span class='fl'>FALSE</span>, | |||||
| inverse_header_color = <span class='kw'>primary_color</span>, | |||||
| title_slide_text_color = <span class='kw'>secondary_color</span>, | |||||
| title_slide_background_color = <span class='kw'>primary_color</span>, | |||||
| title_slide_background_image = <span class='kw'>NULL</span>, | |||||
| title_slide_background_size = <span class='kw'>NULL</span>, | |||||
| title_slide_background_position = <span class='kw'>NULL</span>, | |||||
| footnote_color = <span class='kw'>NULL</span>, | |||||
| footnote_font_size = <span class='st'>"0.9em"</span>, | |||||
| footnote_position_bottom = <span class='st'>"60px"</span>, | |||||
| left_column_subtle_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>secondary_color</span>, <span class='fl'>0.6</span>), | |||||
| left_column_selected_color = <span class='kw'>secondary_color</span>, | |||||
| blockquote_left_border_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>secondary_color</span>, <span class='fl'>0.5</span>), | |||||
| table_border_color = <span class='st'>"#666"</span>, | |||||
| table_row_border_color = <span class='st'>"#ddd"</span>, | |||||
| table_row_even_background_color = <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='kw'>primary_color</span>, <span class='fl'>0.9</span>), | |||||
| base_font_size = <span class='st'>"20px"</span>, | |||||
| text_font_size = <span class='st'>"1rem"</span>, | |||||
| header_h1_font_size = <span class='st'>"2.75rem"</span>, | |||||
| header_h2_font_size = <span class='st'>"2.25rem"</span>, | |||||
| header_h3_font_size = <span class='st'>"1.75rem"</span>, | |||||
| header_background_auto = <span class='fl'>FALSE</span>, | |||||
| header_background_color = <span class='kw'>header_color</span>, | |||||
| header_background_text_color = <span class='kw'>background_color</span>, | |||||
| header_background_padding = <span class='kw'>NULL</span>, | |||||
| header_background_content_padding_top = <span class='st'>"7rem"</span>, | |||||
| header_background_ignore_classes = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| <span class='st'>"bottom"</span>), | <span class='st'>"bottom"</span>), | ||||
| <span class='kw'>text_slide_number_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>text_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| <span class='kw'>text_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| <span class='kw'>text_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| <span class='kw'>text_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| <span class='kw'>text_font_base</span> <span class='kw'>=</span> <span class='st'>"sans-serif"</span>, | |||||
| <span class='kw'>header_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| <span class='kw'>header_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| <span class='kw'>header_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| <span class='kw'>code_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| <span class='kw'>code_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9rem"</span>, | |||||
| <span class='kw'>code_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| <span class='kw'>code_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| <span class='kw'>colors</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_css</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_fonts</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='st'>"xaringan-themer.css"</span> | |||||
| text_slide_number_font_size = <span class='st'>"0.9em"</span>, | |||||
| text_font_google = <span class='kw'>NULL</span>, | |||||
| text_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| text_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| text_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| text_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| text_font_base = <span class='st'>"sans-serif"</span>, | |||||
| header_font_google = <span class='kw'>NULL</span>, | |||||
| header_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| header_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| header_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| code_font_google = <span class='kw'>NULL</span>, | |||||
| code_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| code_font_size = <span class='st'>"0.9rem"</span>, | |||||
| code_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| code_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| colors = <span class='kw'>NULL</span>, | |||||
| extra_css = <span class='kw'>NULL</span>, | |||||
| extra_fonts = <span class='kw'>NULL</span>, | |||||
| outfile = <span class='st'>"xaringan-themer.css"</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <th>text_font_family</th> | <th>text_font_family</th> | ||||
| <td><p>Body Text Font Family (xaringan default is | <td><p>Body Text Font Family (xaringan default is | ||||
| <code>'Droid Serif'</code>). Defaults to | <code>'Droid Serif'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| element. The value of this variable is also stored as a CSS variable that | element. The value of this variable is also stored as a CSS variable that | ||||
| can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | ||||
| style function or in custom CSS.</p></td> | style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_weight</th> | <th>text_font_weight</th> | ||||
| <td><p>Body Text Font Weight. Defaults to | <td><p>Body Text Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| element. Accepts CSS | element. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_url</th> | <th>text_font_url</th> | ||||
| <td><p>Body Text Font URL(s). Defaults to | <td><p>Body Text Font URL(s). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code>@import url()</code> elements.</p></td> | <code>@import url()</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>text_font_family_fallback</th> | <th>text_font_family_fallback</th> | ||||
| <td><p>Body Text Font Fallbacks. Defaults to | <td><p>Body Text Font Fallbacks. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code>body</code> element. The value of this variable is also stored as a CSS | <code>body</code> element. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | ||||
| any argument of a style function or in custom CSS.</p></td> | any argument of a style function or in custom CSS.</p></td> | ||||
| <th>header_font_family</th> | <th>header_font_family</th> | ||||
| <td><p>Header Font Family (xaringan default is | <td><p>Header Font Family (xaringan default is | ||||
| <code>'Yanone Kaffeesatz'</code>). Defaults to | <code>'Yanone Kaffeesatz'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | ||||
| argument of a style function or in custom CSS.</p></td> | argument of a style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_weight</th> | <th>header_font_weight</th> | ||||
| <td><p>Header Font Weight. Defaults to | <td><p>Header Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. Accepts CSS | <code>h1, h2, h3</code> elements. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_url</th> | <th>header_font_url</th> | ||||
| <td><p>Header Font URL. Defaults to | <td><p>Header Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code>@import url</code> elements.</p></td> | <code>@import url</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family</th> | <th>code_font_family</th> | ||||
| <td><p>Code Font Family. Defaults to | <td><p>Code Font Family. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | ||||
| also stored as a CSS variable that can be referenced with | also stored as a CSS variable that can be referenced with | ||||
| <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | ||||
| <tr> | <tr> | ||||
| <th>code_font_url</th> | <th>code_font_url</th> | ||||
| <td><p>Code Font URL. Defaults to | <td><p>Code Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| elements.</p></td> | elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family_fallback</th> | <th>code_font_family_fallback</th> | ||||
| <td><p>Code Font Fallback. Defaults to | <td><p>Code Font Fallback. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes.</p></td> | <code>.remark-code, .remark-inline-code</code> classes.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <p>To use the styles created by this theme function, make sure | <p>To use the styles created by this theme function, make sure | ||||
| that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the <code>outfile</code> | header. If you change the name of the output file using the <code>outfile</code> | ||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='no'>output</span>: | |||||
| <span class='kw pkg'>xaringan</span><span class='kw ns'>::</span><span class='no'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span>: | |||||
| <span class='no'>css</span>: <span class='no'>xaringan</span>-<span class='no'>themer.css</span></pre><p></div></p> | |||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='kw'>output</span><span class='op'>:</span> | |||||
| <span class='kw'>xaringan</span>::<span class='kw'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span><span class='op'>:</span> | |||||
| <span class='kw'>css</span><span class='op'>:</span> <span class='kw'>xaringan</span><span class='op'>-</span><span class='kw'>themer.css</span> | |||||
| </pre><p></div></p> | |||||
| <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | ||||
| <div class='dont-index'><p>Other themes: | <div class='dont-index'><p>Other themes: | ||||
| <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | ||||
| <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | ||||
| <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <p>Other Duotone themes: | <p>Other Duotone themes: | ||||
| <code><a href='style_duo_accent_inverse.html'>style_duo_accent_inverse</a>()</code>, | <code><a href='style_duo_accent_inverse.html'>style_duo_accent_inverse</a>()</code>, | ||||
| <code><a href='style_duo_accent.html'>style_duo_accent</a>()</code></p></div> | <code><a href='style_duo_accent.html'>style_duo_accent</a>()</code></p></div> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | ||||
| <span class='no'>xaringan_themer_css</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, <span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>xaringan_themer_css</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, fileext = <span class='st'>".css"</span>) | |||||
| <span class='fu'>style_duo</span>( | <span class='fu'>style_duo</span>( | ||||
| <span class='kw'>primary_color</span> <span class='kw'>=</span> <span class='st'>"#1f4257"</span>, | |||||
| <span class='kw'>secondary_color</span> <span class='kw'>=</span> <span class='st'>"#f97b64"</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| primary_color = <span class='st'>"#1f4257"</span>, | |||||
| secondary_color = <span class='st'>"#f97b64"</span>, | |||||
| outfile = <span class='kw'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| <span class='co'># styles to xaringan-themer.css</span> | <span class='co'># styles to xaringan-themer.css</span> | ||||
| ) | ) | ||||
| <span class='co'># View the CSS:</span> | <span class='co'># View the CSS:</span> | ||||
| <span class='co'># file.edit(xaringan_themer_css)</span></div></pre> | |||||
| <span class='co'># file.edit(xaringan_themer_css)</span> | |||||
| </div></pre> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| <nav id="toc" data-toggle="toc" class="sticky-top"> | <nav id="toc" data-toggle="toc" class="sticky-top"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>style_duo_accent</span>( | <pre class="usage"><span class='fu'>style_duo_accent</span>( | ||||
| <span class='kw'>primary_color</span> <span class='kw'>=</span> <span class='st'>"#035AA6"</span>, | |||||
| <span class='kw'>secondary_color</span> <span class='kw'>=</span> <span class='st'>"#03A696"</span>, | |||||
| <span class='kw'>white_color</span> <span class='kw'>=</span> <span class='st'>"#FFFFFF"</span>, | |||||
| <span class='kw'>black_color</span> <span class='kw'>=</span> <span class='st'>"#000000"</span>, | |||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='no'>black_color</span>, | |||||
| <span class='kw'>header_color</span> <span class='kw'>=</span> <span class='no'>primary_color</span>, | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='no'>white_color</span>, | |||||
| <span class='kw'>link_color</span> <span class='kw'>=</span> <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>secondary_color</span>, <span class='no'>primary_color</span>, <span class='no'>secondary_color</span>), | |||||
| <span class='kw'>text_bold_color</span> <span class='kw'>=</span> <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>secondary_color</span>, <span class='no'>primary_color</span>, | |||||
| <span class='no'>secondary_color</span>), | |||||
| <span class='kw'>text_slide_number_color</span> <span class='kw'>=</span> <span class='no'>primary_color</span>, | |||||
| <span class='kw'>padding</span> <span class='kw'>=</span> <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| <span class='kw'>background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_highlight_color</span> <span class='kw'>=</span> <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| <span class='kw'>code_inline_color</span> <span class='kw'>=</span> <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>secondary_color</span>, <span class='no'>primary_color</span>, | |||||
| <span class='no'>secondary_color</span>), | |||||
| <span class='kw'>code_inline_background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_inline_font_size</span> <span class='kw'>=</span> <span class='st'>"1em"</span>, | |||||
| <span class='kw'>inverse_background_color</span> <span class='kw'>=</span> <span class='no'>secondary_color</span>, | |||||
| <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>secondary_color</span>, <span class='no'>black_color</span>, <span class='no'>white_color</span>), | |||||
| <span class='kw'>inverse_text_shadow</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>inverse_header_color</span> <span class='kw'>=</span> <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>secondary_color</span>, <span class='no'>black_color</span>, | |||||
| <span class='no'>white_color</span>), | |||||
| <span class='kw'>title_slide_text_color</span> <span class='kw'>=</span> <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>primary_color</span>, <span class='no'>black_color</span>, | |||||
| <span class='no'>white_color</span>), | |||||
| <span class='kw'>title_slide_background_color</span> <span class='kw'>=</span> <span class='no'>primary_color</span>, | |||||
| <span class='kw'>title_slide_background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>footnote_position_bottom</span> <span class='kw'>=</span> <span class='st'>"60px"</span>, | |||||
| <span class='kw'>left_column_subtle_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>primary_color</span>, <span class='fl'>0.6</span>), | |||||
| <span class='kw'>left_column_selected_color</span> <span class='kw'>=</span> <span class='no'>primary_color</span>, | |||||
| <span class='kw'>blockquote_left_border_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>secondary_color</span>, <span class='fl'>0.5</span>), | |||||
| <span class='kw'>table_border_color</span> <span class='kw'>=</span> <span class='st'>"#666"</span>, | |||||
| <span class='kw'>table_row_border_color</span> <span class='kw'>=</span> <span class='st'>"#ddd"</span>, | |||||
| <span class='kw'>table_row_even_background_color</span> <span class='kw'>=</span> <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='no'>secondary_color</span>, <span class='fl'>0.8</span>), | |||||
| <span class='kw'>base_font_size</span> <span class='kw'>=</span> <span class='st'>"20px"</span>, | |||||
| <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='st'>"1rem"</span>, | |||||
| <span class='kw'>header_h1_font_size</span> <span class='kw'>=</span> <span class='st'>"2.75rem"</span>, | |||||
| <span class='kw'>header_h2_font_size</span> <span class='kw'>=</span> <span class='st'>"2.25rem"</span>, | |||||
| <span class='kw'>header_h3_font_size</span> <span class='kw'>=</span> <span class='st'>"1.75rem"</span>, | |||||
| <span class='kw'>header_background_auto</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>header_background_color</span> <span class='kw'>=</span> <span class='no'>header_color</span>, | |||||
| <span class='kw'>header_background_text_color</span> <span class='kw'>=</span> <span class='no'>background_color</span>, | |||||
| <span class='kw'>header_background_padding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_background_content_padding_top</span> <span class='kw'>=</span> <span class='st'>"7rem"</span>, | |||||
| <span class='kw'>header_background_ignore_classes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| primary_color = <span class='st'>"#035AA6"</span>, | |||||
| secondary_color = <span class='st'>"#03A696"</span>, | |||||
| white_color = <span class='st'>"#FFFFFF"</span>, | |||||
| black_color = <span class='st'>"#000000"</span>, | |||||
| text_color = <span class='kw'>black_color</span>, | |||||
| header_color = <span class='kw'>primary_color</span>, | |||||
| background_color = <span class='kw'>white_color</span>, | |||||
| link_color = <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>secondary_color</span>, <span class='kw'>primary_color</span>, <span class='kw'>secondary_color</span>), | |||||
| text_bold_color = <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>secondary_color</span>, <span class='kw'>primary_color</span>, | |||||
| <span class='kw'>secondary_color</span>), | |||||
| text_slide_number_color = <span class='kw'>primary_color</span>, | |||||
| padding = <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| background_image = <span class='kw'>NULL</span>, | |||||
| background_size = <span class='kw'>NULL</span>, | |||||
| background_position = <span class='kw'>NULL</span>, | |||||
| code_highlight_color = <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| code_inline_color = <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>secondary_color</span>, <span class='kw'>primary_color</span>, | |||||
| <span class='kw'>secondary_color</span>), | |||||
| code_inline_background_color = <span class='kw'>NULL</span>, | |||||
| code_inline_font_size = <span class='st'>"1em"</span>, | |||||
| inverse_background_color = <span class='kw'>secondary_color</span>, | |||||
| inverse_text_color = <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>secondary_color</span>, <span class='kw'>black_color</span>, <span class='kw'>white_color</span>), | |||||
| inverse_text_shadow = <span class='fl'>FALSE</span>, | |||||
| inverse_header_color = <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>secondary_color</span>, <span class='kw'>black_color</span>, | |||||
| <span class='kw'>white_color</span>), | |||||
| title_slide_text_color = <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>primary_color</span>, <span class='kw'>black_color</span>, | |||||
| <span class='kw'>white_color</span>), | |||||
| title_slide_background_color = <span class='kw'>primary_color</span>, | |||||
| title_slide_background_image = <span class='kw'>NULL</span>, | |||||
| title_slide_background_size = <span class='kw'>NULL</span>, | |||||
| title_slide_background_position = <span class='kw'>NULL</span>, | |||||
| footnote_color = <span class='kw'>NULL</span>, | |||||
| footnote_font_size = <span class='st'>"0.9em"</span>, | |||||
| footnote_position_bottom = <span class='st'>"60px"</span>, | |||||
| left_column_subtle_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>primary_color</span>, <span class='fl'>0.6</span>), | |||||
| left_column_selected_color = <span class='kw'>primary_color</span>, | |||||
| blockquote_left_border_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>secondary_color</span>, <span class='fl'>0.5</span>), | |||||
| table_border_color = <span class='st'>"#666"</span>, | |||||
| table_row_border_color = <span class='st'>"#ddd"</span>, | |||||
| table_row_even_background_color = <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='kw'>secondary_color</span>, <span class='fl'>0.8</span>), | |||||
| base_font_size = <span class='st'>"20px"</span>, | |||||
| text_font_size = <span class='st'>"1rem"</span>, | |||||
| header_h1_font_size = <span class='st'>"2.75rem"</span>, | |||||
| header_h2_font_size = <span class='st'>"2.25rem"</span>, | |||||
| header_h3_font_size = <span class='st'>"1.75rem"</span>, | |||||
| header_background_auto = <span class='fl'>FALSE</span>, | |||||
| header_background_color = <span class='kw'>header_color</span>, | |||||
| header_background_text_color = <span class='kw'>background_color</span>, | |||||
| header_background_padding = <span class='kw'>NULL</span>, | |||||
| header_background_content_padding_top = <span class='st'>"7rem"</span>, | |||||
| header_background_ignore_classes = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| <span class='st'>"bottom"</span>), | <span class='st'>"bottom"</span>), | ||||
| <span class='kw'>text_slide_number_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>text_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| <span class='kw'>text_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| <span class='kw'>text_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| <span class='kw'>text_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| <span class='kw'>text_font_base</span> <span class='kw'>=</span> <span class='st'>"sans-serif"</span>, | |||||
| <span class='kw'>header_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| <span class='kw'>header_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| <span class='kw'>header_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| <span class='kw'>code_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| <span class='kw'>code_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9rem"</span>, | |||||
| <span class='kw'>code_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| <span class='kw'>code_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| <span class='kw'>colors</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_css</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_fonts</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='st'>"xaringan-themer.css"</span> | |||||
| text_slide_number_font_size = <span class='st'>"0.9em"</span>, | |||||
| text_font_google = <span class='kw'>NULL</span>, | |||||
| text_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| text_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| text_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| text_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| text_font_base = <span class='st'>"sans-serif"</span>, | |||||
| header_font_google = <span class='kw'>NULL</span>, | |||||
| header_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| header_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| header_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| code_font_google = <span class='kw'>NULL</span>, | |||||
| code_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| code_font_size = <span class='st'>"0.9rem"</span>, | |||||
| code_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| code_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| colors = <span class='kw'>NULL</span>, | |||||
| extra_css = <span class='kw'>NULL</span>, | |||||
| extra_fonts = <span class='kw'>NULL</span>, | |||||
| outfile = <span class='st'>"xaringan-themer.css"</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <th>text_font_family</th> | <th>text_font_family</th> | ||||
| <td><p>Body Text Font Family (xaringan default is | <td><p>Body Text Font Family (xaringan default is | ||||
| <code>'Droid Serif'</code>). Defaults to | <code>'Droid Serif'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| element. The value of this variable is also stored as a CSS variable that | element. The value of this variable is also stored as a CSS variable that | ||||
| can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | ||||
| style function or in custom CSS.</p></td> | style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_weight</th> | <th>text_font_weight</th> | ||||
| <td><p>Body Text Font Weight. Defaults to | <td><p>Body Text Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| element. Accepts CSS | element. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_url</th> | <th>text_font_url</th> | ||||
| <td><p>Body Text Font URL(s). Defaults to | <td><p>Body Text Font URL(s). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code>@import url()</code> elements.</p></td> | <code>@import url()</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>text_font_family_fallback</th> | <th>text_font_family_fallback</th> | ||||
| <td><p>Body Text Font Fallbacks. Defaults to | <td><p>Body Text Font Fallbacks. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code>body</code> element. The value of this variable is also stored as a CSS | <code>body</code> element. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | ||||
| any argument of a style function or in custom CSS.</p></td> | any argument of a style function or in custom CSS.</p></td> | ||||
| <th>header_font_family</th> | <th>header_font_family</th> | ||||
| <td><p>Header Font Family (xaringan default is | <td><p>Header Font Family (xaringan default is | ||||
| <code>'Yanone Kaffeesatz'</code>). Defaults to | <code>'Yanone Kaffeesatz'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | ||||
| argument of a style function or in custom CSS.</p></td> | argument of a style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_weight</th> | <th>header_font_weight</th> | ||||
| <td><p>Header Font Weight. Defaults to | <td><p>Header Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. Accepts CSS | <code>h1, h2, h3</code> elements. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_url</th> | <th>header_font_url</th> | ||||
| <td><p>Header Font URL. Defaults to | <td><p>Header Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code>@import url</code> elements.</p></td> | <code>@import url</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family</th> | <th>code_font_family</th> | ||||
| <td><p>Code Font Family. Defaults to | <td><p>Code Font Family. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | ||||
| also stored as a CSS variable that can be referenced with | also stored as a CSS variable that can be referenced with | ||||
| <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | ||||
| <tr> | <tr> | ||||
| <th>code_font_url</th> | <th>code_font_url</th> | ||||
| <td><p>Code Font URL. Defaults to | <td><p>Code Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| elements.</p></td> | elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family_fallback</th> | <th>code_font_family_fallback</th> | ||||
| <td><p>Code Font Fallback. Defaults to | <td><p>Code Font Fallback. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes.</p></td> | <code>.remark-code, .remark-inline-code</code> classes.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <p>To use the styles created by this theme function, make sure | <p>To use the styles created by this theme function, make sure | ||||
| that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the <code>outfile</code> | header. If you change the name of the output file using the <code>outfile</code> | ||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='no'>output</span>: | |||||
| <span class='kw pkg'>xaringan</span><span class='kw ns'>::</span><span class='no'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span>: | |||||
| <span class='no'>css</span>: <span class='no'>xaringan</span>-<span class='no'>themer.css</span></pre><p></div></p> | |||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='kw'>output</span><span class='op'>:</span> | |||||
| <span class='kw'>xaringan</span>::<span class='kw'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span><span class='op'>:</span> | |||||
| <span class='kw'>css</span><span class='op'>:</span> <span class='kw'>xaringan</span><span class='op'>-</span><span class='kw'>themer.css</span> | |||||
| </pre><p></div></p> | |||||
| <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | ||||
| <div class='dont-index'><p>Other themes: | <div class='dont-index'><p>Other themes: | ||||
| <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | ||||
| <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | ||||
| <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <p>Other Duotone themes: | <p>Other Duotone themes: | ||||
| <code><a href='style_duo_accent_inverse.html'>style_duo_accent_inverse</a>()</code>, | <code><a href='style_duo_accent_inverse.html'>style_duo_accent_inverse</a>()</code>, | ||||
| <code><a href='style_duo.html'>style_duo</a>()</code></p></div> | <code><a href='style_duo.html'>style_duo</a>()</code></p></div> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | ||||
| <span class='no'>xaringan_themer_css</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, <span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>xaringan_themer_css</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, fileext = <span class='st'>".css"</span>) | |||||
| <span class='fu'>style_duo_accent</span>( | <span class='fu'>style_duo_accent</span>( | ||||
| <span class='kw'>primary_color</span> <span class='kw'>=</span> <span class='st'>"#006747"</span>, | |||||
| <span class='kw'>secondary_color</span> <span class='kw'>=</span> <span class='st'>"#cfc493"</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| primary_color = <span class='st'>"#006747"</span>, | |||||
| secondary_color = <span class='st'>"#cfc493"</span>, | |||||
| outfile = <span class='kw'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| <span class='co'># styles to xaringan-themer.css</span> | <span class='co'># styles to xaringan-themer.css</span> | ||||
| ) | ) | ||||
| <span class='co'># View the CSS:</span> | <span class='co'># View the CSS:</span> | ||||
| <span class='co'># file.edit(xaringan_themer_css)</span></div></pre> | |||||
| <span class='co'># file.edit(xaringan_themer_css)</span> | |||||
| </div></pre> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| <nav id="toc" data-toggle="toc" class="sticky-top"> | <nav id="toc" data-toggle="toc" class="sticky-top"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>style_duo_accent_inverse</span>( | <pre class="usage"><span class='fu'>style_duo_accent_inverse</span>( | ||||
| <span class='kw'>primary_color</span> <span class='kw'>=</span> <span class='st'>"#035AA6"</span>, | |||||
| <span class='kw'>secondary_color</span> <span class='kw'>=</span> <span class='st'>"#03A696"</span>, | |||||
| <span class='kw'>white_color</span> <span class='kw'>=</span> <span class='st'>"#FFFFFF"</span>, | |||||
| <span class='kw'>black_color</span> <span class='kw'>=</span> <span class='st'>"#000000"</span>, | |||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='no'>white_color</span>, | |||||
| <span class='kw'>header_color</span> <span class='kw'>=</span> <span class='no'>primary_color</span>, | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='no'>black_color</span>, | |||||
| <span class='kw'>link_color</span> <span class='kw'>=</span> <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>secondary_color</span>, <span class='no'>secondary_color</span>, <span class='no'>primary_color</span>), | |||||
| <span class='kw'>text_bold_color</span> <span class='kw'>=</span> <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>secondary_color</span>, <span class='no'>secondary_color</span>, | |||||
| <span class='no'>primary_color</span>), | |||||
| <span class='kw'>text_slide_number_color</span> <span class='kw'>=</span> <span class='no'>primary_color</span>, | |||||
| <span class='kw'>padding</span> <span class='kw'>=</span> <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| <span class='kw'>background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_highlight_color</span> <span class='kw'>=</span> <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| <span class='kw'>code_inline_color</span> <span class='kw'>=</span> <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>secondary_color</span>, <span class='no'>secondary_color</span>, | |||||
| <span class='no'>primary_color</span>), | |||||
| <span class='kw'>code_inline_background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_inline_font_size</span> <span class='kw'>=</span> <span class='st'>"1em"</span>, | |||||
| <span class='kw'>inverse_background_color</span> <span class='kw'>=</span> <span class='no'>secondary_color</span>, | |||||
| <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>secondary_color</span>, <span class='no'>black_color</span>, <span class='no'>white_color</span>), | |||||
| <span class='kw'>inverse_text_shadow</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>inverse_header_color</span> <span class='kw'>=</span> <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>secondary_color</span>, <span class='no'>black_color</span>, | |||||
| <span class='no'>white_color</span>), | |||||
| <span class='kw'>title_slide_text_color</span> <span class='kw'>=</span> <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>primary_color</span>, <span class='no'>black_color</span>, | |||||
| <span class='no'>white_color</span>), | |||||
| <span class='kw'>title_slide_background_color</span> <span class='kw'>=</span> <span class='no'>primary_color</span>, | |||||
| <span class='kw'>title_slide_background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>footnote_position_bottom</span> <span class='kw'>=</span> <span class='st'>"60px"</span>, | |||||
| <span class='kw'>left_column_subtle_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>primary_color</span>, <span class='fl'>0.6</span>), | |||||
| <span class='kw'>left_column_selected_color</span> <span class='kw'>=</span> <span class='no'>primary_color</span>, | |||||
| <span class='kw'>blockquote_left_border_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>secondary_color</span>, <span class='fl'>0.5</span>), | |||||
| <span class='kw'>table_border_color</span> <span class='kw'>=</span> <span class='st'>"#666"</span>, | |||||
| <span class='kw'>table_row_border_color</span> <span class='kw'>=</span> <span class='st'>"#ddd"</span>, | |||||
| <span class='kw'>table_row_even_background_color</span> <span class='kw'>=</span> <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='no'>primary_color</span>, | |||||
| <span class='no'>secondary_color</span>, <span class='no'>primary_color</span>), <span class='fl'>0.2</span>), | |||||
| <span class='kw'>base_font_size</span> <span class='kw'>=</span> <span class='st'>"20px"</span>, | |||||
| <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='st'>"1rem"</span>, | |||||
| <span class='kw'>header_h1_font_size</span> <span class='kw'>=</span> <span class='st'>"2.75rem"</span>, | |||||
| <span class='kw'>header_h2_font_size</span> <span class='kw'>=</span> <span class='st'>"2.25rem"</span>, | |||||
| <span class='kw'>header_h3_font_size</span> <span class='kw'>=</span> <span class='st'>"1.75rem"</span>, | |||||
| <span class='kw'>header_background_auto</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>header_background_color</span> <span class='kw'>=</span> <span class='no'>header_color</span>, | |||||
| <span class='kw'>header_background_text_color</span> <span class='kw'>=</span> <span class='no'>background_color</span>, | |||||
| <span class='kw'>header_background_padding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_background_content_padding_top</span> <span class='kw'>=</span> <span class='st'>"7rem"</span>, | |||||
| <span class='kw'>header_background_ignore_classes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| primary_color = <span class='st'>"#035AA6"</span>, | |||||
| secondary_color = <span class='st'>"#03A696"</span>, | |||||
| white_color = <span class='st'>"#FFFFFF"</span>, | |||||
| black_color = <span class='st'>"#000000"</span>, | |||||
| text_color = <span class='kw'>white_color</span>, | |||||
| header_color = <span class='kw'>primary_color</span>, | |||||
| background_color = <span class='kw'>black_color</span>, | |||||
| link_color = <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>secondary_color</span>, <span class='kw'>secondary_color</span>, <span class='kw'>primary_color</span>), | |||||
| text_bold_color = <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>secondary_color</span>, <span class='kw'>secondary_color</span>, | |||||
| <span class='kw'>primary_color</span>), | |||||
| text_slide_number_color = <span class='kw'>primary_color</span>, | |||||
| padding = <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| background_image = <span class='kw'>NULL</span>, | |||||
| background_size = <span class='kw'>NULL</span>, | |||||
| background_position = <span class='kw'>NULL</span>, | |||||
| code_highlight_color = <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| code_inline_color = <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>secondary_color</span>, <span class='kw'>secondary_color</span>, | |||||
| <span class='kw'>primary_color</span>), | |||||
| code_inline_background_color = <span class='kw'>NULL</span>, | |||||
| code_inline_font_size = <span class='st'>"1em"</span>, | |||||
| inverse_background_color = <span class='kw'>secondary_color</span>, | |||||
| inverse_text_color = <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>secondary_color</span>, <span class='kw'>black_color</span>, <span class='kw'>white_color</span>), | |||||
| inverse_text_shadow = <span class='fl'>FALSE</span>, | |||||
| inverse_header_color = <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>secondary_color</span>, <span class='kw'>black_color</span>, | |||||
| <span class='kw'>white_color</span>), | |||||
| title_slide_text_color = <span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>primary_color</span>, <span class='kw'>black_color</span>, | |||||
| <span class='kw'>white_color</span>), | |||||
| title_slide_background_color = <span class='kw'>primary_color</span>, | |||||
| title_slide_background_image = <span class='kw'>NULL</span>, | |||||
| title_slide_background_size = <span class='kw'>NULL</span>, | |||||
| title_slide_background_position = <span class='kw'>NULL</span>, | |||||
| footnote_color = <span class='kw'>NULL</span>, | |||||
| footnote_font_size = <span class='st'>"0.9em"</span>, | |||||
| footnote_position_bottom = <span class='st'>"60px"</span>, | |||||
| left_column_subtle_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>primary_color</span>, <span class='fl'>0.6</span>), | |||||
| left_column_selected_color = <span class='kw'>primary_color</span>, | |||||
| blockquote_left_border_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>secondary_color</span>, <span class='fl'>0.5</span>), | |||||
| table_border_color = <span class='st'>"#666"</span>, | |||||
| table_row_border_color = <span class='st'>"#ddd"</span>, | |||||
| table_row_even_background_color = <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='fu'><a href='choose_dark_or_light.html'>choose_dark_or_light</a></span>(<span class='kw'>primary_color</span>, | |||||
| <span class='kw'>secondary_color</span>, <span class='kw'>primary_color</span>), <span class='fl'>0.2</span>), | |||||
| base_font_size = <span class='st'>"20px"</span>, | |||||
| text_font_size = <span class='st'>"1rem"</span>, | |||||
| header_h1_font_size = <span class='st'>"2.75rem"</span>, | |||||
| header_h2_font_size = <span class='st'>"2.25rem"</span>, | |||||
| header_h3_font_size = <span class='st'>"1.75rem"</span>, | |||||
| header_background_auto = <span class='fl'>FALSE</span>, | |||||
| header_background_color = <span class='kw'>header_color</span>, | |||||
| header_background_text_color = <span class='kw'>background_color</span>, | |||||
| header_background_padding = <span class='kw'>NULL</span>, | |||||
| header_background_content_padding_top = <span class='st'>"7rem"</span>, | |||||
| header_background_ignore_classes = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| <span class='st'>"bottom"</span>), | <span class='st'>"bottom"</span>), | ||||
| <span class='kw'>text_slide_number_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>text_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| <span class='kw'>text_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| <span class='kw'>text_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| <span class='kw'>text_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| <span class='kw'>text_font_base</span> <span class='kw'>=</span> <span class='st'>"sans-serif"</span>, | |||||
| <span class='kw'>header_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| <span class='kw'>header_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| <span class='kw'>header_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| <span class='kw'>code_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| <span class='kw'>code_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9rem"</span>, | |||||
| <span class='kw'>code_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| <span class='kw'>code_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| <span class='kw'>colors</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_css</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_fonts</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='st'>"xaringan-themer.css"</span> | |||||
| text_slide_number_font_size = <span class='st'>"0.9em"</span>, | |||||
| text_font_google = <span class='kw'>NULL</span>, | |||||
| text_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| text_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| text_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| text_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| text_font_base = <span class='st'>"sans-serif"</span>, | |||||
| header_font_google = <span class='kw'>NULL</span>, | |||||
| header_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| header_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| header_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| code_font_google = <span class='kw'>NULL</span>, | |||||
| code_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| code_font_size = <span class='st'>"0.9rem"</span>, | |||||
| code_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| code_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| colors = <span class='kw'>NULL</span>, | |||||
| extra_css = <span class='kw'>NULL</span>, | |||||
| extra_fonts = <span class='kw'>NULL</span>, | |||||
| outfile = <span class='st'>"xaringan-themer.css"</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <th>text_font_family</th> | <th>text_font_family</th> | ||||
| <td><p>Body Text Font Family (xaringan default is | <td><p>Body Text Font Family (xaringan default is | ||||
| <code>'Droid Serif'</code>). Defaults to | <code>'Droid Serif'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| element. The value of this variable is also stored as a CSS variable that | element. The value of this variable is also stored as a CSS variable that | ||||
| can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | ||||
| style function or in custom CSS.</p></td> | style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_weight</th> | <th>text_font_weight</th> | ||||
| <td><p>Body Text Font Weight. Defaults to | <td><p>Body Text Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| element. Accepts CSS | element. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_url</th> | <th>text_font_url</th> | ||||
| <td><p>Body Text Font URL(s). Defaults to | <td><p>Body Text Font URL(s). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code>@import url()</code> elements.</p></td> | <code>@import url()</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>text_font_family_fallback</th> | <th>text_font_family_fallback</th> | ||||
| <td><p>Body Text Font Fallbacks. Defaults to | <td><p>Body Text Font Fallbacks. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code>body</code> element. The value of this variable is also stored as a CSS | <code>body</code> element. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | ||||
| any argument of a style function or in custom CSS.</p></td> | any argument of a style function or in custom CSS.</p></td> | ||||
| <th>header_font_family</th> | <th>header_font_family</th> | ||||
| <td><p>Header Font Family (xaringan default is | <td><p>Header Font Family (xaringan default is | ||||
| <code>'Yanone Kaffeesatz'</code>). Defaults to | <code>'Yanone Kaffeesatz'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | ||||
| argument of a style function or in custom CSS.</p></td> | argument of a style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_weight</th> | <th>header_font_weight</th> | ||||
| <td><p>Header Font Weight. Defaults to | <td><p>Header Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. Accepts CSS | <code>h1, h2, h3</code> elements. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_url</th> | <th>header_font_url</th> | ||||
| <td><p>Header Font URL. Defaults to | <td><p>Header Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code>@import url</code> elements.</p></td> | <code>@import url</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family</th> | <th>code_font_family</th> | ||||
| <td><p>Code Font Family. Defaults to | <td><p>Code Font Family. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | ||||
| also stored as a CSS variable that can be referenced with | also stored as a CSS variable that can be referenced with | ||||
| <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | ||||
| <tr> | <tr> | ||||
| <th>code_font_url</th> | <th>code_font_url</th> | ||||
| <td><p>Code Font URL. Defaults to | <td><p>Code Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| elements.</p></td> | elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family_fallback</th> | <th>code_font_family_fallback</th> | ||||
| <td><p>Code Font Fallback. Defaults to | <td><p>Code Font Fallback. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes.</p></td> | <code>.remark-code, .remark-inline-code</code> classes.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <p>To use the styles created by this theme function, make sure | <p>To use the styles created by this theme function, make sure | ||||
| that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the <code>outfile</code> | header. If you change the name of the output file using the <code>outfile</code> | ||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='no'>output</span>: | |||||
| <span class='kw pkg'>xaringan</span><span class='kw ns'>::</span><span class='no'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span>: | |||||
| <span class='no'>css</span>: <span class='no'>xaringan</span>-<span class='no'>themer.css</span></pre><p></div></p> | |||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='kw'>output</span><span class='op'>:</span> | |||||
| <span class='kw'>xaringan</span>::<span class='kw'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span><span class='op'>:</span> | |||||
| <span class='kw'>css</span><span class='op'>:</span> <span class='kw'>xaringan</span><span class='op'>-</span><span class='kw'>themer.css</span> | |||||
| </pre><p></div></p> | |||||
| <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | ||||
| <div class='dont-index'><p>Other themes: | <div class='dont-index'><p>Other themes: | ||||
| <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | ||||
| <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | ||||
| <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <p>Other Duotone themes: | <p>Other Duotone themes: | ||||
| <code><a href='style_duo_accent.html'>style_duo_accent</a>()</code>, | <code><a href='style_duo_accent.html'>style_duo_accent</a>()</code>, | ||||
| <code><a href='style_duo.html'>style_duo</a>()</code></p></div> | <code><a href='style_duo.html'>style_duo</a>()</code></p></div> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | ||||
| <span class='no'>xaringan_themer_css</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, <span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>xaringan_themer_css</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, fileext = <span class='st'>".css"</span>) | |||||
| <span class='fu'>style_duo_accent_inverse</span>( | <span class='fu'>style_duo_accent_inverse</span>( | ||||
| <span class='kw'>primary_color</span> <span class='kw'>=</span> <span class='st'>"#006747"</span>, | |||||
| <span class='kw'>secondary_color</span> <span class='kw'>=</span> <span class='st'>"#cfc493"</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| primary_color = <span class='st'>"#006747"</span>, | |||||
| secondary_color = <span class='st'>"#cfc493"</span>, | |||||
| outfile = <span class='kw'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| <span class='co'># styles to xaringan-themer.css</span> | <span class='co'># styles to xaringan-themer.css</span> | ||||
| ) | ) | ||||
| <span class='co'># View the CSS:</span> | <span class='co'># View the CSS:</span> | ||||
| <span class='co'># file.edit(xaringan_themer_css)</span></div></pre> | |||||
| <span class='co'># file.edit(xaringan_themer_css)</span> | |||||
| </div></pre> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| <nav id="toc" data-toggle="toc" class="sticky-top"> | <nav id="toc" data-toggle="toc" class="sticky-top"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>style_extra_css</span>( | <pre class="usage"><span class='fu'>style_extra_css</span>( | ||||
| <span class='no'>css</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='st'>"xaringan-themer.css"</span>, | |||||
| <span class='kw'>append</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, | |||||
| <span class='kw'>heading</span> <span class='kw'>=</span> <span class='st'>"Extra CSS"</span> | |||||
| <span class='kw'>css</span>, | |||||
| outfile = <span class='st'>"xaringan-themer.css"</span>, | |||||
| append = <span class='fl'>TRUE</span>, | |||||
| heading = <span class='st'>"Extra CSS"</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='fu'>style_extra_css</span>( | <pre class="examples"><div class='input'><span class='fu'>style_extra_css</span>( | ||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/showConnections.html'>stdout</a></span>(), | |||||
| <span class='kw'>css</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>( | |||||
| <span class='st'>".red"</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>color</span> <span class='kw'>=</span> <span class='st'>"red"</span>), | |||||
| <span class='st'>".small"</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"font-size"</span> <span class='kw'>=</span> <span class='st'>"90%"</span>), | |||||
| <span class='st'>".full-width"</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>( | |||||
| <span class='kw'>display</span> <span class='kw'>=</span> <span class='st'>"flex"</span>, | |||||
| <span class='kw'>width</span> <span class='kw'>=</span> <span class='st'>"100%"</span>, | |||||
| <span class='kw'>flex</span> <span class='kw'>=</span> <span class='st'>"1 1 auto"</span> | |||||
| outfile = <span class='fu'><a href='https://rdrr.io/r/base/showConnections.html'>stdout</a></span>(), | |||||
| css = <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>( | |||||
| <span class='st'>".red"</span> = <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(color = <span class='st'>"red"</span>), | |||||
| <span class='st'>".small"</span> = <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"font-size"</span> = <span class='st'>"90%"</span>), | |||||
| <span class='st'>".full-width"</span> = <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>( | |||||
| display = <span class='st'>"flex"</span>, | |||||
| width = <span class='st'>"100%"</span>, | |||||
| flex = <span class='st'>"1 1 auto"</span> | |||||
| ) | ) | ||||
| ) | ) | ||||
| )</div><div class='output co'>#> | |||||
| ) | |||||
| </div><div class='output co'>#> | |||||
| #> | #> | ||||
| #> /* Extra CSS */ | #> /* Extra CSS */ | ||||
| #> .red { | #> .red { | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>style_mono_accent</span>( | <pre class="usage"><span class='fu'>style_mono_accent</span>( | ||||
| <span class='kw'>base_color</span> <span class='kw'>=</span> <span class='st'>"#43418A"</span>, | |||||
| <span class='kw'>white_color</span> <span class='kw'>=</span> <span class='st'>"#FFFFFF"</span>, | |||||
| <span class='kw'>black_color</span> <span class='kw'>=</span> <span class='st'>"#272822"</span>, | |||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='no'>black_color</span>, | |||||
| <span class='kw'>header_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='no'>white_color</span>, | |||||
| <span class='kw'>link_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>text_bold_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>text_slide_number_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>padding</span> <span class='kw'>=</span> <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| <span class='kw'>background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_highlight_color</span> <span class='kw'>=</span> <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| <span class='kw'>code_inline_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>code_inline_background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_inline_font_size</span> <span class='kw'>=</span> <span class='st'>"1em"</span>, | |||||
| <span class='kw'>inverse_background_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='no'>white_color</span>, | |||||
| <span class='kw'>inverse_text_shadow</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>inverse_header_color</span> <span class='kw'>=</span> <span class='no'>white_color</span>, | |||||
| <span class='kw'>title_slide_text_color</span> <span class='kw'>=</span> <span class='no'>inverse_text_color</span>, | |||||
| <span class='kw'>title_slide_background_color</span> <span class='kw'>=</span> <span class='no'>inverse_background_color</span>, | |||||
| <span class='kw'>title_slide_background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>footnote_position_bottom</span> <span class='kw'>=</span> <span class='st'>"60px"</span>, | |||||
| <span class='kw'>left_column_subtle_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.6</span>), | |||||
| <span class='kw'>left_column_selected_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>blockquote_left_border_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.5</span>), | |||||
| <span class='kw'>table_border_color</span> <span class='kw'>=</span> <span class='st'>"#666"</span>, | |||||
| <span class='kw'>table_row_border_color</span> <span class='kw'>=</span> <span class='st'>"#ddd"</span>, | |||||
| <span class='kw'>table_row_even_background_color</span> <span class='kw'>=</span> <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.8</span>), | |||||
| <span class='kw'>base_font_size</span> <span class='kw'>=</span> <span class='st'>"20px"</span>, | |||||
| <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='st'>"1rem"</span>, | |||||
| <span class='kw'>header_h1_font_size</span> <span class='kw'>=</span> <span class='st'>"2.75rem"</span>, | |||||
| <span class='kw'>header_h2_font_size</span> <span class='kw'>=</span> <span class='st'>"2.25rem"</span>, | |||||
| <span class='kw'>header_h3_font_size</span> <span class='kw'>=</span> <span class='st'>"1.75rem"</span>, | |||||
| <span class='kw'>header_background_auto</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>header_background_color</span> <span class='kw'>=</span> <span class='no'>header_color</span>, | |||||
| <span class='kw'>header_background_text_color</span> <span class='kw'>=</span> <span class='no'>background_color</span>, | |||||
| <span class='kw'>header_background_padding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_background_content_padding_top</span> <span class='kw'>=</span> <span class='st'>"7rem"</span>, | |||||
| <span class='kw'>header_background_ignore_classes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| base_color = <span class='st'>"#43418A"</span>, | |||||
| white_color = <span class='st'>"#FFFFFF"</span>, | |||||
| black_color = <span class='st'>"#272822"</span>, | |||||
| text_color = <span class='kw'>black_color</span>, | |||||
| header_color = <span class='kw'>base_color</span>, | |||||
| background_color = <span class='kw'>white_color</span>, | |||||
| link_color = <span class='kw'>base_color</span>, | |||||
| text_bold_color = <span class='kw'>base_color</span>, | |||||
| text_slide_number_color = <span class='kw'>base_color</span>, | |||||
| padding = <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| background_image = <span class='kw'>NULL</span>, | |||||
| background_size = <span class='kw'>NULL</span>, | |||||
| background_position = <span class='kw'>NULL</span>, | |||||
| code_highlight_color = <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| code_inline_color = <span class='kw'>base_color</span>, | |||||
| code_inline_background_color = <span class='kw'>NULL</span>, | |||||
| code_inline_font_size = <span class='st'>"1em"</span>, | |||||
| inverse_background_color = <span class='kw'>base_color</span>, | |||||
| inverse_text_color = <span class='kw'>white_color</span>, | |||||
| inverse_text_shadow = <span class='fl'>FALSE</span>, | |||||
| inverse_header_color = <span class='kw'>white_color</span>, | |||||
| title_slide_text_color = <span class='kw'>inverse_text_color</span>, | |||||
| title_slide_background_color = <span class='kw'>inverse_background_color</span>, | |||||
| title_slide_background_image = <span class='kw'>NULL</span>, | |||||
| title_slide_background_size = <span class='kw'>NULL</span>, | |||||
| title_slide_background_position = <span class='kw'>NULL</span>, | |||||
| footnote_color = <span class='kw'>NULL</span>, | |||||
| footnote_font_size = <span class='st'>"0.9em"</span>, | |||||
| footnote_position_bottom = <span class='st'>"60px"</span>, | |||||
| left_column_subtle_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.6</span>), | |||||
| left_column_selected_color = <span class='kw'>base_color</span>, | |||||
| blockquote_left_border_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.5</span>), | |||||
| table_border_color = <span class='st'>"#666"</span>, | |||||
| table_row_border_color = <span class='st'>"#ddd"</span>, | |||||
| table_row_even_background_color = <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.8</span>), | |||||
| base_font_size = <span class='st'>"20px"</span>, | |||||
| text_font_size = <span class='st'>"1rem"</span>, | |||||
| header_h1_font_size = <span class='st'>"2.75rem"</span>, | |||||
| header_h2_font_size = <span class='st'>"2.25rem"</span>, | |||||
| header_h3_font_size = <span class='st'>"1.75rem"</span>, | |||||
| header_background_auto = <span class='fl'>FALSE</span>, | |||||
| header_background_color = <span class='kw'>header_color</span>, | |||||
| header_background_text_color = <span class='kw'>background_color</span>, | |||||
| header_background_padding = <span class='kw'>NULL</span>, | |||||
| header_background_content_padding_top = <span class='st'>"7rem"</span>, | |||||
| header_background_ignore_classes = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| <span class='st'>"bottom"</span>), | <span class='st'>"bottom"</span>), | ||||
| <span class='kw'>text_slide_number_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>text_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| <span class='kw'>text_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| <span class='kw'>text_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| <span class='kw'>text_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| <span class='kw'>text_font_base</span> <span class='kw'>=</span> <span class='st'>"sans-serif"</span>, | |||||
| <span class='kw'>header_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| <span class='kw'>header_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| <span class='kw'>header_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| <span class='kw'>code_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| <span class='kw'>code_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9rem"</span>, | |||||
| <span class='kw'>code_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| <span class='kw'>code_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| <span class='kw'>colors</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_css</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_fonts</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='st'>"xaringan-themer.css"</span> | |||||
| text_slide_number_font_size = <span class='st'>"0.9em"</span>, | |||||
| text_font_google = <span class='kw'>NULL</span>, | |||||
| text_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| text_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| text_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| text_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| text_font_base = <span class='st'>"sans-serif"</span>, | |||||
| header_font_google = <span class='kw'>NULL</span>, | |||||
| header_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| header_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| header_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| code_font_google = <span class='kw'>NULL</span>, | |||||
| code_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| code_font_size = <span class='st'>"0.9rem"</span>, | |||||
| code_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| code_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| colors = <span class='kw'>NULL</span>, | |||||
| extra_css = <span class='kw'>NULL</span>, | |||||
| extra_fonts = <span class='kw'>NULL</span>, | |||||
| outfile = <span class='st'>"xaringan-themer.css"</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <th>text_font_family</th> | <th>text_font_family</th> | ||||
| <td><p>Body Text Font Family (xaringan default is | <td><p>Body Text Font Family (xaringan default is | ||||
| <code>'Droid Serif'</code>). Defaults to | <code>'Droid Serif'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| element. The value of this variable is also stored as a CSS variable that | element. The value of this variable is also stored as a CSS variable that | ||||
| can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | ||||
| style function or in custom CSS.</p></td> | style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_weight</th> | <th>text_font_weight</th> | ||||
| <td><p>Body Text Font Weight. Defaults to | <td><p>Body Text Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| element. Accepts CSS | element. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_url</th> | <th>text_font_url</th> | ||||
| <td><p>Body Text Font URL(s). Defaults to | <td><p>Body Text Font URL(s). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code>@import url()</code> elements.</p></td> | <code>@import url()</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>text_font_family_fallback</th> | <th>text_font_family_fallback</th> | ||||
| <td><p>Body Text Font Fallbacks. Defaults to | <td><p>Body Text Font Fallbacks. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code>body</code> element. The value of this variable is also stored as a CSS | <code>body</code> element. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | ||||
| any argument of a style function or in custom CSS.</p></td> | any argument of a style function or in custom CSS.</p></td> | ||||
| <th>header_font_family</th> | <th>header_font_family</th> | ||||
| <td><p>Header Font Family (xaringan default is | <td><p>Header Font Family (xaringan default is | ||||
| <code>'Yanone Kaffeesatz'</code>). Defaults to | <code>'Yanone Kaffeesatz'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | ||||
| argument of a style function or in custom CSS.</p></td> | argument of a style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_weight</th> | <th>header_font_weight</th> | ||||
| <td><p>Header Font Weight. Defaults to | <td><p>Header Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. Accepts CSS | <code>h1, h2, h3</code> elements. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_url</th> | <th>header_font_url</th> | ||||
| <td><p>Header Font URL. Defaults to | <td><p>Header Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code>@import url</code> elements.</p></td> | <code>@import url</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family</th> | <th>code_font_family</th> | ||||
| <td><p>Code Font Family. Defaults to | <td><p>Code Font Family. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | ||||
| also stored as a CSS variable that can be referenced with | also stored as a CSS variable that can be referenced with | ||||
| <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | ||||
| <tr> | <tr> | ||||
| <th>code_font_url</th> | <th>code_font_url</th> | ||||
| <td><p>Code Font URL. Defaults to | <td><p>Code Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| elements.</p></td> | elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family_fallback</th> | <th>code_font_family_fallback</th> | ||||
| <td><p>Code Font Fallback. Defaults to | <td><p>Code Font Fallback. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes.</p></td> | <code>.remark-code, .remark-inline-code</code> classes.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <p>To use the styles created by this theme function, make sure | <p>To use the styles created by this theme function, make sure | ||||
| that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the <code>outfile</code> | header. If you change the name of the output file using the <code>outfile</code> | ||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='no'>output</span>: | |||||
| <span class='kw pkg'>xaringan</span><span class='kw ns'>::</span><span class='no'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span>: | |||||
| <span class='no'>css</span>: <span class='no'>xaringan</span>-<span class='no'>themer.css</span></pre><p></div></p> | |||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='kw'>output</span><span class='op'>:</span> | |||||
| <span class='kw'>xaringan</span>::<span class='kw'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span><span class='op'>:</span> | |||||
| <span class='kw'>css</span><span class='op'>:</span> <span class='kw'>xaringan</span><span class='op'>-</span><span class='kw'>themer.css</span> | |||||
| </pre><p></div></p> | |||||
| <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | ||||
| <div class='dont-index'><p>Other themes: | <div class='dont-index'><p>Other themes: | ||||
| <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | ||||
| <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | ||||
| <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <p>Other Monotone themes: | <p>Other Monotone themes: | ||||
| <code><a href='style_mono_accent_inverse.html'>style_mono_accent_inverse</a>()</code>, | <code><a href='style_mono_accent_inverse.html'>style_mono_accent_inverse</a>()</code>, | ||||
| <code><a href='style_mono_dark.html'>style_mono_dark</a>()</code>, | <code><a href='style_mono_dark.html'>style_mono_dark</a>()</code>, | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | ||||
| <span class='no'>xaringan_themer_css</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, <span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>xaringan_themer_css</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, fileext = <span class='st'>".css"</span>) | |||||
| <span class='fu'>style_mono_accent</span>( | <span class='fu'>style_mono_accent</span>( | ||||
| <span class='kw'>base_color</span> <span class='kw'>=</span> <span class='st'>"#43418A"</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| base_color = <span class='st'>"#43418A"</span>, | |||||
| outfile = <span class='kw'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| <span class='co'># styles to xaringan-themer.css</span> | <span class='co'># styles to xaringan-themer.css</span> | ||||
| ) | ) | ||||
| <span class='co'># View the CSS:</span> | <span class='co'># View the CSS:</span> | ||||
| <span class='co'># file.edit(xaringan_themer_css)</span></div></pre> | |||||
| <span class='co'># file.edit(xaringan_themer_css)</span> | |||||
| </div></pre> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| <nav id="toc" data-toggle="toc" class="sticky-top"> | <nav id="toc" data-toggle="toc" class="sticky-top"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>style_mono_accent_inverse</span>( | <pre class="usage"><span class='fu'>style_mono_accent_inverse</span>( | ||||
| <span class='kw'>base_color</span> <span class='kw'>=</span> <span class='st'>"#3C989E"</span>, | |||||
| <span class='kw'>white_color</span> <span class='kw'>=</span> <span class='st'>"#FFFFFF"</span>, | |||||
| <span class='kw'>black_color</span> <span class='kw'>=</span> <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.9</span>), | |||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='no'>white_color</span>, | |||||
| <span class='kw'>header_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='no'>black_color</span>, | |||||
| <span class='kw'>link_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>text_bold_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>text_slide_number_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>padding</span> <span class='kw'>=</span> <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| <span class='kw'>background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_highlight_color</span> <span class='kw'>=</span> <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| <span class='kw'>code_inline_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>code_inline_background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_inline_font_size</span> <span class='kw'>=</span> <span class='st'>"1em"</span>, | |||||
| <span class='kw'>inverse_background_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='no'>black_color</span>, | |||||
| <span class='kw'>inverse_text_shadow</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>inverse_header_color</span> <span class='kw'>=</span> <span class='no'>black_color</span>, | |||||
| <span class='kw'>title_slide_text_color</span> <span class='kw'>=</span> <span class='no'>inverse_text_color</span>, | |||||
| <span class='kw'>title_slide_background_color</span> <span class='kw'>=</span> <span class='no'>inverse_background_color</span>, | |||||
| <span class='kw'>title_slide_background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>footnote_position_bottom</span> <span class='kw'>=</span> <span class='st'>"60px"</span>, | |||||
| <span class='kw'>left_column_subtle_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.6</span>), | |||||
| <span class='kw'>left_column_selected_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>blockquote_left_border_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.5</span>), | |||||
| <span class='kw'>table_border_color</span> <span class='kw'>=</span> <span class='st'>"#666"</span>, | |||||
| <span class='kw'>table_row_border_color</span> <span class='kw'>=</span> <span class='st'>"#ddd"</span>, | |||||
| <span class='kw'>table_row_even_background_color</span> <span class='kw'>=</span> <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.8</span>), | |||||
| <span class='kw'>base_font_size</span> <span class='kw'>=</span> <span class='st'>"20px"</span>, | |||||
| <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='st'>"1rem"</span>, | |||||
| <span class='kw'>header_h1_font_size</span> <span class='kw'>=</span> <span class='st'>"2.75rem"</span>, | |||||
| <span class='kw'>header_h2_font_size</span> <span class='kw'>=</span> <span class='st'>"2.25rem"</span>, | |||||
| <span class='kw'>header_h3_font_size</span> <span class='kw'>=</span> <span class='st'>"1.75rem"</span>, | |||||
| <span class='kw'>header_background_auto</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>header_background_color</span> <span class='kw'>=</span> <span class='no'>header_color</span>, | |||||
| <span class='kw'>header_background_text_color</span> <span class='kw'>=</span> <span class='no'>background_color</span>, | |||||
| <span class='kw'>header_background_padding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_background_content_padding_top</span> <span class='kw'>=</span> <span class='st'>"7rem"</span>, | |||||
| <span class='kw'>header_background_ignore_classes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| base_color = <span class='st'>"#3C989E"</span>, | |||||
| white_color = <span class='st'>"#FFFFFF"</span>, | |||||
| black_color = <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.9</span>), | |||||
| text_color = <span class='kw'>white_color</span>, | |||||
| header_color = <span class='kw'>base_color</span>, | |||||
| background_color = <span class='kw'>black_color</span>, | |||||
| link_color = <span class='kw'>base_color</span>, | |||||
| text_bold_color = <span class='kw'>base_color</span>, | |||||
| text_slide_number_color = <span class='kw'>base_color</span>, | |||||
| padding = <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| background_image = <span class='kw'>NULL</span>, | |||||
| background_size = <span class='kw'>NULL</span>, | |||||
| background_position = <span class='kw'>NULL</span>, | |||||
| code_highlight_color = <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| code_inline_color = <span class='kw'>base_color</span>, | |||||
| code_inline_background_color = <span class='kw'>NULL</span>, | |||||
| code_inline_font_size = <span class='st'>"1em"</span>, | |||||
| inverse_background_color = <span class='kw'>base_color</span>, | |||||
| inverse_text_color = <span class='kw'>black_color</span>, | |||||
| inverse_text_shadow = <span class='fl'>FALSE</span>, | |||||
| inverse_header_color = <span class='kw'>black_color</span>, | |||||
| title_slide_text_color = <span class='kw'>inverse_text_color</span>, | |||||
| title_slide_background_color = <span class='kw'>inverse_background_color</span>, | |||||
| title_slide_background_image = <span class='kw'>NULL</span>, | |||||
| title_slide_background_size = <span class='kw'>NULL</span>, | |||||
| title_slide_background_position = <span class='kw'>NULL</span>, | |||||
| footnote_color = <span class='kw'>NULL</span>, | |||||
| footnote_font_size = <span class='st'>"0.9em"</span>, | |||||
| footnote_position_bottom = <span class='st'>"60px"</span>, | |||||
| left_column_subtle_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.6</span>), | |||||
| left_column_selected_color = <span class='kw'>base_color</span>, | |||||
| blockquote_left_border_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.5</span>), | |||||
| table_border_color = <span class='st'>"#666"</span>, | |||||
| table_row_border_color = <span class='st'>"#ddd"</span>, | |||||
| table_row_even_background_color = <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.8</span>), | |||||
| base_font_size = <span class='st'>"20px"</span>, | |||||
| text_font_size = <span class='st'>"1rem"</span>, | |||||
| header_h1_font_size = <span class='st'>"2.75rem"</span>, | |||||
| header_h2_font_size = <span class='st'>"2.25rem"</span>, | |||||
| header_h3_font_size = <span class='st'>"1.75rem"</span>, | |||||
| header_background_auto = <span class='fl'>FALSE</span>, | |||||
| header_background_color = <span class='kw'>header_color</span>, | |||||
| header_background_text_color = <span class='kw'>background_color</span>, | |||||
| header_background_padding = <span class='kw'>NULL</span>, | |||||
| header_background_content_padding_top = <span class='st'>"7rem"</span>, | |||||
| header_background_ignore_classes = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| <span class='st'>"bottom"</span>), | <span class='st'>"bottom"</span>), | ||||
| <span class='kw'>text_slide_number_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>text_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| <span class='kw'>text_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| <span class='kw'>text_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| <span class='kw'>text_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| <span class='kw'>text_font_base</span> <span class='kw'>=</span> <span class='st'>"sans-serif"</span>, | |||||
| <span class='kw'>header_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| <span class='kw'>header_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| <span class='kw'>header_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| <span class='kw'>code_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| <span class='kw'>code_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9rem"</span>, | |||||
| <span class='kw'>code_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| <span class='kw'>code_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| <span class='kw'>colors</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_css</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_fonts</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='st'>"xaringan-themer.css"</span> | |||||
| text_slide_number_font_size = <span class='st'>"0.9em"</span>, | |||||
| text_font_google = <span class='kw'>NULL</span>, | |||||
| text_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| text_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| text_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| text_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| text_font_base = <span class='st'>"sans-serif"</span>, | |||||
| header_font_google = <span class='kw'>NULL</span>, | |||||
| header_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| header_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| header_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| code_font_google = <span class='kw'>NULL</span>, | |||||
| code_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| code_font_size = <span class='st'>"0.9rem"</span>, | |||||
| code_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| code_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| colors = <span class='kw'>NULL</span>, | |||||
| extra_css = <span class='kw'>NULL</span>, | |||||
| extra_fonts = <span class='kw'>NULL</span>, | |||||
| outfile = <span class='st'>"xaringan-themer.css"</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <th>text_font_family</th> | <th>text_font_family</th> | ||||
| <td><p>Body Text Font Family (xaringan default is | <td><p>Body Text Font Family (xaringan default is | ||||
| <code>'Droid Serif'</code>). Defaults to | <code>'Droid Serif'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| element. The value of this variable is also stored as a CSS variable that | element. The value of this variable is also stored as a CSS variable that | ||||
| can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | ||||
| style function or in custom CSS.</p></td> | style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_weight</th> | <th>text_font_weight</th> | ||||
| <td><p>Body Text Font Weight. Defaults to | <td><p>Body Text Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| element. Accepts CSS | element. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_url</th> | <th>text_font_url</th> | ||||
| <td><p>Body Text Font URL(s). Defaults to | <td><p>Body Text Font URL(s). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code>@import url()</code> elements.</p></td> | <code>@import url()</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>text_font_family_fallback</th> | <th>text_font_family_fallback</th> | ||||
| <td><p>Body Text Font Fallbacks. Defaults to | <td><p>Body Text Font Fallbacks. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code>body</code> element. The value of this variable is also stored as a CSS | <code>body</code> element. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | ||||
| any argument of a style function or in custom CSS.</p></td> | any argument of a style function or in custom CSS.</p></td> | ||||
| <th>header_font_family</th> | <th>header_font_family</th> | ||||
| <td><p>Header Font Family (xaringan default is | <td><p>Header Font Family (xaringan default is | ||||
| <code>'Yanone Kaffeesatz'</code>). Defaults to | <code>'Yanone Kaffeesatz'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | ||||
| argument of a style function or in custom CSS.</p></td> | argument of a style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_weight</th> | <th>header_font_weight</th> | ||||
| <td><p>Header Font Weight. Defaults to | <td><p>Header Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. Accepts CSS | <code>h1, h2, h3</code> elements. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_url</th> | <th>header_font_url</th> | ||||
| <td><p>Header Font URL. Defaults to | <td><p>Header Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code>@import url</code> elements.</p></td> | <code>@import url</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family</th> | <th>code_font_family</th> | ||||
| <td><p>Code Font Family. Defaults to | <td><p>Code Font Family. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | ||||
| also stored as a CSS variable that can be referenced with | also stored as a CSS variable that can be referenced with | ||||
| <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | ||||
| <tr> | <tr> | ||||
| <th>code_font_url</th> | <th>code_font_url</th> | ||||
| <td><p>Code Font URL. Defaults to | <td><p>Code Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| elements.</p></td> | elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family_fallback</th> | <th>code_font_family_fallback</th> | ||||
| <td><p>Code Font Fallback. Defaults to | <td><p>Code Font Fallback. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes.</p></td> | <code>.remark-code, .remark-inline-code</code> classes.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <p>To use the styles created by this theme function, make sure | <p>To use the styles created by this theme function, make sure | ||||
| that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the <code>outfile</code> | header. If you change the name of the output file using the <code>outfile</code> | ||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='no'>output</span>: | |||||
| <span class='kw pkg'>xaringan</span><span class='kw ns'>::</span><span class='no'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span>: | |||||
| <span class='no'>css</span>: <span class='no'>xaringan</span>-<span class='no'>themer.css</span></pre><p></div></p> | |||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='kw'>output</span><span class='op'>:</span> | |||||
| <span class='kw'>xaringan</span>::<span class='kw'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span><span class='op'>:</span> | |||||
| <span class='kw'>css</span><span class='op'>:</span> <span class='kw'>xaringan</span><span class='op'>-</span><span class='kw'>themer.css</span> | |||||
| </pre><p></div></p> | |||||
| <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | ||||
| <div class='dont-index'><p>Other themes: | <div class='dont-index'><p>Other themes: | ||||
| <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | ||||
| <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | ||||
| <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <p>Other Monotone themes: | <p>Other Monotone themes: | ||||
| <code><a href='style_mono_accent.html'>style_mono_accent</a>()</code>, | <code><a href='style_mono_accent.html'>style_mono_accent</a>()</code>, | ||||
| <code><a href='style_mono_dark.html'>style_mono_dark</a>()</code>, | <code><a href='style_mono_dark.html'>style_mono_dark</a>()</code>, | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | ||||
| <span class='no'>xaringan_themer_css</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, <span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>xaringan_themer_css</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, fileext = <span class='st'>".css"</span>) | |||||
| <span class='fu'>style_mono_accent_inverse</span>( | <span class='fu'>style_mono_accent_inverse</span>( | ||||
| <span class='kw'>base_color</span> <span class='kw'>=</span> <span class='st'>"#3c989e"</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| base_color = <span class='st'>"#3c989e"</span>, | |||||
| outfile = <span class='kw'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| <span class='co'># styles to xaringan-themer.css</span> | <span class='co'># styles to xaringan-themer.css</span> | ||||
| ) | ) | ||||
| <span class='co'># View the CSS:</span> | <span class='co'># View the CSS:</span> | ||||
| <span class='co'># file.edit(xaringan_themer_css)</span></div></pre> | |||||
| <span class='co'># file.edit(xaringan_themer_css)</span> | |||||
| </div></pre> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| <nav id="toc" data-toggle="toc" class="sticky-top"> | <nav id="toc" data-toggle="toc" class="sticky-top"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>style_mono_dark</span>( | <pre class="usage"><span class='fu'>style_mono_dark</span>( | ||||
| <span class='kw'>base_color</span> <span class='kw'>=</span> <span class='st'>"#cbf7ed"</span>, | |||||
| <span class='kw'>white_color</span> <span class='kw'>=</span> <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.8</span>), | |||||
| <span class='kw'>black_color</span> <span class='kw'>=</span> <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.85</span>), | |||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='no'>white_color</span>, | |||||
| <span class='kw'>header_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='no'>black_color</span>, | |||||
| <span class='kw'>link_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>text_bold_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>text_slide_number_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>padding</span> <span class='kw'>=</span> <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| <span class='kw'>background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_highlight_color</span> <span class='kw'>=</span> <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| <span class='kw'>code_inline_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>code_inline_background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_inline_font_size</span> <span class='kw'>=</span> <span class='st'>"1em"</span>, | |||||
| <span class='kw'>inverse_background_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='no'>black_color</span>, | |||||
| <span class='kw'>inverse_text_shadow</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>inverse_header_color</span> <span class='kw'>=</span> <span class='no'>black_color</span>, | |||||
| <span class='kw'>title_slide_text_color</span> <span class='kw'>=</span> <span class='no'>inverse_text_color</span>, | |||||
| <span class='kw'>title_slide_background_color</span> <span class='kw'>=</span> <span class='no'>inverse_background_color</span>, | |||||
| <span class='kw'>title_slide_background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>footnote_position_bottom</span> <span class='kw'>=</span> <span class='st'>"60px"</span>, | |||||
| <span class='kw'>left_column_subtle_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.6</span>), | |||||
| <span class='kw'>left_column_selected_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>blockquote_left_border_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.5</span>), | |||||
| <span class='kw'>table_border_color</span> <span class='kw'>=</span> <span class='st'>"#666"</span>, | |||||
| <span class='kw'>table_row_border_color</span> <span class='kw'>=</span> <span class='st'>"#ddd"</span>, | |||||
| <span class='kw'>table_row_even_background_color</span> <span class='kw'>=</span> <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.7</span>), | |||||
| <span class='kw'>base_font_size</span> <span class='kw'>=</span> <span class='st'>"20px"</span>, | |||||
| <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='st'>"1rem"</span>, | |||||
| <span class='kw'>header_h1_font_size</span> <span class='kw'>=</span> <span class='st'>"2.75rem"</span>, | |||||
| <span class='kw'>header_h2_font_size</span> <span class='kw'>=</span> <span class='st'>"2.25rem"</span>, | |||||
| <span class='kw'>header_h3_font_size</span> <span class='kw'>=</span> <span class='st'>"1.75rem"</span>, | |||||
| <span class='kw'>header_background_auto</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>header_background_color</span> <span class='kw'>=</span> <span class='no'>header_color</span>, | |||||
| <span class='kw'>header_background_text_color</span> <span class='kw'>=</span> <span class='no'>background_color</span>, | |||||
| <span class='kw'>header_background_padding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_background_content_padding_top</span> <span class='kw'>=</span> <span class='st'>"7rem"</span>, | |||||
| <span class='kw'>header_background_ignore_classes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| base_color = <span class='st'>"#cbf7ed"</span>, | |||||
| white_color = <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.8</span>), | |||||
| black_color = <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.85</span>), | |||||
| text_color = <span class='kw'>white_color</span>, | |||||
| header_color = <span class='kw'>base_color</span>, | |||||
| background_color = <span class='kw'>black_color</span>, | |||||
| link_color = <span class='kw'>base_color</span>, | |||||
| text_bold_color = <span class='kw'>base_color</span>, | |||||
| text_slide_number_color = <span class='kw'>base_color</span>, | |||||
| padding = <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| background_image = <span class='kw'>NULL</span>, | |||||
| background_size = <span class='kw'>NULL</span>, | |||||
| background_position = <span class='kw'>NULL</span>, | |||||
| code_highlight_color = <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| code_inline_color = <span class='kw'>base_color</span>, | |||||
| code_inline_background_color = <span class='kw'>NULL</span>, | |||||
| code_inline_font_size = <span class='st'>"1em"</span>, | |||||
| inverse_background_color = <span class='kw'>base_color</span>, | |||||
| inverse_text_color = <span class='kw'>black_color</span>, | |||||
| inverse_text_shadow = <span class='fl'>FALSE</span>, | |||||
| inverse_header_color = <span class='kw'>black_color</span>, | |||||
| title_slide_text_color = <span class='kw'>inverse_text_color</span>, | |||||
| title_slide_background_color = <span class='kw'>inverse_background_color</span>, | |||||
| title_slide_background_image = <span class='kw'>NULL</span>, | |||||
| title_slide_background_size = <span class='kw'>NULL</span>, | |||||
| title_slide_background_position = <span class='kw'>NULL</span>, | |||||
| footnote_color = <span class='kw'>NULL</span>, | |||||
| footnote_font_size = <span class='st'>"0.9em"</span>, | |||||
| footnote_position_bottom = <span class='st'>"60px"</span>, | |||||
| left_column_subtle_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.6</span>), | |||||
| left_column_selected_color = <span class='kw'>base_color</span>, | |||||
| blockquote_left_border_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.5</span>), | |||||
| table_border_color = <span class='st'>"#666"</span>, | |||||
| table_row_border_color = <span class='st'>"#ddd"</span>, | |||||
| table_row_even_background_color = <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.7</span>), | |||||
| base_font_size = <span class='st'>"20px"</span>, | |||||
| text_font_size = <span class='st'>"1rem"</span>, | |||||
| header_h1_font_size = <span class='st'>"2.75rem"</span>, | |||||
| header_h2_font_size = <span class='st'>"2.25rem"</span>, | |||||
| header_h3_font_size = <span class='st'>"1.75rem"</span>, | |||||
| header_background_auto = <span class='fl'>FALSE</span>, | |||||
| header_background_color = <span class='kw'>header_color</span>, | |||||
| header_background_text_color = <span class='kw'>background_color</span>, | |||||
| header_background_padding = <span class='kw'>NULL</span>, | |||||
| header_background_content_padding_top = <span class='st'>"7rem"</span>, | |||||
| header_background_ignore_classes = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| <span class='st'>"bottom"</span>), | <span class='st'>"bottom"</span>), | ||||
| <span class='kw'>text_slide_number_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>text_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| <span class='kw'>text_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| <span class='kw'>text_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| <span class='kw'>text_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| <span class='kw'>text_font_base</span> <span class='kw'>=</span> <span class='st'>"sans-serif"</span>, | |||||
| <span class='kw'>header_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| <span class='kw'>header_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| <span class='kw'>header_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| <span class='kw'>code_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| <span class='kw'>code_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9rem"</span>, | |||||
| <span class='kw'>code_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| <span class='kw'>code_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| <span class='kw'>colors</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_css</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_fonts</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='st'>"xaringan-themer.css"</span> | |||||
| text_slide_number_font_size = <span class='st'>"0.9em"</span>, | |||||
| text_font_google = <span class='kw'>NULL</span>, | |||||
| text_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| text_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| text_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| text_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| text_font_base = <span class='st'>"sans-serif"</span>, | |||||
| header_font_google = <span class='kw'>NULL</span>, | |||||
| header_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| header_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| header_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| code_font_google = <span class='kw'>NULL</span>, | |||||
| code_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| code_font_size = <span class='st'>"0.9rem"</span>, | |||||
| code_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| code_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| colors = <span class='kw'>NULL</span>, | |||||
| extra_css = <span class='kw'>NULL</span>, | |||||
| extra_fonts = <span class='kw'>NULL</span>, | |||||
| outfile = <span class='st'>"xaringan-themer.css"</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <th>text_font_family</th> | <th>text_font_family</th> | ||||
| <td><p>Body Text Font Family (xaringan default is | <td><p>Body Text Font Family (xaringan default is | ||||
| <code>'Droid Serif'</code>). Defaults to | <code>'Droid Serif'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| element. The value of this variable is also stored as a CSS variable that | element. The value of this variable is also stored as a CSS variable that | ||||
| can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | ||||
| style function or in custom CSS.</p></td> | style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_weight</th> | <th>text_font_weight</th> | ||||
| <td><p>Body Text Font Weight. Defaults to | <td><p>Body Text Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| element. Accepts CSS | element. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_url</th> | <th>text_font_url</th> | ||||
| <td><p>Body Text Font URL(s). Defaults to | <td><p>Body Text Font URL(s). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code>@import url()</code> elements.</p></td> | <code>@import url()</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>text_font_family_fallback</th> | <th>text_font_family_fallback</th> | ||||
| <td><p>Body Text Font Fallbacks. Defaults to | <td><p>Body Text Font Fallbacks. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code>body</code> element. The value of this variable is also stored as a CSS | <code>body</code> element. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | ||||
| any argument of a style function or in custom CSS.</p></td> | any argument of a style function or in custom CSS.</p></td> | ||||
| <th>header_font_family</th> | <th>header_font_family</th> | ||||
| <td><p>Header Font Family (xaringan default is | <td><p>Header Font Family (xaringan default is | ||||
| <code>'Yanone Kaffeesatz'</code>). Defaults to | <code>'Yanone Kaffeesatz'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | ||||
| argument of a style function or in custom CSS.</p></td> | argument of a style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_weight</th> | <th>header_font_weight</th> | ||||
| <td><p>Header Font Weight. Defaults to | <td><p>Header Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. Accepts CSS | <code>h1, h2, h3</code> elements. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_url</th> | <th>header_font_url</th> | ||||
| <td><p>Header Font URL. Defaults to | <td><p>Header Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code>@import url</code> elements.</p></td> | <code>@import url</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family</th> | <th>code_font_family</th> | ||||
| <td><p>Code Font Family. Defaults to | <td><p>Code Font Family. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | ||||
| also stored as a CSS variable that can be referenced with | also stored as a CSS variable that can be referenced with | ||||
| <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | ||||
| <tr> | <tr> | ||||
| <th>code_font_url</th> | <th>code_font_url</th> | ||||
| <td><p>Code Font URL. Defaults to | <td><p>Code Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| elements.</p></td> | elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family_fallback</th> | <th>code_font_family_fallback</th> | ||||
| <td><p>Code Font Fallback. Defaults to | <td><p>Code Font Fallback. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes.</p></td> | <code>.remark-code, .remark-inline-code</code> classes.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <p>To use the styles created by this theme function, make sure | <p>To use the styles created by this theme function, make sure | ||||
| that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the <code>outfile</code> | header. If you change the name of the output file using the <code>outfile</code> | ||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='no'>output</span>: | |||||
| <span class='kw pkg'>xaringan</span><span class='kw ns'>::</span><span class='no'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span>: | |||||
| <span class='no'>css</span>: <span class='no'>xaringan</span>-<span class='no'>themer.css</span></pre><p></div></p> | |||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='kw'>output</span><span class='op'>:</span> | |||||
| <span class='kw'>xaringan</span>::<span class='kw'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span><span class='op'>:</span> | |||||
| <span class='kw'>css</span><span class='op'>:</span> <span class='kw'>xaringan</span><span class='op'>-</span><span class='kw'>themer.css</span> | |||||
| </pre><p></div></p> | |||||
| <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | ||||
| <div class='dont-index'><p>Other themes: | <div class='dont-index'><p>Other themes: | ||||
| <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | ||||
| <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | ||||
| <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <p>Other Monotone themes: | <p>Other Monotone themes: | ||||
| <code><a href='style_mono_accent_inverse.html'>style_mono_accent_inverse</a>()</code>, | <code><a href='style_mono_accent_inverse.html'>style_mono_accent_inverse</a>()</code>, | ||||
| <code><a href='style_mono_accent.html'>style_mono_accent</a>()</code>, | <code><a href='style_mono_accent.html'>style_mono_accent</a>()</code>, | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | ||||
| <span class='no'>xaringan_themer_css</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, <span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>xaringan_themer_css</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, fileext = <span class='st'>".css"</span>) | |||||
| <span class='fu'>style_mono_dark</span>( | <span class='fu'>style_mono_dark</span>( | ||||
| <span class='kw'>base_color</span> <span class='kw'>=</span> <span class='st'>"#cbf7ed"</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| base_color = <span class='st'>"#cbf7ed"</span>, | |||||
| outfile = <span class='kw'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| <span class='co'># styles to xaringan-themer.css</span> | <span class='co'># styles to xaringan-themer.css</span> | ||||
| ) | ) | ||||
| <span class='co'># View the CSS:</span> | <span class='co'># View the CSS:</span> | ||||
| <span class='co'># file.edit(xaringan_themer_css)</span></div></pre> | |||||
| <span class='co'># file.edit(xaringan_themer_css)</span> | |||||
| </div></pre> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| <nav id="toc" data-toggle="toc" class="sticky-top"> | <nav id="toc" data-toggle="toc" class="sticky-top"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>style_mono_light</span>( | <pre class="usage"><span class='fu'>style_mono_light</span>( | ||||
| <span class='kw'>base_color</span> <span class='kw'>=</span> <span class='st'>"#23395b"</span>, | |||||
| <span class='kw'>white_color</span> <span class='kw'>=</span> <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.9</span>), | |||||
| <span class='kw'>black_color</span> <span class='kw'>=</span> <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.3</span>), | |||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='no'>black_color</span>, | |||||
| <span class='kw'>header_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='no'>white_color</span>, | |||||
| <span class='kw'>link_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>text_bold_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>text_slide_number_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>padding</span> <span class='kw'>=</span> <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| <span class='kw'>background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_highlight_color</span> <span class='kw'>=</span> <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| <span class='kw'>code_inline_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>code_inline_background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_inline_font_size</span> <span class='kw'>=</span> <span class='st'>"1em"</span>, | |||||
| <span class='kw'>inverse_background_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='no'>white_color</span>, | |||||
| <span class='kw'>inverse_text_shadow</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>inverse_header_color</span> <span class='kw'>=</span> <span class='no'>white_color</span>, | |||||
| <span class='kw'>title_slide_text_color</span> <span class='kw'>=</span> <span class='no'>inverse_text_color</span>, | |||||
| <span class='kw'>title_slide_background_color</span> <span class='kw'>=</span> <span class='no'>inverse_background_color</span>, | |||||
| <span class='kw'>title_slide_background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>footnote_position_bottom</span> <span class='kw'>=</span> <span class='st'>"60px"</span>, | |||||
| <span class='kw'>left_column_subtle_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.6</span>), | |||||
| <span class='kw'>left_column_selected_color</span> <span class='kw'>=</span> <span class='no'>base_color</span>, | |||||
| <span class='kw'>blockquote_left_border_color</span> <span class='kw'>=</span> <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.5</span>), | |||||
| <span class='kw'>table_border_color</span> <span class='kw'>=</span> <span class='st'>"#666"</span>, | |||||
| <span class='kw'>table_row_border_color</span> <span class='kw'>=</span> <span class='st'>"#ddd"</span>, | |||||
| <span class='kw'>table_row_even_background_color</span> <span class='kw'>=</span> <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='no'>base_color</span>, <span class='fl'>0.8</span>), | |||||
| <span class='kw'>base_font_size</span> <span class='kw'>=</span> <span class='st'>"20px"</span>, | |||||
| <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='st'>"1rem"</span>, | |||||
| <span class='kw'>header_h1_font_size</span> <span class='kw'>=</span> <span class='st'>"2.75rem"</span>, | |||||
| <span class='kw'>header_h2_font_size</span> <span class='kw'>=</span> <span class='st'>"2.25rem"</span>, | |||||
| <span class='kw'>header_h3_font_size</span> <span class='kw'>=</span> <span class='st'>"1.75rem"</span>, | |||||
| <span class='kw'>header_background_auto</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>header_background_color</span> <span class='kw'>=</span> <span class='no'>header_color</span>, | |||||
| <span class='kw'>header_background_text_color</span> <span class='kw'>=</span> <span class='no'>background_color</span>, | |||||
| <span class='kw'>header_background_padding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_background_content_padding_top</span> <span class='kw'>=</span> <span class='st'>"7rem"</span>, | |||||
| <span class='kw'>header_background_ignore_classes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| base_color = <span class='st'>"#23395b"</span>, | |||||
| white_color = <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.9</span>), | |||||
| black_color = <span class='fu'><a href='lighten_darken_color.html'>darken_color</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.3</span>), | |||||
| text_color = <span class='kw'>black_color</span>, | |||||
| header_color = <span class='kw'>base_color</span>, | |||||
| background_color = <span class='kw'>white_color</span>, | |||||
| link_color = <span class='kw'>base_color</span>, | |||||
| text_bold_color = <span class='kw'>base_color</span>, | |||||
| text_slide_number_color = <span class='kw'>base_color</span>, | |||||
| padding = <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| background_image = <span class='kw'>NULL</span>, | |||||
| background_size = <span class='kw'>NULL</span>, | |||||
| background_position = <span class='kw'>NULL</span>, | |||||
| code_highlight_color = <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| code_inline_color = <span class='kw'>base_color</span>, | |||||
| code_inline_background_color = <span class='kw'>NULL</span>, | |||||
| code_inline_font_size = <span class='st'>"1em"</span>, | |||||
| inverse_background_color = <span class='kw'>base_color</span>, | |||||
| inverse_text_color = <span class='kw'>white_color</span>, | |||||
| inverse_text_shadow = <span class='fl'>FALSE</span>, | |||||
| inverse_header_color = <span class='kw'>white_color</span>, | |||||
| title_slide_text_color = <span class='kw'>inverse_text_color</span>, | |||||
| title_slide_background_color = <span class='kw'>inverse_background_color</span>, | |||||
| title_slide_background_image = <span class='kw'>NULL</span>, | |||||
| title_slide_background_size = <span class='kw'>NULL</span>, | |||||
| title_slide_background_position = <span class='kw'>NULL</span>, | |||||
| footnote_color = <span class='kw'>NULL</span>, | |||||
| footnote_font_size = <span class='st'>"0.9em"</span>, | |||||
| footnote_position_bottom = <span class='st'>"60px"</span>, | |||||
| left_column_subtle_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.6</span>), | |||||
| left_column_selected_color = <span class='kw'>base_color</span>, | |||||
| blockquote_left_border_color = <span class='fu'><a href='apply_alpha.html'>apply_alpha</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.5</span>), | |||||
| table_border_color = <span class='st'>"#666"</span>, | |||||
| table_row_border_color = <span class='st'>"#ddd"</span>, | |||||
| table_row_even_background_color = <span class='fu'><a href='lighten_darken_color.html'>lighten_color</a></span>(<span class='kw'>base_color</span>, <span class='fl'>0.8</span>), | |||||
| base_font_size = <span class='st'>"20px"</span>, | |||||
| text_font_size = <span class='st'>"1rem"</span>, | |||||
| header_h1_font_size = <span class='st'>"2.75rem"</span>, | |||||
| header_h2_font_size = <span class='st'>"2.25rem"</span>, | |||||
| header_h3_font_size = <span class='st'>"1.75rem"</span>, | |||||
| header_background_auto = <span class='fl'>FALSE</span>, | |||||
| header_background_color = <span class='kw'>header_color</span>, | |||||
| header_background_text_color = <span class='kw'>background_color</span>, | |||||
| header_background_padding = <span class='kw'>NULL</span>, | |||||
| header_background_content_padding_top = <span class='st'>"7rem"</span>, | |||||
| header_background_ignore_classes = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| <span class='st'>"bottom"</span>), | <span class='st'>"bottom"</span>), | ||||
| <span class='kw'>text_slide_number_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>text_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| <span class='kw'>text_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| <span class='kw'>text_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| <span class='kw'>text_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| <span class='kw'>text_font_base</span> <span class='kw'>=</span> <span class='st'>"sans-serif"</span>, | |||||
| <span class='kw'>header_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| <span class='kw'>header_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| <span class='kw'>header_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| <span class='kw'>code_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| <span class='kw'>code_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9rem"</span>, | |||||
| <span class='kw'>code_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| <span class='kw'>code_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| <span class='kw'>colors</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_css</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_fonts</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='st'>"xaringan-themer.css"</span> | |||||
| text_slide_number_font_size = <span class='st'>"0.9em"</span>, | |||||
| text_font_google = <span class='kw'>NULL</span>, | |||||
| text_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| text_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| text_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| text_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| text_font_base = <span class='st'>"sans-serif"</span>, | |||||
| header_font_google = <span class='kw'>NULL</span>, | |||||
| header_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| header_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| header_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| code_font_google = <span class='kw'>NULL</span>, | |||||
| code_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| code_font_size = <span class='st'>"0.9rem"</span>, | |||||
| code_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| code_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| colors = <span class='kw'>NULL</span>, | |||||
| extra_css = <span class='kw'>NULL</span>, | |||||
| extra_fonts = <span class='kw'>NULL</span>, | |||||
| outfile = <span class='st'>"xaringan-themer.css"</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <th>text_font_family</th> | <th>text_font_family</th> | ||||
| <td><p>Body Text Font Family (xaringan default is | <td><p>Body Text Font Family (xaringan default is | ||||
| <code>'Droid Serif'</code>). Defaults to | <code>'Droid Serif'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| element. The value of this variable is also stored as a CSS variable that | element. The value of this variable is also stored as a CSS variable that | ||||
| can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | ||||
| style function or in custom CSS.</p></td> | style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_weight</th> | <th>text_font_weight</th> | ||||
| <td><p>Body Text Font Weight. Defaults to | <td><p>Body Text Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| element. Accepts CSS | element. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_url</th> | <th>text_font_url</th> | ||||
| <td><p>Body Text Font URL(s). Defaults to | <td><p>Body Text Font URL(s). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code>@import url()</code> elements.</p></td> | <code>@import url()</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>text_font_family_fallback</th> | <th>text_font_family_fallback</th> | ||||
| <td><p>Body Text Font Fallbacks. Defaults to | <td><p>Body Text Font Fallbacks. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code>body</code> element. The value of this variable is also stored as a CSS | <code>body</code> element. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | ||||
| any argument of a style function or in custom CSS.</p></td> | any argument of a style function or in custom CSS.</p></td> | ||||
| <th>header_font_family</th> | <th>header_font_family</th> | ||||
| <td><p>Header Font Family (xaringan default is | <td><p>Header Font Family (xaringan default is | ||||
| <code>'Yanone Kaffeesatz'</code>). Defaults to | <code>'Yanone Kaffeesatz'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | ||||
| argument of a style function or in custom CSS.</p></td> | argument of a style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_weight</th> | <th>header_font_weight</th> | ||||
| <td><p>Header Font Weight. Defaults to | <td><p>Header Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. Accepts CSS | <code>h1, h2, h3</code> elements. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_url</th> | <th>header_font_url</th> | ||||
| <td><p>Header Font URL. Defaults to | <td><p>Header Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code>@import url</code> elements.</p></td> | <code>@import url</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family</th> | <th>code_font_family</th> | ||||
| <td><p>Code Font Family. Defaults to | <td><p>Code Font Family. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | ||||
| also stored as a CSS variable that can be referenced with | also stored as a CSS variable that can be referenced with | ||||
| <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | ||||
| <tr> | <tr> | ||||
| <th>code_font_url</th> | <th>code_font_url</th> | ||||
| <td><p>Code Font URL. Defaults to | <td><p>Code Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| elements.</p></td> | elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family_fallback</th> | <th>code_font_family_fallback</th> | ||||
| <td><p>Code Font Fallback. Defaults to | <td><p>Code Font Fallback. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes.</p></td> | <code>.remark-code, .remark-inline-code</code> classes.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <p>To use the styles created by this theme function, make sure | <p>To use the styles created by this theme function, make sure | ||||
| that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the <code>outfile</code> | header. If you change the name of the output file using the <code>outfile</code> | ||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='no'>output</span>: | |||||
| <span class='kw pkg'>xaringan</span><span class='kw ns'>::</span><span class='no'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span>: | |||||
| <span class='no'>css</span>: <span class='no'>xaringan</span>-<span class='no'>themer.css</span></pre><p></div></p> | |||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='kw'>output</span><span class='op'>:</span> | |||||
| <span class='kw'>xaringan</span>::<span class='kw'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span><span class='op'>:</span> | |||||
| <span class='kw'>css</span><span class='op'>:</span> <span class='kw'>xaringan</span><span class='op'>-</span><span class='kw'>themer.css</span> | |||||
| </pre><p></div></p> | |||||
| <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | ||||
| <div class='dont-index'><p>Other themes: | <div class='dont-index'><p>Other themes: | ||||
| <code><a href='style_mono_dark.html'>style_mono_dark</a>()</code>, | <code><a href='style_mono_dark.html'>style_mono_dark</a>()</code>, | ||||
| <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | ||||
| <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <p>Other Monotone themes: | <p>Other Monotone themes: | ||||
| <code><a href='style_mono_accent_inverse.html'>style_mono_accent_inverse</a>()</code>, | <code><a href='style_mono_accent_inverse.html'>style_mono_accent_inverse</a>()</code>, | ||||
| <code><a href='style_mono_accent.html'>style_mono_accent</a>()</code>, | <code><a href='style_mono_accent.html'>style_mono_accent</a>()</code>, | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | ||||
| <span class='no'>xaringan_themer_css</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, <span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>xaringan_themer_css</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, fileext = <span class='st'>".css"</span>) | |||||
| <span class='fu'>style_mono_light</span>( | <span class='fu'>style_mono_light</span>( | ||||
| <span class='kw'>base_color</span> <span class='kw'>=</span> <span class='st'>"#23395b"</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| base_color = <span class='st'>"#23395b"</span>, | |||||
| outfile = <span class='kw'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| <span class='co'># styles to xaringan-themer.css</span> | <span class='co'># styles to xaringan-themer.css</span> | ||||
| ) | ) | ||||
| <span class='co'># View the CSS:</span> | <span class='co'># View the CSS:</span> | ||||
| <span class='co'># file.edit(xaringan_themer_css)</span></div></pre> | |||||
| <span class='co'># file.edit(xaringan_themer_css)</span> | |||||
| </div></pre> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| <nav id="toc" data-toggle="toc" class="sticky-top"> | <nav id="toc" data-toggle="toc" class="sticky-top"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>style_solarized_dark</span>( | <pre class="usage"><span class='fu'>style_solarized_dark</span>( | ||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='st'>"#839496"</span>, | |||||
| <span class='kw'>header_color</span> <span class='kw'>=</span> <span class='st'>"#dc322f"</span>, | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='st'>"#002b36"</span>, | |||||
| <span class='kw'>link_color</span> <span class='kw'>=</span> <span class='st'>"#b58900"</span>, | |||||
| <span class='kw'>text_bold_color</span> <span class='kw'>=</span> <span class='st'>"#d33682"</span>, | |||||
| <span class='kw'>text_slide_number_color</span> <span class='kw'>=</span> <span class='st'>"#586e75"</span>, | |||||
| <span class='kw'>padding</span> <span class='kw'>=</span> <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| <span class='kw'>background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_highlight_color</span> <span class='kw'>=</span> <span class='st'>"#268bd240"</span>, | |||||
| <span class='kw'>code_inline_color</span> <span class='kw'>=</span> <span class='st'>"#6c71c4"</span>, | |||||
| <span class='kw'>code_inline_background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_inline_font_size</span> <span class='kw'>=</span> <span class='st'>"1em"</span>, | |||||
| <span class='kw'>inverse_background_color</span> <span class='kw'>=</span> <span class='st'>"#fdf6e3"</span>, | |||||
| <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='st'>"#002b36"</span>, | |||||
| <span class='kw'>inverse_text_shadow</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>inverse_header_color</span> <span class='kw'>=</span> <span class='no'>inverse_text_color</span>, | |||||
| <span class='kw'>title_slide_text_color</span> <span class='kw'>=</span> <span class='no'>inverse_text_color</span>, | |||||
| <span class='kw'>title_slide_background_color</span> <span class='kw'>=</span> <span class='no'>inverse_background_color</span>, | |||||
| <span class='kw'>title_slide_background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>footnote_position_bottom</span> <span class='kw'>=</span> <span class='st'>"60px"</span>, | |||||
| <span class='kw'>left_column_subtle_color</span> <span class='kw'>=</span> <span class='st'>"#586e75"</span>, | |||||
| <span class='kw'>left_column_selected_color</span> <span class='kw'>=</span> <span class='st'>"#93a1a1"</span>, | |||||
| <span class='kw'>blockquote_left_border_color</span> <span class='kw'>=</span> <span class='st'>"#cb4b16"</span>, | |||||
| <span class='kw'>table_border_color</span> <span class='kw'>=</span> <span class='st'>"#657b83"</span>, | |||||
| <span class='kw'>table_row_border_color</span> <span class='kw'>=</span> <span class='st'>"#657b83"</span>, | |||||
| <span class='kw'>table_row_even_background_color</span> <span class='kw'>=</span> <span class='st'>"#073642"</span>, | |||||
| <span class='kw'>base_font_size</span> <span class='kw'>=</span> <span class='st'>"20px"</span>, | |||||
| <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='st'>"1rem"</span>, | |||||
| <span class='kw'>header_h1_font_size</span> <span class='kw'>=</span> <span class='st'>"2.75rem"</span>, | |||||
| <span class='kw'>header_h2_font_size</span> <span class='kw'>=</span> <span class='st'>"2.25rem"</span>, | |||||
| <span class='kw'>header_h3_font_size</span> <span class='kw'>=</span> <span class='st'>"1.75rem"</span>, | |||||
| <span class='kw'>header_background_auto</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>header_background_color</span> <span class='kw'>=</span> <span class='no'>header_color</span>, | |||||
| <span class='kw'>header_background_text_color</span> <span class='kw'>=</span> <span class='no'>background_color</span>, | |||||
| <span class='kw'>header_background_padding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_background_content_padding_top</span> <span class='kw'>=</span> <span class='st'>"7rem"</span>, | |||||
| <span class='kw'>header_background_ignore_classes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| text_color = <span class='st'>"#839496"</span>, | |||||
| header_color = <span class='st'>"#dc322f"</span>, | |||||
| background_color = <span class='st'>"#002b36"</span>, | |||||
| link_color = <span class='st'>"#b58900"</span>, | |||||
| text_bold_color = <span class='st'>"#d33682"</span>, | |||||
| text_slide_number_color = <span class='st'>"#586e75"</span>, | |||||
| padding = <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| background_image = <span class='kw'>NULL</span>, | |||||
| background_size = <span class='kw'>NULL</span>, | |||||
| background_position = <span class='kw'>NULL</span>, | |||||
| code_highlight_color = <span class='st'>"#268bd240"</span>, | |||||
| code_inline_color = <span class='st'>"#6c71c4"</span>, | |||||
| code_inline_background_color = <span class='kw'>NULL</span>, | |||||
| code_inline_font_size = <span class='st'>"1em"</span>, | |||||
| inverse_background_color = <span class='st'>"#fdf6e3"</span>, | |||||
| inverse_text_color = <span class='st'>"#002b36"</span>, | |||||
| inverse_text_shadow = <span class='fl'>FALSE</span>, | |||||
| inverse_header_color = <span class='kw'>inverse_text_color</span>, | |||||
| title_slide_text_color = <span class='kw'>inverse_text_color</span>, | |||||
| title_slide_background_color = <span class='kw'>inverse_background_color</span>, | |||||
| title_slide_background_image = <span class='kw'>NULL</span>, | |||||
| title_slide_background_size = <span class='kw'>NULL</span>, | |||||
| title_slide_background_position = <span class='kw'>NULL</span>, | |||||
| footnote_color = <span class='kw'>NULL</span>, | |||||
| footnote_font_size = <span class='st'>"0.9em"</span>, | |||||
| footnote_position_bottom = <span class='st'>"60px"</span>, | |||||
| left_column_subtle_color = <span class='st'>"#586e75"</span>, | |||||
| left_column_selected_color = <span class='st'>"#93a1a1"</span>, | |||||
| blockquote_left_border_color = <span class='st'>"#cb4b16"</span>, | |||||
| table_border_color = <span class='st'>"#657b83"</span>, | |||||
| table_row_border_color = <span class='st'>"#657b83"</span>, | |||||
| table_row_even_background_color = <span class='st'>"#073642"</span>, | |||||
| base_font_size = <span class='st'>"20px"</span>, | |||||
| text_font_size = <span class='st'>"1rem"</span>, | |||||
| header_h1_font_size = <span class='st'>"2.75rem"</span>, | |||||
| header_h2_font_size = <span class='st'>"2.25rem"</span>, | |||||
| header_h3_font_size = <span class='st'>"1.75rem"</span>, | |||||
| header_background_auto = <span class='fl'>FALSE</span>, | |||||
| header_background_color = <span class='kw'>header_color</span>, | |||||
| header_background_text_color = <span class='kw'>background_color</span>, | |||||
| header_background_padding = <span class='kw'>NULL</span>, | |||||
| header_background_content_padding_top = <span class='st'>"7rem"</span>, | |||||
| header_background_ignore_classes = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| <span class='st'>"bottom"</span>), | <span class='st'>"bottom"</span>), | ||||
| <span class='kw'>text_slide_number_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>text_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| <span class='kw'>text_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| <span class='kw'>text_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| <span class='kw'>text_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| <span class='kw'>text_font_base</span> <span class='kw'>=</span> <span class='st'>"sans-serif"</span>, | |||||
| <span class='kw'>header_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| <span class='kw'>header_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| <span class='kw'>header_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| <span class='kw'>code_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| <span class='kw'>code_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9rem"</span>, | |||||
| <span class='kw'>code_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| <span class='kw'>code_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| <span class='kw'>colors</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_css</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_fonts</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='st'>"xaringan-themer.css"</span> | |||||
| text_slide_number_font_size = <span class='st'>"0.9em"</span>, | |||||
| text_font_google = <span class='kw'>NULL</span>, | |||||
| text_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| text_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| text_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| text_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| text_font_base = <span class='st'>"sans-serif"</span>, | |||||
| header_font_google = <span class='kw'>NULL</span>, | |||||
| header_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| header_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| header_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| code_font_google = <span class='kw'>NULL</span>, | |||||
| code_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| code_font_size = <span class='st'>"0.9rem"</span>, | |||||
| code_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| code_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| colors = <span class='kw'>NULL</span>, | |||||
| extra_css = <span class='kw'>NULL</span>, | |||||
| extra_fonts = <span class='kw'>NULL</span>, | |||||
| outfile = <span class='st'>"xaringan-themer.css"</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <th>text_font_family</th> | <th>text_font_family</th> | ||||
| <td><p>Body Text Font Family (xaringan default is | <td><p>Body Text Font Family (xaringan default is | ||||
| <code>'Droid Serif'</code>). Defaults to | <code>'Droid Serif'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| element. The value of this variable is also stored as a CSS variable that | element. The value of this variable is also stored as a CSS variable that | ||||
| can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | ||||
| style function or in custom CSS.</p></td> | style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_weight</th> | <th>text_font_weight</th> | ||||
| <td><p>Body Text Font Weight. Defaults to | <td><p>Body Text Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| element. Accepts CSS | element. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_url</th> | <th>text_font_url</th> | ||||
| <td><p>Body Text Font URL(s). Defaults to | <td><p>Body Text Font URL(s). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code>@import url()</code> elements.</p></td> | <code>@import url()</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>text_font_family_fallback</th> | <th>text_font_family_fallback</th> | ||||
| <td><p>Body Text Font Fallbacks. Defaults to | <td><p>Body Text Font Fallbacks. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code>body</code> element. The value of this variable is also stored as a CSS | <code>body</code> element. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | ||||
| any argument of a style function or in custom CSS.</p></td> | any argument of a style function or in custom CSS.</p></td> | ||||
| <th>header_font_family</th> | <th>header_font_family</th> | ||||
| <td><p>Header Font Family (xaringan default is | <td><p>Header Font Family (xaringan default is | ||||
| <code>'Yanone Kaffeesatz'</code>). Defaults to | <code>'Yanone Kaffeesatz'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | ||||
| argument of a style function or in custom CSS.</p></td> | argument of a style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_weight</th> | <th>header_font_weight</th> | ||||
| <td><p>Header Font Weight. Defaults to | <td><p>Header Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. Accepts CSS | <code>h1, h2, h3</code> elements. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_url</th> | <th>header_font_url</th> | ||||
| <td><p>Header Font URL. Defaults to | <td><p>Header Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code>@import url</code> elements.</p></td> | <code>@import url</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family</th> | <th>code_font_family</th> | ||||
| <td><p>Code Font Family. Defaults to | <td><p>Code Font Family. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | ||||
| also stored as a CSS variable that can be referenced with | also stored as a CSS variable that can be referenced with | ||||
| <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | ||||
| <tr> | <tr> | ||||
| <th>code_font_url</th> | <th>code_font_url</th> | ||||
| <td><p>Code Font URL. Defaults to | <td><p>Code Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| elements.</p></td> | elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family_fallback</th> | <th>code_font_family_fallback</th> | ||||
| <td><p>Code Font Fallback. Defaults to | <td><p>Code Font Fallback. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes.</p></td> | <code>.remark-code, .remark-inline-code</code> classes.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <p>To use the styles created by this theme function, make sure | <p>To use the styles created by this theme function, make sure | ||||
| that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the <code>outfile</code> | header. If you change the name of the output file using the <code>outfile</code> | ||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='no'>output</span>: | |||||
| <span class='kw pkg'>xaringan</span><span class='kw ns'>::</span><span class='no'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span>: | |||||
| <span class='no'>css</span>: <span class='no'>xaringan</span>-<span class='no'>themer.css</span></pre><p></div></p> | |||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='kw'>output</span><span class='op'>:</span> | |||||
| <span class='kw'>xaringan</span>::<span class='kw'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span><span class='op'>:</span> | |||||
| <span class='kw'>css</span><span class='op'>:</span> <span class='kw'>xaringan</span><span class='op'>-</span><span class='kw'>themer.css</span> | |||||
| </pre><p></div></p> | |||||
| <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2> | <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2> | ||||
| <p><a href='http://ethanschoonover.com/solarized'>http://ethanschoonover.com/solarized</a></p> | <p><a href='http://ethanschoonover.com/solarized'>http://ethanschoonover.com/solarized</a></p> | ||||
| <code><a href='style_mono_dark.html'>style_mono_dark</a>()</code>, | <code><a href='style_mono_dark.html'>style_mono_dark</a>()</code>, | ||||
| <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | ||||
| <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code>, | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <p>Other Solarized themes: | <p>Other Solarized themes: | ||||
| <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code></p></div> | <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code></p></div> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | ||||
| <span class='no'>xaringan_themer_css</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, <span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>xaringan_themer_css</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, fileext = <span class='st'>".css"</span>) | |||||
| <span class='fu'>style_solarized_dark</span>( | <span class='fu'>style_solarized_dark</span>( | ||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| outfile = <span class='kw'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| <span class='co'># styles to xaringan-themer.css</span> | <span class='co'># styles to xaringan-themer.css</span> | ||||
| ) | ) | ||||
| <span class='co'># View the CSS:</span> | <span class='co'># View the CSS:</span> | ||||
| <span class='co'># file.edit(xaringan_themer_css)</span></div></pre> | |||||
| <span class='co'># file.edit(xaringan_themer_css)</span> | |||||
| </div></pre> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| <nav id="toc" data-toggle="toc" class="sticky-top"> | <nav id="toc" data-toggle="toc" class="sticky-top"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>style_solarized_light</span>( | <pre class="usage"><span class='fu'>style_solarized_light</span>( | ||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='st'>"#657b83"</span>, | |||||
| <span class='kw'>header_color</span> <span class='kw'>=</span> <span class='st'>"#dc322f"</span>, | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='st'>"#fdf6e3"</span>, | |||||
| <span class='kw'>link_color</span> <span class='kw'>=</span> <span class='st'>"#b58900"</span>, | |||||
| <span class='kw'>text_bold_color</span> <span class='kw'>=</span> <span class='st'>"#d33682"</span>, | |||||
| <span class='kw'>text_slide_number_color</span> <span class='kw'>=</span> <span class='st'>"#93a1a1"</span>, | |||||
| <span class='kw'>padding</span> <span class='kw'>=</span> <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| <span class='kw'>background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_highlight_color</span> <span class='kw'>=</span> <span class='st'>"#268bd240"</span>, | |||||
| <span class='kw'>code_inline_color</span> <span class='kw'>=</span> <span class='st'>"#6c71c4"</span>, | |||||
| <span class='kw'>code_inline_background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_inline_font_size</span> <span class='kw'>=</span> <span class='st'>"1em"</span>, | |||||
| <span class='kw'>inverse_background_color</span> <span class='kw'>=</span> <span class='st'>"#002b36"</span>, | |||||
| <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='st'>"#fdf6e3"</span>, | |||||
| <span class='kw'>inverse_text_shadow</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>inverse_header_color</span> <span class='kw'>=</span> <span class='no'>inverse_text_color</span>, | |||||
| <span class='kw'>title_slide_text_color</span> <span class='kw'>=</span> <span class='no'>inverse_text_color</span>, | |||||
| <span class='kw'>title_slide_background_color</span> <span class='kw'>=</span> <span class='no'>inverse_background_color</span>, | |||||
| <span class='kw'>title_slide_background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>footnote_position_bottom</span> <span class='kw'>=</span> <span class='st'>"60px"</span>, | |||||
| <span class='kw'>left_column_subtle_color</span> <span class='kw'>=</span> <span class='st'>"#93a1a1"</span>, | |||||
| <span class='kw'>left_column_selected_color</span> <span class='kw'>=</span> <span class='st'>"#586e75"</span>, | |||||
| <span class='kw'>blockquote_left_border_color</span> <span class='kw'>=</span> <span class='st'>"#cb4b16"</span>, | |||||
| <span class='kw'>table_border_color</span> <span class='kw'>=</span> <span class='st'>"#839496"</span>, | |||||
| <span class='kw'>table_row_border_color</span> <span class='kw'>=</span> <span class='st'>"#839496"</span>, | |||||
| <span class='kw'>table_row_even_background_color</span> <span class='kw'>=</span> <span class='st'>"#eee8d5"</span>, | |||||
| <span class='kw'>base_font_size</span> <span class='kw'>=</span> <span class='st'>"20px"</span>, | |||||
| <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='st'>"1rem"</span>, | |||||
| <span class='kw'>header_h1_font_size</span> <span class='kw'>=</span> <span class='st'>"2.75rem"</span>, | |||||
| <span class='kw'>header_h2_font_size</span> <span class='kw'>=</span> <span class='st'>"2.25rem"</span>, | |||||
| <span class='kw'>header_h3_font_size</span> <span class='kw'>=</span> <span class='st'>"1.75rem"</span>, | |||||
| <span class='kw'>header_background_auto</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>header_background_color</span> <span class='kw'>=</span> <span class='no'>header_color</span>, | |||||
| <span class='kw'>header_background_text_color</span> <span class='kw'>=</span> <span class='no'>background_color</span>, | |||||
| <span class='kw'>header_background_padding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_background_content_padding_top</span> <span class='kw'>=</span> <span class='st'>"7rem"</span>, | |||||
| <span class='kw'>header_background_ignore_classes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| text_color = <span class='st'>"#657b83"</span>, | |||||
| header_color = <span class='st'>"#dc322f"</span>, | |||||
| background_color = <span class='st'>"#fdf6e3"</span>, | |||||
| link_color = <span class='st'>"#b58900"</span>, | |||||
| text_bold_color = <span class='st'>"#d33682"</span>, | |||||
| text_slide_number_color = <span class='st'>"#93a1a1"</span>, | |||||
| padding = <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| background_image = <span class='kw'>NULL</span>, | |||||
| background_size = <span class='kw'>NULL</span>, | |||||
| background_position = <span class='kw'>NULL</span>, | |||||
| code_highlight_color = <span class='st'>"#268bd240"</span>, | |||||
| code_inline_color = <span class='st'>"#6c71c4"</span>, | |||||
| code_inline_background_color = <span class='kw'>NULL</span>, | |||||
| code_inline_font_size = <span class='st'>"1em"</span>, | |||||
| inverse_background_color = <span class='st'>"#002b36"</span>, | |||||
| inverse_text_color = <span class='st'>"#fdf6e3"</span>, | |||||
| inverse_text_shadow = <span class='fl'>FALSE</span>, | |||||
| inverse_header_color = <span class='kw'>inverse_text_color</span>, | |||||
| title_slide_text_color = <span class='kw'>inverse_text_color</span>, | |||||
| title_slide_background_color = <span class='kw'>inverse_background_color</span>, | |||||
| title_slide_background_image = <span class='kw'>NULL</span>, | |||||
| title_slide_background_size = <span class='kw'>NULL</span>, | |||||
| title_slide_background_position = <span class='kw'>NULL</span>, | |||||
| footnote_color = <span class='kw'>NULL</span>, | |||||
| footnote_font_size = <span class='st'>"0.9em"</span>, | |||||
| footnote_position_bottom = <span class='st'>"60px"</span>, | |||||
| left_column_subtle_color = <span class='st'>"#93a1a1"</span>, | |||||
| left_column_selected_color = <span class='st'>"#586e75"</span>, | |||||
| blockquote_left_border_color = <span class='st'>"#cb4b16"</span>, | |||||
| table_border_color = <span class='st'>"#839496"</span>, | |||||
| table_row_border_color = <span class='st'>"#839496"</span>, | |||||
| table_row_even_background_color = <span class='st'>"#eee8d5"</span>, | |||||
| base_font_size = <span class='st'>"20px"</span>, | |||||
| text_font_size = <span class='st'>"1rem"</span>, | |||||
| header_h1_font_size = <span class='st'>"2.75rem"</span>, | |||||
| header_h2_font_size = <span class='st'>"2.25rem"</span>, | |||||
| header_h3_font_size = <span class='st'>"1.75rem"</span>, | |||||
| header_background_auto = <span class='fl'>FALSE</span>, | |||||
| header_background_color = <span class='kw'>header_color</span>, | |||||
| header_background_text_color = <span class='kw'>background_color</span>, | |||||
| header_background_padding = <span class='kw'>NULL</span>, | |||||
| header_background_content_padding_top = <span class='st'>"7rem"</span>, | |||||
| header_background_ignore_classes = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| <span class='st'>"bottom"</span>), | <span class='st'>"bottom"</span>), | ||||
| <span class='kw'>text_slide_number_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>text_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| <span class='kw'>text_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| <span class='kw'>text_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| <span class='kw'>text_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| <span class='kw'>text_font_base</span> <span class='kw'>=</span> <span class='st'>"sans-serif"</span>, | |||||
| <span class='kw'>header_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| <span class='kw'>header_font_weight</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| <span class='kw'>header_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| <span class='kw'>code_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_font_family</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| <span class='kw'>code_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9rem"</span>, | |||||
| <span class='kw'>code_font_url</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| <span class='kw'>code_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'><a href='style_xaringan.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| <span class='kw'>colors</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_css</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_fonts</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='st'>"xaringan-themer.css"</span> | |||||
| text_slide_number_font_size = <span class='st'>"0.9em"</span>, | |||||
| text_font_google = <span class='kw'>NULL</span>, | |||||
| text_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family"</span>), | |||||
| text_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_weight"</span>), | |||||
| text_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_url"</span>), | |||||
| text_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| text_font_base = <span class='st'>"sans-serif"</span>, | |||||
| header_font_google = <span class='kw'>NULL</span>, | |||||
| header_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_family"</span>), | |||||
| header_font_weight = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_weight"</span>), | |||||
| header_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"header_font_url"</span>), | |||||
| code_font_google = <span class='kw'>NULL</span>, | |||||
| code_font_family = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family"</span>), | |||||
| code_font_size = <span class='st'>"0.9rem"</span>, | |||||
| code_font_url = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_url"</span>), | |||||
| code_font_family_fallback = <span class='fu'><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a></span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| colors = <span class='kw'>NULL</span>, | |||||
| extra_css = <span class='kw'>NULL</span>, | |||||
| extra_fonts = <span class='kw'>NULL</span>, | |||||
| outfile = <span class='st'>"xaringan-themer.css"</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <th>text_font_family</th> | <th>text_font_family</th> | ||||
| <td><p>Body Text Font Family (xaringan default is | <td><p>Body Text Font Family (xaringan default is | ||||
| <code>'Droid Serif'</code>). Defaults to | <code>'Droid Serif'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family")</a></code>. Modifies the <code>body</code> | |||||
| element. The value of this variable is also stored as a CSS variable that | element. The value of this variable is also stored as a CSS variable that | ||||
| can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a | ||||
| style function or in custom CSS.</p></td> | style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_weight</th> | <th>text_font_weight</th> | ||||
| <td><p>Body Text Font Weight. Defaults to | <td><p>Body Text Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_weight")</a></code>. Modifies the <code>body</code> | |||||
| element. Accepts CSS | element. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>text_font_url</th> | <th>text_font_url</th> | ||||
| <td><p>Body Text Font URL(s). Defaults to | <td><p>Body Text Font URL(s). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_url")</a></code>. Modifies the | |||||
| <code>@import url()</code> elements.</p></td> | <code>@import url()</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>text_font_family_fallback</th> | <th>text_font_family_fallback</th> | ||||
| <td><p>Body Text Font Fallbacks. Defaults to | <td><p>Body Text Font Fallbacks. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("text_font_family_fallback")</a></code>. Modifies the | |||||
| <code>body</code> element. The value of this variable is also stored as a CSS | <code>body</code> element. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in | ||||
| any argument of a style function or in custom CSS.</p></td> | any argument of a style function or in custom CSS.</p></td> | ||||
| <th>header_font_family</th> | <th>header_font_family</th> | ||||
| <td><p>Header Font Family (xaringan default is | <td><p>Header Font Family (xaringan default is | ||||
| <code>'Yanone Kaffeesatz'</code>). Defaults to | <code>'Yanone Kaffeesatz'</code>). Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_family")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS | ||||
| variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any | ||||
| argument of a style function or in custom CSS.</p></td> | argument of a style function or in custom CSS.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_weight</th> | <th>header_font_weight</th> | ||||
| <td><p>Header Font Weight. Defaults to | <td><p>Header Font Weight. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_weight")</a></code>. Modifies the | |||||
| <code>h1, h2, h3</code> elements. Accepts CSS | <code>h1, h2, h3</code> elements. Accepts CSS | ||||
| <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | <a href='https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight'>font-weight</a> | ||||
| property values.</p></td> | property values.</p></td> | ||||
| <tr> | <tr> | ||||
| <th>header_font_url</th> | <th>header_font_url</th> | ||||
| <td><p>Header Font URL. Defaults to | <td><p>Header Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("header_font_url")</a></code>. Modifies the | |||||
| <code>@import url</code> elements.</p></td> | <code>@import url</code> elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family</th> | <th>code_font_family</th> | ||||
| <td><p>Code Font Family. Defaults to | <td><p>Code Font Family. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is | ||||
| also stored as a CSS variable that can be referenced with | also stored as a CSS variable that can be referenced with | ||||
| <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom | ||||
| <tr> | <tr> | ||||
| <th>code_font_url</th> | <th>code_font_url</th> | ||||
| <td><p>Code Font URL. Defaults to | <td><p>Code Font URL. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_url")</a></code>. Modifies the <code>@import url</code> | |||||
| elements.</p></td> | elements.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <th>code_font_family_fallback</th> | <th>code_font_family_fallback</th> | ||||
| <td><p>Code Font Fallback. Defaults to | <td><p>Code Font Fallback. Defaults to | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default("code_font_family_fallback")</a></code>. Modifies the | |||||
| <code>.remark-code, .remark-inline-code</code> classes.</p></td> | <code>.remark-code, .remark-inline-code</code> classes.</p></td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <p>To use the styles created by this theme function, make sure | <p>To use the styles created by this theme function, make sure | ||||
| that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the <code>outfile</code> | header. If you change the name of the output file using the <code>outfile</code> | ||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='no'>output</span>: | |||||
| <span class='kw pkg'>xaringan</span><span class='kw ns'>::</span><span class='no'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span>: | |||||
| <span class='no'>css</span>: <span class='no'>xaringan</span>-<span class='no'>themer.css</span></pre><p></div></p> | |||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='kw'>output</span><span class='op'>:</span> | |||||
| <span class='kw'>xaringan</span>::<span class='kw'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span><span class='op'>:</span> | |||||
| <span class='kw'>css</span><span class='op'>:</span> <span class='kw'>xaringan</span><span class='op'>-</span><span class='kw'>themer.css</span> | |||||
| </pre><p></div></p> | |||||
| <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2> | <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2> | ||||
| <p><a href='http://ethanschoonover.com/solarized'>http://ethanschoonover.com/solarized</a></p> | <p><a href='http://ethanschoonover.com/solarized'>http://ethanschoonover.com/solarized</a></p> | ||||
| <code><a href='style_mono_dark.html'>style_mono_dark</a>()</code>, | <code><a href='style_mono_dark.html'>style_mono_dark</a>()</code>, | ||||
| <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | <code><a href='style_mono_light.html'>style_mono_light</a>()</code>, | ||||
| <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>, | ||||
| <code><a href='style_xaringan.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <code><a href='xaringanthemer_font_default.html'>xaringanthemer_font_default</a>()</code></p> | |||||
| <p>Other Solarized themes: | <p>Other Solarized themes: | ||||
| <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code></p></div> | <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code></p></div> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | ||||
| <span class='no'>xaringan_themer_css</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, <span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>xaringan_themer_css</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, fileext = <span class='st'>".css"</span>) | |||||
| <span class='fu'>style_solarized_light</span>( | <span class='fu'>style_solarized_light</span>( | ||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| outfile = <span class='kw'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| <span class='co'># styles to xaringan-themer.css</span> | <span class='co'># styles to xaringan-themer.css</span> | ||||
| ) | ) | ||||
| <span class='co'># View the CSS:</span> | <span class='co'># View the CSS:</span> | ||||
| <span class='co'># file.edit(xaringan_themer_css)</span></div></pre> | |||||
| <span class='co'># file.edit(xaringan_themer_css)</span> | |||||
| </div></pre> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| <nav id="toc" data-toggle="toc" class="sticky-top"> | <nav id="toc" data-toggle="toc" class="sticky-top"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| <p>Creates a customized Xaringan theme CSS file.</p> | <p>Creates a customized Xaringan theme CSS file.</p> | ||||
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>xaringanthemer_font_default</span>(<span class='no'>font_arg</span>) | |||||
| <pre class="usage"><span class='fu'>xaringanthemer_font_default</span>(<span class='kw'>font_arg</span>) | |||||
| <span class='fu'>style_xaringan</span>( | <span class='fu'>style_xaringan</span>( | ||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='st'>"#000"</span>, | |||||
| <span class='kw'>header_color</span> <span class='kw'>=</span> <span class='st'>"#000"</span>, | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='st'>"#FFF"</span>, | |||||
| <span class='kw'>link_color</span> <span class='kw'>=</span> <span class='st'>"rgb(249, 38, 114)"</span>, | |||||
| <span class='kw'>text_bold_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_slide_number_color</span> <span class='kw'>=</span> <span class='no'>inverse_background_color</span>, | |||||
| <span class='kw'>padding</span> <span class='kw'>=</span> <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| <span class='kw'>background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_highlight_color</span> <span class='kw'>=</span> <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| <span class='kw'>code_inline_color</span> <span class='kw'>=</span> <span class='st'>"#000"</span>, | |||||
| <span class='kw'>code_inline_background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_inline_font_size</span> <span class='kw'>=</span> <span class='st'>"1em"</span>, | |||||
| <span class='kw'>inverse_background_color</span> <span class='kw'>=</span> <span class='st'>"#272822"</span>, | |||||
| <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='st'>"#d6d6d6"</span>, | |||||
| <span class='kw'>inverse_text_shadow</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>inverse_header_color</span> <span class='kw'>=</span> <span class='st'>"#f3f3f3"</span>, | |||||
| <span class='kw'>title_slide_text_color</span> <span class='kw'>=</span> <span class='no'>inverse_text_color</span>, | |||||
| <span class='kw'>title_slide_background_color</span> <span class='kw'>=</span> <span class='no'>inverse_background_color</span>, | |||||
| <span class='kw'>title_slide_background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_slide_background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>footnote_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>footnote_position_bottom</span> <span class='kw'>=</span> <span class='st'>"60px"</span>, | |||||
| <span class='kw'>left_column_subtle_color</span> <span class='kw'>=</span> <span class='st'>"#777"</span>, | |||||
| <span class='kw'>left_column_selected_color</span> <span class='kw'>=</span> <span class='st'>"#000"</span>, | |||||
| <span class='kw'>blockquote_left_border_color</span> <span class='kw'>=</span> <span class='st'>"lightgray"</span>, | |||||
| <span class='kw'>table_border_color</span> <span class='kw'>=</span> <span class='st'>"#666"</span>, | |||||
| <span class='kw'>table_row_border_color</span> <span class='kw'>=</span> <span class='st'>"#ddd"</span>, | |||||
| <span class='kw'>table_row_even_background_color</span> <span class='kw'>=</span> <span class='st'>"#eee"</span>, | |||||
| <span class='kw'>base_font_size</span> <span class='kw'>=</span> <span class='st'>"20px"</span>, | |||||
| <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='st'>"1rem"</span>, | |||||
| <span class='kw'>header_h1_font_size</span> <span class='kw'>=</span> <span class='st'>"2.75rem"</span>, | |||||
| <span class='kw'>header_h2_font_size</span> <span class='kw'>=</span> <span class='st'>"2.25rem"</span>, | |||||
| <span class='kw'>header_h3_font_size</span> <span class='kw'>=</span> <span class='st'>"1.75rem"</span>, | |||||
| <span class='kw'>header_background_auto</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, | |||||
| <span class='kw'>header_background_color</span> <span class='kw'>=</span> <span class='no'>header_color</span>, | |||||
| <span class='kw'>header_background_text_color</span> <span class='kw'>=</span> <span class='no'>background_color</span>, | |||||
| <span class='kw'>header_background_padding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_background_content_padding_top</span> <span class='kw'>=</span> <span class='st'>"7rem"</span>, | |||||
| <span class='kw'>header_background_ignore_classes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| text_color = <span class='st'>"#000"</span>, | |||||
| header_color = <span class='st'>"#000"</span>, | |||||
| background_color = <span class='st'>"#FFF"</span>, | |||||
| link_color = <span class='st'>"rgb(249, 38, 114)"</span>, | |||||
| text_bold_color = <span class='kw'>NULL</span>, | |||||
| text_slide_number_color = <span class='kw'>inverse_background_color</span>, | |||||
| padding = <span class='st'>"16px 64px 16px 64px"</span>, | |||||
| background_image = <span class='kw'>NULL</span>, | |||||
| background_size = <span class='kw'>NULL</span>, | |||||
| background_position = <span class='kw'>NULL</span>, | |||||
| code_highlight_color = <span class='st'>"rgba(255,255,0,0.5)"</span>, | |||||
| code_inline_color = <span class='st'>"#000"</span>, | |||||
| code_inline_background_color = <span class='kw'>NULL</span>, | |||||
| code_inline_font_size = <span class='st'>"1em"</span>, | |||||
| inverse_background_color = <span class='st'>"#272822"</span>, | |||||
| inverse_text_color = <span class='st'>"#d6d6d6"</span>, | |||||
| inverse_text_shadow = <span class='fl'>FALSE</span>, | |||||
| inverse_header_color = <span class='st'>"#f3f3f3"</span>, | |||||
| title_slide_text_color = <span class='kw'>inverse_text_color</span>, | |||||
| title_slide_background_color = <span class='kw'>inverse_background_color</span>, | |||||
| title_slide_background_image = <span class='kw'>NULL</span>, | |||||
| title_slide_background_size = <span class='kw'>NULL</span>, | |||||
| title_slide_background_position = <span class='kw'>NULL</span>, | |||||
| footnote_color = <span class='kw'>NULL</span>, | |||||
| footnote_font_size = <span class='st'>"0.9em"</span>, | |||||
| footnote_position_bottom = <span class='st'>"60px"</span>, | |||||
| left_column_subtle_color = <span class='st'>"#777"</span>, | |||||
| left_column_selected_color = <span class='st'>"#000"</span>, | |||||
| blockquote_left_border_color = <span class='st'>"lightgray"</span>, | |||||
| table_border_color = <span class='st'>"#666"</span>, | |||||
| table_row_border_color = <span class='st'>"#ddd"</span>, | |||||
| table_row_even_background_color = <span class='st'>"#eee"</span>, | |||||
| base_font_size = <span class='st'>"20px"</span>, | |||||
| text_font_size = <span class='st'>"1rem"</span>, | |||||
| header_h1_font_size = <span class='st'>"2.75rem"</span>, | |||||
| header_h2_font_size = <span class='st'>"2.25rem"</span>, | |||||
| header_h3_font_size = <span class='st'>"1.75rem"</span>, | |||||
| header_background_auto = <span class='fl'>FALSE</span>, | |||||
| header_background_color = <span class='kw'>header_color</span>, | |||||
| header_background_text_color = <span class='kw'>background_color</span>, | |||||
| header_background_padding = <span class='kw'>NULL</span>, | |||||
| header_background_content_padding_top = <span class='st'>"7rem"</span>, | |||||
| header_background_ignore_classes = <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, | |||||
| <span class='st'>"bottom"</span>), | <span class='st'>"bottom"</span>), | ||||
| <span class='kw'>text_slide_number_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>, | |||||
| <span class='kw'>text_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"text_font_family"</span>), | |||||
| <span class='kw'>text_font_weight</span> <span class='kw'>=</span> <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"text_font_weight"</span>), | |||||
| <span class='kw'>text_font_url</span> <span class='kw'>=</span> <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"text_font_url"</span>), | |||||
| <span class='kw'>text_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| <span class='kw'>text_font_base</span> <span class='kw'>=</span> <span class='st'>"sans-serif"</span>, | |||||
| <span class='kw'>header_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"header_font_family"</span>), | |||||
| <span class='kw'>header_font_weight</span> <span class='kw'>=</span> <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"header_font_weight"</span>), | |||||
| <span class='kw'>header_font_url</span> <span class='kw'>=</span> <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"header_font_url"</span>), | |||||
| <span class='kw'>code_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>code_font_family</span> <span class='kw'>=</span> <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"code_font_family"</span>), | |||||
| <span class='kw'>code_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9rem"</span>, | |||||
| <span class='kw'>code_font_url</span> <span class='kw'>=</span> <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"code_font_url"</span>), | |||||
| <span class='kw'>code_font_family_fallback</span> <span class='kw'>=</span> <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| <span class='kw'>colors</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_css</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>extra_fonts</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='st'>"xaringan-themer.css"</span> | |||||
| text_slide_number_font_size = <span class='st'>"0.9em"</span>, | |||||
| text_font_google = <span class='kw'>NULL</span>, | |||||
| text_font_family = <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"text_font_family"</span>), | |||||
| text_font_weight = <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"text_font_weight"</span>), | |||||
| text_font_url = <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"text_font_url"</span>), | |||||
| text_font_family_fallback = <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"text_font_family_fallback"</span>), | |||||
| text_font_base = <span class='st'>"sans-serif"</span>, | |||||
| header_font_google = <span class='kw'>NULL</span>, | |||||
| header_font_family = <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"header_font_family"</span>), | |||||
| header_font_weight = <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"header_font_weight"</span>), | |||||
| header_font_url = <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"header_font_url"</span>), | |||||
| code_font_google = <span class='kw'>NULL</span>, | |||||
| code_font_family = <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"code_font_family"</span>), | |||||
| code_font_size = <span class='st'>"0.9rem"</span>, | |||||
| code_font_url = <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"code_font_url"</span>), | |||||
| code_font_family_fallback = <span class='fu'>xaringanthemer_font_default</span>(<span class='st'>"code_font_family_fallback"</span>), | |||||
| colors = <span class='kw'>NULL</span>, | |||||
| extra_css = <span class='kw'>NULL</span>, | |||||
| extra_fonts = <span class='kw'>NULL</span>, | |||||
| outfile = <span class='st'>"xaringan-themer.css"</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <p>To use the styles created by this theme function, make sure | <p>To use the styles created by this theme function, make sure | ||||
| that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML | ||||
| header. If you change the name of the output file using the <code>outfile</code> | header. If you change the name of the output file using the <code>outfile</code> | ||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='no'>output</span>: | |||||
| <span class='kw pkg'>xaringan</span><span class='kw ns'>::</span><span class='no'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span>: | |||||
| <span class='no'>css</span>: <span class='no'>xaringan</span>-<span class='no'>themer.css</span></pre><p></div></p> | |||||
| argument, use that name instead of the default file name.<div class="yaml"></p><pre><span class='kw'>output</span><span class='op'>:</span> | |||||
| <span class='kw'>xaringan</span>::<span class='kw'><a href='https://rdrr.io/pkg/xaringan/man/moon_reader.html'>moon_reader</a></span><span class='op'>:</span> | |||||
| <span class='kw'>css</span><span class='op'>:</span> <span class='kw'>xaringan</span><span class='op'>-</span><span class='kw'>themer.css</span> | |||||
| </pre><p></div></p> | |||||
| <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> | ||||
| <div class='dont-index'><p>Other themes: | <div class='dont-index'><p>Other themes: | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span> | ||||
| <span class='no'>xaringan_themer_css</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, <span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>xaringan_themer_css</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, fileext = <span class='st'>".css"</span>) | |||||
| <span class='fu'>style_xaringan</span>( | <span class='fu'>style_xaringan</span>( | ||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='st'>"#002b3"</span>, | |||||
| <span class='kw'>inverse_background_color</span> <span class='kw'>=</span> <span class='st'>"#31b09e"</span>, | |||||
| <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='st'>"#002b3"</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| text_color = <span class='st'>"#002b3"</span>, | |||||
| inverse_background_color = <span class='st'>"#31b09e"</span>, | |||||
| inverse_text_color = <span class='st'>"#002b3"</span>, | |||||
| outfile = <span class='kw'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span> | |||||
| <span class='co'># styles to xaringan-themer.css</span> | <span class='co'># styles to xaringan-themer.css</span> | ||||
| )</div><div class='output co'>#> <span class='warning'>Warning: Colors that will be used by `theme_xaringan()` need to be in hexadecimal format: text_color, inverse_text_color</span></div><div class='input'> | |||||
| # View the CSS: | |||||
| # file.edit(xaringan_themer_css) | |||||
| ) | |||||
| </div><div class='output co'>#> <span class='warning'>Warning: Colors that will be used by `theme_xaringan()` need to be in hexadecimal format: text_color, inverse_text_color</span></div><div class='input'> | |||||
| <span class='co'># View the CSS:</span> | |||||
| <span class='co'># file.edit(xaringan_themer_css)</span> | |||||
| </div></pre> | </div></pre> | ||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>theme_xaringan</span>( | <pre class="usage"><span class='fu'>theme_xaringan</span>( | ||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>accent_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>accent_secondary_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>css_file</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>set_ggplot_defaults</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, | |||||
| <span class='kw'>text_font</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_use_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_font</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_font_use_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_font_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>use_showtext</span> <span class='kw'>=</span> <span class='fl'>TRUE</span> | |||||
| text_color = <span class='kw'>NULL</span>, | |||||
| background_color = <span class='kw'>NULL</span>, | |||||
| accent_color = <span class='kw'>NULL</span>, | |||||
| accent_secondary_color = <span class='kw'>NULL</span>, | |||||
| css_file = <span class='kw'>NULL</span>, | |||||
| set_ggplot_defaults = <span class='fl'>TRUE</span>, | |||||
| text_font = <span class='kw'>NULL</span>, | |||||
| text_font_use_google = <span class='kw'>NULL</span>, | |||||
| text_font_size = <span class='kw'>NULL</span>, | |||||
| title_font = <span class='kw'>NULL</span>, | |||||
| title_font_use_google = <span class='kw'>NULL</span>, | |||||
| title_font_size = <span class='kw'>NULL</span>, | |||||
| use_showtext = <span class='fl'>TRUE</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Requires ggplot2</span> | <pre class="examples"><div class='input'><span class='co'># Requires ggplot2</span> | ||||
| <span class='no'>has_ggplot2</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"ggplot2"</span>, <span class='kw'>quietly</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) | |||||
| <span class='kw'>has_ggplot2</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"ggplot2"</span>, quietly = <span class='fl'>TRUE</span>) | |||||
| <span class='kw'>if</span> (<span class='no'>has_ggplot2</span>) { | |||||
| <span class='co'>if</span> (<span class='kw'>has_ggplot2</span>) { | |||||
| <span class='co'># Because this is an example, we'll save the CSS to a temp file</span> | <span class='co'># Because this is an example, we'll save the CSS to a temp file</span> | ||||
| <span class='no'>path_to_css_file</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>path_to_css_file</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(fileext = <span class='st'>".css"</span>) | |||||
| <span class='co'># Create the xaringan theme: dark blue background with teal green accents</span> | <span class='co'># Create the xaringan theme: dark blue background with teal green accents</span> | ||||
| <span class='fu'><a href='style_duo.html'>style_duo</a></span>( | <span class='fu'><a href='style_duo.html'>style_duo</a></span>( | ||||
| <span class='kw'>primary_color</span> <span class='kw'>=</span> <span class='st'>"#002b36"</span>, | |||||
| <span class='kw'>secondary_color</span> <span class='kw'>=</span> <span class='st'>"#31b09e"</span>, | |||||
| primary_color = <span class='st'>"#002b36"</span>, | |||||
| secondary_color = <span class='st'>"#31b09e"</span>, | |||||
| <span class='co'># Using basic fonts for this example, but the plot theme will</span> | <span class='co'># Using basic fonts for this example, but the plot theme will</span> | ||||
| <span class='co'># automatically use your theme font if you use Google fonts</span> | <span class='co'># automatically use your theme font if you use Google fonts</span> | ||||
| <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='st'>"sans"</span>, | |||||
| <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='st'>"serif"</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>path_to_css_file</span> | |||||
| text_font_family = <span class='st'>"sans"</span>, | |||||
| header_font_family = <span class='st'>"serif"</span>, | |||||
| outfile = <span class='kw'>path_to_css_file</span> | |||||
| ) | ) | ||||
| <span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>ggplot2</span>) | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='no'>mpg</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='no'>cty</span>, <span class='no'>hwy</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_point.html'>geom_point</a></span>() + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>ggtitle</a></span>(<span class='st'>"Fuel Efficiency of Various Cars"</span>) + | |||||
| <span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='kw'><a href='http://ggplot2.tidyverse.org'>ggplot2</a></span>) | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='kw'>mpg</span>) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='kw'>cty</span>, <span class='kw'>hwy</span>) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_point.html'>geom_point</a></span>() <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>ggtitle</a></span>(<span class='st'>"Fuel Efficiency of Various Cars"</span>) <span class='op'>+</span> | |||||
| <span class='fu'>theme_xaringan</span>() | <span class='fu'>theme_xaringan</span>() | ||||
| }</div><div class='img'><img src='theme_xaringan-1.png' alt='' width='700' height='433' /></div></pre> | |||||
| } | |||||
| </div><div class='img'><img src='theme_xaringan-1.png' alt='' width='700' height='433' /></div></pre> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| <nav id="toc" data-toggle="toc" class="sticky-top"> | <nav id="toc" data-toggle="toc" class="sticky-top"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>theme_xaringan_base</span>( | <pre class="usage"><span class='fu'>theme_xaringan_base</span>( | ||||
| <span class='no'>text_color</span>, | |||||
| <span class='no'>background_color</span>, | |||||
| <span class='no'>...</span>, | |||||
| <span class='kw'>set_ggplot_defaults</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, | |||||
| <span class='kw'>accent_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>accent_secondary_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_use_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_font</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_font_use_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_font_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>use_showtext</span> <span class='kw'>=</span> <span class='fl'>TRUE</span> | |||||
| <span class='kw'>text_color</span>, | |||||
| <span class='kw'>background_color</span>, | |||||
| <span class='kw'>...</span>, | |||||
| set_ggplot_defaults = <span class='fl'>TRUE</span>, | |||||
| accent_color = <span class='kw'>NULL</span>, | |||||
| accent_secondary_color = <span class='kw'>NULL</span>, | |||||
| text_font = <span class='kw'>NULL</span>, | |||||
| text_font_use_google = <span class='kw'>NULL</span>, | |||||
| text_font_size = <span class='kw'>NULL</span>, | |||||
| title_font = <span class='kw'>NULL</span>, | |||||
| title_font_use_google = <span class='kw'>NULL</span>, | |||||
| title_font_size = <span class='kw'>NULL</span>, | |||||
| use_showtext = <span class='fl'>TRUE</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Requires ggplot2</span> | <pre class="examples"><div class='input'><span class='co'># Requires ggplot2</span> | ||||
| <span class='no'>has_ggplot2</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"ggplot2"</span>, <span class='kw'>quietly</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) | |||||
| <span class='kw'>has_ggplot2</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"ggplot2"</span>, quietly = <span class='fl'>TRUE</span>) | |||||
| <span class='kw'>if</span> (<span class='no'>has_ggplot2</span>) { | |||||
| <span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>ggplot2</span>) | |||||
| <span class='co'>if</span> (<span class='kw'>has_ggplot2</span>) { | |||||
| <span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='kw'><a href='http://ggplot2.tidyverse.org'>ggplot2</a></span>) | |||||
| <span class='no'>plot1</span> <span class='kw'><-</span> <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='no'>mpg</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='no'>cty</span>, <span class='no'>hwy</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_point.html'>geom_point</a></span>() + | |||||
| <span class='kw'>plot1</span> <span class='op'><-</span> <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='kw'>mpg</span>) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='kw'>cty</span>, <span class='kw'>hwy</span>) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_point.html'>geom_point</a></span>() <span class='op'>+</span> | |||||
| <span class='fu'>theme_xaringan_base</span>( | <span class='fu'>theme_xaringan_base</span>( | ||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='st'>"#602f6b"</span>, <span class='co'># imperial</span> | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='st'>"#f8f8f8"</span>, <span class='co'># light gray</span> | |||||
| <span class='kw'>accent_color</span> <span class='kw'>=</span> <span class='st'>"#317873"</span>, <span class='co'># myrtle green</span> | |||||
| <span class='kw'>title_font</span> <span class='kw'>=</span> <span class='st'>"sans"</span>, | |||||
| <span class='kw'>text_font</span> <span class='kw'>=</span> <span class='st'>"serif"</span>, | |||||
| <span class='kw'>set_ggplot_defaults</span> <span class='kw'>=</span> <span class='fl'>TRUE</span> | |||||
| ) + | |||||
| text_color = <span class='st'>"#602f6b"</span>, <span class='co'># imperial</span> | |||||
| background_color = <span class='st'>"#f8f8f8"</span>, <span class='co'># light gray</span> | |||||
| accent_color = <span class='st'>"#317873"</span>, <span class='co'># myrtle green</span> | |||||
| title_font = <span class='st'>"sans"</span>, | |||||
| text_font = <span class='st'>"serif"</span>, | |||||
| set_ggplot_defaults = <span class='fl'>TRUE</span> | |||||
| ) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>labs</a></span>( | <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>labs</a></span>( | ||||
| <span class='kw'>title</span> <span class='kw'>=</span> <span class='st'>"Fuel Efficiency of Various Cars"</span>, | |||||
| <span class='kw'>subtitle</span> <span class='kw'>=</span> <span class='st'>"+ theme_xaringan_base()"</span>, | |||||
| <span class='kw'>caption</span> <span class='kw'>=</span> <span class='st'>"xaringanthemer"</span> | |||||
| title = <span class='st'>"Fuel Efficiency of Various Cars"</span>, | |||||
| subtitle = <span class='st'>"+ theme_xaringan_base()"</span>, | |||||
| caption = <span class='st'>"xaringanthemer"</span> | |||||
| ) | ) | ||||
| <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>plot1</span>) | |||||
| <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='kw'>plot1</span>) | |||||
| <span class='no'>plot2</span> <span class='kw'><-</span> <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='no'>mpg</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='no'>hwy</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_histogram.html'>geom_histogram</a></span>(<span class='kw'>binwidth</span> <span class='kw'>=</span> <span class='fl'>2</span>) + | |||||
| <span class='kw'>plot2</span> <span class='op'><-</span> <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='kw'>mpg</span>) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='kw'>hwy</span>) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_histogram.html'>geom_histogram</a></span>(binwidth = <span class='fl'>2</span>) <span class='op'>+</span> | |||||
| <span class='fu'>theme_xaringan_base</span>( | <span class='fu'>theme_xaringan_base</span>( | ||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='st'>"#a8a9c8"</span>, <span class='co'># light purple</span> | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='st'>"#303163"</span>, <span class='co'># deep slate purple</span> | |||||
| <span class='kw'>accent_color</span> <span class='kw'>=</span> <span class='st'>"#ffff99"</span>, <span class='co'># canary yellow</span> | |||||
| <span class='kw'>title_font</span> <span class='kw'>=</span> <span class='st'>"sans"</span>, | |||||
| <span class='kw'>text_font</span> <span class='kw'>=</span> <span class='st'>"serif"</span>, | |||||
| <span class='kw'>set_ggplot_defaults</span> <span class='kw'>=</span> <span class='fl'>TRUE</span> | |||||
| ) + | |||||
| text_color = <span class='st'>"#a8a9c8"</span>, <span class='co'># light purple</span> | |||||
| background_color = <span class='st'>"#303163"</span>, <span class='co'># deep slate purple</span> | |||||
| accent_color = <span class='st'>"#ffff99"</span>, <span class='co'># canary yellow</span> | |||||
| title_font = <span class='st'>"sans"</span>, | |||||
| text_font = <span class='st'>"serif"</span>, | |||||
| set_ggplot_defaults = <span class='fl'>TRUE</span> | |||||
| ) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>labs</a></span>( | <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>labs</a></span>( | ||||
| <span class='kw'>title</span> <span class='kw'>=</span> <span class='st'>"Highway Fuel Efficiency"</span>, | |||||
| <span class='kw'>subtitle</span> <span class='kw'>=</span> <span class='st'>"+ theme_xaringan_base()"</span>, | |||||
| <span class='kw'>caption</span> <span class='kw'>=</span> <span class='st'>"xaringanthemer"</span> | |||||
| title = <span class='st'>"Highway Fuel Efficiency"</span>, | |||||
| subtitle = <span class='st'>"+ theme_xaringan_base()"</span>, | |||||
| caption = <span class='st'>"xaringanthemer"</span> | |||||
| ) | ) | ||||
| <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>plot2</span>) | |||||
| }</div><div class='img'><img src='theme_xaringan_base-1.png' alt='' width='700' height='433' /></div><div class='img'><img src='theme_xaringan_base-2.png' alt='' width='700' height='433' /></div></pre> | |||||
| <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='kw'>plot2</span>) | |||||
| } | |||||
| </div><div class='img'><img src='theme_xaringan_base-1.png' alt='' width='700' height='433' /></div><div class='img'><img src='theme_xaringan_base-2.png' alt='' width='700' height='433' /></div></pre> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| <nav id="toc" data-toggle="toc" class="sticky-top"> | <nav id="toc" data-toggle="toc" class="sticky-top"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| xaringanthemer style function, for use in plotting and other circumstances.</p> | xaringanthemer style function, for use in plotting and other circumstances.</p> | ||||
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>theme_xaringan_get_value</span>(<span class='no'>setting</span>, <span class='kw'>css_file</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre> | |||||
| <pre class="usage"><span class='fu'>theme_xaringan_get_value</span>(<span class='kw'>setting</span>, css_file = <span class='kw'>NULL</span>)</pre> | |||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <table class="ref-arguments"> | <table class="ref-arguments"> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Create a xaringanthemer style in a temporary file for this example</span> | <pre class="examples"><div class='input'><span class='co'># Create a xaringanthemer style in a temporary file for this example</span> | ||||
| <span class='no'>xaringan_themer_css</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer"</span>, <span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>xaringan_themer_css</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer"</span>, fileext = <span class='st'>".css"</span>) | |||||
| <span class='fu'><a href='style_solarized_light.html'>style_solarized_light</a></span>(<span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span>) | |||||
| <span class='fu'><a href='style_solarized_light.html'>style_solarized_light</a></span>(outfile = <span class='kw'>xaringan_themer_css</span>) | |||||
| <span class='fu'>theme_xaringan_get_value</span>(<span class='st'>"text_color"</span>)</div><div class='output co'>#> [1] "#657b83"</div><div class='input'><span class='fu'>theme_xaringan_get_value</span>(<span class='st'>"background_color"</span>)</div><div class='output co'>#> [1] "#fdf6e3"</div><div class='input'><span class='fu'>theme_xaringan_get_value</span>(<span class='st'>"header_color"</span>)</div><div class='output co'>#> [1] "#dc322f"</div><div class='input'><span class='fu'>theme_xaringan_get_value</span>(<span class='st'>"text_bold_color"</span>)</div><div class='output co'>#> [1] "#d33682"</div><div class='input'> | |||||
| <span class='fu'>theme_xaringan_get_value</span>(<span class='st'>"text_color"</span>) | |||||
| </div><div class='output co'>#> [1] "#657b83"</div><div class='input'><span class='fu'>theme_xaringan_get_value</span>(<span class='st'>"background_color"</span>) | |||||
| </div><div class='output co'>#> [1] "#fdf6e3"</div><div class='input'><span class='fu'>theme_xaringan_get_value</span>(<span class='st'>"header_color"</span>) | |||||
| </div><div class='output co'>#> [1] "#dc322f"</div><div class='input'><span class='fu'>theme_xaringan_get_value</span>(<span class='st'>"text_bold_color"</span>) | |||||
| </div><div class='output co'>#> [1] "#d33682"</div><div class='input'> | |||||
| </div></pre> | </div></pre> | ||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>theme_xaringan_inverse</span>( | <pre class="usage"><span class='fu'>theme_xaringan_inverse</span>( | ||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>accent_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>accent_secondary_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>css_file</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>set_ggplot_defaults</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, | |||||
| <span class='kw'>text_font</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_use_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_font</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_font_use_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>title_font_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>use_showtext</span> <span class='kw'>=</span> <span class='fl'>TRUE</span> | |||||
| text_color = <span class='kw'>NULL</span>, | |||||
| background_color = <span class='kw'>NULL</span>, | |||||
| accent_color = <span class='kw'>NULL</span>, | |||||
| accent_secondary_color = <span class='kw'>NULL</span>, | |||||
| css_file = <span class='kw'>NULL</span>, | |||||
| set_ggplot_defaults = <span class='fl'>TRUE</span>, | |||||
| text_font = <span class='kw'>NULL</span>, | |||||
| text_font_use_google = <span class='kw'>NULL</span>, | |||||
| text_font_size = <span class='kw'>NULL</span>, | |||||
| title_font = <span class='kw'>NULL</span>, | |||||
| title_font_use_google = <span class='kw'>NULL</span>, | |||||
| title_font_size = <span class='kw'>NULL</span>, | |||||
| use_showtext = <span class='fl'>TRUE</span> | |||||
| )</pre> | )</pre> | ||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> | ||||
| <pre class="examples"><div class='input'><span class='co'># Requires ggplot2</span> | <pre class="examples"><div class='input'><span class='co'># Requires ggplot2</span> | ||||
| <span class='no'>has_ggplot2</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"ggplot2"</span>, <span class='kw'>quietly</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) | |||||
| <span class='kw'>has_ggplot2</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></span>(<span class='st'>"ggplot2"</span>, quietly = <span class='fl'>TRUE</span>) | |||||
| <span class='kw'>if</span> (<span class='no'>has_ggplot2</span>) { | |||||
| <span class='co'>if</span> (<span class='kw'>has_ggplot2</span>) { | |||||
| <span class='co'># Because this is an example, we'll save the CSS to a temp file</span> | <span class='co'># Because this is an example, we'll save the CSS to a temp file</span> | ||||
| <span class='no'>path_to_css_file</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>) | |||||
| <span class='kw'>path_to_css_file</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(fileext = <span class='st'>".css"</span>) | |||||
| <span class='co'># Create the xaringan theme: dark blue background with teal green accents</span> | <span class='co'># Create the xaringan theme: dark blue background with teal green accents</span> | ||||
| <span class='fu'><a href='style_duo.html'>style_duo</a></span>( | <span class='fu'><a href='style_duo.html'>style_duo</a></span>( | ||||
| <span class='kw'>primary_color</span> <span class='kw'>=</span> <span class='st'>"#002b36"</span>, | |||||
| <span class='kw'>secondary_color</span> <span class='kw'>=</span> <span class='st'>"#31b09e"</span>, | |||||
| primary_color = <span class='st'>"#002b36"</span>, | |||||
| secondary_color = <span class='st'>"#31b09e"</span>, | |||||
| <span class='co'># Using basic fonts for this example, but the plot theme will</span> | <span class='co'># Using basic fonts for this example, but the plot theme will</span> | ||||
| <span class='co'># automatically use your theme font if you use Google fonts</span> | <span class='co'># automatically use your theme font if you use Google fonts</span> | ||||
| <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='st'>"sans"</span>, | |||||
| <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='st'>"serif"</span>, | |||||
| <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>path_to_css_file</span> | |||||
| text_font_family = <span class='st'>"sans"</span>, | |||||
| header_font_family = <span class='st'>"serif"</span>, | |||||
| outfile = <span class='kw'>path_to_css_file</span> | |||||
| ) | ) | ||||
| <span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>ggplot2</span>) | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='no'>mpg</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='no'>cty</span>, <span class='no'>hwy</span>) + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_point.html'>geom_point</a></span>() + | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>ggtitle</a></span>(<span class='st'>"Fuel Efficiency of Various Cars"</span>) + | |||||
| <span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='kw'><a href='http://ggplot2.tidyverse.org'>ggplot2</a></span>) | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></span>(<span class='kw'>mpg</span>) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/aes.html'>aes</a></span>(<span class='kw'>cty</span>, <span class='kw'>hwy</span>) <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/geom_point.html'>geom_point</a></span>() <span class='op'>+</span> | |||||
| <span class='fu'><a href='https://ggplot2.tidyverse.org/reference/labs.html'>ggtitle</a></span>(<span class='st'>"Fuel Efficiency of Various Cars"</span>) <span class='op'>+</span> | |||||
| <span class='co'># themed to match the inverse slides: teal background with dark blue text</span> | <span class='co'># themed to match the inverse slides: teal background with dark blue text</span> | ||||
| <span class='fu'>theme_xaringan_inverse</span>() | <span class='fu'>theme_xaringan_inverse</span>() | ||||
| }</div><div class='img'><img src='theme_xaringan_inverse-1.png' alt='' width='700' height='433' /></div></pre> | |||||
| } | |||||
| </div><div class='img'><img src='theme_xaringan_inverse-1.png' alt='' width='700' height='433' /></div></pre> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| <nav id="toc" data-toggle="toc" class="sticky-top"> | <nav id="toc" data-toggle="toc" class="sticky-top"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>theme_xaringan_set_defaults</span>( | <pre class="usage"><span class='fu'>theme_xaringan_set_defaults</span>( | ||||
| <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, | |||||
| <span class='kw'>accent_color</span> <span class='kw'>=</span> <span class='no'>text_color</span>, | |||||
| <span class='kw'>accent_secondary_color</span> <span class='kw'>=</span> <span class='no'>accent_color</span>, | |||||
| <span class='kw'>text_font</span> <span class='kw'>=</span> <span class='kw'>NULL</span> | |||||
| text_color = <span class='kw'>NULL</span>, | |||||
| background_color = <span class='kw'>NULL</span>, | |||||
| accent_color = <span class='kw'>text_color</span>, | |||||
| accent_secondary_color = <span class='kw'>accent_color</span>, | |||||
| text_font = <span class='kw'>NULL</span> | |||||
| ) | ) | ||||
| <span class='fu'>theme_xaringan_restore_defaults</span>()</pre> | <span class='fu'>theme_xaringan_restore_defaults</span>()</pre> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| <div class="ref-description"> | <div class="ref-description"> | ||||
| <p>These functions in xaringanthemer have been deprecated or renamed.</p> | <p>These functions in xaringanthemer have been deprecated or renamed.</p> | ||||
| <p>Use <code><a href='style_xaringan.html'>style_xaringan()</a></code> instead of <code>write_xaringan_theme()</code>.</p> | |||||
| <p>Use <code><a href='xaringanthemer_font_default.html'>style_xaringan()</a></code> instead of <code>write_xaringan_theme()</code>.</p> | |||||
| <p>Use <code><a href='style_extra_css.html'>style_extra_css()</a></code> instead of <code>write_extra_css()</code>.</p> | <p>Use <code><a href='style_extra_css.html'>style_extra_css()</a></code> instead of <code>write_extra_css()</code>.</p> | ||||
| <p>Use <code><a href='style_mono_light.html'>style_mono_light()</a></code> instead of <code>mono_light()</code>.</p> | <p>Use <code><a href='style_mono_light.html'>style_mono_light()</a></code> instead of <code>mono_light()</code>.</p> | ||||
| <p>Use <code><a href='style_mono_dark.html'>style_mono_dark()</a></code> instead of <code>mono_dark()</code>.</p> | <p>Use <code><a href='style_mono_dark.html'>style_mono_dark()</a></code> instead of <code>mono_dark()</code>.</p> | ||||
| <p>Use <code><a href='style_solarized_dark.html'>style_solarized_dark()</a></code> instead of <code>solarized_dark()</code>.</p> | <p>Use <code><a href='style_solarized_dark.html'>style_solarized_dark()</a></code> instead of <code>solarized_dark()</code>.</p> | ||||
| </div> | </div> | ||||
| <pre class="usage"><span class='fu'>write_xaringan_theme</span>(<span class='no'>...</span>) | |||||
| <pre class="usage"><span class='fu'>write_xaringan_theme</span>(<span class='kw'>...</span>) | |||||
| <span class='fu'>write_extra_css</span>(<span class='no'>...</span>) | |||||
| <span class='fu'>write_extra_css</span>(<span class='kw'>...</span>) | |||||
| <span class='fu'>mono_light</span>(<span class='no'>...</span>) | |||||
| <span class='fu'>mono_light</span>(<span class='kw'>...</span>) | |||||
| <span class='fu'>mono_dark</span>(<span class='no'>...</span>) | |||||
| <span class='fu'>mono_dark</span>(<span class='kw'>...</span>) | |||||
| <span class='fu'>mono_accent</span>(<span class='no'>...</span>) | |||||
| <span class='fu'>mono_accent</span>(<span class='kw'>...</span>) | |||||
| <span class='fu'>mono_accent_inverse</span>(<span class='no'>...</span>) | |||||
| <span class='fu'>mono_accent_inverse</span>(<span class='kw'>...</span>) | |||||
| <span class='fu'>duo</span>(<span class='no'>...</span>) | |||||
| <span class='fu'>duo</span>(<span class='kw'>...</span>) | |||||
| <span class='fu'>duo_accent</span>(<span class='no'>...</span>) | |||||
| <span class='fu'>duo_accent</span>(<span class='kw'>...</span>) | |||||
| <span class='fu'>duo_accent_inverse</span>(<span class='no'>...</span>) | |||||
| <span class='fu'>duo_accent_inverse</span>(<span class='kw'>...</span>) | |||||
| <span class='fu'>solarized_light</span>(<span class='no'>...</span>) | |||||
| <span class='fu'>solarized_light</span>(<span class='kw'>...</span>) | |||||
| <span class='fu'>solarized_dark</span>(<span class='no'>...</span>)</pre> | |||||
| <span class='fu'>solarized_dark</span>(<span class='kw'>...</span>)</pre> | |||||
| <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> | ||||
| <table class="ref-arguments"> | <table class="ref-arguments"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |
| </ul> | </ul> | ||||
| </div> | </div> | ||||
| <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> | |||||
| <p><strong>Maintainer</strong>: Garrick Aden-Buie <a href='mailto:garrick@adenbuie.com'>garrick@adenbuie.com</a> (<a href='https://orcid.org/0000-0002-7111-0077'>ORCID</a>)</p> | |||||
| </div> | </div> | ||||
| <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> | ||||
| </div> | </div> | ||||
| <div class="pkgdown"> | <div class="pkgdown"> | ||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> | |||||
| <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> | |||||
| </div> | </div> | ||||
| </footer> | </footer> |