#latexmk is great for auto-compiling your documents.

However, it fails in some cases and I'm currently bitten by a nasty one:

- \includgraphics'ed PDF is corrupt (It's a missing, unlocked #gitAnnex / @datalad file)
- that stops biblatex from properly finishing the .bcf XML file
- *before* fetching the missing PDF (with #DataLad), latexmk runs biber on the now corrupt .bcf (fails and deletes the .bbl)
- vicious cycle repeats literally forever - latexmk is in an endless loop 🙄

#TexLaTeX

I managed to have latexmk interpret the 'corrupt PDF' error properly by adding this to the .latexmkrc:

push @file_not_found, '!pdfTeX error: .*? \(file ([^)]+)\): xpdf: reading PDF image failed';

It now sees that that PDF is 'missing'. However how do I get it to fetch broken files first and leave the bibliography stuff to the end? 😅

Currently trying to understand its  #Perl code...

I have compiled a minimal working example here:

https://gitlab.com/nobodyinperson/latexmk-biber-endless-loop

This is also my first  nix flake to make it completely reproducible. 🥳

@mih @datalad @TeXhackse

#TexLaTeX #nix #flake

Yann Büchau / latexmk-biber-endless-loop · GitLab

GitLab.com

GitLab
@nobodyinperson I remember having lots of fun with endless latexmk loops, especially with German citations... 😅
@katexochen Ah. At least I am not the only one 😂