Browse Source

Run biber when --bbl --biber is given

There are two places in the code where bibtex/biber are run: when
compiling the diff, with --biber or --bibtex, and when preparing the
old and new, before latexpand-ing the *.bbl file. Only the first was
sensitive respecting the --biber option.
master
Matthieu Moy 7 years ago
parent
commit
4b4c0f7523
  1. 26
      git-latexdiff

26
git-latexdiff

@ -228,7 +228,7 @@ bbl=0
latexdiff_flatten=0 latexdiff_flatten=0
latex=0 latex=0
xelatex=0 xelatex=0
BIBTEX_EXEC=bibtex
while test $# -ne 0; do while test $# -ne 0; do
case "$1" in case "$1" in
@ -455,6 +455,10 @@ else
LATEX_EXEC=pdflatex LATEX_EXEC=pdflatex
fi fi
if test $biber = 1; then
BIBTEX_EXEC=biber
fi
## end option parsing ## ## end option parsing ##
check_knitr () { check_knitr () {
@ -648,9 +652,9 @@ if test "$flatten" = 1; then
compile_error=1 compile_error=1
error_msg="command 'pdflatex' (automatically run in old due to --bbl) failed." error_msg="command 'pdflatex' (automatically run in old due to --bbl) failed."
} }
log_cmd bibtex0.log bibtex "$mainbase" || {
log_cmd "$BIBTEX_EXEC"0.log $BIBTEX_EXEC "$mainbase" || {
compile_error=1 compile_error=1
error_msg="command 'bibtex' (automatically run in old due to --bbl) failed."
error_msg="command '$BIBTEX_EXEC' (automatically run in old due to --bbl) failed."
} }
cd "$oldPWD" cd "$oldPWD"
ignore_errors_maybe ignore_errors_maybe
@ -666,9 +670,9 @@ if test "$flatten" = 1; then
compile_error=1 compile_error=1
error_msg="command 'pdflatex' (automatically run in new due to --bbl) failed." error_msg="command 'pdflatex' (automatically run in new due to --bbl) failed."
} }
log_cmd bibtex0.log bibtex "$mainbase" || {
log_cmd "$BIBTEX_EXEC"0.log $BIBTEX_EXEC "$mainbase" || {
compile_error=1 compile_error=1
error_msg="command 'bibtex' (automatically run in new due to --bbl) failed."
error_msg="command '$BIBTEX_EXEC' (automatically run in new due to --bbl) failed."
} }
cd "$oldPWD" cd "$oldPWD"
ignore_errors_maybe ignore_errors_maybe
@ -730,16 +734,10 @@ else
compile_error=1 compile_error=1
error_msg="command pdflatex (first run) failed." error_msg="command pdflatex (first run) failed."
} }
if test "$bibtex" = 1 ; then
log_cmd bibtex.log bibtex "$mainbase" || {
compile_error=1
error_msg="command 'bibtex' failed."
}
fi
if test "$biber" = 1 ; then
log_cmd biber.log biber "$mainbase" || {
if test "$bibtex" = 1 || test "$biber" = 1 ; then
log_cmd "$BIBTEX_EXEC".log $BIBTEX_EXEC "$mainbase" || {
compile_error=1 compile_error=1
error_msg="command 'biber' failed."
error_msg="command '$BIBTEX_EXEC' failed."
} }
fi fi
log_cmd pdflatex2.log $LATEX_EXEC $latexopt "$mainbase" || { log_cmd pdflatex2.log $LATEX_EXEC $latexopt "$mainbase" || {

Loading…
Cancel
Save