diff options
author | Karl Berry <karl@freefriends.org> | 2016-03-20 23:05:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-03-20 23:05:01 +0000 |
commit | 8e40493a78e68ac15c343e70ded4c5d131bfa1d4 (patch) | |
tree | cf9d3cf3c3d108c22d8ff539235ce6fcedcdfac3 /Master/tlpkg/bin/pdflatex-preserve-pdf | |
parent | 08bcc7ae8d3ce3f5c1e3a2355a239cd3c2f538cb (diff) |
doc tweaks
git-svn-id: svn://tug.org/texlive/trunk@40090 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/pdflatex-preserve-pdf')
-rwxr-xr-x | Master/tlpkg/bin/pdflatex-preserve-pdf | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Master/tlpkg/bin/pdflatex-preserve-pdf b/Master/tlpkg/bin/pdflatex-preserve-pdf new file mode 100755 index 00000000000..f9d70b1e571 --- /dev/null +++ b/Master/tlpkg/bin/pdflatex-preserve-pdf @@ -0,0 +1,22 @@ +#!/bin/sh -ex +# $Id$ +# Public domain. Originally written by Karl Berry, 2015. +# This tiny script is used from ctan2tds as a specialinsrunner. +# +# The problem is that a number of packages make it impossible to +# generate derived files (.sty) from their .dtx without also +# regenerating the documentation (.pdf). Which we do not want to do, +# because remaking the doc generally involves many steps, external +# programs, and who knows what else. +# +# Thus this script saves foo.pdf, runs pdflatex foo.tex, then restores +# foo.pdf. That way we get the derived files but the author's .pdf. +# +# 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. + +basefile=`echo "$1" | sed 's/\.[^.]*$//'` +mv "$basefile.pdf" save.pdf +pdflatex "$@" +mv save.pdf "$basefile.pdf" |