Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/recipe-books.git

Merge branch 'master' of https://bitbucket.org/djarvis/recipe-books

Authorliantze <email>
Date2013-04-23 22:22:32 GMT+0800
Commitd95ef91c5a8f320632f283c8944361748ec9ba96
Parent879617e
tex2pdf.sh
+#!/bin/bash
+
+function usage() {
+ echo "$(basename "$0") [-h] [-l path] -f filename
+
+where:
+ -h Show options
+ -l Path to LaTeX bin directory (/usr/local/texlive/2012/bin/x86_64-linux)
+ -f TeX file to convert to a PDF"
+}
+
+OPTIND=1
+LOG=/tmp/latex/tex2pdf.log
+latex=/usr/local/texlive/2012/bin/x86_64-linux
+
+while getopts 'h?lf:' opt; do
+ case "$opt" in
+ h|\?) usage; exit 0;;
+ l) latex=$OPTARG;;
+ f) filename=$OPTARG;;
+ esac
+done
+shift $((OPTIND - 1))
+
+if [ -z $filename ]; then
+ usage
+ echo
+ echo "ERROR: Use '-f filename.tex' to specify a file to convert."
+ exit 1
+fi
+
+LATEX_OPS="-interaction=batchmode"
+INDEX_OPS="-q"
+
+$latex/pdflatex $LATEX_OPS -draftmode $filename
+$latex/texindy $INDEX_OPS -M flatidx flatingred.idx
+$latex/texindy $INDEX_OPS -M deepidx catingred.idx
+$latex/pdflatex $LATEX_OPS -draftmode $filename
+$latex/pdflatex $LATEX_OPS $filename
+
Delta40 lines added, 0 lines removed, 40-line increase