Clean output for a single .tex file
clean_slide.RdUses latexmk -C <slide_file>, also removing the PDF file.
Uses latexmk -c <slide_file> to keep the PDF file.
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.- keep_pdf
 [FALSE]: Keep the PDF file.- verbose
 [TRUE]: Print additional output to the console.- check_status
 [TRUE]: Wait forlatexmkto finish and return the exit status. Not supported formethod = "tinytex".
Value
Invisibly:
If
check_status,TRUEif the exit code is 0,FALSEotherwise.If
check_statusisFALSE,NULLis returned.
Examples
if (FALSE) { # \dontrun{
# Create the PDF
compile_slide("slides-cart-computationalaspects.tex")
# Remove the PDF and other output
clean_slide("slides-cart-computationalaspects.tex")
} # }