Skip to content

Instantly share code, notes, and snippets.

@SimonGreenhill
Last active April 8, 2016 09:14
Show Gist options
  • Save SimonGreenhill/1f70310ff1775cea8eff8c76e3d908d3 to your computer and use it in GitHub Desktop.
Save SimonGreenhill/1f70310ff1775cea8eff8c76e3d908d3 to your computer and use it in GitHub Desktop.
PAPER=my-paper
BIBFILE=my-paper
OUTPUTDIR=build
.PHONY: pdf refs bib pdflatex wordcount clean
all: build/plos2015.bst bib pdf diff figures
build/plos2015.bst:
@cp plos2015.bst build/plos2015.bst
bib: build/plos2015.bst
cp ${BIBFILE}.bib ${OUTPUTDIR}
texfot pdflatex -output-directory=${OUTPUTDIR} ${PAPER}
cd ${OUTPUTDIR}; bibtex -terse ${PAPER}
texfot pdflatex -output-directory=${OUTPUTDIR} ${PAPER}
pdf: bib
texfot pdflatex -output-directory=${OUTPUTDIR} ${PAPER}
cp ${OUTPUTDIR}/${PAPER}.pdf .
figures:
mkdir figures
cp ../../analyses/figure1.eps ./figures/figure1.eps
# ... etc
wordcount:
@texcount -sum ${PAPER}.tex
clean:
rm -rf ${OUTPUTDIR}/*
rm -rf figures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment