solarizeddocx provides an RMarkdown output format to create a docx file with solarized syntax highlighting. It works by provide custom style files to pandoc.
Currently only the light solarized theme is supported.
You can install the development version of solarizeddocx from GitHub with:
# install.packages("devtools")
devtools::install_github("tjmahr/solarizeddocx")
This format can be used via YAML metadata.
output:
solarizeddocx::document: default
Or explicitly with rmarkdown:
rmarkdown::render(
"README.Rmd",
output_format = solarizeddocx::document()
)
The built-in demo function will render a vignette detailing all of the customizations used by the package.
solarizeddocx::demo_document()
This format’s styling assets can be accessed by the included file_
functions. For example, here is how one could sneak this format’s
solarized theme into an HTML document.
rmarkdown::render(
"README.Rmd",
output_format = rmarkdown::html_document_base(
pandoc_args = rmarkdown::pandoc_highlight_args(
solarizeddocx::file_solarized_light_theme()
)
)
)