Skip to contents

Compile a single .tex file

Usage

compile_slide(
  slide_file,
  pre_clean = TRUE,
  margin = TRUE,
  check_status = TRUE,
  verbose = TRUE,
  log = FALSE
)

Arguments

slide_file

character(1): A single slide .tex file (see examples).

pre_clean

[TRUE]: Run clean_slide() beforehand, ensuring a clean slate.

margin

[TRUE] By default renders slides with margin. Otherwise a 4:3 slide is rendered.

check_status

[TRUE]: Wait for latexmk to finish and return the exit status.

verbose

[TRUE]: Print additional output to the console.

log

[FALSE]: Write stdout and stderr logs to ./logs/.

Value

Invisibly: A list with entries

  • passed: TRUE indicates a successful compilation, FALSE a failure.

  • log: Absolute path to the log file in case of a non-zero exit status.

Examples

if (FALSE) { # \dontrun{
# The "normal" way: A .tex file name
compile_slide("slides-cart-computationalaspects.tex")

# Also acceptable: A full path (absolute or relative), convenient for scripts
compile_slide("lecture_advml/slides/gaussian-processes/slides-gp-bayes-lm.tex")

# Lazy way: No extension, just a name
compile_slide("slides-cart-predictions")
} # }