aboutsummaryrefslogtreecommitdiff
path: root/reproduce/analysis
diff options
context:
space:
mode:
authorBoud Roukema <boud@cosmo.torun.pl>2020-05-24 23:44:38 +0200
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-05-29 03:01:21 +0100
commite82c907459b578213a46a15be70167b3dffe3876 (patch)
treed51eb23ec72b4f92c2a2e8a9fb4bfabd3243b807 /reproduce/analysis
parent62b8983f25805829cdd02fbc3204cd7676a3e6fc (diff)
Reproducible research based on open-access papers
Publishing a paper on reproducible research without making it easy for readers to read the references would defeat the point. Of course we have to make some compromises with some journals' reluctance to shift towards the free world, but to satisfy scientific ethics, we should at least provide clickable URLs to the references, preferably to the ArXiv version if available [1], and also to the DOI, again, preferably to an open-access version of the URL if available. I was not able to fully get this done in the .bst file, so there's an sed/tr hack done to the .bbl file in `reproduce/analysis/make/paper.mk` to tidy up commas and spaces. This commit also reverts some of the hacks in the Akhlaghi IAU Symposium `tex/src/references.tex` entry, to match the improved .bst file, `tex/src/IEEEtran_openaccess.bst`, provided here with a different name to the original, in order to satisfy the LaTeX licence. [1] https://cosmo.torun.pl/blog/arXiv_refs
Diffstat (limited to 'reproduce/analysis')
-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