# .latexmkrc
$pdf_mode = 1;
$pdflatex = 'pdflatex -interaction=nonstopmode -file-line-error %O %S';
$bibtex_use = 2;
$biber = 'biber %O %S';

# Core technical files (swissi.cls, truncate.sty, meta) live in 1-system/.
# Bibliography files live in 4-bib/.
# Let pdflatex and biber find them there; the empty trailing entry keeps the
# default TeX/Bib search paths in place.
$ENV{'TEXINPUTS'} = './1-system//:' . ($ENV{'TEXINPUTS'} || '');
$ENV{'BIBINPUTS'} = './4-bib//:' . ($ENV{'BIBINPUTS'} || '');

# Keep the repo root clean while putting the finished PDF where it is easy to
# find. Scratch (aux/log/bcf/bbl/toc/fls/fdb_latexmk/...) lands in 2-build/runs/;
# the PDF (and synctex) are written next to the .tex at the repo root. On TeX
# Live the *latex engines lack -aux-directory, so $emulate_aux lets latexmk
# emulate the split and move the PDF to out_dir after the final pass.
my $aux = $ENV{'SWISSI_LATEX_BUILD_DIR'} || '2-build/runs';
$aux_dir = $aux;
$out_dir = '.';
$emulate_aux = 1;
