~mwshinn/+junk/notes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh -e 
# Compiles Max's note files (as described in 4FB6B11A) into pdf files.
# Just pass the notes file as an argument.

LATEXIFY="/opt/notes-bin/latexify-notes.pl"
PDFLATEX="pdflatex"
BIBTEX="bibtex"

$LATEXIFY $1 > $1.tex
export openout_any=a 
$PDFLATEX -output-directory `dirname $1` -halt-on-error -shell-escape $1.tex
if grep -q "Bibliography: " "$1"; then
  $BIBTEX $1
fi
$PDFLATEX -output-directory `dirname $1` -halt-on-error -shell-escape $1.tex
$PDFLATEX -output-directory `dirname $1` -halt-on-error -shell-escape $1.tex
rm -f $1.log $1.out $1.aux $1.tex $1.blg $1.bbl
rm -f *-eps-converted-to.pdf