Browse Source

added --bibtex option and added a description of verbose option to help

if you add --bibtex option then rather than just latexing once it does
pdflatex, bibtex, pdflatex, pdflatex sequence.
master
Jevon Longdell 13 years ago
committed by Matthieu Moy
parent
commit
0d2814ad86
  1. 12
      git-latexdiff

12
git-latexdiff

@ -44,6 +44,8 @@ Options:
--help this help message --help this help message
--main <file.tex> name of the main LaTeX file --main <file.tex> name of the main LaTeX file
--no-view don't display the resulting PDF file --no-view don't display the resulting PDF file
--bibtex, -b run bibtex as well as latex
(pdflatex,bibtex,pdflatex,pdflatex)
--view view the resulting PDF file --view view the resulting PDF file
(default if -o is not used) (default if -o is not used)
--pdf-viewer <cmd> use <cmd> to view the PDF file (default: \$PDFVIEWER) --pdf-viewer <cmd> use <cmd> to view the PDF file (default: \$PDFVIEWER)
@ -51,6 +53,7 @@ Options:
-o <file>, --output <file> -o <file>, --output <file>
copy resulting PDF into <file> copy resulting PDF into <file>
(usually ending with .pdf) (usually ending with .pdf)
--verbos, -v give more verbose output
EOF EOF
} }
@ -83,6 +86,7 @@ main=
view=maybe view=maybe
cleanup=1 cleanup=1
verbose=0 verbose=0
bibtex=0
output= output=
initial_dir=$PWD initial_dir=$PWD
@ -113,6 +117,9 @@ while test $# -ne 0; do
test $# -gt 1 && shift || die "missing argument for $1" test $# -gt 1 && shift || die "missing argument for $1"
output=$1 output=$1
;; ;;
"-b"|"--bibtex")
bibtex=1
;;
"--verbose"|"-v") "--verbose"|"-v")
verbose=1 verbose=1
;; ;;
@ -242,6 +249,11 @@ if test -f Makefile ; then
make || compile_error=1 make || compile_error=1
else else
pdflatex --interaction errorstopmode "$mainbase" || compile_error=1 pdflatex --interaction errorstopmode "$mainbase" || compile_error=1
if test "$bibtex" = 1 ; then
bibtex "$mainbase" || compile_error=1
pdflatex --interaction errorstopmode "$mainbase" || compile_error=1
pdflatex --interaction errorstopmode "$mainbase" || compile_error=1
fi
fi fi
verbose_done verbose_done

Loading…
Cancel
Save