groff
[Top][All Lists]
Advanced

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

Re: groff_mm : problems with .DS


From: Damian McGuckin
Subject: Re: groff_mm : problems with .DS
Date: Sat, 24 Oct 2020 08:20:45 +1100 (AEDT)
User-agent: Alpine 2.02 (LRH 1266 2009-07-14)

On Fri, 23 Oct 2020, Anton Shepelev wrote:

Does  not  the  current  behavior  agree  with   the
groff_mm manpage, which states for .DS that:

  `rindent shortens the line length by that amount.

If you don't pass the `rindent' as the third parame-
ter, you get the same line length,  but  indented to
the right.

The 'rindent' is optional. AT&T's DWB MM never had this option. You only use 'rindent' if you want to over-ride the standard display indent, i.e. that which you get with

        .DS 1

The default Display indent is stored in the 2-letter number register Si
which defaults to 5 standard units. Note that 'groff' uses the notation

        \n[Si]

to extrapolate even a 2-letter number register (instead of \n(Si as used in AT&T nroff/troff) so please excuse me if your prefer the older form.

Currently

        .DS

by itself does not indent, i.e. it implies

        .DS 0

which uses the

        linelength of the text prior to when '.DS' appears

whereas

        .DS 1

uses the

        linelength of the text when '.DS' appears LESS \n[Si]

So, if one starts with main body text line-length of say 70, the use of that '.DS 1' results in a line-length of 65.

So, in no-fill mode, the current MM (or groff_mm) works as documented,
as expected, i.e. as AT&T DWB MM has worked for 40+ years.

If I then ask for fill mode in my indented display, i.e.

        .DS 1 1

I still expect a line-length of 65 BUT with the text inside the display being filled. Sure, fill mode works. But unfortunately, the line-length reverts to that used in the document prior to the use of that 'DS' Which is wrong.

If it is not the intended behavior, then it is a a very long-standing bug in Groff's implementation of MM that I have taken for granted more than ten years. I think I can fix it if you can't once I am sure it *is* a bug.

I have not used fill-mode in a '.DS'. in 15 years so it may well be long-standing. It is most definitely a bug.

My document is 40 years old and with AT*T troff with 'MM' does the right thing. I do not use 'DS' in a nested way as AT&T's MM did not support such usage.

Stay safe - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer



reply via email to

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