groff-commit
[Top][All Lists]
Advanced

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

[groff] 16/16: [pdf.tmac]: Fix problem with hotspot placement.


From: G. Branden Robinson
Subject: [groff] 16/16: [pdf.tmac]: Fix problem with hotspot placement.
Date: Sat, 16 Mar 2024 01:48:54 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit c2e017009874355facd5bbe9ad847225bfd88a3d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Mar 16 00:23:38 2024 -0500

    [pdf.tmac]: Fix problem with hotspot placement.
    
    * tmac/pdf.tmac (pdf*href): Fix problem with hotspot placement when
      there is no link text (illustrated by the "See also" section of pic(1)
      when rendered to PDF).  It is apparently necessary to flush the output
      buffer immediately after constructing certain device control nodes
      ("pdf: markstart" and "pdf: markend" in this case).  Deri understands
      this stuff better than I do; the misapprehensions I exhibited in
      Savannah #65052 might be related.  If that's the case, then the issue
      is maintaining synchrony between the formatter's idea of the drawing
      position and the output driver's.
---
 ChangeLog     | 13 +++++++++++++
 tmac/pdf.tmac |  8 +++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index b4ff8ef6b..697070941 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2024-03-16  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/pdf.tmac (pdf*href): Fix problem with hotspot placement
+       when there is no link text (illustrated by the "See also"
+       section of pic(1) when rendered to PDF).  It is apparently
+       necessary to flush the output buffer immediately after
+       constructing certain device control nodes ("pdf: markstart" and
+       "pdf: markend" in this case).  Deri understands this stuff
+       better than I do; the misapprehensions I exhibited in Savannah
+       #65052 might be related.  If that's the case, then the issue is
+       maintaining synchrony between the formatter's idea of the
+       drawing position and the output driver's.
+
 2024-03-15  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [man]: Fix Savannah #64267.
diff --git a/tmac/pdf.tmac b/tmac/pdf.tmac
index 05d9f1b77..b1cd2966b 100644
--- a/tmac/pdf.tmac
+++ b/tmac/pdf.tmac
@@ -759,7 +759,13 @@ am solely responsible for any bugs I may have introduced 
into this file.
 .   if '\\*[PDFHREF.DESC]'|' .nr pdf:href.pipe 1
 .   nop \&\m[\\*[PDFHREF.TEXT.COLOUR]]\c
 .   device pdf: markstart \\n[rst] \\n[rsb] \\n[PDFHREF.LEADING] 
\\*[pdf:href.link]
-.   if !\\n[pdf:href.pipe] .nop \&\\*[PDFHREF.DESC]\X'pdf: 
markend'\m[\\*[pdf:curcol]]\c
+'   fl
+.   if !\\n[pdf:href.pipe] \{\
+.     nop \&\\*[PDFHREF.DESC]
+.     device pdf: markend
+'     fl
+.     nop \m[\\*[pdf:curcol]]\c
+.   \}
 .   \"
 .   \" Clean up the temporary registers and strings, used to
 .   \" compute the "hot-spot" bounds, and format the reference,



reply via email to

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