gbranden pushed a commit to branch master
in repository groff.
commit 4c0d979fe785920c64630a867a37856484ca9f66
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Jun 5 00:24:36 2024 -0500
doc/groff.texi.in: Add caveat about `\n%` usage.
Also bump document date.
---
doc/groff.texi.in | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index 82b15fddd..2701fd019 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -464,7 +464,7 @@ Documentation License''.
@title groff
@subtitle The GNU implementation of @code{troff}
@subtitle version @VERSION@
-@subtitle May 2024
+@subtitle June 2024
@author Trent@tie{}A.@: Fisher
@author Werner Lemberg
@author G.@tie{}Branden Robinson
@@ -10223,13 +10223,25 @@ This request is incorrectly documented in the
@acronym{AT&T}
@cindex page number register (@code{%})
@cindex current page number (@code{%})
-The register @code{%} interpolates the current page number.
+The register @code{%} interpolates the page number.
@Example
.de BP
' bp \" schedule page break once current line is output
..
@endExample
+
+@strong{Caution:@:} Interpolations occur before formatting operations.
+The act of filling, breaking, and adjusting a line can change the page
+number. @code{%} is a register like any other, not a placeholder that
+is populated after the line it appears on is formatted. Consider, for
+example, an extremely long page number at the end of the last line on
+the page; numbers aren't hyphenated, so the word containing the page
+number might break the line and the page, causing the reported page
+number to lag by one. This sequencing also means that interpolating the
+@code{%} register inside a diversion (such as a footnote) records the
+page number at the time the diversion is populated, not when it is
+output.
@endDefreq
@Defreq {ne, [@Var{space}]}
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit