groff
[Top][All Lists]
Advanced

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

Re: [Groff] [groff] table of contents and hyperlinks


From: Deri James
Subject: Re: [Groff] [groff] table of contents and hyperlinks
Date: Sun, 29 Apr 2012 13:39:44 +0100
User-agent: KMail/1.13.7 (Linux/2.6.38.8-desktop-10.mga; KDE/4.6.5; x86_64; ; )

On Friday 27 Apr 2012 06:19:25 bertrand wrote:
> I am using groff 1.21, with the following commands:
> groff -pt -m ms -m pdfmark -m spdf -Tps mydoc.ms > mydoc.ps
> ps2pdf mydoc.ps

If you are using a recent version (from CVS), and want to walk on the wild 
side! You could try using the native PDF driver with:-

groff -pt -Tpdf -ms -m spdf -dPDF.EXPORT=1 -z mydoc.ms 2>&1 | grep '^.ds' | 
groff -pt -Tpdf -ms -m spdf mydoc.ms > mydoc.pdf

In addition, if you want to relocate the TOC to somewhere else in the document 
put:-

.if '\*[.T]'pdf' \X'pdf: pagename here'

somewhere in mydoc.ms and call:-

.if '\*[.T]'pdf' \X'pdf: switchtopage before here'

('after' can be used too) immediately before the .TC at the end of the 
document.

Please note that not every feature of the pdfmark macro is implemented so it 
may not look exactly the same, but you will see that the TOC contains 
clickable links. 

Cheers 

Deri



reply via email to

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