-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
85 lines (84 loc) · 2.36 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
76
77
78
79
80
81
82
83
84
85
# change the below to fit your own files:
BUILDDIR=build
FILENAME=example
BIBLIOGRAPHY=bibliography.bib
BIBSTYLE=examplebibstyle.csl # see and download at https://www.zotero.org/styles
# Latex has the --biblatex option to properly convert references. You can also use --natbib, check pandoc for explenation
latex:
mkdir $(BUILDDIR) -p # Creates the BUILDDIR if it doesn't already exist.
pandoc $(FILENAME).md \
--filter pandoc-crossref \
--citeproc \
--from=markdown+tex_math_single_backslash+tex_math_dollars \
--bibliography=$(BIBLIOGRAPHY) \
--csl=$(BIBSTYLE) \
--biblatex \
--to=latex \
--output=$(BUILDDIR)/$(FILENAME).tex
latexfull:
mkdir $(BUILDDIR) -p # Creates the BUILDDIR if it doesn't already exist.
pandoc $(FILENAME).md \
--filter pandoc-crossref \
--citeproc \
--from=markdown+tex_math_single_backslash+tex_math_dollars \
--bibliography=$(BIBLIOGRAPHY) \
--csl=$(BIBSTYLE) \
--biblatex \
--to=latex \
--output=$(BUILDDIR)/$(FILENAME)_so.tex \
--standalone
pdf:
mkdir $(BUILDDIR) -p
pandoc $(FILENAME).md \
--filter pandoc-crossref \
--citeproc \
--from=markdown+tex_math_single_backslash+tex_math_dollars+raw_tex \
--bibliography=$(BIBLIOGRAPHY) \
--csl=$(BIBSTYLE) \
--to=latex \
--output=$(BUILDDIR)/$(FILENAME).pdf
odt:
mkdir $(BUILDDIR) -p
pandoc $(FILENAME).md \
--filter pandoc-crossref \
--citeproc \
--from=markdown+tex_math_single_backslash+tex_math_dollars \
--bibliography=$(BIBLIOGRAPHY) \
--csl=$(BIBSTYLE) \
--to=odt \
--output=$(BUILDDIR)/$(FILENAME).odt
docx:
mkdir $(BUILDDIR) -p
pandoc $(FILENAME).md \
--filter pandoc-crossref \
--citeproc \
--from=markdown+tex_math_single_backslash+tex_math_dollars \
--bibliography=$(BIBLIOGRAPHY) \
--csl=$(BIBSTYLE) \
--to=docx \
--output=$(BUILDDIR)/$(FILENAME).docx
html:
mkdir $(BUILDDIR) -p
pandoc $(FILENAME).md \
--filter pandoc-crossref \
--citeproc \
--from=markdown+tex_math_single_backslash+tex_math_dollars \
--bibliography=$(BIBLIOGRAPHY) \
--csl=$(BIBSTYLE) \
--to=html5 \
--output=$(BUILDDIR)/$(FILENAME).html \
--mathjax \
--standalone
epub:
mkdir $(BUILDDIR) -p
pandoc $(FILENAME).md \
--filter pandoc-crossref \
--citeproc \
--from=markdown+tex_math_single_backslash+tex_math_dollars \
--bibliography=$(BIBLIOGRAPHY) \
--csl=$(BIBSTYLE) \
--to=epub \
--mathjax \
--output=$(BUILDDIR)/$(FILENAME).epub \
# --epub-cover-image=<cover-image> \
#--toc