-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile_paper.sh
executable file
·34 lines (24 loc) · 1021 Bytes
/
compile_paper.sh
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
#!/bin/bash
export cslfile='elementa.csl' # citation style file
export bib='bibliography.bib' # bibliography for just this article
export bib_full='bibliographyfull.bib' # master bibliography, could be only a symlink
cd paper # ./paper
export file='paper'
./parse_file.sh
# preferably use full bib file, but if unavailable (e.g. in exported docker or
# public repo) then use the reduced file (exported with bibexport)
if [ -f $bib_full ]; then
bib=$bib_full
fi
echo Using bibfile: $bib
# --- compile draft
# -docx
pandoc --bibliography $bib --filter pandoc-crossref --citeproc --csl $cslfile --reference-doc reference.docx --mathjax -o ${file}.docx ${file}.md
# now that draft is done, move figures up into text
python move_figures_into_text.py ${file}.md
# --- static paper
# -html
pandoc --bibliography $bib --filter pandoc-crossref --citeproc --csl $cslfile --self-contained --resource-path=.:../nb_fig/:../fig --mathjax -o ${file}.html ${file}.md
# make version with tracked changes
./diff.sh
cd .. # ./