[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Groff to pdf/Windows

From: Deri James
Subject: Re: [Groff] Groff to pdf/Windows
Date: Thu, 06 Mar 2014 20:08:34 +0000
User-agent: KMail/4.10.5 (Linux/3.10.28-desktop-1.mga3; KDE/4.10.5; x86_64; ; )

On Thu 06 Mar 2014 18:08:10 Keith Marshall wrote:
> On 06/03/14 16:21, Deri James wrote:
> > If you are not using mom the actual command is:-
> > 
> > groff -Tpdf -dPDF.EXPORT=1 -z $cmdstring 2>&1 \
> > 
> >   | grep '^.ds' | groff -Tpdf - $preconv $cmdstring
> So, you're assuming that just one preliminary pass is sufficient to
> resolve the cross references?  That may not be so, and pdfroff is not so
> naive; it performs at least two such passes, and then as many more as
> may be necessary, until two consecutive passes generate identical
> reference dictionaries, (or until it becomes clear that no ultimately
> stable layout is achievable).

It's a bit simpler for me because part of the logic is in the output driver 
(gropdf). All I need are the tag names and the descriptive text associated 
with them. The positioning of hot spots is done with these calls to gropdf:-

\X’pdf: markstart /ANN definition’


\X’pdf: markend’

So if the hotspot "moves" due to previously unfound references which are 
expanded on the second run, the markers also move. (There are also a 
pair of other commands - \X’pdf: marksuspend’ and \X’pdf: markrestart’ 
which are intended to be used in page trap macros to prevent 
headings/footings being included in the hot spotting when the hotspot 
crosses a page boundary).

I had it much easier than you having to do the hotspot location 
calculations in a groff macro.

> > Keith, is there any chance I could add something along these lines to
> > pdfroff if the -T pdf switch is passed to pdfroff?
> Sure.  You have the source, to modify as you see fit, (or, are you
> asking me to help you with that?)

No, I'm happy to suggest a patch, it's just that your scripting 
style/knowledge is far superior so I would welcome the opurtunity to send it 
to you for perusal first.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]