Follow-up Comment #19, bug #58736 (project groff):

Bjarni's comment #12 patch (with correction from comment #14) does produce
correct output for the test cases in comment #0 and comment #11.

However, the new code appears to presume that there are only two columns,
whereas -me's .2c macro can begin any number of columns, two merely being the
default if no number is specified.

Indeed, the patched e.tmac fails in the three-column case:

A little introductory text.
.2c 4n 3
This text appears in the first column of multi-column output.
In this example, the first column is the longest.
.bc
This text appears in the second column of multi-column output.
.bc
This text appears in the third column of multi-column output.
.1c
Single-column output resumes.


In groff 1.22.4, this behaves as expected, producing for terminal output:

A little introductory text.
This text appears    This text appears    This text appears
in the first col-    in   the   second    in the third col-
umn of multi-col-    column  of multi-    umn of multi-col-
umn  output.   In    column output.       umn output.
this example, the
first  column  is
the longest.
Single-column output resumes.

With the patch applied to the current code base, terminal output is:

A little introductory text.
This text appears    This text appears    This text appears
in the first col-    in   the   second    in the third col-
umn of multi-col-    column of  multi-    umn of multi-col-
umn  output.   In    column output.       umn output.
Single-column output resumes.
first  column  is
the longest.


The logic Bjarni added to macro .1c does not easily scale to handle an
arbitrary number of columns.

Branden's dread from comment #4 was well justified.

    _______________________________________________________

Reply to this item at:

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

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


Reply via email to