bug-groff
[Top][All Lists]
Advanced

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

[bug #63116] [eqn] sup and sub render adversarially in nroff mode


From: G. Branden Robinson
Subject: [bug #63116] [eqn] sup and sub render adversarially in nroff mode
Date: Tue, 27 Sep 2022 15:32:18 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?63116>

                 Summary: [eqn] sup and sub render adversarially in nroff mode
                 Project: GNU troff
               Submitter: gbranden
               Submitted: Tue 27 Sep 2022 07:32:17 PM UTC
                Category: Preprocessor eqn
                Severity: 3 - Normal
              Item Group: Rendering/Cosmetics
                  Status: Confirmed
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 27 Sep 2022 07:32:17 PM UTC By: G. Branden Robinson <gbranden>
Initially reported on 12 June as Debian bug #1012709
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012709>.

Consider the following, adapted from a BSD cksum(1) man page page in mdoc(7).


$ cat EXPERIMENTS/crc-polynomial.ms 
.EQ
delim %%
.EN
.LP
The CRC polynomial is
% x sup 32 + x sup 26 + x sup 23 + x sup 22 + x sup 16 + x sup 12 + x sup 11 +
x sup 10 + x sup 8 + x sup 7 + x sup 5 + x sup 4 + x sup 2 + x + 1 %.
$ groff -T utf8 -b -ww -e -ms EXPERIMENTS/crc-polynomial.ms | cat -s

The              CRC              polynomial              is
x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1.



The reporter, наб, rightly observes that this is all but unintelligible
except to those already pretty familiar with CRC polynomials.

It is true that we don't advertise much capability for our terminal-mode
eqn(1) output.

At the same time, mandoc(1) can do better, it seems.

So could we.

We could define alternative primitives for "sup" and "sub" in nroff mode that
unambiguously distinguish the super- and subscripts.

Here's a proposal.  It doesn't work as-is because the grammar of eqn
primitives and macro calls differ.  But it should get the idea across.


.EQ
ndefine sub ' roman { _< } $1 roman > '
ndefine sup ' roman { "^(" } $1 roman ) '
delim $$
.EN
.LP
$ roman H sub 2 roman O $
.LP
$ x sup 2 $








    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63116>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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