|
@ -75,6 +75,7 @@ Options: |
|
|
--help this help message |
|
|
--help this help message |
|
|
--main <file.tex> name of the main LaTeX file |
|
|
--main <file.tex> name of the main LaTeX file |
|
|
--no-view don't display the resulting PDF file |
|
|
--no-view don't display the resulting PDF file |
|
|
|
|
|
--latex run latex instead of pdflatex |
|
|
--bibtex, -b run bibtex as well as latex |
|
|
--bibtex, -b run bibtex as well as latex |
|
|
(pdflatex,bibtex,pdflatex,pdflatex) |
|
|
(pdflatex,bibtex,pdflatex,pdflatex) |
|
|
--biber run BibLaTex-Biber as well as latex |
|
|
--biber run BibLaTex-Biber as well as latex |
|
@ -176,6 +177,8 @@ latexdiffopt=() |
|
|
latexpand=() |
|
|
latexpand=() |
|
|
bbl=0 |
|
|
bbl=0 |
|
|
latexdiff_flatten=0 |
|
|
latexdiff_flatten=0 |
|
|
|
|
|
latex=0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while test $# -ne 0; do |
|
|
while test $# -ne 0; do |
|
|
case "$1" in |
|
|
case "$1" in |
|
@ -230,6 +233,9 @@ while test $# -ne 0; do |
|
|
"-b"|"--bibtex") |
|
|
"-b"|"--bibtex") |
|
|
bibtex=1 |
|
|
bibtex=1 |
|
|
;; |
|
|
;; |
|
|
|
|
|
"--latex") |
|
|
|
|
|
latex=1 |
|
|
|
|
|
;; |
|
|
"--biber") |
|
|
"--biber") |
|
|
biber=1 |
|
|
biber=1 |
|
|
;; |
|
|
;; |
|
@ -362,6 +368,12 @@ if test $flatten = 1 && |
|
|
flatten=0 |
|
|
flatten=0 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if test $latex = 1; then |
|
|
|
|
|
LATEX_EXEC=latex |
|
|
|
|
|
else |
|
|
|
|
|
LATEX_EXEC=pdflatex |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
## end option parsing ## |
|
|
## end option parsing ## |
|
|
|
|
|
|
|
|
check_knitr () { |
|
|
check_knitr () { |
|
@ -507,7 +519,7 @@ if test "$flatten" = 1; then |
|
|
verbose "Attempting to regenerate missing new/$maindir$mainbase.bbl" |
|
|
verbose "Attempting to regenerate missing new/$maindir$mainbase.bbl" |
|
|
oldPWD=$PWD |
|
|
oldPWD=$PWD |
|
|
cd new/"$maindir" |
|
|
cd new/"$maindir" |
|
|
log_cmd pdflatex0.log pdflatex $latexopt "$mainbase" || compile_error=1 |
|
|
|
|
|
|
|
|
log_cmd pdflatex0.log $LATEX_EXEC $latexopt "$mainbase" || compile_error=1 |
|
|
log_cmd bibtex0.log bibtex "$mainbase" || compile_error=1 |
|
|
log_cmd bibtex0.log bibtex "$mainbase" || compile_error=1 |
|
|
cd "$oldPWD" |
|
|
cd "$oldPWD" |
|
|
if [ "$compile_error" = 1 ]; then |
|
|
if [ "$compile_error" = 1 ]; then |
|
@ -565,15 +577,15 @@ else |
|
|
else |
|
|
else |
|
|
latexopt="$latexopt -interaction=errorstopmode" |
|
|
latexopt="$latexopt -interaction=errorstopmode" |
|
|
fi |
|
|
fi |
|
|
log_cmd pdflatex1.log pdflatex $latexopt "$mainbase" || compile_error=1 |
|
|
|
|
|
|
|
|
log_cmd pdflatex1.log $LATEX_EXEC $latexopt "$mainbase" || compile_error=1 |
|
|
if test "$bibtex" = 1 ; then |
|
|
if test "$bibtex" = 1 ; then |
|
|
log_cmd bibtex.log bibtex "$mainbase" || compile_error=1 |
|
|
log_cmd bibtex.log bibtex "$mainbase" || compile_error=1 |
|
|
fi |
|
|
fi |
|
|
if test "$biber" = 1 ; then |
|
|
if test "$biber" = 1 ; then |
|
|
log_cmd biber.log biber "$mainbase" || compile_error=1 |
|
|
log_cmd biber.log biber "$mainbase" || compile_error=1 |
|
|
fi |
|
|
fi |
|
|
log_cmd pdflatex2.log pdflatex $latexopt "$mainbase" || compile_error=1 |
|
|
|
|
|
log_cmd pdflatex3.log pdflatex $latexopt "$mainbase" || compile_error=1 |
|
|
|
|
|
|
|
|
log_cmd pdflatex2.log $LATEX_EXEC $latexopt "$mainbase" || compile_error=1 |
|
|
|
|
|
log_cmd pdflatex3.log $LATEX_EXEC $latexopt "$mainbase" || compile_error=1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
verbose_done |
|
|
verbose_done |
|
@ -583,6 +595,11 @@ if [ "$compile_error" = 1 ] && [ "$ignorelatexerrors" = 1 ]; then |
|
|
compile_error=0 |
|
|
compile_error=0 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if test $latex = 1; then |
|
|
|
|
|
dvips "$mainbase".dvi |
|
|
|
|
|
ps2pdf "$mainbase".ps |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
pdffile="$mainbase".pdf |
|
|
pdffile="$mainbase".pdf |
|
|
if test ! -r "$pdffile" ; then |
|
|
if test ! -r "$pdffile" ; then |
|
|
echo "No PDF file generated." |
|
|
echo "No PDF file generated." |
|
|