From c7ec5cb03c358dd0579771aae864ee718f8c7472 Mon Sep 17 00:00:00 2001 From: Dariusz Dwornikowski Date: Thu, 22 Sep 2011 22:36:56 +0200 Subject: [PATCH 1/2] Added -sync flag to handle synctex --- pdflatex.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pdflatex.sh b/pdflatex.sh index 16bd398..aa90055 100755 --- a/pdflatex.sh +++ b/pdflatex.sh @@ -140,6 +140,7 @@ ${txtbld}Options${txtrst}: -2x2 FILE put four pages of the PDF FILE on a single A4 sheet (the output will be in FILE-nup.pdf file) +3 run latex/pdflatex thrice (default is twice) + -sync append -synctex=1 to pdflatex command +b make also bibtex -b FILE make ONLY bibtex -c FILE cleanup (remove auxiliary files) @@ -359,7 +360,7 @@ function spell_checker() { # Runs (pdf)latex function run_pdflatex() { echo -ne "$TEXT..." - $LATEX_PROGRAM $LATEX_BATCHMODE_OPT "$FILENAME" >&- 2>&- + $LATEX_PROGRAM $SYNCTEXFLAG $LATEX_BATCHMODE_OPT "$FILENAME" >&- 2>&- local ERR=`grep -i error "$FILENAME".log` if [[ -n $ERR ]] ; then echo -ne "\t\t\t\t${txtred}[done]" @@ -384,6 +385,7 @@ while [[ -n $1 ]] ; do -2x1) pdf_manipulation "2x1" "$2" ; exit 0 ;; -2x2) pdf_manipulation "2x2" "$2" ; exit 0 ;; +3) THRICE="2" ; shift ;; + -sync) SYNCTEXFLAG="-synctex=1" ; shift ;; +b) MAKEBIBTEXARG="yes" ; shift ;; -b) MAKEONLYBIBTEXARG="yes" ; shift ; break ;; -c) AUXILIARYEXTS="$AUXILIARYEXTS log dvi" ; cleanup "$2"; exit 0 ;; From 4992732ca817518d35f73a4cc6ca861b634dc303 Mon Sep 17 00:00:00 2001 From: Dariusz Dwornikowski Date: Fri, 23 Sep 2011 12:44:53 +0200 Subject: [PATCH 2/2] Change from -sync to +sync --- pdflatex.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdflatex.sh b/pdflatex.sh index aa90055..ef77f46 100755 --- a/pdflatex.sh +++ b/pdflatex.sh @@ -140,7 +140,7 @@ ${txtbld}Options${txtrst}: -2x2 FILE put four pages of the PDF FILE on a single A4 sheet (the output will be in FILE-nup.pdf file) +3 run latex/pdflatex thrice (default is twice) - -sync append -synctex=1 to pdflatex command + +sync append -synctex=1 to pdflatex command +b make also bibtex -b FILE make ONLY bibtex -c FILE cleanup (remove auxiliary files) @@ -385,7 +385,7 @@ while [[ -n $1 ]] ; do -2x1) pdf_manipulation "2x1" "$2" ; exit 0 ;; -2x2) pdf_manipulation "2x2" "$2" ; exit 0 ;; +3) THRICE="2" ; shift ;; - -sync) SYNCTEXFLAG="-synctex=1" ; shift ;; + +sync) SYNCTEXFLAG="-synctex=1" ; shift ;; +b) MAKEBIBTEXARG="yes" ; shift ;; -b) MAKEONLYBIBTEXARG="yes" ; shift ; break ;; -c) AUXILIARYEXTS="$AUXILIARYEXTS log dvi" ; cleanup "$2"; exit 0 ;;