Follow-up Comment #8, bug #68252 (group groff):

At 2026-04-17T20:28:43-0400, G. Branden Robinson wrote:
> Let me enumerate the differences.

(between the AT&T USG Unix System V "R1" man `TH` macro and the one
stuck to the top of the 750ops.8 man page and a few others that appear
in the release Clem has, and sporadically in Ryan Woodsmall's "oldsysv"
Unix archive on GitHub)

Most of the differences I enumerated were actually between Seventh
Edition Unix man(7) by McIlroy and SVR1.

The `TH` replacement macro devised by the unknown USG engineer actually
did only two things.


$ diff -U1 /tmp/TH-SVr1 /tmp/TH-that-80s-guy | cat -v
--- /tmp/TH-SVr1        2026-04-20 11:28:34.133366772 -0500
+++ /tmp/TH-that-80s-guy        2026-04-20 11:29:47.701090656 -0500
@@ -6,4 +6,4 @@
 .if\\n()s .ds ]D
-.if\\n()t .ds ]D UNIX 5.0
-.ifn .ds ]D UNIX 5.0
+.if\\n()t .ds ]D UNIX System V
+.ifn .ds ]D UNIX System V
 .ds]L
@@ -14,3 +14,3 @@
 .em}M
-.if\\n(nl .bp 1
+.if\\n(nl .bp
 .nr)I \\n()Mu


Three observations:

1.  These changes _should_ have been made in the distribution's "an.src"
    file.  That way they'd have applied generally and consistently to
    man pages rendered on the system.

2.  The continuous page numbering achieved by the second "hunk" of the
    diff has been achievable from the groff command line since day one
    (back in 1989 or so) via the `-rC1` option.  One can also add:


.nr C 1
-verbatim+

    to one's "man.local" file (see _groff_man_(7)) or a "preloaded"
    macro file to configure a batch of man pages for System V-compatible
    rendering.

3.  The same "man.local" or preloaded macro file technique can be used
    to fix up the page footer as the first hunk of the diff does.

+verbatim+
.AT 5
-verbatim+

These needs were recognized long ago, which I think is why SunOS 2.0
(1985) introduced the `C` register and 4.3BSD (1986) the `AT` macro.

While I want _groff_ to support the loading and use of legacy or foreign
macro packages, including alternative implementations of familiar macro
packages, I'm not unwilling to accept the support burden of macro files
(or, past an uncertain point, documents), that rely upon mucking about
with undocumented package internals--groff's, AT&T's, or anyone else's.
Unless _groff_'s input is supplied the undocumented resources as well.

So while rendering the "750ops.8" document as-was falls outside the
support boundary I delineated above, because it replaces the `TH` macro
_and_ the replacement assumes the availability of undocumented _man_(7)
registers, strings, and macros, rendering it with System V's own _man_
package with GNU _troff_ as the formatter **is** supportable.

Contrast:

+verbatim+
$ groff -t -C -man SPECIMENS/clem-man-page/ORIG/750ops.8


with:


$ groff -C -t -M HISTORY/MAN/1983-01-SystemV -m ansvr1 -m an \
  SPECIMENS/clem-man-page/ORIG/750ops.8


Finally, and to reiterate the foregoing advice, I think the following
solution is probably best.


$ cat SPECIMENS/altman/ansvr1.tmac
.\" Tune groff man(7) macros to simulate AT&T System V ("R1").
.nr C 1
.AT 5
$ groff -C -t -m an SPECIMENS/altman/ansvr1.tmac \
  SPECIMENS/clem-man-page/ORIG/750ops.8


Regards,
Branden



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68252>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to