fixing paper build

This commit is contained in:
2026-04-10 08:30:48 +02:00
parent 5460f34426
commit 6427ae63ec
5 changed files with 40 additions and 17 deletions

View File

@@ -4,5 +4,23 @@ $bibtex_use = 2; # run biber when biblatex .bcf changes
# biber cwd is paper/build; scripts/nx_paper.sh symlinks ../build/bib -> ../src/bib so
# datasources log as bib/references.bib and latexmk's -e check works from paper/src
$biber = 'biber %O %S';
# Stale latexmk db: biblatex uses biber + .bcf, but the fdb can keep a "bibtex" rule after a bad
# run. Then biber never runs and citations stay undefined. Read whole fdb (small) so the rule
# line is never missed after a long dependency list.
for my $job (qw(main main-genpop summary)) {
my $bcf = "../build/$job.bcf";
my $bbl = "../build/$job.bbl";
my $fdb = "../build/$job.fdb_latexmk";
next unless -e $fdb && -e $bcf;
my $drop = !-e $bbl;
if ( !$drop && open my $fh, '<', $fdb ) {
local $/;
my $body = <$fh>;
close $fh;
$drop = 1 if defined $body && $body =~ /\["bibtex $job"\]/;
}
unlink $fdb if $drop;
}
$pdf_previewer = 'zathura %O %S';
$clean_ext = 'synctex.gz bbl bcf run.xml fls fdb_latexmk glg glo gls ist blg lof lot out toc';

Binary file not shown.

Binary file not shown.