From bd22b1ef7ecac86d87590c2fd1b58cb78d3d5a90 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Tue, 23 Dec 2025 13:46:22 +0100 Subject: [PATCH] Update entrypoint --- latex/README.md | 2 +- latex/entrypoint.sh | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/latex/README.md b/latex/README.md index c815767..9f55533 100644 --- a/latex/README.md +++ b/latex/README.md @@ -9,7 +9,7 @@ Build the docker image using ``` You can then run the image using ```bash -docker run --name container-name -v /path/to/latex/build/dir/on/host:/root/data your-image-name:latest ./entrypoint.sh data +docker run --name container-name -v /path/to/latex/build/dir/on/host:/root/data your-image-name:latest ./entrypoint.sh data file.tex false ``` The arguments that can be passed to the container are the following (in order): 1. Extra arguments for `latexmk` (you can also use this to provide the entry file) diff --git a/latex/entrypoint.sh b/latex/entrypoint.sh index 81d40da..2bb7b1d 100755 --- a/latex/entrypoint.sh +++ b/latex/entrypoint.sh @@ -3,9 +3,10 @@ set -e WORKDIR="$1" -INSTALL_HELPERS="$2" -EXTRA_ARGS="$3" -EXTRA_PKGS="$4" +FILE="$2" +INSTALL_HELPERS="$3" +EXTRA_ARGS="$4" +EXTRA_PKGS="$5" if [ -n "$EXTRA_PKGS" ]; then for pkg in $EXTRA_PKGS; do @@ -33,4 +34,4 @@ fi echo "latexmk with extra args $EXTRA_ARGS" -latexmk -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode $EXTRA_ARGS +latexmk -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode $EXTRA_ARGS "$FILE"