Individual R Markdown PDF Templates.
indiedown allows you to generate a customized R Markdown PDF template in a few basic steps.
Goals and non-goals
indiedown aims to:
- turn a corporate design into an installable R package:
create_indiedown_package()writes a skeleton whose template then shows up in RStudio’s template list - apply that design on top of the default
.textemplate of Pandoc, which should keep it compliant with future releases of Pandoc and R Markdown - keep the customization points few and documented:
default.yamlfor Pandoc options,preamble.texfor LaTeX settings, andpre_processor.Rfor dynamic adjustments - keep corporate design elements, such as a title page, as R functions that produce LaTeX code
- download and wire up Google fonts for a template with
use_indiedown_gfonts()
It is explicitly not trying to:
- replace the default
.textemplate of Pandoc: every modification is applied on top of it - be a template itself:
create_indiedown_package()produces a skeleton, and the design and the resulting package are yours - produce output other than PDF: the generated output format passes its arguments on to
rmarkdown::pdf_document() - set up your LaTeX toolchain:
dr_down()reports which engines your machine can compile with, it does not install anything
Start by installing indiedown:
install.packages("indiedown")You can also install the development version from GitHub:
# install.packages("devtools")
devtools::install_github("cynkra/indiedown")To create your own customized R Markdown template, start by creating an indiedown template package, called mydown in this example. Navigate to the directory where you want to create the package, then:
indiedown::create_indiedown_package("mydown")This creates a package skeleton in the new mydown directory in the current working directory. You can build mydown, using “Build and Reload” in the RStudio or via the command line, as follows:
devtools::install("mydown")With mydown built and installed, our new template is available in RStudio (after a restart).
- Read more at
vignette("indiedown"). - See
vignette("walkthrough")for a step by step guide to customization. - See
vignette("customize")for advanced customization.