gbranden pushed a commit to branch master
in repository groff.
commit 15c44e99acc23ad71b37dbd0535fb14314a65f22
Author: G. Branden Robinson <[email protected]>
Date: Sun Sep 15 02:23:07 2019 +1000
tmac/an-old.tmac: Respect man.local's CS and CT.
Move test for definitions of CS and CT registers to after man.local is
sourced; this way we can both respect any setting of those registers in
that file (which is intended for customization by the site
administrator) and ensure that the registers are defined when
dereferenced later.
---
ChangeLog | 8 ++++++++
tmac/an-old.tmac | 8 ++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8cb9aaf..e8f377c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2019-09-15 G. Branden Robinson <[email protected]>
+ * tmac/an-old.tmac: Move test for definitions of CS and CT
+ registers to after man.local is sourced; this way we can both
+ respect any setting of those registers in that file (which is
+ intended for customization by the site administrator) and ensure
+ that the registers are defined when dereferenced later.
+
+2019-09-15 G. Branden Robinson <[email protected]>
+
* **/*.man: Put section headings in title case.
2019-09-13 G. Branden Robinson <[email protected]>
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index bca09c8..50bac10 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -148,7 +148,7 @@
.
. de an-init \" This approach gets multiple man pages right.
. ds an-title "\\$1\"
-. if r CT .if \\\\n[CT] .stringup an-title
+. if \\\\n[CT] .stringup an-title
. ds an-section "\\$2\"
. ds an-extra1 "\\$3\"
. ie (\\n[.$] > 3) .ds an-extra2 "\\$4\"
@@ -364,7 +364,7 @@
. ne (2v + 1u)
. if \\n[.$] \{\
. ds an-section-heading \\$*\"
-. if r CS .if \\n[CS] .stringup an-section-heading
+. if \\n[CS] .stringup an-section-heading
\&\\*[an-section-heading]
. \}
..
@@ -700,6 +700,10 @@
.\" Load local modifications.
.mso man.local
.
+.\" Set CS and CT if and only if man.local did not.
+.if !r CS .nr CS 0
+.if !r CT .nr CT 0
+.
.cp \n[_C]
.
.\" ====================================================================
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit