Skip to content

Instantly share code, notes, and snippets.

@cpmpercussion
Created January 27, 2017 15:28
Show Gist options
  • Save cpmpercussion/b244fa890403550e8f238e300c687372 to your computer and use it in GitHub Desktop.
Save cpmpercussion/b244fa890403550e8f238e300c687372 to your computer and use it in GitHub Desktop.
NIME paper markdown makefile
DOCNAME=nime-paper-input.md
OUTNAME=rendered-output
REFSFILE=references.bib
ARGS=--bibliography $(REFSFILE)
nime:
pandoc --template=nime.latex --self-contained --natbib --filter pandoc-fignos $(DOCNAME) -o $(OUTNAME).tex
sed -i '.bak' 's/\citep{/\cite{/g' $(OUTNAME).tex
pdflatex $(OUTNAME)
bibtex $(OUTNAME)
pdflatex $(OUTNAME)
pdflatex $(OUTNAME)
all: pdf html word tex
pdf:
pandoc --template=nime.latex $(ARGS) $(DOCNAME) -o $(OUTNAME).pdf
html:
pandoc $(ARGS) $(DOCNAME) -o $(OUTNAME).html
word:
pandoc $(ARGS) $(DOCNAME) -o $(OUTNAME).docx
.PHONY: clean
clean:
rm -f $(OUTNAME).pdf $(OUTNAME).docx $(OUTNAME).tex $(OUTNAME).html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment