Hi John, At 2024-08-09T16:41:11+1000, John Gardner wrote: > [I wrote:] > > All of the terminal output devices groff supports lack overstriking > > support. > > Whoops. I forgot that what I was seeing in less(1) was actually duped I don't think it was duped. It was being clever. There is lots of cleverness in less(1). Some of it makes me cringe. > using an underline effect. On that note, am I right to assume that > \fI+\fP0 is equally implausible by virtue of terminals diverging > wildly in their italicisation support? (Underlining, obliquity, > ignoring the effect outright, etc). Not equally implausible. Most terminals one encounters support enough of what ECMA-48 calls "graphic renditions" that, _generally_, in your exhibit the '+' and the '0' will appear in visually distinguishable styles. But little beyond that can be said: they might be different colors, the plus sign might be in standout (reverse video) mode, it might be underlined, and so on. And a document author, particularly of a man page, does _not_ want to rely solely on text style changes to communicate meaning. Such things go away when people do unspeakable things like copying and pasting chunks of man pages into email messages, losing all formatting. As a rule it's prudent to ensure that your meaning is adequately conveyed when the text is read aloud. That's a laudable practice in all writing. (I assume that Slack and Discord clients support "rich text", and eagerly convert each word of styled text into 100kiB of CSS-ful HTML overhead.[1]) > That reminds me (and I'm being dead serious here), if anybody knows > where a Model 37 can be acquired in 2024, *please* let me know. (I > spent all arvo yesterday searching… seriously). I read somewhere recently, possibly on the TUHS or COFF lists, that Model 33 machines experienced an active and deliberate period of junking. And as far as I know Model 37s were not very common outside of Bell Labs, which partly explains why such devices were known mainly as "ASR 33"s, a misnomer in multiple respects.[2] Who needs a Greek box, anyway? Good luck. If you are ever successful I may send you a draft notice enlisting you in the improvement of groff's hardcopy terminal support. > Why stop there? Such a conditional could match against a named field > (and optional value) in an output driver description (DESC) file, > whether it's recognised by Groff or not. Something like: > > .if T unicode \{ > .if T res > 50 \{ > > I mean, if we're gonna extend the syntax to include something this > niche, we may as well go all the way. Much of the machinery is already in place for this. Numeric expressions are already valid conditional expressions, so all we'd need here is a syntax for interpolating an output device parameter. As it happens, `\T` is _not_ yet taken. So I'd write your thought experiment as follows. .if '\?\T"unicode"\?'\?1\?' .tm hooray! we've got Unicode! .if \T'res'>50 .tm output device has good resolution Except in AT&T troff compatibility mode, switching up delimiters when nesting them is not necessary, but doing so can be kind to humans. And yes, there's a story behind all those wacky `\?` things. ---snip--- 5.23.1 Operators in Conditionals -------------------------------- In 'if', 'ie', and 'while' requests, in addition to the numeric expressions described in *note Numeric Expressions::, several Boolean operators are available; the members of this expanded class are termed "conditional expressions". [...] If the first argument to an 'if', 'ie', or 'while' request begins with a non-alphanumeric character apart from '!' (see below), it performs an output comparison test. (2) (*note Operators in Conditionals-Footnote-2::) 'XXX'YYY' True if formatting the comparands XXX and YYY produces the same output commands. The delimiter need not be a neutral apostrophe: the output comparison operator accepts the same delimiters as most escape sequences; see *note Delimiters::. This "output comparison operator" formats XXX and YYY in separate scratch buffers; after the comparison, the resulting data are discarded. [...] Surround the comparands with '\?' to avoid formatting them; this causes them to be compared character by character, as with string comparisons in other programming languages. .ie "\?|\?"\?\fR|\fP\?" true .el false => false Since GNU 'troff' reads comparands protected with '\?' in copy mode (*note Copy Mode::), they need not even be valid 'groff' syntax. The escape character is still lexically recognized, however, and consumes the next character. .ds a \[ .ds b \[ .if '\?\*a\?'\?\*b\?' a and b equivalent .if '\?\\?'\?\\?' backslashes equivalent => a and b equivalent ---end snip--- (Anyone who hates the word "comparand" can blame me.) I don't know if we'd want to support a `\T[]` syntax as well. Maybe. Regards, Branden [1] I am informed that these technologies, along with GitHub Merge Requests, are the only means of collaboration that developers need take seriously these days. Email is for old men attempting to thwart all progress. https://salsa.debian.org/dep-team/deps/-/merge_requests/8 One can almost see Mark Shuttleworth, or someone of identical properties,[3] holding the control bar of a marionette. [2] "Teletype" was (is?) a trademark, and thus should not be used as a noun. "ASR" was not a model identifier, but an option, and that option specifically designated a unit _without a keyboard_. One is not going to emulate Thompson and Ritchie that way. What people _mean_ when uttering the slovenly, Eric-Raymondesque "ASR-33 teletype" locution is closer to: "Western Electric (or Teletype Corporation) Model 33 (or 37) KSR (teleprinter or teletypewriter)" ...where "KSR" means "keyboard send and receive". There are many ways to abbreviate that lengthy identifer; "ASR-33 teletype" is a poor one. I don't claim to know whether the vertically integrated structure of AT&T, Western Electric, and the Teletype Corporation was stable throughout the lifetime of these products. Regulated monopolies lead to fascinating (and/or dismaying) ownership structures.[4] [3] Like Luca Bocassi plus one billion dollars? [4] https://coppolacomment.substack.com/p/thames-water-and-its-dividends
Attachment:
signature.asc
Description: PGP signature