From 07cf4ec3da91c2b0c99d36b3937e45d8d107d078 Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Sat, 6 Apr 2019 15:07:23 +0200 Subject: [PATCH] revamp the --bibtex and --biber options --bibtex and --biber were just running bibtex and biber on the resulting diff, but this is rarely what users want. What --bbl does is much more sensible: it generates *.bbl files on old and new versions, and use these *.bbl to compute the diff. No run of bibtex or biber is needed on the diff, since the *.bbl are latexpand-ed into the *.tex source file. Change the meaning of --bibtex and --biber to do what --bbl used to do. --bbl is now an alias for --bibtex, and --biber does the same as --bbl, but using biber to generate the *.bbl file. Old, essentially broken options are kept with different names --run-bibtex and --run-biber, but I suspect to one is really using them. We break backward compatibility, but the benefit of having short and sweet option names for things that work should be higher than the cost of backward compatibility. --- git-latexdiff | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/git-latexdiff b/git-latexdiff index 595734f..90e8b90 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -93,10 +93,18 @@ Options: --no-view don't display the resulting PDF file --latex run latex instead of pdflatex --xelatex run xelatex instead of pdflatex - --bibtex, -b run bibtex as well as latex + --bibtex, --bbl display changes in the bibliography + (runs bibtex to generate *.bbl files and + include them in the source file using + latexpand --expand-bbl before computing + the diff) + --biber like --bibtex, but runs biber instead. + --run-bibtex, -b run bibtex as well as latex to generate the PDF file (pdflatex,bibtex,pdflatex,pdflatex) - --biber run BibLaTex-Biber as well as latex + NOTE: --bibtex usually works better + --run-biber run BibLaTex-Biber as well as latex to generate the PDF file (pdflatex,biber,pdflatex,pdflatex) + NOTE: --biber usually works better --view view the resulting PDF file (default if -o is not used) --pdf-viewer use to view the PDF file (default: \$PDFVIEWER) @@ -137,7 +145,6 @@ Options: a PDF file is produced --ignore-makefile ignore the Makefile, build as though it doesn't exist -* other options are passed directly to latexdiff - --bbl shortcut to flatten a bbl file of the same name as the project --latexpand OPT pass option OPT to latexpand. Use multiple times like --latexpand OPT1 --latexpand OPT2 to pass multiple options. --latexdiff-flatten use --flatten from latexdiff instead of latexpand @@ -285,7 +292,7 @@ while test $# -ne 0; do cleanup=all ;; "-b"|"--bibtex") - bibtex=1 + bbl=1 ;; "--latex") latex=1 @@ -294,8 +301,15 @@ while test $# -ne 0; do xelatex=1 ;; "--biber") - biber=1 + BIBTEX_EXEC=biber + bbl=1 ;; + "--run-bibtex") + bibtex=1 + ;; + "--run-biber") + biber=1 + ;; "--verbose"|"-v") verbose=1 ;;