blob: 5816045dfba11c1ef754f827efad49231e1731e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
ALL = \
questions.pdf \
answers.pdf \
form.pdf
TMP = tmp
all: $(ALL)
answers.pdf questions.pdf: trivia.mdwn
mkdir -p $(TMP)
cat $< | sed -f sed/$(basename $@).sed > $(TMP)/$(basename $@).mdwn
cat $(TMP)/$(basename $@).mdwn | pandoc -s -f markdown -t latex \
-N -H tex/header.tex -V classoption=a6paper,11pt -V pagestyle=empty \
| sed -f sed/latex.sed -f sed/$(basename $@).sed > $(TMP)/$(basename $@)-small.tex
pdflatex -output-directory $(TMP) -jobname $(basename $@)-small < $(TMP)/$(basename $@)-small.tex
cat tex/$(basename $@).tex \
| pdflatex -output-directory $(TMP) -jobname $(basename $@)
mv $(TMP)/$@ $@
form.pdf: tex/form.tex
mkdir -p $(TMP)
pdflatex -output-directory $(TMP) -jobname $(basename $@) < $<
mv $(TMP)/$@ $@
clean:
rm -f $(ALL)
rm -fr $(TMP)
|