knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(dplyr) library(officer)
As explained in section 3.4 of R Markdown: The Definitive Guide, the first step in creating a reference document is to produce a .docx file using rmarkdown or Pandoc. The formatting and layout of this document can then be edited and saved. The resulting reference document is then used in the YAML metadata of each R Markdown file.
This vignette is intended to track all the changes made to the rub_reference.docx file, so that these changes are reproducible and documented.
We can use officer::styles_info
to extract all custom styles defined in the reference document:
reference_docx <- system.file( "rmarkdown", "templates", "datenreport-2022", "skeleton", "rub_reference_2021.docx", package = "RUBer" ) x <- officer::read_docx( reference_docx ) x %>% officer::styles_info() %>% dplyr::filter( is_custom ) %>% dplyr::arrange( style_type, style_name ) %>% head(50L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.