Compile a single .tex file
compile_slide.RdCompile a single .tex file
Usage
compile_slide(
slide_file,
pre_clean = TRUE,
post_clean = FALSE,
margin = TRUE,
check_status = TRUE,
verbose = TRUE,
log = FALSE,
method = c("system", "docker", "tinytex"),
...
)Arguments
- slide_file
[character(1)]Name of a (single) slide, with or without.texextension. See examples offind_slide_tex(). Can also be a direct file path to enable use of this function outside rigid folder hierarchy.- pre_clean, post_clean
[TRUE, FALSE]: Runclean_slide()before / after compilation, ensuring a clean slate.- margin
[TRUE]By default renders slides with margin. Otherwise a 4:3 slide is rendered.- check_status
[TRUE]: Wait forlatexmkto finish and return the exit status. Not supported formethod = "tinytex".- verbose
[TRUE]: Print additional output to the console.- log
[FALSE]: Write stdout and stderr logs to./logs/. Not supported formethod = "tinytex".- method
["system"]:"system"useslatexmk_system(), "docker" useslatexmk_docker(), and"tinytex"useslatexmk_tinytex().- ...
For future extension. Currently passed to function invoked via
method.
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.
See also
latexmk_docker() and latexmk_system() for internal compilation methods.
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")
} # }