diff --git a/pdflatex.sh b/pdflatex.sh index 16bd398..ef77f46 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 ;;