This function compiles a list of LaTeX (.tex) files using tinytex::latexmk. If no file list is provided, it compiles all .tex files in the current working directory. Note that files that fail to compile will still be included in the results data frame, marked with success = FALSE.

compile_texs(file_list = NULL, clean = TRUE)

Arguments

file_list

A character vector of LaTeX file names to be compiled. If NULL, all .tex files in the working directory will be compiled.

clean

Logical indicating whether to clean auxiliary files after compilation (default is TRUE).

Value

A character vector of files that were unsuccessfully compiled.

Examples

if (FALSE) { # \dontrun{
  failed_files <- compile_texs()
  file_list = list.files(pattern = "^Sta.*tex", ignore.case = TRUE)
  failed_files <- compile_texs(file_list)
} # }