diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-09 16:54:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-09 16:54:30 +0000 |
commit | 09fd9c9121cefeb7ebe015102a51a796e2d8a314 (patch) | |
tree | b535dbaecec73e08d3b68c44c7fde7d6bcd99d52 /Master/texmf-dist/scripts/pfarrei | |
parent | ba6b0d9a71177f6c82fd81c79c42254dceca27ad (diff) |
pfarrei (8apr13)
git-svn-id: svn://tug.org/texlive/trunk@29796 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/pfarrei')
-rwxr-xr-x | Master/texmf-dist/scripts/pfarrei/a5toa4.tlu | 4 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/pfarrei/pfarrei.tlu | 27 |
2 files changed, 20 insertions, 11 deletions
diff --git a/Master/texmf-dist/scripts/pfarrei/a5toa4.tlu b/Master/texmf-dist/scripts/pfarrei/a5toa4.tlu index 25c7de5986e..436941eda58 100755 --- a/Master/texmf-dist/scripts/pfarrei/a5toa4.tlu +++ b/Master/texmf-dist/scripts/pfarrei/a5toa4.tlu @@ -28,10 +28,10 @@ -- The list of files belonging to the work `pfarrei' is given in -- the file `pfarrei.dtx'. -- --- $Id: pfarrei.dtx 20 2013-03-10 14:19:06Z mjk $ +-- $Id: pfarrei.dtx 33 2013-04-08 07:22:56Z mjk $ kpse.set_program_name(arg[-1], 'a5toa4') -require('pfarrei') +require('pfarrei.pfarrei') -- -- -- End of file `a5toa4.tlu'. diff --git a/Master/texmf-dist/scripts/pfarrei/pfarrei.tlu b/Master/texmf-dist/scripts/pfarrei/pfarrei.tlu index ee5f0ed8d67..f2756f6f907 100755 --- a/Master/texmf-dist/scripts/pfarrei/pfarrei.tlu +++ b/Master/texmf-dist/scripts/pfarrei/pfarrei.tlu @@ -28,7 +28,7 @@ -- The list of files belonging to the work `pfarrei' is given in -- the file `pfarrei.dtx'. -- -local version_number = string.sub( '$Revision: 20 $', 12, -2 ) +local version_number = string.sub( '$Revision: 33 $', 12, -2 ) local action_version = ' r' .. version_number .. '\n' .. [[ Copyright (c) 2013 Markus Kohm. @@ -62,7 +62,9 @@ local processing_opts = { ['-s'] = 'sidebyside', ['--sidebyside'] = 'sidebyside', ['-o'] = 'overwrite', - ['--overwrite'] = 'overwrite' + ['--overwrite'] = 'overwrite', + ['-d'] = 'debug', + ['--debug'] = 'debug', } -- detect action options and do action @@ -86,12 +88,14 @@ end -- process options and parameters local booklet = false local overwrite = false +local debug = false i = 1 while arg[i] do action = processing_opts[arg[i]] if action == 'booklet' then booklet = true elseif action == 'sidebyside' then booklet = false elseif action == 'overwrite' then overwrite = true + elseif action == 'debug' then debug = true elseif action == nil then -- build the temporary tex file local tmpdir = os.tmpdir("pfarrei.XXXXXX" ) @@ -99,7 +103,7 @@ while arg[i] do local basename = string.match( tmpfile,'(.*)%.[^.]*$') or tmpfile tmpfile = tmpdir..'/'..basename..'.tex' local file = assert( io.open( tmpfile, 'w' ) ) - if booklet then assert( file:write("\\def\\Booklet{}\n") ) end + if booklet then assert( file:write("\\PassOptionsToPackage{booklet}{pfarrei}\n") ) end assert( file:write("\\def\\OriginalFile{",arg[i],"}\n") ) assert( file:write("\\input{a5toa4.tex}\n") ) assert( file:flush() ) @@ -129,12 +133,17 @@ while arg[i] do end assert( destfile:close() ) srcfile:close() - tmpfile=tmpdir..'/'..basename - os.remove( tmpfile..'.aux' ) - os.remove( tmpfile..'.tex' ) - os.remove( tmpfile..'.log' ) - os.remove( tmpfile..'.pdf' ) - os.remove( tmpdir ) + if debug + then + print('DEBUG: Temporary files in: '..tmpdir); + else + tmpfile=tmpdir..'/'..basename + os.remove( tmpfile..'.aux' ) + os.remove( tmpfile..'.tex' ) + os.remove( tmpfile..'.log' ) + os.remove( tmpfile..'.pdf' ) + os.remove( tmpdir ) + end overwrite = false end i=i+1 |