[Top][All Lists]

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

Re: Formatting difference with 1.23.0.rc3 (ms)

From: G. Branden Robinson
Subject: Re: Formatting difference with 1.23.0.rc3 (ms)
Date: Sat, 8 Apr 2023 19:38:47 -0500

Hi Christof,

At 2023-04-08T20:56:57+0200, Christof Meerwald wrote:
> just gave 1.23.0.rc3 a quick try

Thank you for evaluating this RC.  Our maintainer might be able to tag
an RC4 this weekend and 1..n weeks after that, I hope, we'll go final.

> and noticed a difference for the following input with -ms (-Tascii and
> -Tpdf show the same difference):
> .nr PD 1v
> .LP
> X1
> .LD
> X2
> .DE
> .LP
> X3
> .LD
> X4
> .DE
> X5
> .LP
> .LP
> X6
> with 1.23.0.rc3 I now only get a single blank line between X2 and X3,
> but with earlier versions (1.22.4 and also 1.19.2) I got 2 blank lines
> there.
> Is this change expected?

Yes.  Technically, this changed behavior is the result of a bug fix to
bring our rendering of ms documents more in line with AT&T troff ms, and
we don't ordinarily document bug fixes in the NEWS file.

But since you're the second person to have raised this issue to the
mailing list, it seems it might be worth adding a NEWS item about it.
So I'll see about that.

Other changes were also prompted by efforts to faithfully reproduce AT&T
troff ms output for vintage ms documents. [1]

If you have some inter-display or inter-paragraph spacing you need to
exactly preserve, I suggest manipulating the `DD` and `PD` registers
prior to the `DS`, `DE`, or paragraphing macro calls to which you want
them to apply.

Here is how the groff_ms(7) man page documents these registers in the
forthcoming 1.23.0.

                              Paragraph settings
     Parameter             Definition              Effective       Default
    \n[PI]        Indentation                    next paragraph   5n
    \n[PD]        Paragraph distance (spacing)   next paragraph   0.3v (1v)
    \n[QI]        Quotation indentation          next paragraph   5n
    \n[PORPHANS]  # of initial lines kept        next paragraph   1

                              Display settings
    Parameter              Definition              Effective    Default
    \n[DD]      Display distance (spacing)         special     0.5v (1v)
    \n[DI]      Display indentation                special     0.5i

    ... For entries marked "special" in the "Effective" column, see the
    discussion in the applicable section below. ... The PD and DD
    registers use the larger value if the vertical motion quantum of the
    output device is too coarse for the smaller one; usually, this is
    the case only for output to terminals and emulators thereof. ...

    The distance stored in \n[DD] is inserted before and after each pair
    of display macros, replacing any adjacent inter-paragraph distance;
    this is a Berkeley extension.  The DI register is a GNU extension;
    ... Changes to either register take effect at the next display

In groff 1.23 we also have a new document, (available in source
and PostScript forms), which serves as a guide to the macro package.

I'm attaching an alteration of your reproducer that formats the same
in nroff mode with groff 1.22.4 and groff 1.23.0.  It also formats the
same with Heirloom Doctools ms except for the inclusion of the date in
the page footer (a documented difference between AT&T-descended ms and
GNU ms).  (If you add an `ND` call to the top of the document, the two
formatters produce identical output.)  DWB 3.3 ms is the same as
Heirloom ms except that DWB does not honor the new display distance (DD)
before the `DE` call on line 7.  This appears to me to be a bug in DWB
ms that Heirloom corrected.

Many aspects of ms were not rigidly specified by AT&T and consequently
there is some wiggle room among implementations.  A more notorious one
is that there is no official list of which *roff requests constitute
valid input in ms documents.  Lesk 1978 explicitly names only `br`,
`bp`, `sp`, and `na`, but elsewhere implies by discussion or example
that `nr`, `ds`, and `de` are supported (as indeed they must be to
exercise the documented features of the package).

Thank you for your patience.  Further feedback is welcome!


[1] AT&T ms of course did not support a `MINGW` register--its name was
    too long--but the point here was the handling of the gutter width.

Description: Troff MS-macros document

Attachment: signature.asc
Description: PGP signature

reply via email to

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