aboutsummaryrefslogtreecommitdiff
path: root/reproduce
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce')
-rw-r--r--reproduce/analysis/make/paper.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/reproduce/analysis/make/paper.mk b/reproduce/analysis/make/paper.mk
index a216370..08fd766 100644
--- a/reproduce/analysis/make/paper.mk
+++ b/reproduce/analysis/make/paper.mk
@@ -99,12 +99,29 @@ $(texbdir)/paper.bbl: tex/src/references.tex $(mtexdir)/dependencies-bib.tex \
ln -s $$p/tex/src/references.tex $(texbdir)/references.bib
fi
+ # Copy the improved IEEE bst file into the build directory.
+ # The improved bst file provides ArXiv clickable URLs and
+ # if available, open-access URLs based on the DOIs, with
+ # closed-access URLs as a fallback, via https://oadoi.org .
+ cp -pv $$p/tex/src/IEEEtran_openaccess.bst $(texbdir)
+
# We'll run LaTeX first to generate the `.bcf' file (necessary
# for `biber') and then run `biber' to generate the `.bbl' file.
export TEXINPUTS=$$p:
cd $(texbdir);
latex -shell-escape -halt-on-error $$p/paper.tex
bibtex paper
+ # Hack: tidy up eprint+doi style that didn't work in .bst file.
+ # TODO (better): read Part 4 of
+ # http://mirrors.ctan.org/info/bibtex/tamethebeast/ttb_en.pdf
+ # and fix the .bst style properly.
+ cp paper.bbl paper-tmp.bbl \
+ && sed -e "s/\'/EOLINE/g" paper-tmp.bbl \
+ | tr -d '\n' \
+ | sed -e 's/\([0-9]\)\( \|EOLINE\)}/\1}/g' \
+ | sed -e 's/\([^,]\) *\( \|EOLINE\) *\\eprint/\1, \\eprint/g' \
+ | sed -e 's/\([^,]\) *\( \|EOLINE\) *\\doi/\1, \\doi/g' \
+ | sed -e 's/EOLINE/\n/g' > paper.bbl
latex -shell-escape -halt-on-error $$p/paper.tex
fi