| #!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| set -euo pipefail
|
| cd "$(dirname "$0")/.."
|
|
|
| PY="${PYTHON:-python}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| cd report
|
|
|
| if command -v latexmk >/dev/null 2>&1; then
|
| latexmk -pdf -interaction=nonstopmode report.tex
|
| latexmk -c
|
| elif command -v tectonic >/dev/null 2>&1; then
|
| tectonic report.tex
|
| elif command -v pdflatex >/dev/null 2>&1; then
|
|
|
| pdflatex -interaction=nonstopmode report.tex
|
| pdflatex -interaction=nonstopmode report.tex
|
| else
|
| cat <<'EOF'
|
|
|
| No LaTeX engine found (looked for latexmk, tectonic, pdflatex).
|
|
|
| Figures (report/figures/*.pdf) and tables (report/tables/*.tex) were still
|
| regenerated, so report.tex is ready to compile anywhere. To build the PDF:
|
|
|
| Windows winget install MiKTeX.MiKTeX
|
| macOS brew install --cask mactex-no-gui
|
| Debian sudo apt install texlive-latex-recommended texlive-fonts-recommended
|
| Anywhere cargo install tectonic (single binary, fetches packages itself)
|
|
|
| Or upload report/ to Overleaf and compile there — it is self-contained.
|
|
|
| EOF
|
| exit 1
|
| fi
|
|
|
| echo
|
| echo "wrote report/report.pdf"
|
|
|