From 864746328c2dc5a1bf66f99307365d0d0097e9cf Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 14 Mar 2024 04:05:41 +0100 Subject: add make targets diff-* --- Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2a5dd64..73690df 100644 --- a/Makefile +++ b/Makefile @@ -87,3 +87,28 @@ $(ARTICLES:%=turtle-from-%): turtle-from-%: _site/%/index.pdf $(ARTICLES:%=dotgraph-from-%): dotgraph-from-%: _site/%/index.pdf @bin/xmp2rdfxml _site/$*/index.pdf \ | rapper -i rdfxml -o dot - $(BASE_IRI)$*/ + +diff-all: $(ARTICLES:%=diff-of-%) + +$(ARTICLES:%=diff-of-%): diff-of-%: %/changes.tex + +$(ARTICLES:%=%/changes.tex): %/changes.tex: %/a.tex %/b.tex + latexdiff --type CULINECHBAR --subtype COLOR --replace-context2cmd '' $^ > $*/index_diff.tex + perl -i -pe 's/\[pdftex\]{changebar}/[luatex]{changebar}/g' $*/index_diff.tex + latexmk --gg --lualatex --cd --silent --Werror $*/index_diff.tex + find $*/ -name 'index_diff.*' -not -name index_diff.pdf -delete + rm -f $^ + +$(ARTICLES:%=%/a.tex): %/a.tex: + git switch --detach $(shell git describe --tags --abbrev=0) + QUARTO_LOG_LEVEL=quiet \ + quarto render $*/index.qmd --to pdf -M keep-tex:true --output a.pdf + mv --force $*/index.tex $@ + rm --force _site/a.pdf + +$(ARTICLES:%=%/b.tex): %/b.tex: + git switch - + QUARTO_LOG_LEVEL=quiet \ + quarto render $*/index.qmd --to pdf -M keep-tex:true --output b.pdf + mv --force $*/index.tex $@ + rm --force _site/b.pdf -- cgit v1.2.3