Jeff Conrad wrote in <byapr08mb595924a082577773d11e3a7080...@byapr08mb5959.namprd08.prod.outl\ ook.com>: |A major drawback to manual pages formatted using the man macros is the |lack of bookmarks in a PDF file. A quick and dirty way to get bookmarks |appears to be adding | |.am SH |.pdfbookmark 1 "\&\\$*" |.. |.am SS |.pdfbookmark 2 "\&\\$*" |..
Why quick and dirty? I am using this regulary for my mdocmx(7) macros on top of normal mdoc(7) with groff 1.22.3 (since i have not ported the enhance request to 1.22.4): .de mx:dump-anchor-pdf . \" Outline support . ie '\$1'Sh' .pdfbookmark 1 "\$3" . el .if '\$1'Ss' .pdfbookmark 2 "\$3" . . ie d mx-debug \ . pdfhref M -N "\$2" -E "#\$2#" . el \ . pdfhref M -N "\$2" .. |to the beginning of the man page source (the PDFHREF.VIEW.LEADING |register needs a slight increase to make the heading texts visible when |clicking a bookmark). | |But this results in the message | | "... can't transparently output node at top level"; | |if there are many sections and subsections, there are a lot of messages. I see exactly five such messages with a huge manual page with 666 anchors and thousands (!) of links. |It doesn't seem to cause much harm--the PDF bookmarks are duly created-- |but the messages are distracting, and may make it easier to miss a real |error. I don't get the messages if I call pdfbookmark directly from the |man page source rather than adding them to the macros; this certainly is |a solution, but it does require a fair bit of extra coding that adds |clutter to the document source. For mdoc macros there are a lot of other messages which are distracting, however. |I've looked at pdfmark.tmac and a couple of the groff source files, but |haven't been able to figure out what's happening. | |I get the same message using spdf (e.g., formatting the pdfmark |reference manual); is this just something one does not worry about? That is an interesting question. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)