gbranden pushed a commit to branch master
in repository groff.
commit 5719740b0a154eebd048a4546c02d6340f79298d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Dec 13 13:41:38 2025 -0600
groff_out(5): Tweak page-local macro.
* man/groff_out.5.man (indexed_offset): Accept new sixth argument for a
desired trailing `\c`.
(Graphics commands): Use it where needed.
Brought to my attention by an experimental diagnostic that I probably
won't be landing in the Git trunk any time soon.
Here's the notional diagnostic (in category "syntax") in question:
troff:man/groff_out.5:945: warning: ignoring an extra vertical spacing node
token on input line after output line continuation escape sequence
It's not fruitful to complain about "node tokens" after `\c` because
those get injected by diversion requests. When interpreting an
interpolated diversion, the formatter doesn't know that it put the
extra vertical spacing node in there itself.[1] We don't want to warn
about an ill-structured input line that isn't, in fact, ill-structured.
That would be spurious.
The foregoing doesn't obviate the need for this change. Even without
that diagnostic, a trailing `\c` really does need to be the last thing
on the text line that the `indexed_offset` macro constructs.
Problem snuck in, undetected, in commit d8fb0fe543, 9 January 2002.
[1] I think the purpose of the extra vertical spacing node, which
typically has a negative value, is to "back up" over a break so that
diversion ending in a break doesn't include a vee of blank space at
the end.
---
man/groff_out.5.man | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/groff_out.5.man b/man/groff_out.5.man
index e3450bcd3..1e0238444 100644
--- a/man/groff_out.5.man
+++ b/man/groff_out.5.man
@@ -75,7 +75,7 @@ after these commands, otherwise the position is not changed.
..
.de indexed_offset
.offset \fI\\$1\/\fP\d\s-3\\$2\s+3\u\x'\n[.v]/4' \fI\\$3\/\fP\
-\d\s-3\\$4\s+3\u\x'\n[.v]/4' \\$5\x'\n[.v]/4'
+\d\s-3\\$4\s+3\u\x'\n[.v]/4' \\$5\x'\n[.v]/4'\\$6
..
.\" format: .command <name> "<arguments>" <punctuation>
.de command
@@ -942,7 +942,7 @@ position is moved to the terminal point of the drawn curve.
.TP
.Da-command
Draw arc from current position to
-.indexed_offset h 1 v 1 \|+\|\c
+.indexed_offset h 1 v 1 \|+\| \c
.indexed_offset h 2 v 2
with center at
.indexed_offset h 1 v 1 ;
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit