-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
73 lines (60 loc) · 1.99 KB
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
MKDN = $(sort $(wildcard [0-9a-z]*.md)) # do not publish _* files
HTML = $(MKDN:.md=.html)
PDF = $(MKDN:.md=.pdf)
DOCX = $(MKDN:.md=.docx)
KATEX = https://cdn.jsdelivr.net/npm/[email protected]/dist/
REVEAL = https://cdn.jsdelivr.net/reveal.js/3.0.0
CSS = math.css
FLAGS = -f markdown+definition_lists+raw_html+pipe_tables+citations
FLAGS += -f markdown+tex_math_single_backslash+auto_identifiers+definition_lists
#FLAGS += --citeproc capm.bib
TEXFLAGS = --pdf-engine=xelatex
TEXFLAGS += -f markdown+definition_lists+raw_html+pipe_tables+citations
FLAGS += -t html5
FLAGS += -s # smart quotes
#FLAGS += --katex
FLAGS += --katex=$(KATEX)
#FLAGS += --katex=katex/
FLAGS += --css math.css
#FLAGS += -A FOOTER.md
FLAGS += --metadata date="$(shell date "+%B %e, %Y")"
#TEXFLAGS += --metadata date="$(shell date "+%B %e, %Y")"
TEXFLAGS += -V fontsize=12pt
TEXFLAGS += -M date="$(shell date "+%B %e, %Y")"
#TEXFLAGS += --bibliography=capm.bib
FLAGS += --toc --toc-depth=6
#FLAGS += -B katex.tex
FLAGS += --reference-location=document
#FLAGS += -t html5
#FLAGS += --mathjax
#FLAGS += --css capm.css
FLAGS += --section-divs
#FLAGS += -H HEADER.html
#FLAGS += -H katex.html
FLAGS += --citeproc --bibliography=capm.bib
DOCFLAGS = --citeproc --bibliography=capm.bib
%.html: %.md $(CSS)
pandoc $(FLAGS) $< -o $@
%.pdf: %.md $(CSS)
pandoc $(TEXFLAGS) $(DOCFLAGS) $< -o $@
%.docx: %.md
pandoc -f markdown -t latex $(DOCFLAGS) $< -o $*.tex
pandoc -f latex $*.tex -o $@
index: $(MKDN)
./index.sh $(MKDN) > index.html
docs: $(HTML) index
cp *.html math.css docs
git add -f docs/*
clean:
rm -f *.docx *.pdf *.html docs/*.html
RJS = -V theme="serif" -V revealjs-url=https://cdn.jsdelivr.net/reveal.js/3.0.0
slides: um_slides.md
pandoc -V theme=serif -t revealjs -o um_slides.html um_slides.md
pandoc -o um_slides.pptx um_slides.md
ep.pdf: ep.md
pandoc -f yaml_metadata_block+pandoc_title_block $< $(TEXFLAGS) --citeproc --bibliography=capm.bib -o $@
#ep.pdf: ep.latex
# xetex ep.latex
# bibtex ep.aux
# xetex ep.latex
# xetex ep.latex