-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
50 lines (37 loc) · 1.25 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
pandoc_opt=-Fpandoc-crossref -Fpandoc-citeproc
.DELETE_ON_ERROR:
.SECONDARY:
all: orca.pdf orca-bioinfo.pdf
clean:
rm -f orca.pdf
# Fetch BibTex records from a list of DOI.
%.doi.bib: %.doi
brew cite $$(<$<) | sort >$@
# Concatentate the citations with and without DOI.
%.bib: %.doi.bib %.other.bib
sort $^ | sed 's~http://dx.doi.org~https://doi.org~' >$@
# Download the citation style language (CSL).
orca.csl:
curl -o $@ https://www.zotero.org/styles/bioinformatics
# Download the Bioinformatics LaTeX template.
cabios-template.zip:
curl -L -o $@ https://academic.oup.com/DocumentLibrary/Bioinformatics/cabios-template.zip
# Extract the Bioinformatics LaTeX template.
bioinfo.cls: cabios-template.zip
unzip -o $< $@ OUP_First_SBk_Bot_8401.eps OUP_First_SBk_Bot_8401-eps-converted-to.pdf
touch $@
# Render Markdown to HTML using Pandoc.
%.html: %.md %.bib %.csl
pandoc $(pandoc_opt) -s -o $@ $<
# Convert Markdown to LaTeX using Pandoc.
%.tex: %.md %.bib %.csl
pandoc $(pandoc_opt) -s -o $@ $<
# Render Markdown to PDF using Pandoc.
%.pdf: %.md %.bib %.csl
pandoc $(pandoc_opt) -o $@ $<
# Render Markdown to DOCX using Pandoc.
%.docx: %.md %.bib %.csl
pandoc $(pandoc_opt) -o $@ $<
# Render LaTeX to PDF using pdflatex.
%.pdf: %.tex bioinfo.cls
pdflatex $<