diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2024-03-16 00:23:38 -0500 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2024-03-16 00:24:50 -0500 |
commit | c2e017009874355facd5bbe9ad847225bfd88a3d (patch) | |
tree | c5a63d660abb4b99051a5ac6af5b7f39582bd488 | |
parent | 11f321f972eef0bf9262230482a93d071c0bec72 (diff) |
[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.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | tmac/pdf.tmac | 8 |
2 files changed, 20 insertions, 1 deletions
@@ -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, |