schola_pdf: Schola Empirica PDF Format

View source: R/rmarkdown_output.R

schola_pdfR Documentation

Schola Empirica PDF Format


Function called in the output section of the YAML header (see examples below), instructing knitr to use the standard Schola PDF document format. If you run into any problem using the Czech language, consult this function details first.


  num_format = NULL,
  number_sections = FALSE,
  toc = TRUE,
  template = find_resource("schola_pdf", "schola_template.tex"),
  latex_engine = "xelatex",
  fig_crop = FALSE,
  document_class = "report",



Character, if cs, Czech number formatting is used. Other values are currently ignored and will result in default options.


Logical, TRUE to number headings. Defaults to FALSE.


Logical, TRUE (default) to include a table of contents. The title is set with pandoc variable toc-title in YAML header.


Character, path to the .tex template used by the format. Defaults to standard Schola template bundled in the package. Changes discouraged.


Character, engine used for .md to .pdf conversion. Only xelatex (the default) and lualatex are supported because of custom fonts. Changes discouraged.


logical, whether to crop PDF figures. Defaults to FALSE. Requires the tools pdfcrop and ghostscript to be installed, if TRUE.


Character, one of standard LaTeX document class. Defaults to report. Changes discouraged.


Arguments passed on to rmarkdown::pdf_document


Depth of headers to include in table of contents


Default width (in inches) for figures


TRUE to render figures with captions


Method to be used for printing data frames. Valid values include "default", "kable", "tibble", and "paged". The "default" method uses a corresponding S3 method of print, typically The "kable" method uses the knitr::kable function. The "tibble" method uses the tibble package to print a summary of the data frame. The "paged" method creates a paginated HTML table (note that this method is only valid for formats that produce HTML). In addition to the named methods you can also pass an arbitrary function to be used for printing data frames. You can disable the df_print behavior entirely by setting the option rmarkdown.df_print to FALSE. See Data frame printing section in bookdown book for examples.


Syntax highlighting style passed to Pandoc.

Supported built-in styles include "default", "tango", "pygments", "kate", "monochrome", "espresso", "zenburn", "haddock", and "breezedark".

Two custom styles are also included, "arrow", an accessible color scheme, and "rstudio", which mimics the default IDE theme. Alternatively, supply a path to a ‘⁠.theme⁠’ file to use a custom Pandoc style. Note that custom theme requires Pandoc 2.0+.

Pass NULL to prevent syntax highlighting.


Keep the intermediate tex file used in the conversion to PDF. Note that this argument does not control whether to keep the auxiliary files (e.g., ‘.aux’) generated by LaTeX when compiling ‘.tex’ to ‘.pdf’. To keep these files, you may set options(tinytex.clean = FALSE).


Keep the markdown file generated by knitting.


The LaTeX package to process citations, natbib or biblatex. Use default if neither package is to be used, which means citations will be processed via the command pandoc-citeproc.


Named list of additional content to include within the document (typically created using the includes function).


Markdown extensions to be added or removed from the default definition of R Markdown. See the rmarkdown_format for additional details.


Pandoc extensions to be added or removed from the output format, e.g., "-smart" means the output format will be latex-smart.


Additional command line options to pass to pandoc


A LaTeX dependency latex_dependency(), a list of LaTeX dependencies, a character vector of LaTeX package names (e.g. c("framed", "hyperref")), or a named list of LaTeX package options with the names being package names (e.g. list(hyperef = c("unicode=true", "breaklinks=true"), lmodern = NULL)). It can be used to add custom LaTeX packages to the .tex header.


A modified bookdown::pdf_document2 with the standard Schola formatting.

Package babel hyphenation warning

You may encounter a following warning when your document is being "compiled" to .pdf format:

Warning: Package babel Warning: No hyphenation patterns were preloaded for
Warning: (babel)                the language 'Czech' into the format.
Warning: (babel)                Please, configure your TeX system to add them and
Warning: (babel)                rebuild the format. Now I will use the patterns
Warning: (babel)                preloaded for \language=0 instead on input line 53.

This usually solves by calling tinytex::tlmgr_install("hyphen-czech") (if you are a {tinytex} user).


Jan Netik

See Also

Other Report templates and formats: copy_schola_template(), open_schola_template(), schola_word2(), schola_word()


## Not run: 
# in YAML header ------

## End(Not run)

scholaempirica/reschola documentation built on June 1, 2024, 1:29 p.m.