groff
[Top][All Lists]
Advanced

[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: Thu, 12 Aug 2021 08:43:08 -0500

* On 2021 11 Aug 20:30 -0500, Dave Kemper wrote:
> On 8/9/21, G. Branden Robinson <g.branden.robinson@gmail.com> wrote:
> >
> >     \v'-.5'\s-4\&2\s0\v'.5'
> >
> > The use of \&, unnecessary here as far as I know, suggests to me that
> > someone got burned by the magic syntax of the \s escape sequence.
> 
> The \& is unnecessary for correct machine parsing, but it surely aids
> human eyes, which could otherwise potentially misread \s-42.  A
> handful of users may have memorized the cutoffs for \s's magic, but
> others would have to consult another manual to check.  The \& makes it
> immediately clear the "2" is not part of the "\s" escape.

In perusing CSTR #54 [1] in section 11.1 "Local Motions." the last
paragraph gives this example:

        As an example, E2 could be generated by the
        sequence E\s–2\v’–0.4m’2\v’0.4m’\s+2; note that the 0.4 em
        vertical motions are at the smaller size.

In this way the author apparently intends to disambiguate the magic of
\s by following it immediately with \v,  As the parameters to \v must be
quoted, the 2 becomes visually isolated and no need for \&.  As noted,
the roff user must be careful to understand that \v now computes from
the smaller point size set by \s.

As I understand it, with macros the escapes would be "hidden" and the
ambiguity of the \s magic would not be evident to the roff author, e.g.
E\*[SUPER_START]2\*[SUPER_END], etc.

- Nate

[1] https://www.troff.org/54.pdf

-- 

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

Web: https://www.n0nb.us
Projects: https://github.com/N0NB
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]