Hi Dan,
At 2025-10-05T01:51:20-0400, Dan Plassche wrote:
> On Thu, 2 Oct 2025, G. Branden Robinson wrote:
> > > .XE and the other table of contents macros were added into 4.2BSD
> > > outside of the tmac directory under /usr/lib/ms in 1983.
> >
> > I don't think the Eighth Edition Unix man(7)'s `XE` has anything to
> > do with Berkeley ms's `XE`.
>
> Ah, agreed. The v8 XE macro forcing the system eqn pipeline on man
> documents is separate and totally different.
>
> I started thinking more generally regarding lq/rq, but should have
> looked again closely at v8 man.
>
> Going back to your question specific to v8 man and BSD ditroff man, I
> notice that:
>
> - the 1C/2C v8 man macros have no shared elements
> with the v7+ ms versions and are not in the ditroff
> man (local/ditroff.old.{okeeffe,van}/tmac/tmac.an)A lot of man/ms overlap is like that. Identical names for broadly similar purposes, with the implementations differing. > - man macros between v7 and v8 are missing all items > (lq/rq, 1C/2C, XE) in sys III (vers 1.35 198005) > and pdp11v (vers 1.37 198012) Acknowledged. > - the BSD ditroff man is very similar to v7 with a > few minor additions of .IP for indented paragraph, `IP` was already implemented and documented in V7 man(7). https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/lib/tmac/tmac.an https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/man/man7/man.7 > .DS/.DE compatibility with ms, Ahh, so _that's_ where the notion of a `DS`/`DE` pair in man(7) came from. > and .P as an alias for .PP That was a PWB/USG(?) initiative from System III, or maybe earlier, the attested-but-unavailable PWB 2.0. To me, it looks like a training wheel for mm(7) document authors, as `LP` and `PP` were for ms(7) authors. I expect BSD ditroff added it so that man pages from "packages" (to indulge a near-anachronism) targeting AT&T Unix would render acceptably on BSD Unix. If you haven't reviewed groff_man(7)'s "History" subsection recently, here it is. History M. Douglas McIlroy ⟨[email protected]⟩ designed, implemented, and documented the AT&T man macros for Unix Version 7 (1979) and employed them to edit Volume 1 of its Programmer’s Manual, a compilation of all man pages supplied by the system. The package supported the macros listed in this page not described as extensions, except P and the deprecated AT and UC. It documented no registers and defined only R and S strings. UC appeared in 3BSD (1980). Unix System III (1980) introduced P and exposed the registers IN and LL, which had been internal to Seventh Edition Unix man. PWB/Unix 2.0 (1980) added the Tm string. 4BSD (1980) added lq and rq strings. SunOS 2.0 (1985) recognized C, D, P, and X registers. 4.3BSD (1986) added AT and P. Ninth Edition Unix (1986) introduced EX and EE. SunOS 4.0 (1988) added SB. Unix System V (1988) incorporated BSD’s lq and rq strings. Except for EX/EE, James Clark implemented the foregoing features in early versions of groff. Later, groff 1.20 (2009) resurrected EX/EE and originated SY/YS, TQ, MT/ME, and UR/UE. Plan 9 from User Space’s troff introduced MR in 2020. The last sentence in the second paragraph is thanks to you. https://lists.gnu.org/archive/html/groff-commit/2025-10/msg00009.html > > The implementation itself is starkly different from V7 to V8. It > > looks like the people behind PWB (USG?) whacked on the man(7) > > package pretty hard, imposed their own (less readable) code style, > > and CSRC reimported it and built their innovations on that. > > Anecdotally I recall mentions of pwb cutting comments from > macros and then delivering compressed versions system-wide as > fallout from efforts to speed up mm runtimes. Ahh. Apparently that was still thought desirable or necessary in 1989, because James Clark implemented something similar in a script called "strip.sed". In the groff community it became known as "the stripper", and was mooted for removal several times before I acted on the obvious consensus. https://mail.gnu.org/archive/html/groff/2018-03/msg00019.html https://lists.gnu.org/archive/html/groff-commit/2021-07/msg00007.html https://lists.gnu.org/archive/html/groff-commit/2021-07/msg00008.html https://lists.gnu.org/archive/html/groff-commit/2021-07/msg00020.html https://lists.gnu.org/archive/html/groff-commit/2021-07/msg00021.html https://lists.gnu.org/archive/html/groff-commit/2021-07/msg00022.html https://lists.gnu.org/archive/html/groff-commit/2021-07/msg00023.html > Definitely less readable and structured. System V Release 2 > ended up shipping full macros with comments and compressed > versions without. > > By PWB I guess I mean PWB 2.0, a predecessor of Unix System III, > > since TUHS doesn't have a copy of PWB2 but does of PWB1, which > > appears to me to offer no man(7) macros as we know them at all. > > (That makes sense if PWB1 is a descendant of V6 Unix rather than > > V7.) > > Seems reasonable. I also have never been able to find a copy of pwb 2 > anywhere. The origin point for v8 should have been around 1982 based > upon 4.1BSD (1981) and using man macros from before pdp11v (1983), I believe I've read that v8 imported 4.1cBSD specifically, probably in an account from Doug McIlroy. > but that makes the man macro omissions in 1984-85 BSD/Kent ditroff > from research seem odd. Maybe the innovations were thought unwelcome...or unutilized in practice. I've never heard any clamor for general display macros in man(7). When people want a display, they seem to be after an example display, a need V9 Unix met with `EX` and `EE`. (Similarly, V8 Unix man(7)'s own `1C` and `2C` macros seem not to have achieved liftoff. I don't recall seeing any evidence of it in use in the paper V8 manual in my possession.) The `lq` and `rq` strings were an excellent idea, though, given the package's unmet need for a quotation facility and highly variable means of obtaining quotation characters on the various supported devices. That's exactly the sort of thing that should be abstracted. I guess the Teletype Model 37 cast too long a shadow over quotation practices at the CSRC, even once it was possible to play Breakout on the Blit.[1] ;-) When my tuits are rounded enough I'll get my plan9port patch submitted, and then they'll be truly universally portable. Regards, Branden [1] Not Pong, because the Blit had a portrait-mode display... 😛
signature.asc
Description: PGP signature
