Add automatic handout compilation to Makefile
This commit is contained in:
parent
1c042a7626
commit
a71b85c808
9
Makefile
9
Makefile
@ -1,12 +1,17 @@
|
||||
PDFs := $(patsubst src/%/presentation.tex,build/presentation_%.pdf,$(wildcard src/*/presentation.tex))
|
||||
PRESENTATIONS := $(patsubst src/%/presentation.tex,build/presentation_%.pdf,$(wildcard src/*/presentation.tex))
|
||||
HANDOUTS := $(patsubst build/presentation_%.pdf,build/presentation_%_handout.pdf,$(PRESENTATIONS))
|
||||
|
||||
.PHONY: all
|
||||
all: $(PDFs)
|
||||
all: $(PRESENTATIONS) $(HANDOUTS)
|
||||
|
||||
build/presentation_%.pdf: src/%/presentation.tex build/prepared
|
||||
TEXINPUTS=./lib/cel-slides-template-2025:$$TEXINPUTS latexmk $<
|
||||
mv build/presentation.pdf $@
|
||||
|
||||
build/presentation_%_handout.pdf: src/%/presentation.tex build/prepared
|
||||
TEXINPUTS=./lib/cel-slides-template-2025:$$TEXINPUTS latexmk -pdflatex='pdflatex %O "\def\ishandout{1}\input{%S}"' $<
|
||||
mv build/presentation.pdf $@
|
||||
|
||||
build/prepared:
|
||||
mkdir -p build
|
||||
touch build/prepared
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
\documentclass[de]{CELbeamer}
|
||||
\ifdefined\ishandout
|
||||
\documentclass[de, handout]{CELbeamer}
|
||||
\else
|
||||
\documentclass[de]{CELbeamer}
|
||||
\fi
|
||||
|
||||
%
|
||||
%
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
\documentclass[de]{CELbeamer}
|
||||
\ifdefined\ishandout
|
||||
\documentclass[de, handout]{CELbeamer}
|
||||
\else
|
||||
\documentclass[de]{CELbeamer}
|
||||
\fi
|
||||
|
||||
%
|
||||
%
|
||||
|
||||
Loading…
Reference in New Issue
Block a user