Added -sync flag to handle synctex

This commit is contained in:
Dariusz Dwornikowski 2011-09-22 22:36:56 +02:00
parent 0cdec1c29a
commit c7ec5cb03c
1 changed files with 3 additions and 1 deletions

View File

@ -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 ;;