[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 05/31: [man]: Slightly refactor.
From: |
G. Branden Robinson |
Subject: |
[groff] 05/31: [man]: Slightly refactor. |
Date: |
Mon, 31 Jan 2022 11:27:59 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 091a6cd7dd96f3525f8e0c7f1ba9e9dd34bdccae
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Jan 29 06:44:27 2022 +1100
[man]: Slightly refactor.
* tmac/an.tmac (an-prepare-page-title): Rename to...
(an*prepare-page-title): ...this. Also simplify numeric expression.
Add comment regarding necessity of correct environment.
(an-header): Update call site of `an*prepare-page-title`.
---
ChangeLog | 11 +++++++++++
tmac/an.tmac | 7 ++++---
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e9e14472..f4d2fb9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2022-01-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [man]: Slightly refactor.
+
+ * tmac/an.tmac (an-prepare-page-title): Rename to...
+ (an*prepare-page-title): ...this. Also simplify numeric
+ expression. Add comment regarding necessity of correct
+ environment.
+
+ (an-header): Update call site of `an*prepare-page-title`.
+
2022-01-27 Dave Kemper <saint.snit@gmail.com>
[man pages]: Add more references to pic(1)'s .PF.
diff --git a/tmac/an.tmac b/tmac/an.tmac
index c39276e5..544c74ba 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -359,7 +359,8 @@
.\" Abbreviate the page title if it's too long for the header. Leaves
.\" string an-pageref defined for use in .PT and .an-footer. Also
.\" leaves an-title-abbv for possible use by .PT and .BT re-definers.
-.de an-prepare-page-title
+.\" Call this only from within the header/footer environment.
+.de an*prepare-page-title
. ds an-title-abbv \\*[an-title]\" might not get abbreviated at all
. ds an-title-string \\*[an-title]\"
. ds an-ellipsis \|.\|.\|.\|\"
@@ -382,7 +383,7 @@
. \" characters of the title remain intact (in cases of pathological
. \" shortening).
. substring an-prefix 0 (\\n[an-mark1] >? 1)
-. substring an-suffix (\\n[an-mark2] <? (\\n[an-title-length] - 1) -1
+. substring an-suffix (\\n[an-mark2] <? \\n[an-title-length] - 1) -1
. ds an-title-string \\*[an-prefix]\\*[an-suffix]\"
. ds an-title-abbv \\*[an-prefix]\\*[an-ellipsis]\\*[an-suffix]\"
. \" Measure the string again and give up if we made no progress.
@@ -474,7 +475,7 @@
. ps \\n[PS]u
. vs \\n[VS]u
. lt \\n[LT]u
-. an-prepare-page-title
+. an*prepare-page-title
. ie \\n[cR] .pl +1v
. el .sp .5i
. PT
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 05/31: [man]: Slightly refactor.,
G. Branden Robinson <=