R/utils.R
create_tempdir_for_latex.Rd
Creates a temporary directory for compiling the latex file with latex commands for a csasdown type
create_tempdir_for_latex(
type = NULL,
where = "r",
tmp_dir = NULL,
root_dir = here::here()
)
The csasdown document type. See draft()
Where to look for the tex file. If "r", look in root directory, if "b", look in the _book subdirectory. Any other value will cause an error
A temporary directory. If NULL, once will be created in the filesystem using tempdir()
A directory where everything will be copied from
The temporary directory's full path
The compiled tex file will be copied from either the root directory or the _book directory, depending
on the value of where
. The necessary directories knitr-figs-pdf, knitr-figs-word, knitr-cache-pdf, and
knitr-cache-word will be copied recursively into the temporary directory, preserving the directory structure
necessary for the build.