Run dockerized latexmk
latexmk_docker.Rd
This uses the docker image from https://gitlab.com/islandoftex/images/texlive.
The default uses tag TL2023-historic
for TeXLive 2023.
Usage
latexmk_docker(
slide_file,
verbose = TRUE,
tag = "TL2023-historic",
log_stdout = "",
log_stderr = "",
supervise = TRUE
)
Arguments
- slide_file
[character(1)]
Name of a (single) slide, with or without.tex
extension. See examples offind_slide_tex()
.- verbose
[TRUE]
: Print output fromdocker
/latexmk
to console.- tag
["TL2023-historic"]
: Tag oftexlive
docker image to use.- log_stdout, log_stderr
[""]
: Path to write stdout/stderr log to. Discared ifNULL
or inherited from main R process if""
.stderr
can be redirected tostdout
with"2>&1"
.- supervise
[TRUE]
: Passed toprocessx::process()
's$new()
.
Value
A processx::process()
object.
Details
You will need to install docker or podman or some other compatible runtime on your system beforehand.
The docker command run by this is equivalent to something like
cd path/to/lecture_i2ml/slides/ml-basics
CWD=$(basename ${PWD})
LECTURE=$(dirname $(dirname ${PWD}))
docker run -i --rm --user $(id -u) --name latex \
-v "${LECTURE}":/usr/src/app:z \
-w "/usr/src/app/slides/${CWD}" \
registry.gitlab.com/islandoftex/images/texlive:TL2023-historic \
latexmk -pdf -halt-on-error slides-basics-data.tex
Note
This utility is usually invoked by compile_slide()
.