-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathmake-tex.mk
39 lines (32 loc) · 1.24 KB
/
make-tex.mk
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
31
32
33
34
35
36
37
38
39
%.notes.tex.markdown: %.md ${DEPS}
${PP} $< -o $@ --format notes --to tex --code sparse --snippets-path ${SNIPPETSDIR} --diagrams-dir diagrams --edit-links ${PPFLAGS}
# Fix percentage width for latex.
sed -i -e 's/width=\(.*\)\%/width=0.\1\\textwidth/g' $@
sed -i -e 's/height=\(.*\)\%/height=0.\1\\textheight/g' $@
${BASE}.notes.pdf: ${BASE}.notes.aux ${BASE}.notes.bbl ${BASE}.notes.tex
pdflatex -shell-escape ${BASE}.notes.tex
cp ${BASE}.notes.pdf ${NOTESDIR}/${OUT}.notes.pdf
${BASE}.notes.bbl: ${BASE}.notes.aux ${BIBDEPS}
bibtex ${BASE}.notes
${BASE}.notes.aux: ${BASE}.notes.tex
pdflatex -shell-escape ${BASE}.notes.tex
${BASE}.notes.tex: ${BASE}.notes.tex.markdown
pandoc -s \
--template pandoc-notes-tex-template.tex \
--number-sections \
--natbib \
${BIBFLAGS} \
-B ../_includes/${NOTATION} \
-o ${BASE}.notes.tex \
${BASE}.notes.tex.markdown
${BASE}.include.tex: ${BASE}.notes.tex.markdown ${TEXDEPS}
pandoc -s \
--template pandoc-include-tex-template.tex \
--number-sections \
--natbib \
${BIBFLAGS} \
-B ../_includes/${NOTATION} \
-o ${BASE}.include.tex \
${BASE}.notes.tex.markdown
cp ${BASE}.include.tex ${TEXDIR}/${BASE}.include.tex
../copy_web_diagrams.sh ${BASE}.md texdiagrams ${TEXDIR}/diagrams