groff
[Top][All Lists]
Advanced

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

Re: [Groff] Is there a way to make PDF with table of contents (and links


From: Kees Zeelenberg
Subject: Re: [Groff] Is there a way to make PDF with table of contents (and links) ?
Date: Mon, 22 Jan 2001 00:00:52 +0100

Here it is, as a small zipfile.
I will write the documentation within a few weeks. Not much is needed though: 
they work
silently by redefining the NH and SH macros. The first time you run groff with 
-mspdfref, you
may get a warning that a .out file is missing; simply run groff -ms -mspdfref 
again. After
distilling the postscript file generated by groff, the bookmarks should appear 
in the pdf file.
The lower levels appear indented; the SH sections are assumed to be at the 
lowest level.
There is one limitation: the macros assume that the section title given to NH 
or SH consists of
one line; nor must they contain math (this gives a problem when viewing the pdf 
document, since
the bookmarks cannot use the symbol font; this is a limitation of pdf, not of 
the macros).
There is one option: the NH-level below which the bookmarks will appear closed 
in the pdf file
(in Acrobat Reader 4.0, you then see a + , in Reader 3 you see a >), can be set 
in the register
NHclosed; the default value is 2 (this option is the reason that the .out file 
and at least two
groff passes are needed, since all SH and NH statements below this level must 
be counted).
If something is wrong with the bookmarks when viewing the pdf document, always 
make another
groff pass over the document, before investigating the problem; usually the 
problem disappears.

Included are similar macros (anpdfref) for the mandoc macro package, but these 
are still very
simple, and only useful if several manpages are first collected in one troff 
document.

Kees Zeelenberg


----- Oorspronkelijk bericht -----
Van: "Werner LEMBERG" <address@hidden>
Aan: <address@hidden>
CC: <address@hidden>; <address@hidden>
Verzonden: zondag 21 januari 2001 16:02
Onderwerp: Re: [Groff] Is there a way to make PDF with table of contents (and 
links) ?


>
> > For the ms macros I have developed supplementary macros that
> > generate bookmarks (the table of contents at the left of the
> > document) [...] No documentation yet and no macros for links.  They
> > work by adding code to the NH and SH macros.  Add the files
> > tmac.pdfref and tmac.spdfref to your tmac folder and add -mspdfref
> > to the command line of groff, after -ms .
>
> This sounds excellent!  Can you finish it, providing some
> documentation, so that I can include it into the groff package?  [I
> would need a copyright assignment paper also...]  Otherwise, can you
> make it available as a small package also (to minimize download size)?
>
>
>     Werner
>

Attachment: pdfref.zip
Description: Zip compressed data


reply via email to

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