groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AT&T troff requests


From: Humm
Subject: AT&T troff requests
Date: Sun, 27 Mar 2022 16:10:28 +0000

After stumbling upon the .li request in v6 man pages, I took a little look at what requests were removed and added between v7 and Plan 9 4E and at what they did.

.li and .fz went away; .fm, .gd, .ha, and .pt were introduced. As far as I can tell, none of them are mentioned in the Troff User’s Manual (CSTR 54, Plan 9, and Heirloom versions), in Mandoc docs, or in Groff docs. I suggest mentioning these somewhere in the docs, even if not implemented.

.fm, .gd, .ha, and .pt are part of Plan 9 troff and thus usable via 9front and via plan9port. .li and .fz can be used in a v7 VM. The FIXES file mentioned later is part of the Plan 9 and plan9port source trees ((/sys/)src/cmd/troff/FIXES).

Hereafter, I describe what I found about the requests. (Take it with a grain of salt, as I don’t know my way around troff sources well.)

I’m not sure what .fz did.

`.li N` read N (default 1) lines literally.

        .li
        .ab

would have the same effect as

        \&.ab

`.ha N` sets the hyphenation algorithm. The FIXES file, entry from January 1991:

added tex hyphenation, using standard tex data files, but not the
elaborate compressed trie, which is a lot of trouble to save maybe
40k bytes.  this appears to run at exactly the same speed as before.

[…]

the command .ha sets the algorithm.  .ha 1 => tex, with troff rules
if tex doesn't hyphenate;  .ha 0 gives troff rules, and .ha resets
to the default, which is tex.  the hyphenation algorithm is part of
the environment, a nod to a future in which i handle more than one
language.

[…]

`.fm filename string` writes string to a file.

`.pt N` sets the trace mode.  The FIXES file, entry from 1992-07-12:

added .pt request to trace macros and requests (from jaap).
.pt N Print trace of macros (N=1), requests (N=2) or both (N=3)

and from 1992-10-26:

Numeric arguments error reporting:

Controlled by .pt, illegal numbers are now reported (default
trace mode is 1).  This is also true for the escapes:
\h'..', \v'..' \H'..', \S'..', \N'..', \D'..', \l'.., \L'..
and \x'..'.

[…]

Enhancement to .pt:

The .pt now pops the previous values when no argument is
specified. Turned out to be handy when chasing for problems.
Just ``bracked'' the code with .pt 7 and .pt and you get
a trace of only that block. The meaning of the arguments
is now:
        01      trace numeric arguments (default on)
        02      trace requests
        04      trace macros

[…]

`.gd xx` sets number registers dn and dl to the size of diversion xx.

--
Humm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]