From 5d1c2d1eef8aebac27915d55827864df783b4ad1 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Wed, 1 Jul 2026 15:36:51 +0200 Subject: [PATCH] Fix bib file lookup for subfiles --- Justfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Justfile b/Justfile index 3e34766..d7468a0 100644 --- a/Justfile +++ b/Justfile @@ -2,10 +2,11 @@ LATEXMK := "latexmk -pdflatex=lualatex -pdf -shell-escape -interaction=nonstopmo build: #!/usr/bin/env bash + ROOT="$PWD" FILE=$(find . -type f \( -path './chapters/*' -name '*.tex' ! -name 'template.tex' \) -o -name 'thesis.tex' | sed 's|^\./||' | sort | fzf) DIR=$(dirname "$FILE") BASE=$(basename "$FILE" .tex) - kitty -e sh -c "cd '$DIR' && {{ LATEXMK }} -outdir=build -pvc -view=none '$BASE.tex'" > /dev/null 2>&1 & + kitty -e sh -c "cd '$DIR' && BIBINPUTS='$ROOT:' {{ LATEXMK }} -outdir=build -pvc -view=none '$BASE.tex'" > /dev/null 2>&1 & while [ ! -f "$DIR/build/$BASE.pdf" ]; do sleep 0.5; done if command -v inotifywait > /dev/null; then inotifywait -qq -e close_write "$DIR/build/$BASE.pdf"