-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
75 lines (68 loc) · 2.84 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
74
75
PANDOC=pandoc
BASEDIR=$(CURDIR)
INPUTDIR=$(BASEDIR)/source
OUTPUTDIR=$(BASEDIR)/output
STYLEDIR=$(BASEDIR)/style
BEFOREDIR=$(INPUTDIR)/before
AFTERDIR=$(INPUTDIR)/after
BIBFILE=$(INPUTDIR)/references.bib
help:
@echo ' '
@echo 'Makefile for the Markdown thesis '
@echo ' '
@echo 'Usage: '
@echo ' make pdf generate a PDF file '
@echo ' make tex generate a tex file '
@echo ' '
@echo ' '
@echo ' '
@echo 'get local templates with: pandoc -D latex/html/etc '
@echo 'or generic ones from: https://github.com/jgm/pandoc-templates '
pdf:
pandoc "$(INPUTDIR)"/*.md \
-f markdown \
-o "$(OUTPUTDIR)/thesis.pdf" \
--template="$(STYLEDIR)/template_classicthesis.tex" \
--include-before-body "$(BEFOREDIR)"/00_00_coverpage.tex \
--include-before-body "$(BEFOREDIR)"/00_01_abstract.tex \
--include-before-body "$(BEFOREDIR)"/00_02_statements.tex \
--include-before-body "$(BEFOREDIR)"/00_03_acknowledgements.tex \
--include-before-body "$(BEFOREDIR)"/00_04_toc.tex \
--include-after-body "$(AFTERDIR)"/09_appendix.tex \
--include-after-body "$(AFTERDIR)"/10_colophon.tex \
--bibliography="$(BIBFILE)" 2>pandoc.log \
--csl="$(STYLEDIR)/apa.csl" \
--verbose \
--latex-engine=pdflatex
tex:
pandoc "$(INPUTDIR)"/*.md \
-f markdown \
-o "$(OUTPUTDIR)/thesis.latex" \
--template="$(STYLEDIR)/template_classicthesis.tex" \
--include-before-body "$(BEFOREDIR)"/00_00_coverpage.tex \
--include-before-body "$(BEFOREDIR)"/00_01_abstract.tex \
--include-before-body "$(BEFOREDIR)"/00_02_statements.tex \
--include-before-body "$(BEFOREDIR)"/00_03_acknowledgements.tex \
--include-before-body "$(BEFOREDIR)"/00_04_toc.tex \
--include-after-body "$(AFTERDIR)"/09_appendix.tex \
--include-after-body "$(AFTERDIR)"/10_colophon.tex \
--bibliography="$(BIBFILE)" 2>pandoc.log \
--csl="$(STYLEDIR)/apa.csl" \
--verbose
test:
pandoc "$(INPUTDIR)"/01_Introduction.md \
-f markdown \
-o "$(OUTPUTDIR)/thesis.pdf" \
--template="$(STYLEDIR)/template_classicthesis.tex" \
--include-before-body "$(BEFOREDIR)"/00_00_coverpage.tex \
--include-before-body "$(BEFOREDIR)"/00_01_abstract.tex \
--include-before-body "$(BEFOREDIR)"/00_02_statements.tex \
--include-before-body "$(BEFOREDIR)"/00_03_acknowledgements.tex \
--include-before-body "$(BEFOREDIR)"/00_04_toc.tex \
--include-after-body "$(AFTERDIR)"/09_appendix.tex \
--include-after-body "$(AFTERDIR)"/10_colophon.tex \
--bibliography="$(BIBFILE)" 2>pandoc.log \
--csl="$(STYLEDIR)/apa.csl" \
--verbose \
--latex-engine=pdflatex
.PHONY: help pdf tex