From 0d2814ad8606bd5e35b7d777f69f444307c8fe4c Mon Sep 17 00:00:00 2001 From: Jevon Longdell Date: Sun, 24 Jun 2012 21:33:16 +1200 Subject: [PATCH] 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. --- git-latexdiff | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/git-latexdiff b/git-latexdiff index 858794e..aa5d7b5 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -44,6 +44,8 @@ Options: --help this help message --main name of the main LaTeX 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 (default if -o is not used) --pdf-viewer use to view the PDF file (default: \$PDFVIEWER) @@ -51,6 +53,7 @@ Options: -o , --output copy resulting PDF into (usually ending with .pdf) + --verbos, -v give more verbose output EOF } @@ -83,6 +86,7 @@ main= view=maybe cleanup=1 verbose=0 +bibtex=0 output= initial_dir=$PWD @@ -113,6 +117,9 @@ while test $# -ne 0; do test $# -gt 1 && shift || die "missing argument for $1" output=$1 ;; + "-b"|"--bibtex") + bibtex=1 + ;; "--verbose"|"-v") verbose=1 ;; @@ -242,6 +249,11 @@ if test -f Makefile ; then make || compile_error=1 else 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 verbose_done