At 2018-12-16T17:15:47+0100, Ingo Schwarze wrote:
> So i don't regard it as a big mystery how the rule "put all caps
> into the source code for section headers" came to be.  The question
> only is whether it is worth editing thousands of manual pages for
> each operating system to get rid of the rule now.

I think that is a false dilemma; between changing everything and
changing nothing.

Since we don't have power over all the man pages in existence, it's easy
to predict how such a dilemma gets decided.

It's my intention to downcase man page names (.TH) and section headings
(.SH)[1] in groff after 1.22.4 is released.

Cognizant of conservative attitudes, I'm of course willing to do the
work to support the transformation of these items back into shouting
capitals at the macro package level.

I'm attaching a quick example of how to address this for section
headings.

Regards,
Branden

[1] .SH is one of those annoying macros that eats the next input line as
its parameter if no arguments are given on the same line.
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index 971d2cd5..0251ff41 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -134,6 +134,13 @@
 .  nr an-saved-prevailing-indent1 \\n[IN]
 ..
 .
+.nr do-fullcaps-section-heading 1
+.
+.de possibly-fullcaps-transform
+.ie \\$1 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
+.el      .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
+..
+.
 .ds an-extra1
 .ds an-extra2
 .ds an-extra3
@@ -361,7 +368,9 @@
 .  ps \\n[PS-SH]u
 .  ft \\*[HF]
 .  ne (2v + 1u)
+.  possibly-fullcaps-transform \\n[do-fullcaps-section-heading]
 .  if \\n[.$] \&\\$*
+.  possibly-fullcaps-transform 0
 ..
 .
 .de1 SS

Attachment: signature.asc
Description: PGP signature

Reply via email to