[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: man Macro Package and pdfmark
From: |
Steffen Nurpmeso |
Subject: |
Re: man Macro Package and pdfmark |
Date: |
Fri, 14 Feb 2020 00:58:50 +0100 |
User-agent: |
s-nail v14.9.17-43-g63b6e03a |
Jeff Conrad wrote in
<address@hidden\
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)
- man Macro Package and pdfmark, Jeff Conrad, 2020/02/13
- Re: man Macro Package and pdfmark,
Steffen Nurpmeso <=
- Re: man Macro Package and pdfmark, Ingo Schwarze, 2020/02/14
- Re: man Macro Package and pdfmark, Steffen Nurpmeso, 2020/02/14
- RE: man Macro Package and pdfmark, Jeff Conrad, 2020/02/14
- Re: man Macro Package and pdfmark, Ingo Schwarze, 2020/02/15
- RE: man Macro Package and pdfmark, Jeff Conrad, 2020/02/15
- Re: man Macro Package and pdfmark, Deri, 2020/02/15
- Re: man Macro Package and pdfmark, Ingo Schwarze, 2020/02/16
- Re: man Macro Package and pdfmark, Werner LEMBERG, 2020/02/16
- Re: man Macro Package and pdfmark, Larry McVoy, 2020/02/16
- Re: man Macro Package and pdfmark, John Gardner, 2020/02/16