😎 Give your xaringan slides some style
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

431 line
19KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/style_mono_accent.R
  3. \name{style_mono_accent}
  4. \alias{style_mono_accent}
  5. \title{Monotone Accent Theme}
  6. \usage{
  7. style_mono_accent(
  8. base_color = "#43418A",
  9. white_color = "#FFFFFF",
  10. black_color = "#272822",
  11. text_color = black_color,
  12. header_color = base_color,
  13. background_color = white_color,
  14. link_color = base_color,
  15. text_bold_color = base_color,
  16. text_slide_number_color = base_color,
  17. padding = "16px 64px 16px 64px",
  18. background_image = NULL,
  19. background_size = NULL,
  20. background_position = NULL,
  21. code_highlight_color = "rgba(255,255,0,0.5)",
  22. code_inline_color = base_color,
  23. code_inline_background_color = NULL,
  24. code_inline_font_size = "1em",
  25. inverse_background_color = base_color,
  26. inverse_text_color = white_color,
  27. inverse_text_shadow = FALSE,
  28. inverse_header_color = white_color,
  29. title_slide_text_color = inverse_text_color,
  30. title_slide_background_color = inverse_background_color,
  31. title_slide_background_image = NULL,
  32. title_slide_background_size = NULL,
  33. title_slide_background_position = NULL,
  34. footnote_color = NULL,
  35. footnote_font_size = "0.9em",
  36. footnote_position_bottom = "60px",
  37. left_column_subtle_color = apply_alpha(base_color, 0.6),
  38. left_column_selected_color = base_color,
  39. blockquote_left_border_color = apply_alpha(base_color, 0.5),
  40. table_border_color = "#666",
  41. table_row_border_color = "#ddd",
  42. table_row_even_background_color = lighten_color(base_color, 0.8),
  43. base_font_size = "20px",
  44. text_font_size = "1rem",
  45. header_h1_font_size = "2.75rem",
  46. header_h2_font_size = "2.25rem",
  47. header_h3_font_size = "1.75rem",
  48. header_background_auto = FALSE,
  49. header_background_color = header_color,
  50. header_background_text_color = background_color,
  51. header_background_padding = NULL,
  52. header_background_content_padding_top = "7rem",
  53. header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"),
  54. text_slide_number_font_size = "0.9em",
  55. text_font_google = NULL,
  56. text_font_family = "Noto Sans",
  57. text_font_weight = "normal",
  58. text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
  59. text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
  60. text_font_base = "sans-serif",
  61. header_font_google = NULL,
  62. header_font_family = "Cabin",
  63. header_font_weight = "600",
  64. header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
  65. code_font_google = NULL,
  66. code_font_family = "Source Code Pro",
  67. code_font_size = "0.9rem",
  68. code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
  69. code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
  70. colors = NULL,
  71. extra_css = NULL,
  72. extra_fonts = NULL,
  73. outfile = "xaringan-themer.css"
  74. )
  75. }
  76. \arguments{
  77. \item{base_color}{Monotone Base Color, works best with a strong color.
  78. Defaults to #43418A. Used in multiple CSS rules. The value of this
  79. variable is also stored as a CSS variable that can be referenced with
  80. \code{var(--base)} in any argument of a style function or in custom CSS.}
  81. \item{white_color}{Brightest color used. Defaults to #FFFFFF. Used in
  82. multiple CSS rules. The value of this variable is also stored as a CSS
  83. variable that can be referenced with \code{var(--white)} in any argument of a
  84. style function or in custom CSS.}
  85. \item{black_color}{Darkest color used. Defaults to #272822. Used in multiple
  86. CSS rules. The value of this variable is also stored as a CSS variable
  87. that can be referenced with \code{var(--black)} in any argument of a style
  88. function or in custom CSS.}
  89. \item{text_color}{Text Color. Defaults to \code{black_color}. Modifies the \code{body}
  90. element. The value of this variable is also stored as a CSS variable that
  91. can be referenced with \code{var(--text_color)} in any argument of a style
  92. function or in custom CSS.}
  93. \item{header_color}{Header Color. Defaults to \code{base_color}. Modifies the
  94. \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
  95. variable that can be referenced with \code{var(--header-color)} in any argument
  96. of a style function or in custom CSS.}
  97. \item{background_color}{Slide Background Color. Defaults to \code{white_color}.
  98. Modifies the \code{.remark-slide-content} class. The value of this variable is
  99. also stored as a CSS variable that can be referenced with
  100. \code{var(--background-color)} in any argument of a style function or in custom
  101. CSS.}
  102. \item{link_color}{Link Color. Defaults to \code{base_color}. Modifies the
  103. \verb{a, a > code} elements. The value of this variable is also stored as a CSS
  104. variable that can be referenced with \code{var(--link-color)} in any argument
  105. of a style function or in custom CSS.}
  106. \item{text_bold_color}{Bold Text Color. Defaults to \code{base_color}. Modifies
  107. the \code{strong} element. The value of this variable is also stored as a CSS
  108. variable that can be referenced with \code{var(--text-bold-color)} in any
  109. argument of a style function or in custom CSS.}
  110. \item{text_slide_number_color}{Slide Number Color. Defaults to \code{base_color}.
  111. Modifies the \code{.remark-slide-number} class.}
  112. \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults
  113. to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class.}
  114. \item{background_image}{Background image applied to each \emph{and every} slide.
  115. Set \code{title_slide_background_image = "none"} to remove the background image
  116. from the title slide. Defaults to \code{NULL}. Modifies the
  117. \code{.remark-slide-content} class.}
  118. \item{background_size}{Background image size, requires \code{background_image} to
  119. be set. If \code{background_image} is set, \code{background_size} will default to
  120. \code{cover} so the backround fills the screen. If both \code{background_image} and
  121. \code{background_position} are set, will default to 100 percent. Defaults to
  122. \code{NULL}. Modifies the \code{.remark-slide-content} class.}
  123. \item{background_position}{Background image position, requires
  124. \code{background_image} to be set, and it is recommended to adjust
  125. \code{background_size}. Defaults to \code{NULL}. Modifies the
  126. \code{.remark-slide-content} class.}
  127. \item{code_highlight_color}{Code Line Highlight. Defaults to
  128. rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class.
  129. The value of this variable is also stored as a CSS variable that can be
  130. referenced with \code{var(--code-highlight-color)} in any argument of a style
  131. function or in custom CSS.}
  132. \item{code_inline_color}{Inline Code Color. Defaults to \code{base_color}.
  133. Modifies the \code{.remark-inline-code} class.}
  134. \item{code_inline_background_color}{Inline Code Background Color. Defaults
  135. to \code{NULL}. Modifies the \code{.remark-inline-code} class.}
  136. \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em.
  137. Modifies the \code{.remark-inline-code} class. The value of this variable is
  138. also stored as a CSS variable that can be referenced with
  139. \code{var(--code-inline-font-size)} in any argument of a style function or in
  140. custom CSS.}
  141. \item{inverse_background_color}{Inverse Background Color. Defaults to
  142. \code{base_color}. Modifies the \code{.inverse} class. The value of this variable is
  143. also stored as a CSS variable that can be referenced with
  144. \code{var(--inverse-background-color)} in any argument of a style function or
  145. in custom CSS.}
  146. \item{inverse_text_color}{Inverse Text Color. Defaults to \code{white_color}.
  147. Modifies the \code{.inverse} class. The value of this variable is also stored
  148. as a CSS variable that can be referenced with \code{var(--inverse-text-color)}
  149. in any argument of a style function or in custom CSS.}
  150. \item{inverse_text_shadow}{Enables Shadow on text of inverse slides.
  151. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.}
  152. \item{inverse_header_color}{Inverse Header Color. Defaults to \code{white_color}.
  153. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of
  154. this variable is also stored as a CSS variable that can be referenced with
  155. \code{var(--inverse-header-color)} in any argument of a style function or in
  156. custom CSS.}
  157. \item{title_slide_text_color}{Title Slide Text Color. Defaults to
  158. \code{inverse_text_color}. Modifies the \code{.title-slide} class. The value of this
  159. variable is also stored as a CSS variable that can be referenced with
  160. \code{var(--title-slide-text-color)} in any argument of a style function or in
  161. custom CSS.}
  162. \item{title_slide_background_color}{Title Slide Background Color. Defaults
  163. to \code{inverse_background_color}. Modifies the \code{.title-slide} class. The
  164. value of this variable is also stored as a CSS variable that can be
  165. referenced with \code{var(--title-slide-background-color)} in any argument of a
  166. style function or in custom CSS.}
  167. \item{title_slide_background_image}{Title Slide Background Image URL.
  168. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.}
  169. \item{title_slide_background_size}{Title Slide Background Image Size,
  170. defaults to "cover" if background image is set. Defaults to \code{NULL}.
  171. Modifies the \code{.title-slide} class.}
  172. \item{title_slide_background_position}{Title Slide Background Image
  173. Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.}
  174. \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same
  175. color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote}
  176. class.}
  177. \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies
  178. the \code{.footnote} class.}
  179. \item{footnote_position_bottom}{Footnote location from bottom of screen.
  180. Defaults to 60px. Modifies the \code{.footnote} class.}
  181. \item{left_column_subtle_color}{Left Column Text (not last). Defaults to
  182. \code{apply_alpha(base_color, 0.6)}. Modifies the
  183. \verb{.left-column h2, .left-column h3} classes.}
  184. \item{left_column_selected_color}{Left Column Current Selection. Defaults to
  185. \code{base_color}. Modifies the
  186. \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.}
  187. \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults
  188. to \code{apply_alpha(base_color, 0.5)}. Modifies the \code{blockquote} element.}
  189. \item{table_border_color}{Table top/bottom border. Defaults to #666.
  190. Modifies the \verb{table: border-top, border-bottom} elements.}
  191. \item{table_row_border_color}{Table row inner bottom border. Defaults to
  192. #ddd. Modifies the \verb{table thead th: border-bottom} elements.}
  193. \item{table_row_even_background_color}{Table Even Row Background Color.
  194. Defaults to \code{lighten_color(base_color, 0.8)}. Modifies the
  195. \verb{thead, tfoot, tr:nth-child(even)} elements.}
  196. \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}).
  197. Defaults to 20px. Modifies the \code{html} element. The value of this variable
  198. is also stored as a CSS variable that can be referenced with
  199. \code{var(--base-font-size)} in any argument of a style function or in custom
  200. CSS.}
  201. \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies
  202. the \code{.remark-slide-content} class. The value of this variable is also
  203. stored as a CSS variable that can be referenced with
  204. \code{var(--text-font-size)} in any argument of a style function or in custom
  205. CSS.}
  206. \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem.
  207. Modifies the \verb{.remark-slide-content h1} class. The value of this variable
  208. is also stored as a CSS variable that can be referenced with
  209. \code{var(--header-h1-font-size)} in any argument of a style function or in
  210. custom CSS.}
  211. \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem.
  212. Modifies the \verb{.remark-slide-content h2} class. The value of this variable
  213. is also stored as a CSS variable that can be referenced with
  214. \code{var(--header-h2-font-size)} in any argument of a style function or in
  215. custom CSS.}
  216. \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem.
  217. Modifies the \verb{.remark-slide-content h3} class. The value of this variable
  218. is also stored as a CSS variable that can be referenced with
  219. \code{var(--header-h3-font-size)} in any argument of a style function or in
  220. custom CSS.}
  221. \item{header_background_auto}{Add background under slide title automatically
  222. for h1 header elements. If not enabled, use \code{class: header_background} to
  223. enable. Defaults to \code{FALSE}.}
  224. \item{header_background_color}{Background Color for h1 Header with
  225. Background. Defaults to \code{header_color}. Modifies the
  226. \verb{.remark-slide-content h1} class. The value of this variable is also
  227. stored as a CSS variable that can be referenced with
  228. \code{var(--header-background-color)} in any argument of a style function or in
  229. custom CSS.}
  230. \item{header_background_text_color}{Text Color for h1 Header with
  231. Background. Defaults to \code{background_color}. Modifies the
  232. \verb{.remark-slide-content h1} class. The value of this variable is also
  233. stored as a CSS variable that can be referenced with
  234. \code{var(--header-background-text-color)} in any argument of a style function
  235. or in custom CSS.}
  236. \item{header_background_padding}{Padding for h1 Header with Background.
  237. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class.}
  238. \item{header_background_content_padding_top}{Top Padding for Content in
  239. Slide with Header with Background. Defaults to 7rem. Modifies the
  240. \code{.remark-slide-content} class.}
  241. \item{header_background_ignore_classes}{Slide Classes Where Header with
  242. Background will not be Applied. Defaults to
  243. \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the
  244. \code{.remark-slide-content} class.}
  245. \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to
  246. 0.9em. Modifies the \code{.remark-slide-number} class.}
  247. \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults
  248. to \code{NULL}. Modifies the \code{body} element.}
  249. \item{text_font_family}{Body Text Font Family (xaringan default is
  250. \code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
  251. value of this variable is also stored as a CSS variable that can be
  252. referenced with \code{var(--text-font-family)} in any argument of a style
  253. function or in custom CSS.}
  254. \item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
  255. the \code{body} element.}
  256. \item{text_font_url}{Body Text Font URL(s). Defaults to
  257. https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
  258. Modifies the \verb{@import url()} elements.}
  259. \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
  260. -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
  261. helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
  262. element. The value of this variable is also stored as a CSS variable that
  263. can be referenced with \code{var(--text-font-family-fallback)} in any argument
  264. of a style function or in custom CSS.}
  265. \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
  266. to sans-serif. Modifies the \code{body} element. The value of this variable is
  267. also stored as a CSS variable that can be referenced with
  268. \code{var(--text-font-base)} in any argument of a style function or in custom
  269. CSS.}
  270. \item{header_font_google}{Use \code{google_font()} to specify header font.
  271. Defaults to \code{NULL}. Modifies the \code{body} element.}
  272. \item{header_font_family}{Header Font Family (xaringan default is
  273. \code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
  274. elements. The value of this variable is also stored as a CSS variable that
  275. can be referenced with \code{var(--header-font-family)} in any argument of a
  276. style function or in custom CSS.}
  277. \item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
  278. \verb{h1, h2, h3} elements.}
  279. \item{header_font_url}{Header Font URL. Defaults to
  280. https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
  281. Modifies the \verb{@import url} elements.}
  282. \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
  283. to \code{NULL}. Modifies the \code{body} element.}
  284. \item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
  285. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
  286. this variable is also stored as a CSS variable that can be referenced with
  287. \code{var(--code-font-family)} in any argument of a style function or in custom
  288. CSS.}
  289. \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the
  290. \code{.remark-inline} class. The value of this variable is also stored as a CSS
  291. variable that can be referenced with \code{var(--code-font-size)} in any
  292. argument of a style function or in custom CSS.}
  293. \item{code_font_url}{Code Font URL. Defaults to
  294. https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
  295. Modifies the \verb{@import url} elements.}
  296. \item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
  297. Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
  298. \verb{.remark-code, .remark-inline-code} classes.}
  299. \item{colors}{A named vector of custom colors. The names of the colors
  300. become CSS variables and classes that can be used within your slides.
  301. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable
  302. \code{--blue}, a \code{.blue} CSS class that applies the color to the text or
  303. foreground color, and a \code{.bg-blue} CSS class that applies the color
  304. to the background.}
  305. \item{extra_css}{A named list of CSS definitions each containing a named list
  306. of CSS property-value pairs, i.e.
  307. \code{list(".class-id" = list("css-property" = "value"))}.}
  308. \item{extra_fonts}{A list of additional fonts to import, each list element
  309. can be either a URL as a character string or a call to
  310. \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you
  311. will need to write custom CSS rules that apply the font to an element or
  312. class with the \code{font-family} property. See the \strong{Fonts} section of
  313. \code{vignette("xaringanthemer")} for an example.}
  314. \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
  315. }
  316. \description{
  317. The default xaringan theme with a single color used for color
  318. accents on select elements (headers, bold text, etc.).
  319. }
  320. \section{Usage}{
  321. To use the styles created by this theme function, make sure
  322. that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML
  323. header. If you change the name of the output file using the \code{outfile}
  324. argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output:
  325. xaringan::moon_reader:
  326. css: xaringan-themer.css`
  327. }\if{html}{\out{</div>}}
  328. }
  329. \examples{
  330. # Create a xaringan style in a temporary file
  331. xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css")
  332. style_mono_accent(
  333. base_color = "#43418A",
  334. outfile = xaringan_themer_css # omit in your slides to write the
  335. # styles to xaringan-themer.css
  336. )
  337. # View the CSS:
  338. # file.edit(xaringan_themer_css)
  339. }
  340. \seealso{
  341. Other themes:
  342. \code{\link{style_duo_accent_inverse}()},
  343. \code{\link{style_duo_accent}()},
  344. \code{\link{style_duo}()},
  345. \code{\link{style_mono_accent_inverse}()},
  346. \code{\link{style_mono_dark}()},
  347. \code{\link{style_mono_light}()},
  348. \code{\link{style_solarized_dark}()},
  349. \code{\link{style_solarized_light}()},
  350. \code{\link{style_xaringan}()}
  351. Other Monotone themes:
  352. \code{\link{style_mono_accent_inverse}()},
  353. \code{\link{style_mono_dark}()},
  354. \code{\link{style_mono_light}()}
  355. }
  356. \concept{Monotone themes}
  357. \concept{themes}