diff options
Diffstat (limited to 'Master/tlpkg/bin')
-rwxr-xr-x | Master/tlpkg/bin/pdflatex-preserve-pdf | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Master/tlpkg/bin/pdflatex-preserve-pdf b/Master/tlpkg/bin/pdflatex-preserve-pdf index f9d70b1e571..befbc364301 100755 --- a/Master/tlpkg/bin/pdflatex-preserve-pdf +++ b/Master/tlpkg/bin/pdflatex-preserve-pdf @@ -15,8 +15,18 @@ # Authors are sometimes responsive to supporting an alternate method for # running the dtx that does not remake the doc (e.g., \ifpdf), but not # always. So we need this workaround. +# +# With a first arg --engine, the second arg is the name of the program +# to invoke, instead of pdflatex. + +if test x"$1" = x--engine; then + shift + engine=$1; shift +else + engine=pdflatex +fi basefile=`echo "$1" | sed 's/\.[^.]*$//'` mv "$basefile.pdf" save.pdf -pdflatex "$@" +$engine "$@" </dev/null mv save.pdf "$basefile.pdf" |