Skip to content

Instantly share code, notes, and snippets.

@dorchard
Created February 14, 2018 10:19
Show Gist options
  • Select an option

  • Save dorchard/f9bd837e2b0dfdc159bf7d3d2825aa94 to your computer and use it in GitHub Desktop.

Select an option

Save dorchard/f9bd837e2b0dfdc159bf7d3d2825aa94 to your computer and use it in GitHub Desktop.
A script that generates a simple makefile (with no dependency tracking) for latex / bibtex that I use all the time.
default: quick
quick:
pdflatex paper.tex
full:
pdflatex paper.tex
bibtex paper
pdflatex paper.tex
pdflatex paper.tex
#!/bin/bash
# Usage:
# makemakefile
# creates Makefile in the current directory for paper.tex
# makemakefile name
# creates Makefile in the current directory for name.tex
cp ~/.local/bin/Makefile.template .
if [ $# -eq 1 ]
then
sed s/paper/$1/ Makefile.template >Makefile
rm Makefile.template
else
mv Makefile.template Makefile
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment