On Thu 06 Mar 2014 17:24:09 Peter Schaffter wrote: > > Keith, is there any chance I could add something along these lines > > to pdfroff if the -T pdf switch is passed to pdfroff? > > I'm all for this. pdfmom performs splendidly. Nary a hitch with > forward references. Non-mom users could really benefit from the > convenience.
Keith is correct. There is an occasion where three passes are needed. When a hot link description includes a page number (\n[%]) if the expansion to the text before this point causes it to move to the next page the descriptive text, collected on the first pass, will be out of date. So a third pass is necessary. And the command becomes:- groff -Tpdf -dPDF.EXPORT=1 -z $cmdstring 2>&1 | grep '^\.ds' | \ groff -Tpdf -dPDF.EXPORT=1 -z - $cmdstring 2>&1 | grep '^\.ds' | \ groff -Tpdf - $preconv $cmdstring Cheers Deri