Browse Source

Make latexdiff "--flatten" option optional with "--no-flatten" parameter

master
Janick Martinez Esturo 12 years ago
parent
commit
92aad14379
  1. 13
      git-latexdiff

13
git-latexdiff

@ -64,6 +64,7 @@ Options:
(default if -o is not used) (default if -o is not used)
--pdf-viewer <cmd> use <cmd> to view the PDF file (default: \$PDFVIEWER) --pdf-viewer <cmd> use <cmd> to view the PDF file (default: \$PDFVIEWER)
--no-cleanup don't cleanup temp dir after running --no-cleanup don't cleanup temp dir after running
--no-flatten don't provide latexdiff the --flatten option
--cleanup MODE Cleanup temporary files according to MODE: --cleanup MODE Cleanup temporary files according to MODE:
- keeppdf (default): keep only the - keeppdf (default): keep only the
@ -139,6 +140,7 @@ output=
initial_dir=$PWD initial_dir=$PWD
tmpdir_prefix="/tmp" tmpdir_prefix="/tmp"
prepare_cmd= prepare_cmd=
flatten=1
subtree=1 subtree=1
uselatexmk= uselatexmk=
latexopt= latexopt=
@ -182,6 +184,9 @@ while test $# -ne 0; do
;; ;;
esac esac
;; ;;
"--no-flatten")
flatten=0
;;
"--ignore-makefile") "--ignore-makefile")
ignoremake=1 ignoremake=1
;; ;;
@ -409,9 +414,13 @@ do
verbose_done verbose_done
done done
verbose "Running latexdiff ${latexdiffopt[@]} --flatten old/$main new/$main > ./diff.tex"
if test "$flatten" = 1; then
latexdiffopt+=("--flatten")
fi
verbose "Running latexdiff ${latexdiffopt[@]} old/$main new/$main > ./diff.tex"
latexdiff "${latexdiffopt[@]}" --flatten old/"$main" new/"$main" > diff.tex || die "latexdiff failed"
latexdiff "${latexdiffopt[@]}" old/"$main" new/"$main" > diff.tex || die "latexdiff failed"
verbose_done verbose_done

Loading…
Cancel
Save