On Tue, Nov 21, 2023 at 01:55:57PM +0100, Preuße, Hilmar wrote: > > Hilmar, please hold on with upload. I need to improve the patch as it breaks > > with absolute paths. Don't know where I made the mistake because I was > > testing > > for it before going public. Anyway I need to come with a better fix. > > Will keep you posted... > > > > Thanks for information. I'll comment the patch for now.
This patch passed all my testing. Pavel
--- pfarrei.tlu 2023-11-21 11:43:19.611137725 +0100 +++ pfarrei.tlu 2023-11-21 11:46:53.993277671 +0100 @@ -100,11 +100,15 @@ -- build the temporary tex file local tmpdir = os.tmpdir("pfarrei.XXXXXX" ) local tmpfile = string.match( arg[i], '.*/(.*)$') or arg[i] + -- pdflatex's -output-directory search for source pdf works with path specification but fails + -- when simple file name in the current working directory is provided, we need to provide '../' then + local local_source='' + if tmpfile == arg[i] then local_source = '../' end local basename = string.match( tmpfile,'(.*)%.[^.]*$') or tmpfile tmpfile = tmpdir..'/'..basename..'.tex' local file = assert( io.open( tmpfile, 'w' ) ) if booklet then assert( file:write("\\PassOptionsToPackage{booklet}{pfarrei}\n") ) end - assert( file:write("\\def\\OriginalFile{",arg[i],"}\n") ) + assert( file:write("\\def\\OriginalFile{"..local_source,arg[i],"}\n") ) assert( file:write("\\input{a5toa4.tex}\n") ) assert( file:flush() ) file:close()