[Top][All Lists]

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

Re: mm(7) DT string and super/subscripts (was: troff Memorandum Macros d

From: Nate Bargmann
Subject: Re: mm(7) DT string and super/subscripts (was: troff Memorandum Macros documentation derived from the paper "MM - Memorandum Macros")
Date: Mon, 9 Aug 2021 09:11:50 -0500

* On 2021 09 Aug 07:12 -0500, G. Branden Robinson wrote:
> Hi, Nate!

Good morning, Branden.

> I took it out as part of commit 4f3b1e33[1], 13 July (just a few weeks
> ago).  I was revising the material that had to do with the `ISODATE`
> macro and `Iso` register, both of which are groff extensions, and I
> found them inadequately documented for my taste.  I further noticed
> that the `DT` string was nowhere used _within_ the macro package proper,
> but only in the extensions that implemented some cover sheet styles,
> which, judging by some bugs I'd found in them, I regarded as
> little-used.
> I didn't realize the `DT` was a traditionally exposed string--it's
> thanks to this thread that some real mm documentation has come my way.
> I haven't been treating O'Reilly and Dougherty's _UTP_ as comprehensive
> or authoritative, because with ms I know they encourage the reader to
> get under the hood and muck around with package internals.

So far I've not read much of the book[1] closely.  I have skimmed
through Chapter 4 and on page 4-117 (page 247 of the PDF) is a table of
the available MM strings.  Given that I've seen example dates from
1987/88, this list may be quite close to the final AT&T MM (it really
doesn't appear that Apple changed much, if anything in this regard, but
I'm mostly guessing).

> It looks like I will need to restore documentation of the string, so
> I'll do that.


> It would be straightforward to bring over the super- and subscripting
> macros from groff ms; this would give us string names that "port" across
> all of groff ms, mm, and me(7), which seems like an ergonomically kind
> thing to do.
> Here are the definitions from groff ms[2][3].
>       .\" superscript
>       .ds par@sup-start \v'-.9m\s'\En[.s]*7u/10u'+.7m'
>       .als { par@sup-start
>       .ds par@sup-end \v'-.7m\s0+.9m'
>       .als } par@sup-end
>       .\" subscript
>       .ds par@sub-start \v'+.3m\s'\En[.s]*7u/10u'-.1m'
>       .als < par@sub-start
>       .ds par@sub-end \v'+.1m\s0-.3m'
>       .als > par@sub-end
> The internal string names would not necessarily be the same for mm,
> though they might be: groff mm is architecturally quite similar to
> groff ms in this respect.
> It's certainly easy to do.
> What do you think?

The same document[1] has a slightly different formula on page 3-36 (102)
for a superscript:

        \v'-.5'\s-4\&2\sO\v' .5'

Also in my searches the MOM documentation for superscript[2] has this

"Mom does a pretty fine job of making superscripts look good in any font
and at any size. If you’re fussy, though (and I am), about precise
vertical placement, kerning, weight, size, and so on, you may want to
roll your own solution."

So, it might be a good exercise to look at how Peter handles this as
well.  I looked there but got lost.  Quickly!  ;-)

Regarding the MS formula, for the font family I chose, I did modify it
to not raise as high by changing the .9m to .8m which I think lined up
slightly better.

- Nate



"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."

GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819

Attachment: signature.asc
Description: PGP signature

reply via email to

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