gbranden pushed a commit to branch master
in repository groff.
commit e9828b2927d9c995098c5d5ab0888b9fcd9e84cc
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Oct 21 01:41:20 2023 -0500
[man, mdoc]: Adjust vertical margins.
* tmac/an.tmac (TH):
* tmac/mdoc/doc-common (doc-set-up-titles): Update default footer trap
location to leave a half-inch margin below the footer, not 1/2 inch
minus one vee.
* tmac/an.tmac (PT):
* tmac/mdoc/doc-common (doc-header): Adjust vertical spacing at page top
to leave a half-inch above the header, and 1 inch distance from the
page top to the top of the running text (in practice, the "Name"
section heading).
* tmac/groff_man.7.man.in (Options) <-rFT>:
* tmac/groff_mdoc.7.man (Options) <-rFT>: Document new default.
* tmac/tests/an_P-register-works.sh:
* tmac/tests/andoc_P-register-works.sh:
* tmac/tests/doc_P-register-works.sh: Update test expectations.
* NEWS: Add item.
---
ChangeLog | 21 +++++++++++++++++++++
NEWS | 8 ++++++++
tmac/an.tmac | 6 +++---
tmac/groff_man.7.man.in | 2 +-
tmac/groff_mdoc.7.man | 2 +-
tmac/mdoc/doc-common | 6 +++---
tmac/tests/an_P-register-works.sh | 4 ++--
tmac/tests/andoc_P-register-works.sh | 24 ++++++++++++------------
tmac/tests/doc_P-register-works.sh | 4 ++--
9 files changed, 53 insertions(+), 24 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5d1e4105d..69152488b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2023-10-21 G. Branden Robinson <[email protected]>
+
+ * tmac/an.tmac (TH):
+ * tmac/mdoc/doc-common (doc-set-up-titles): Update default
+ footer trap location to leave a half-inch margin below the
+ footer, not 1/2 inch minus one vee.
+ * tmac/an.tmac (PT):
+ * tmac/mdoc/doc-common (doc-header): Adjust vertical spacing at
+ page top to leave a half-inch above the header, and 1 inch
+ distance from the page top to the top of the running text (in
+ practice, the "Name" section heading).
+
+ * tmac/groff_man.7.man.in (Options) <-rFT>:
+ * tmac/groff_mdoc.7.man (Options) <-rFT>: Document new default.
+
+ * tmac/tests/an_P-register-works.sh:
+ * tmac/tests/andoc_P-register-works.sh:
+ * tmac/tests/doc_P-register-works.sh: Update test expectations.
+
+ * NEWS: Add item.
+
2023-10-16 G. Branden Robinson <[email protected]>
* tmac/refer.tmac (ref*add-J, ref*add-D, ref*add-E, ref*add-G)
diff --git a/NEWS b/NEWS
index 2c87e9880..d8fb37954 100644
--- a/NEWS
+++ b/NEWS
@@ -91,6 +91,14 @@ o The an (man) macro package now supports a `TS` register to
configure
paragraph indentation, the line is broken after the tag.) This
parameter, formerly hard-coded as `1n`, now defaults to `2n`.
+o The an (man) and doc (mdoc) macro packages now use slightly different
+ vertical margins when formatting for typesetters, to align more
+ closely with the traditional ones. Per man(7) in the AT&T Unix System
+ III manual (June 1980), the text area was 6.5 by 10 inches. When
+ formatting for terminals with continuous rendering disabled (by
+ default, it is enabled), the page footer now sets 1 line higher than
+ before.
+
o The new macro file "koi8-r.tmac" supports the KOI8-R character
encoding, which supports the new Russian locale for groff.
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 4dc059fe0..1a730cf6a 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -354,7 +354,7 @@
. if !\\n[cR] \{\
. wh 0 an-header
. ie r FT .nr an*footer-location \\n[FT]
-. el .nr an*footer-location (-.5i)
+. el .nr an*footer-location (-.5i - 1v)
. wh \\n[an*footer-location]u an-footer
. wh (\\n[an*footer-location]u - .5i) an-break-body-text
. rr an*footer-location
@@ -417,7 +417,7 @@
.if d PT .ig
.de1 PT
. ie \\n[cR] .pl +1v
-. el .sp .5i
+. el .sp (.5i - .5m)
. if !\\n[an*was-TH-bookmark-emitted] \{\
. an*bookmark 1 \E*[an*page-ref-string]
. nr an*was-TH-bookmark-emitted 1
@@ -427,7 +427,7 @@
. pl +1v
. sp 1v
. \}
-. el .sp |1i
+. el .sp |(1i - 1m)
..
.
.\" Write the page footer; can be redefined by man.local.
diff --git a/tmac/groff_man.7.man.in b/tmac/groff_man.7.man.in
index acb3fa2f0..38394fcb9 100644
--- a/tmac/groff_man.7.man.in
+++ b/tmac/groff_man.7.man.in
@@ -3590,7 +3590,7 @@ the page text is broken before writing the footer.
.
Ignored if continuous rendering is enabled.
.
-The default is\~\-0.5i.
+The default is \(lq\-0.5i\~\-\~1v\(rq.
.
.
.TP
diff --git a/tmac/groff_mdoc.7.man b/tmac/groff_mdoc.7.man
index f37a1546a..13647652c 100644
--- a/tmac/groff_mdoc.7.man
+++ b/tmac/groff_mdoc.7.man
@@ -5041,7 +5041,7 @@ the page text is broken before writing the footer.
.
It is ignored if continuous rendering is enabled.
.
-The default is \-0.5i.
+The default is \(lq\-0.5i\~\-\~1v\(rq.
.
.
.Pp
diff --git a/tmac/mdoc/doc-common b/tmac/mdoc/doc-common
index 63f3a1fbd..821b12c2f 100644
--- a/tmac/mdoc/doc-common
+++ b/tmac/mdoc/doc-common
@@ -264,7 +264,7 @@
. if !\n[cR] \{\
. wh 0 doc-header
. ie r FT .nr doc-footer-location \n[FT]
-. el .nr doc-footer-location (-.5i)
+. el .nr doc-footer-location (-.5i - 1v)
. wh \n[doc-footer-location]u doc-footer
. wh (\n[doc-footer-location]u - .5i) doc-break-body-text
. rr doc-footer-location
@@ -1010,7 +1010,7 @@
. ev doc-env-dh
. doc-setup-page-layout
. ie \n[cR] .pl +1v
-. el .sp .5i
+. el .sp |(.5i - .5m)
. nr doc-reg-dh \w'\*[doc-page-topic-font]\*[doc-xref]\f[]'
. nr doc-reg-dh1 \w'\*[doc-volume]'
. if (\n[doc-reg-dh] + \n[doc-reg-dh1] + \n[doc-reg-dh] >= \n[.lt]) \{\
@@ -1034,7 +1034,7 @@
. pl +1v
. sp 1v
. \}
-. el .sp |1i
+. el .sp |(1i - 1m)
. ev
. ns
. rm doc-xref
diff --git a/tmac/tests/an_P-register-works.sh
b/tmac/tests/an_P-register-works.sh
index 12f534144..aee3b43a0 100755
--- a/tmac/tests/an_P-register-works.sh
+++ b/tmac/tests/an_P-register-works.sh
@@ -40,11 +40,11 @@ echo "$output"
echo "checking first page footer" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +13$" \
- | grep '^64:' || wail
+ | grep '^63:' || wail
echo "checking second page footer" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +14$" \
- | grep '^130:' || wail
+ | grep '^129:' || wail
test -z "$fail"
diff --git a/tmac/tests/andoc_P-register-works.sh
b/tmac/tests/andoc_P-register-works.sh
index e4e8f77d6..180808f28 100755
--- a/tmac/tests/andoc_P-register-works.sh
+++ b/tmac/tests/andoc_P-register-works.sh
@@ -59,27 +59,27 @@ echo "$output"
echo "checking first document, first page footer (discontinuous)" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +13$" \
- | grep '^64:' || wail
+ | grep '^63:' || wail
echo "checking first document, second page footer (discontinuous)" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +14$" \
- | grep '^130:' || wail
+ | grep '^129:' || wail
echo "checking second document, first page footer (discontinuous)" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +13$" \
- | grep '^196:' || wail
+ | grep '^195:' || wail
echo "checking second document, second page footer (discontinuous)" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +14$" \
- | grep '^262:' || wail
+ | grep '^261:' || wail
echo "checking third document, first page footer (discontinuous)" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +13$" \
- | grep '^328:' || wail
+ | grep '^327:' || wail
echo "checking third document, second page footer (discontinuous)" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +14$" \
- | grep '^394:' || wail
+ | grep '^393:' || wail
# Now, check _with_ continuous numbering. Only the first page is
# numbered P.
@@ -90,27 +90,27 @@ echo "$output"
echo "checking first document, first page footer (continuous)" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +13$" \
- | grep '^64:' || wail
+ | grep '^63:' || wail
echo "checking first document, second page footer (continuous)" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +14$" \
- | grep '^130:' || wail
+ | grep '^129:' || wail
echo "checking second document, first page footer (continuous)" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +15$" \
- | grep '^196:' || wail
+ | grep '^195:' || wail
echo "checking second document, second page footer (continuous)" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +16$" \
- | grep '^262:' || wail
+ | grep '^261:' || wail
echo "checking third document, first page footer (continuous)" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +17$" \
- | grep '^328:' || wail
+ | grep '^327:' || wail
echo "checking third document, second page footer (continuous)" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +18$" \
- | grep '^394:' || wail
+ | grep '^393:' || wail
test -z "$fail"
diff --git a/tmac/tests/doc_P-register-works.sh
b/tmac/tests/doc_P-register-works.sh
index a3fe817fa..847ce7b0d 100755
--- a/tmac/tests/doc_P-register-works.sh
+++ b/tmac/tests/doc_P-register-works.sh
@@ -43,11 +43,11 @@ echo "$output"
echo "checking first page footer" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +13$" \
- | grep '^64:' || wail
+ | grep '^63:' || wail
echo "checking second page footer" >&2
echo "$output" | grep -En "^groff test suite +2022-12-11 +14$" \
- | grep '^130:' || wail
+ | grep '^129:' || wail
test -z "$fail"
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit