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

188 lines
13KB

  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"><title>Get the Value of xaringanthemer Style Setting — theme_xaringan_get_value • xaringanthemer</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><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.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/IBM_Plex_Mono-0.4.10/font.css" rel="stylesheet"><link href="../deps/Outfit-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></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 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."><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"></head><body>
  5. <a href="#main" class="visually-hidden-focusable">Skip to contents</a>
  6. <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container">
  7. <a class="navbar-brand me-2" href="../index.html">xaringanthemer</a>
  8. <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Released version">0.4.4</small>
  9. <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
  10. <span class="navbar-toggler-icon"></span>
  11. </button>
  12. <div id="navbar" class="collapse navbar-collapse ms-3">
  13. <ul class="navbar-nav me-auto"><li class="nav-item"><a class="nav-link" href="../articles/xaringanthemer.html">Features</a></li>
  14. <li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li>
  15. <li class="nav-item dropdown">
  16. <button class="nav-link dropdown-toggle" type="button" id="dropdown-themes" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Themes</button>
  17. <ul class="dropdown-menu" aria-labelledby="dropdown-themes"><li><h6 class="dropdown-header" data-toc-skip>Themes</h6></li>
  18. <li><a class="dropdown-item" href="../articles/themes.html">Slide Themes</a></li>
  19. <li><a class="dropdown-item" href="../articles/ggplot2-themes.html">ggplot2 Themes</a></li>
  20. <li><hr class="dropdown-divider"></li>
  21. <li><h6 class="dropdown-header" data-toc-skip>More Customization</h6></li>
  22. <li><a class="dropdown-item" href="../articles/fonts.html">Fonts</a></li>
  23. <li><a class="dropdown-item" href="../articles/template-variables.html">Template Variables</a></li>
  24. </ul></li>
  25. </ul><ul class="navbar-nav"><li class="nav-item dropdown">
  26. <button class="nav-link dropdown-toggle" type="button" id="dropdown-" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true"><span class="fa far fa-newspaper fa-lg"></span> </button>
  27. <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdown-"><li><a class="external-link dropdown-item" href="https://garrickadenbuie.com/blog/xaringanthemer-v0-3-0/">xaringanthemer 0.3.0</a></li>
  28. <li><hr class="dropdown-divider"></li>
  29. <li><a class="dropdown-item" href="../news/index.html">Changelog</a></li>
  30. </ul></li>
  31. <li class="nav-item"><a class="external-link nav-link" href="https://github.com/gadenbuie/xaringanthemer"><span class="fa fab fa-github fa-lg"></span></a></li>
  32. <li class="nav-item"><a class="external-link nav-link" href="https://twitter.com/grrrck"><span class="fa fab fa-twitter fa-lg"></span></a></li>
  33. <li class="nav-item"><a class="external-link nav-link" href="https://www.garrickadenbuie.com"><span class="fa fas fa-home fa-lg"></span></a></li>
  34. </ul></div>
  35. </div>
  36. </nav><div class="container template-reference-topic">
  37. <div class="row">
  38. <main id="main" class="col-md-9"><div class="page-header">
  39. <img src="../logo.png" class="logo" alt=""><h1>Get the Value of xaringanthemer Style Setting</h1>
  40. <small class="dont-index">Source: <a href="https://github.com/gadenbuie/xaringanthemer/blob/main/R/ggplot2.R" class="external-link"><code>R/ggplot2.R</code></a></small>
  41. <div class="d-none name"><code>theme_xaringan_get_value.Rd</code></div>
  42. </div>
  43. <div class="ref-description section level2">
  44. <p>A helper function to retrieve the value of style settings as set by a
  45. xaringanthemer style function, for use in plotting and other circumstances.</p>
  46. </div>
  47. <div class="section level2">
  48. <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
  49. <div class="sourceCode"><pre class="sourceCode r"><code><span><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></span></code></pre></div>
  50. </div>
  51. <div class="section level2">
  52. <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
  53. <dl><dt id="arg-setting">setting<a class="anchor" aria-label="anchor" href="#arg-setting"></a></dt>
  54. <dd><p>A xaringanthemer style setting</p></dd>
  55. <dt id="arg-css-file">css_file<a class="anchor" aria-label="anchor" href="#arg-css-file"></a></dt>
  56. <dd><p>Path to a <span class="pkg">xaringanthemer</span> CSS file, from which the
  57. theme variables and values will be inferred. In general, if you use the
  58. <span class="pkg">xaringathemer</span> defaults, you will not need to set this. This feature
  59. lets you create a <span class="pkg">ggplot2</span> theme for your <span class="pkg">xaringan</span> slides, even
  60. if you have only saved your theme CSS file and you aren't creating your
  61. CSS theme with <span class="pkg">xaringanthemer</span> in your slides' source file.</p></dd>
  62. </dl></div>
  63. <div class="section level2">
  64. <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
  65. <p>The value of the xaringanthemer style parameter.</p>
  66. </div>
  67. <div class="section level2">
  68. <h2 id="style-settings">Style Settings<a class="anchor" aria-label="anchor" href="#style-settings"></a></h2>
  69. <p>Style settings used by xaringanthemer include:</p><ul><li><p><code>background_color</code></p></li>
  70. <li><p><code>background_image</code></p></li>
  71. <li><p><code>background_position</code></p></li>
  72. <li><p><code>background_size</code></p></li>
  73. <li><p><code>blockquote_left_border_color</code></p></li>
  74. <li><p><code>code_font_family</code></p></li>
  75. <li><p><code>code_font_family_fallback</code></p></li>
  76. <li><p><code>code_font_google</code></p></li>
  77. <li><p><code>code_font_is_google</code></p></li>
  78. <li><p><code>code_font_size</code></p></li>
  79. <li><p><code>code_font_url</code></p></li>
  80. <li><p><code>code_highlight_color</code></p></li>
  81. <li><p><code>code_inline_background_color</code></p></li>
  82. <li><p><code>code_inline_color</code></p></li>
  83. <li><p><code>code_inline_font_size</code></p></li>
  84. <li><p><code>extra_css</code></p></li>
  85. <li><p><code>extra_fonts</code></p></li>
  86. <li><p><code>footnote_color</code></p></li>
  87. <li><p><code>footnote_font_size</code></p></li>
  88. <li><p><code>footnote_position_bottom</code></p></li>
  89. <li><p><code>header_background_auto</code></p></li>
  90. <li><p><code>header_background_color</code></p></li>
  91. <li><p><code>header_background_content_padding_top</code></p></li>
  92. <li><p><code>header_background_ignore_classes</code></p></li>
  93. <li><p><code>header_background_padding</code></p></li>
  94. <li><p><code>header_background_text_color</code></p></li>
  95. <li><p><code>header_color</code></p></li>
  96. <li><p><code>header_font_family</code></p></li>
  97. <li><p><code>header_font_google</code></p></li>
  98. <li><p><code>header_font_is_google</code></p></li>
  99. <li><p><code>header_font_url</code></p></li>
  100. <li><p><code>header_font_weight</code></p></li>
  101. <li><p><code>header_h1_font_size</code></p></li>
  102. <li><p><code>header_h2_font_size</code></p></li>
  103. <li><p><code>header_h3_font_size</code></p></li>
  104. <li><p><code>inverse_background_color</code></p></li>
  105. <li><p><code>inverse_header_color</code></p></li>
  106. <li><p><code>inverse_text_color</code></p></li>
  107. <li><p><code>inverse_text_shadow</code></p></li>
  108. <li><p><code>left_column_selected_color</code></p></li>
  109. <li><p><code>left_column_subtle_color</code></p></li>
  110. <li><p><code>link_color</code></p></li>
  111. <li><p><code>padding</code></p></li>
  112. <li><p><code>table_border_color</code></p></li>
  113. <li><p><code>table_row_border_color</code></p></li>
  114. <li><p><code>table_row_even_background_color</code></p></li>
  115. <li><p><code>text_bold_color</code></p></li>
  116. <li><p><code>text_color</code></p></li>
  117. <li><p><code>text_font_base</code></p></li>
  118. <li><p><code>text_font_family</code></p></li>
  119. <li><p><code>text_font_family_fallback</code></p></li>
  120. <li><p><code>text_font_google</code></p></li>
  121. <li><p><code>text_font_is_google</code></p></li>
  122. <li><p><code>text_font_size</code></p></li>
  123. <li><p><code>text_font_url</code></p></li>
  124. <li><p><code>text_font_weight</code></p></li>
  125. <li><p><code>text_slide_number_color</code></p></li>
  126. <li><p><code>text_slide_number_font_size</code></p></li>
  127. <li><p><code>title_slide_background_color</code></p></li>
  128. <li><p><code>title_slide_background_image</code></p></li>
  129. <li><p><code>title_slide_background_position</code></p></li>
  130. <li><p><code>title_slide_background_size</code></p></li>
  131. <li><p><code>title_slide_text_color</code></p></li>
  132. </ul></div>
  133. <div class="section level2">
  134. <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
  135. <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># Create a xaringanthemer style in a temporary file for this example</span></span></span>
  136. <span class="r-in"><span><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></span>
  137. <span class="r-in"><span></span></span>
  138. <span class="r-in"><span><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></span>
  139. <span class="r-in"><span></span></span>
  140. <span class="r-in"><span><span class="fu">theme_xaringan_get_value</span><span class="op">(</span><span class="st">"text_color"</span><span class="op">)</span></span></span>
  141. <span class="r-out co"><span class="r-pr">#&gt;</span> [1] "#657b83"</span>
  142. <span class="r-in"><span><span class="fu">theme_xaringan_get_value</span><span class="op">(</span><span class="st">"background_color"</span><span class="op">)</span></span></span>
  143. <span class="r-out co"><span class="r-pr">#&gt;</span> [1] "#fdf6e3"</span>
  144. <span class="r-in"><span><span class="fu">theme_xaringan_get_value</span><span class="op">(</span><span class="st">"header_color"</span><span class="op">)</span></span></span>
  145. <span class="r-out co"><span class="r-pr">#&gt;</span> [1] "#dc322f"</span>
  146. <span class="r-in"><span><span class="fu">theme_xaringan_get_value</span><span class="op">(</span><span class="st">"text_bold_color"</span><span class="op">)</span></span></span>
  147. <span class="r-out co"><span class="r-pr">#&gt;</span> [1] "#d33682"</span>
  148. </code></pre></div>
  149. </div>
  150. </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
  151. </nav></aside></div>
  152. <footer><div class="pkgdown-footer-left">
  153. <p>Developed by <a href="https://www.garrickadenbuie.com" class="external-link">Garrick Aden-Buie</a>.</p>
  154. </div>
  155. <div class="pkgdown-footer-right">
  156. <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.3.</p>
  157. </div>
  158. </footer></div>
  159. <script src="../doc-versions.js"></script></body></html>