groff-commit
[Top][All Lists]
Advanced

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

[groff] 04/15: [man]: Generate PDF bookmark tag for `TH` call.


From: G. Branden Robinson
Subject: [groff] 04/15: [man]: Generate PDF bookmark tag for `TH` call.
Date: Sun, 17 Mar 2024 17:59:37 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit c51c8f6863202b0abc5e21808126c0299cc7f3b0
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Mar 16 09:26:33 2024 -0500

    [man]: Generate PDF bookmark tag for `TH` call.
    
    [man]: When formatting PDF, automatically give each `TH` call a named
    PDF bookmark tag that can be used in links (inside the guts of the `MR`
    macro).
    
    * doc/GMPfront.t.in (reload-man [appendment]): Move logic for declaring
      a named ("tagged") bookmark from here...
    * tmac/an.tmac (an*bookmark*pdf): ...to here.
---
 ChangeLog         | 10 ++++++++++
 doc/GMPfront.t.in |  8 --------
 tmac/an.tmac      |  5 ++++-
 3 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0088b2891..a324d8033 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-03-16  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [man]: When formatting PDF, automatically give each `TH` call a
+       named PDF bookmark tag that can be used in links (inside the
+       guts of the `MR` macro).
+
+       * doc/GMPfront.t.in (reload-man [appendment]): Move logic for
+       declaring a named ("tagged") bookmark from here...
+       * tmac/an.tmac (an*bookmark*pdf): ...to here.
+
 2024-03-16  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/pdf.tmac (pdf*href): Fix problem with hotspot placement
diff --git a/doc/GMPfront.t.in b/doc/GMPfront.t.in
index 4390ea5f3..5fa592ace 100644
--- a/doc/GMPfront.t.in
+++ b/doc/GMPfront.t.in
@@ -12,14 +12,6 @@
 ..
 .
 .am reload-man END
-.de an*bookmark
-.  ie (\\\\$1=1) \{\
-.     ds an*page-ref-nm \\\\$2\"
-.     pdfbookmark -T "\\\\*[an*page-ref-nm]" \\\\$1 \\\\$2
-.  \}
-.  el .pdfbookmark \\\\$1 \\\\$2
-..
-.
 .de1 MR
 .  if ((\\\\n[.$] < 2) : (\\\\n[.$] > 3)) \
 .    an-style-warn .\\\\$0 expects 2 or 3 arguments, got \\\\n[.$]
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 76b90b686..c3881bd46 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -230,7 +230,10 @@
 .ds an*bookmark*utf8 \" empty
 .
 .de an*bookmark*pdf
-.  pdfbookmark \\$1 \\$2
+.  ie (\\$1 = 1) \
+.    pdfbookmark -T "\\$2" \\$1 \\$2
+.  el \
+.    pdfbookmark \\$1 \\$2
 ..
 .
 .



reply via email to

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