Created
April 28, 2022 12:10
-
-
Save adigitoleo/ec37afca7cb27e2455e217dffde2b39e to your computer and use it in GitHub Desktop.
Makefile for LuaLaTeX documents with Biber for references
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src := $(wildcard *.tex) | |
bib := $(wildcard *.bib) | |
all: $(src:%.tex=%.pdf) | |
%.pdf: $(src) out/%.bbl | |
@ 1>/dev/null lualatex --output-directory=out --interaction=batchmode --halt-on-error --file-line-error $< \ | |
|| echo "LuaLaTeX run 2/3 failed, check log files in out/ for details" | |
@ lualatex --output-directory=out --halt-on-error --file-line-error $<|rg -v '/usr/share/' | |
@ mv out/$@ $@ | |
out/%.bbl: out/%.bcf | |
@ biber --input-directory=out --output-directory=out $(<F) | |
out/%.bcf: $(src) $(bib) | out | |
@ 1>/dev/null lualatex --output-directory=out --interaction=batchmode --halt-on-error --file-line-error $< \ | |
|| echo "LuaLaTeX run 1/3 failed, check log files in out/ for details" | |
out: | |
@ mkdir -p out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment