command: "latexmk -pvc -view=none" does not work for multiple pdf
On https://latex.ti.bfh.ch/doc_gettingStarted/configuration/docker.html#use-docker-compose the recommended docker-compose.yaml
is
version: "3.7"
services:
latex-bfh:
image: registry.gitlab.ti.bfh.ch/bfh-latex/registry/bfh-ci:latest
volumes:
- ${PWD}:/home/bfhlatex/project
working_dir: /home/bfhlatex/project
command: "latexmk -pvc -view=none"
This recommendation will fail [1] for compiling multiple *.tex
files, because the option -pvc
can only work with a single file [2].
I am inclined to propose
version: "3.7"
services:
latex-bfh:
image: registry.gitlab.ti.bfh.ch/bfh-latex/registry/bfh-ci:latest
volumes:
- ${PWD}:/home/bfhlatex/project
working_dir: /home/bfhlatex/project
command: "latexmk"
which works fine for multiple *.tex
files. I think it's a more robust default.
Then again, I am not really sure about the initial motivation for adding -pvc -view=none
[3] Maybe I am missing a relevant use case?
Please consider implementing my suggestion to use command: "latexmk"
as a more robust default.
Kind regards, Benedict
[1]
ben@pax ~/tmp/bfh_git/btm1503_machine_learning_lecture $ docker compose up
[+] Running 1/1
✔ Container btm1503_machine_learning_lecture-latex-bfh-1 Recreated 0.1s
Attaching to btm1503_machine_learning_lecture-latex-bfh-1
btm1503_machine_learning_lecture-latex-bfh-1 | Subroutine eps2pdf redefined at (eval 11) line 18.
btm1503_machine_learning_lecture-latex-bfh-1 | Subroutine makeglossaries redefined at (eval 11) line 29.
btm1503_machine_learning_lecture-latex-bfh-1 | Rc files read:
btm1503_machine_learning_lecture-latex-bfh-1 | /home/bfhlatex/.latexmkrc
btm1503_machine_learning_lecture-latex-bfh-1 | .latexmkrc
btm1503_machine_learning_lecture-latex-bfh-1 | Latexmk: This is Latexmk, John Collins, 31 Jan. 2024. Version 4.83.
btm1503_machine_learning_lecture-latex-bfh-1 |
btm1503_machine_learning_lecture-latex-bfh-1 | Latexmk: Need to specify exactly one filename for preview-continuous mode.
btm1503_machine_learning_lecture-latex-bfh-1 | Since none were specified on the command line, I looked for
btm1503_machine_learning_lecture-latex-bfh-1 | files in '*.tex'.
btm1503_machine_learning_lecture-latex-bfh-1 | But I found 19 files, not 1.
btm1503_machine_learning_lecture-latex-bfh-1 | Use
btm1503_machine_learning_lecture-latex-bfh-1 | latexmk -help
btm1503_machine_learning_lecture-latex-bfh-1 | to get usage information
btm1503_machine_learning_lecture-latex-bfh-1 |
btm1503_machine_learning_lecture-latex-bfh-1 exited with code 10
[2] from man latexmk
-pvc Run a file previewer and continually update the .dvi, .ps,
and/or .pdf files whenever changes are made to source files (see
the Description above). Which of these files is generated and
which is viewed is governed by the other options, and is the
same as for the -pv option. The preview-continuous option -pvc
can only work with one file. So in this case you will normally
only specify one filename on the command line. It is also in‐
compatible with the -p and -pv options, so it turns these op‐
tions off.
[3] from man latexmk
-view=default, -view=dvi, -view=ps, -view=pdf, -view=none
Set the kind of file used when previewing is requested (e.g., by
the -pv or -pvc switches). The default is to view the "highest"
kind of requested file (in the low-to-high order .dvi, .ps,
.pdf).
Note the possibility -view=none where no viewer is opened at
all. One example of is use is in conjunction with the -pvc op‐
tion, when you want latexmk to do a compilation automatically
whenever source file(s) change, but do not want a previewer to
be opened.