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

218 lines
15KB

  1. <!DOCTYPE html>
  2. <!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="A helper function to retrieve the value of style settings as set by a
  3. xaringanthemer style function, for use in plotting and other circumstances."><title>Get the Value of xaringanthemer Style Setting — theme_xaringan_get_value • xaringanthemer</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.1.0/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.0/bootstrap.bundle.min.js"></script><link href="../deps/_IBM%20Plex%20Mono-0.4.0/font.css" rel="stylesheet"><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><meta property="og:title" content="Get the Value of xaringanthemer Style Setting — theme_xaringan_get_value"><meta property="og:description" content="A helper function to retrieve the value of style settings as set by a
  4. xaringanthemer style function, for use in plotting and other circumstances."><meta property="og:image" content="https://pkg.garrickadenbuie.com/xaringanthemer/logo.png"><meta name="twitter:card" content="summary"><meta name="twitter:creator" content="@grrrck"><meta name="twitter:site" content="@grrrck"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
  5. <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  6. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  7. <![endif]--></head><body>
  8. <a href="#main" class="visually-hidden-focusable">Skip to contents</a>
  9. <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
  10. <a class="navbar-brand me-2" href="../index.html">xaringanthemer</a>
  11. <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Released version">0.4.1</small>
  12. <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
  13. <span class="navbar-toggler-icon"></span>
  14. </button>
  15. <div id="navbar" class="collapse navbar-collapse ms-2">
  16. <ul class="navbar-nav me-auto"><li class="nav-item">
  17. <a class="nav-link" href="../articles/xaringanthemer.html">Features</a>
  18. </li>
  19. <li class="active nav-item">
  20. <a class="nav-link" href="../reference/index.html">Reference</a>
  21. </li>
  22. <li class="nav-item dropdown">
  23. <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-themes">Themes</a>
  24. <div class="dropdown-menu" aria-labelledby="dropdown-themes">
  25. <h6 class="dropdown-header" data-toc-skip>Themes</h6>
  26. <a class="dropdown-item" href="../articles/themes.html">Slide Themes</a>
  27. <a class="dropdown-item" href="../articles/ggplot2-themes.html">ggplot2 Themes</a>
  28. <div class="dropdown-divider"></div>
  29. <h6 class="dropdown-header" data-toc-skip>More Customization</h6>
  30. <a class="dropdown-item" href="../articles/fonts.html">Fonts</a>
  31. <a class="dropdown-item" href="../articles/template-variables.html">Template Variables</a>
  32. </div>
  33. </li>
  34. </ul><form class="form-inline my-2 my-lg-0" role="search">
  35. <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
  36. <ul class="navbar-nav"><li class="nav-item dropdown">
  37. <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown--">
  38. <span class="far fa far fa-newspaper fa-lg"></span>
  39. </a>
  40. <div class="dropdown-menu" aria-labelledby="dropdown--">
  41. <a class="external-link dropdown-item" href="https://garrickadenbuie.com/blog/xaringanthemer-v0-3-0/">xaringanthemer 0.3.0</a>
  42. <div class="dropdown-divider"></div>
  43. <a class="dropdown-item" href="../news/index.html">Changelog</a>
  44. </div>
  45. </li>
  46. <li class="nav-item">
  47. <a class="external-link nav-link" href="https://github.com/gadenbuie/xaringanthemer">
  48. <span class="fab fa fab fa-github fa-lg"></span>
  49. </a>
  50. </li>
  51. <li class="nav-item">
  52. <a class="external-link nav-link" href="https://twitter.com/grrrck">
  53. <span class="fab fa fab fa-twitter fa-lg"></span>
  54. </a>
  55. </li>
  56. <li class="nav-item">
  57. <a class="external-link nav-link" href="https://www.garrickadenbuie.com">
  58. <span class="fas fa fas fa-home fa-lg"></span>
  59. </a>
  60. </li>
  61. </ul></div>
  62. </div>
  63. </nav><div class="container template-reference-topic">
  64. <div class="row">
  65. <main id="main" class="col-md-9"><div class="page-header">
  66. <img src="../logo.png" class="logo" alt=""><h1>Get the Value of xaringanthemer Style Setting</h1>
  67. <small class="dont-index">Source: <a href="https://github.com/gadenbuie/xaringanthemer/blob/HEAD/R/ggplot2.R" class="external-link"><code>R/ggplot2.R</code></a></small>
  68. <div class="d-none name"><code>theme_xaringan_get_value.Rd</code></div>
  69. </div>
  70. <div class="ref-description section level2">
  71. <p>A helper function to retrieve the value of style settings as set by a
  72. xaringanthemer style function, for use in plotting and other circumstances.</p>
  73. </div>
  74. <div class="section level2">
  75. <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
  76. <div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">theme_xaringan_get_value</span><span class="op">(</span><span class="va">setting</span>, css_file <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></code></pre></div>
  77. </div>
  78. <div class="section level2">
  79. <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
  80. <dl><dt>setting</dt>
  81. <dd><p>A xaringanthemer style setting</p></dd>
  82. <dt>css_file</dt>
  83. <dd><p>Path to a <span class="pkg">xaringanthemer</span> CSS file, from which the
  84. theme variables and values will be inferred. In general, if you use the
  85. <span class="pkg">xaringathemer</span> defaults, you will not need to set this. This feature
  86. lets you create a <span class="pkg">ggplot2</span> theme for your <span class="pkg">xaringan</span> slides, even
  87. if you have only saved your theme CSS file and you aren't creating your
  88. CSS theme with <span class="pkg">xaringanthemer</span> in your slides' source file.</p></dd>
  89. </dl></div>
  90. <div class="section level2">
  91. <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
  92. <p>The value of the xaringanthemer style parameter.</p>
  93. </div>
  94. <div class="section level2">
  95. <h2 id="style-settings">Style Settings<a class="anchor" aria-label="anchor" href="#style-settings"></a></h2>
  96. <p>Style settings used by xaringanthemer include:</p><ul><li><p><code>background_color</code></p></li>
  97. <li><p><code>background_image</code></p></li>
  98. <li><p><code>background_position</code></p></li>
  99. <li><p><code>background_size</code></p></li>
  100. <li><p><code>blockquote_left_border_color</code></p></li>
  101. <li><p><code>code_font_family</code></p></li>
  102. <li><p><code>code_font_family_fallback</code></p></li>
  103. <li><p><code>code_font_google</code></p></li>
  104. <li><p><code>code_font_is_google</code></p></li>
  105. <li><p><code>code_font_size</code></p></li>
  106. <li><p><code>code_font_url</code></p></li>
  107. <li><p><code>code_highlight_color</code></p></li>
  108. <li><p><code>code_inline_background_color</code></p></li>
  109. <li><p><code>code_inline_color</code></p></li>
  110. <li><p><code>code_inline_font_size</code></p></li>
  111. <li><p><code>extra_css</code></p></li>
  112. <li><p><code>extra_fonts</code></p></li>
  113. <li><p><code>footnote_color</code></p></li>
  114. <li><p><code>footnote_font_size</code></p></li>
  115. <li><p><code>footnote_position_bottom</code></p></li>
  116. <li><p><code>header_background_auto</code></p></li>
  117. <li><p><code>header_background_color</code></p></li>
  118. <li><p><code>header_background_content_padding_top</code></p></li>
  119. <li><p><code>header_background_ignore_classes</code></p></li>
  120. <li><p><code>header_background_padding</code></p></li>
  121. <li><p><code>header_background_text_color</code></p></li>
  122. <li><p><code>header_color</code></p></li>
  123. <li><p><code>header_font_family</code></p></li>
  124. <li><p><code>header_font_google</code></p></li>
  125. <li><p><code>header_font_is_google</code></p></li>
  126. <li><p><code>header_font_url</code></p></li>
  127. <li><p><code>header_font_weight</code></p></li>
  128. <li><p><code>header_h1_font_size</code></p></li>
  129. <li><p><code>header_h2_font_size</code></p></li>
  130. <li><p><code>header_h3_font_size</code></p></li>
  131. <li><p><code>inverse_background_color</code></p></li>
  132. <li><p><code>inverse_header_color</code></p></li>
  133. <li><p><code>inverse_text_color</code></p></li>
  134. <li><p><code>inverse_text_shadow</code></p></li>
  135. <li><p><code>left_column_selected_color</code></p></li>
  136. <li><p><code>left_column_subtle_color</code></p></li>
  137. <li><p><code>link_color</code></p></li>
  138. <li><p><code>padding</code></p></li>
  139. <li><p><code>table_border_color</code></p></li>
  140. <li><p><code>table_row_border_color</code></p></li>
  141. <li><p><code>table_row_even_background_color</code></p></li>
  142. <li><p><code>text_bold_color</code></p></li>
  143. <li><p><code>text_color</code></p></li>
  144. <li><p><code>text_font_base</code></p></li>
  145. <li><p><code>text_font_family</code></p></li>
  146. <li><p><code>text_font_family_fallback</code></p></li>
  147. <li><p><code>text_font_google</code></p></li>
  148. <li><p><code>text_font_is_google</code></p></li>
  149. <li><p><code>text_font_size</code></p></li>
  150. <li><p><code>text_font_url</code></p></li>
  151. <li><p><code>text_font_weight</code></p></li>
  152. <li><p><code>text_slide_number_color</code></p></li>
  153. <li><p><code>text_slide_number_font_size</code></p></li>
  154. <li><p><code>title_slide_background_color</code></p></li>
  155. <li><p><code>title_slide_background_image</code></p></li>
  156. <li><p><code>title_slide_background_position</code></p></li>
  157. <li><p><code>title_slide_background_size</code></p></li>
  158. <li><p><code>title_slide_text_color</code></p></li>
  159. </ul></div>
  160. <div class="section level2">
  161. <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
  162. <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span class="co"># Create a xaringanthemer style in a temporary file for this example</span></span>
  163. <span class="r-in"><span class="va">xaringan_themer_css</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/tempfile.html" class="external-link">tempfile</a></span><span class="op">(</span><span class="st">"xaringan-themer"</span>, fileext <span class="op">=</span> <span class="st">".css"</span><span class="op">)</span></span>
  164. <span class="r-in"></span>
  165. <span class="r-in"><span class="fu"><a href="style_solarized_light.html">style_solarized_light</a></span><span class="op">(</span>outfile <span class="op">=</span> <span class="va">xaringan_themer_css</span><span class="op">)</span></span>
  166. <span class="r-in"></span>
  167. <span class="r-in"><span class="fu">theme_xaringan_get_value</span><span class="op">(</span><span class="st">"text_color"</span><span class="op">)</span></span>
  168. <span class="r-out co"><span class="r-pr">#&gt;</span> [1] "#657b83"</span>
  169. <span class="r-in"><span class="fu">theme_xaringan_get_value</span><span class="op">(</span><span class="st">"background_color"</span><span class="op">)</span></span>
  170. <span class="r-out co"><span class="r-pr">#&gt;</span> [1] "#fdf6e3"</span>
  171. <span class="r-in"><span class="fu">theme_xaringan_get_value</span><span class="op">(</span><span class="st">"header_color"</span><span class="op">)</span></span>
  172. <span class="r-out co"><span class="r-pr">#&gt;</span> [1] "#dc322f"</span>
  173. <span class="r-in"><span class="fu">theme_xaringan_get_value</span><span class="op">(</span><span class="st">"text_bold_color"</span><span class="op">)</span></span>
  174. <span class="r-out co"><span class="r-pr">#&gt;</span> [1] "#d33682"</span>
  175. </code></pre></div>
  176. </div>
  177. </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
  178. </nav></aside></div>
  179. <footer><div class="pkgdown-footer-left">
  180. <p></p><p>Developed by <a href="https://www.garrickadenbuie.com" class="external-link">Garrick Aden-Buie</a>.</p>
  181. </div>
  182. <div class="pkgdown-footer-right">
  183. <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.1.</p>
  184. </div>
  185. </footer></div>
  186. </body></html>