From b2b7016a94c3fd275d5db12f45f723c845ff4a0e Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Mon, 25 Mar 2013 10:20:12 +0100 Subject: [PATCH] New option --latexmk to use "latexmk -f -pdf -silent" to compile From: Sebastian Hofer --- git-latexdiff | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/git-latexdiff b/git-latexdiff index 995ba46..caccda8 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -54,6 +54,7 @@ Options: (default if -o is not used) --pdf-viewer use to view the PDF file (default: \$PDFVIEWER) --no-cleanup don't cleanup temp dir after running + --latexmk use latexmk -o , --output copy resulting PDF into (usually ending with .pdf) @@ -98,6 +99,7 @@ biber=0 output= initial_dir=$PWD prepare_cmd= +uselatexmk= while test $# -ne 0; do case "$1" in @@ -143,6 +145,9 @@ while test $# -ne 0; do shift prepare_cmd="$1" ;; + "--latexmk") + uselatexmk=1 + ;; *) if test -z "$1" ; then echo "Empty string not allowed as argument" @@ -275,6 +280,8 @@ compile_error=0 cd new/"$maindir" || die "Can't cd to new/$maindir" if test -f Makefile ; then make || compile_error=1 +elif test "$uselatexmk" = 1; then + latexmk -f -pdf -silent "$mainbase" else pdflatex --interaction errorstopmode "$mainbase" || compile_error=1 if test "$bibtex" = 1 ; then