* date.1: Remove no-longer-needed .nh and .na.
* workman.sh: Modernize the code that disables adjustment and
hyphenation, to work in groff 1.23 too.  Add comments.
---
 date.1     |  2 --
 workman.sh | 18 +++++++++++++++---
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/date.1 b/date.1
index 3a02e7c2..5f334358 100644
--- a/date.1
+++ b/date.1
@@ -4,8 +4,6 @@
 .SH NAME
 date \- show and set date and time
 .SH SYNOPSIS
-.if n .nh
-.if n .na
 .B date
 [
 .B \-u
diff --git a/workman.sh b/workman.sh
index 29f317cb..ad1a9532 100644
--- a/workman.sh
+++ b/workman.sh
@@ -9,12 +9,24 @@ if (type nroff && type perl) >/dev/null 2>&1; then
   # Tell groff not to emit SGR escape sequences (ANSI color escapes).
   export GROFF_NO_SGR=1
 
-  echo ".am TH
-.hy 0
+  printf '%s\n' '.
+.\" -- Tailor groff -man --
+.
+.\" Left-adjust and do not hyphenate.
+.ds AD l
+.nr HY 0
+.
+.\" -- Tailor traditional troff -man --
+.
+.\" Left-adjust and do not hyphenate.
+.am TH
 .na
+.hy 0
 ..
+.\" Omit page headers and footers.
 .rm }H
-.rm }F" | nroff -man - ${1+"$@"} | perl -ne '
+.rm }F
+.' | nroff -man - ${1+"$@"} | perl -ne '
        binmode STDIN, '\'':encoding(utf8)'\'';
        binmode STDOUT, '\'':encoding(utf8)'\'';
        chomp;
-- 
2.50.1

Reply via email to