gbranden pushed a commit to branch master
in repository groff.
commit 0cc32d8b75d0e94ac2589c5eb5435d747a562d62
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Jul 24 14:15:03 2024 -0500
doc/groff.texi.in: Improve header/footer example.
* Stop using no-break control character to invoke `tl` request; it's not
necessary.
* _Do_ use no-break control character to invoke `sp` and `bp`;
otherwise, the first word of a partially collected line can be output
in the midst of header or footer material.
* Fix positioning of body text to one inch as touted; use
boundary-relative motion operator to get there.
* Fix positioning of footer, adjusting it 1v up the page from the bottom
of the body text so that the margin between them is one half-inch as
touted.
* Improve discussion to motivate application of no-break control
character to the `bp` request, as noted above.
---
doc/groff.texi.in | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index 01777b98e..8c004ce2d 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -14802,20 +14802,22 @@ there.
A macro package might set headers and footers as follows; this example
configures vertical margins of one inch to the body text, and one
half-inch to the titles. Observe the use of the no-break control
-character with @code{sp} request to position our text baselines,
-and the page number character @samp{%} used with the @code{tl} request.
+character with the @code{sp} and @code{br} requests to position our text
+baselines and prevent a partially collected line from being written
+outside the body text, and the page number character @samp{%} used with
+the @code{tl} request.
@Example
.\" hdfo.roff
.de hd \" page header
' sp .5i
-' tl '\\*(Ti''\\*(Da' \" title and date strings
-' sp .5i
+. tl '\\*(Ti''\\*(Da' \" title and date strings
+' sp |1i
..
.de fo \" page footer
-' sp .5i
+' sp .5i-1v
. tl ''%''
-. bp
+' bp
..
.wh 0 hd \" trap at top of the page
.wh -1i fo \" trap 1 inch from bottom
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit