chiaro_pdf: A format for article classes

Description Usage Arguments Details Value Examples

Description

This format is meant to supply only the TikZ-wrangling features of the package and to set up reasonable further defaults for an article rather than a presentation. For slides that use scuro's font and figure-drawing setup but not its color scheme, use scuro_md but with format option scuro=FALSE. For an article, rmarkdown's built-in render is flexible enough to handle all the processing from R markdown to PDF, including citation processing where needed. Simply set output: scuro::chiaro_pdf in your YAML header. The package includes an R markdown template demonstrating this format as well.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
chiaro_pdf(
  fig_width = 4,
  fig_height = 2,
  fig_crop = TRUE,
  fig_caption = TRUE,
  dev = "tikz",
  highlight = "default",
  keep_tex = TRUE,
  citation_package = c("default", "biblatex"),
  latex_engine = "xelatex",
  plot_font = "mainfont",
  plot_font_options = NULL,
  pandoc_args = NULL,
  ...
)

Arguments

fig_width

Natural figure width in inches. This is rescaled according to the value of chunk option out.width (by default, configured to use the natural width or the textwidth, whichever is smaller).

fig_height

Natural figure height in inches. fig_width/fig_height is the aspect ratio of the graphic.

fig_crop

Apply pdfcrop? Set by default.

dev

graphics device (tikz) by default.

latex_engine

xelatex by default

plot_font

If both XeLaTeX and TikZ are used, the package will set the font in graphics. Any system font name can be given. The default value mainfont selects the document main font.

plot_font_options

fontspec options for the plot_font.

...

remaining arguments (e.g. include) are passed on to pdf_document, which is the base of this format.

Details

Among defaults selected here, of particular note are centering alignment for figures, a black-and-white ggplot theme, and stop-on-error. Errors, warnings, and messages will all go to the console, not into the final document. The intermediate LaTeX file will also be kept, as this is often necessary to diagnose typesetting errors.

Additional typesetting customizations are as described in https://github.com/agoldst/memarticle (the underlying pandoc template).

Value

An R Markdown format suitable for rendering.

Examples

1
2
3
4
5
6
## Not run: 
# create article from the included template
rmarkdown::draft("my-essay", "article", "scuro", edit=F)
system("make -C my-essay") # a Makefile is supplied

## End(Not run)

agoldst/scuro documentation built on Nov. 5, 2021, 3:44 a.m.