diff --git a/git-latexdiff b/git-latexdiff index 18960b3..b05b9bc 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -656,12 +656,14 @@ do verbose_done done -if [ "$ignorelatexerrors" = 1 ]; then - latexopt="$latexopt -interaction=batchmode" -elif [ "$quiet" = 1 ]; then - latexopt="$latexopt -interaction=nonstopmode" -else - latexopt="$latexopt -interaction=errorstopmode" +if test $tectonic != 1; then + if [ "$ignorelatexerrors" = 1 ]; then + latexopt="$latexopt -interaction=batchmode" + elif [ "$quiet" = 1 ]; then + latexopt="$latexopt -interaction=nonstopmode" + else + latexopt="$latexopt -interaction=errorstopmode" + fi fi # Option to use latexdiff --flatten instead of latexpand @@ -789,6 +791,11 @@ elif test "$uselatexmk" = 1; then compile_error=1 error_msg="command 'latexmk' failed." } +elif test "$tectonic" = 1; then + log_cmd tectonic.log tectonic $latexopt "$mainbase.tex" || { + compile_error=1 + error_msg="command 'tectonic' failed." + } else log_cmd pdflatex1.log $LATEX_EXEC $latexopt "$mainbase" || { compile_error=1 diff --git a/tests/tectonic/run-test.sh b/tests/tectonic/run-test.sh new file mode 100755 index 0000000..4c768eb --- /dev/null +++ b/tests/tectonic/run-test.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +die () { + echo "fatal: $*" + exit 1 +} + +cd "$(dirname "$0")/../bib" || exit + +old=b9a200a6a0c45d6c594cb3c5473edd81a7edb52c +new=cbce899ba408849a471461bb9b5d648bf02039ef + +echo "git latexdiff with --tectonic should work" +../../git-latexdiff --tectonic -v $old $new > tectonic.log 2>&1 || + die "latexdiff with --tectonic failed."