• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Reference Documentation: PDF Publishing with GNU Troff


Commit MetaInfo

Revisionafdfa353df9931623bbacb08290bb3227327594d (tree)
Time2024-06-14 18:47:45
AuthorKeith Marshall <keith@user...>
CommiterKeith Marshall

Log Message

Correct manpage page trap and end macro handling.

* tmac/anpdf.tmac (anpdf-atend): New macro; assign it...
(anpdf-reload-man): ...here, as end macro replacement for...
(an-end): ...this default groff_man(7) internal end macro.
(anpdf-reload-man): Append groff_pdfhref(7) page trap handler to...
(PT): ...this groff_man(7) page trap hook.

Change Summary

Incremental Difference

diff -r 6561c094adf2 -r afdfa353df99 tmac/anpdf.tmac
--- a/tmac/anpdf.tmac Tue Jun 11 14:00:23 2024 +0100
+++ b/tmac/anpdf.tmac Fri Jun 14 10:47:45 2024 +0100
@@ -118,7 +118,15 @@
118118 .\"
119119 . anpdf-pdfsync O
120120 . als anpdf-pdfsync pdfsync
121-. em anpdf-pdfsync
121+. em anpdf-atend
122+.
123+.\" We also need to install a page trap handler, to ensure that
124+.\" any links which span page breaks are correctly mapped; it is
125+.\" convenient to attach this to groff_man's existing PT handler,
126+.\" but this will be redefined every time reload-man is called,
127+.\" so we must reattach our handler every time.
128+.\"
129+. pdfhref I -PT PT
122130 .
123131 .\" If TH is called again, ensure that we intercept it; (we must
124132 .\" not allow reload-man to get immediate control, which it will
@@ -137,6 +145,14 @@
137145 .\"
138146 .de anpdf-pdfsync
139147 ..
148+.\" anpdf-pdfsync must be called by the active end-of-input macro;
149+.\" anpdf-atend is assigned, overriding but then encapsulating the
150+.\" default an-end macro, to achieve the required objective.
151+.\"
152+.de1 anpdf-atend
153+. anpdf-pdfsync
154+. an-end
155+..
140156 .
141157 .\" PDF Document Outlines
142158 .\" ---------------------