groff
[Top][All Lists]
Advanced

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

Why are Groff's macro packages not PDF-aware by default?


From: John Gardner
Subject: Why are Groff's macro packages not PDF-aware by default?
Date: Mon, 15 Jun 2020 21:24:23 +1000

When preparing PDF output, Groff will automatically load PDF-specific macro
packages (such as pdfmark.tmac). I'm wondering why man(7), mdoc(7) and
friends aren't leveraging PDF features like outlines and clickable links.
For example, headings and subheadings should logically generate an outline
and named destinations [1], while cross-references and web links should be
made clickable.

Modifying the macro packages to use these features wouldn't be hard. It's
simply a matter of

.if '\*(.T'pdf' .if d pdfmark \{\

.    pdfmark …

.\}


… possibly with an additional check for a register to disable "auto-PDFing"
of formatted documents.

Thoughts?

[1] - That's PDF lingo for *"navigable table of contents"* and *"anchored
location that you can jump to"*, respectively. Adobe's pdfmark reference
<https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/pdfmark_reference.pdf>
can explain more.


reply via email to

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