[Top][All Lists]

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

Re: Don't despair! (was: [groff] 06/23: [man pages]: Define page-local `

From: G. Branden Robinson
Subject: Re: Don't despair! (was: [groff] 06/23: [man pages]: Define page-local `MR` fallback.)
Date: Fri, 24 Feb 2023 10:21:14 -0600

Hi Ingo,

At 2023-02-24T16:44:55+0100, Ingo Schwarze wrote:
> very brief feedback:  If all you care about is new groff, old groff,
> mandoc and Heirloom, then what your committed does indeed work,
> but so would this much simpler version, so i assumed you were
> aiming higher:

I don't think we understand each other's satisfiability criteria...

I'd _like_ to be as portable as possible, but I'm not going to let
non-portability to notional and likely nonexistent *roff formatters gate
the `MR` feature or the groff 1.23.0 release.

There is one exception, which I might have mentioned before--DWB 3.3
troff.  I'll discuss that in a footnote.[1]

>   .\" Define fallback for groff 1.23's MR macro if the system lacks it.
>   .if !d MR \{\
>   .  de MR
>   [...]

That's originally what I had in my man.local.  But then I started
getting paranoid...

> I noticed that you put "mandoc" in a comment on a line that mandoc
> does not need (and that, incidentally, no other formatter you are
> targetting needs either).
> Besides, i concluded from the comment "non-groff *roff" that you
> were targetting other formatters besides groff, mandoc and
> Heirloom, and i wondered what those might be.
> Now it appears you targeted none beyond those three.

You are right that what I currently have is neither quite one thing nor
the other.

My criteria for development and release are different.

  For development, I was something perfect and elegant.
  For release, I want something that doesn't break popular

"Perfect" and "elegant" are often impossible to achieve, particularly
when an underlying implementation or historical factors foreclose
certain avenues.

> >> I would have prefered being wrong, but here we are.  :-(
> > I think you are in fact wrong here,
> What a relief!  =:c)

If you're saying what I've got is imperfect, I strongly agree.

If you think it breaks some user population's ability to view the groff
man pages (using its preferred formatter) where this ability wasn't
broken before, then I need to see some evidence.


[1] Now for the DWB 3.3 issue.  I didn't bother with this before now
    because as far as I know, people only have DWB 3.3 troff around for
    research purposes.  (As I understand it, it is the baseline upon
    which Gunnar Ritter swiftly began heaping groff-compatible and other
    features to produce Heirloom Doctools.)

    If I make two changes to the fallback preamble, then I can get it to
    work even on DWB 3.3.

    A. Use a CSTR #54-compliant register name.
    B. DWB 3.3 doesn't support spaces between the two dots of a default
       macro ending.  I just learned this.  Never knew it before.

    This gives us:

.\" Define fallback for groff 1.23's MR macro if the system lacks it.
.nr @f 0
.if !\n(.f           .nr @f 1 \" mandoc
.if  \n(.g .if !d MR .nr @f 1 \" older groff
.if !\n(.g           .nr @f 1 \" non-groff *roff
.if \n(@f \{\
.  de MR
.    ie \\n(.$=1 \
.      I \%\\$1
.    el \
.      IR \%\\$1 (\\$2)\\$3
.rr @f

    And the output...

$ cd ~/dwb
$ DWBHOME=. ./bin/nroff -man neqn.1 | cat -s

       neqn(1)   groff 1.23.0.rc3.28-3c4b4 (24 February 2023)    neqn(1)

            neqn - format equations for character-cell terminal output


            neqn invokes the eqn(1) command with the ascii output

            eqn does not support low-resolution, typewriter-like
            devices, although it may work adequately for very simple

       See also

       Page 1                                        (printed 2/24/2023)


Is this worth the candle?  Given P9US's provenance, this might make it
work there too (I haven't tested), but again I don't want to gate the
groff 1.23.0 release for that community, particularly for use of a
feature they already have.  (Thus do I summon up Humm from the vasty
deep to complain about how overlooked P9US aficionados are.)

Attachment: signature.asc
Description: PGP signature

reply via email to

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