bug-groff
[Top][All Lists]
Advanced

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

[bug #61646] [me] line numbering doesn't work as documented


From: G. Branden Robinson
Subject: [bug #61646] [me] line numbering doesn't work as documented
Date: Sat, 1 Jan 2022 07:16:44 -0500 (EST)
User-agent: Lynx/2.8.9rel.1 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/3.6.7

Follow-up Comment #3, bug #61646 (project groff):

Here are the problems with n1/n2 that I have been able to
identify.

First, let's have a look at our input.

Input:


.if r mypo .po \n[mypo]u
.if !d C .ds C\" empty
.pp
Feck, vex loping bad jazz: quench my thirst.
Feck, vex loping bad jazz: quench my thirst.
.pp
.n1 \*C
Jackdaws love my big sphinx of quartz.
Jackdaws love my big sphinx of quartz.
Jackdaws love my big sphinx of quartz.
.pp
.n2 +5
Waltz, bad nymph, for quick jigs vex.
Waltz, bad nymph, for quick jigs vex.
.pp
.n2 100
Pack my box with five dozen liquor jugs.
Pack my box with five dozen liquor jugs.
Pack my box with five dozen liquor jugs.
.pp
.n2
All done.


You'll note right away that this reproducer is parameterized in
the register `mypo` and the string `C`.  These don't matter for
any released version of groff, but only for the changes I'm
making to e.tmac to resolve the problems.

Now, let's start seeing how groff 1.22.4 goes wrong with it.

Output:


$ nroff -me EXPERIMENTS/n1n2.me | cat -s

     Feck, vex loping bad jazz: quench my thirst.  Feck, vex
loping bad jazz: quench my thirst.

  1      Jackdaws love my big sphinx  of  quartz.   Jackdaws
  2 love  my  big  sphinx  of  quartz.  Jackdaws love my big
  3 sphinx of quartz.

  4      How vexingly quick daft zebras jump!

6      Waltz, bad nymph, for quick jigs vex.   Waltz,  bad
7 nymph, for quick jigs vex.

99      Pack  my  box with five dozen liquor jugs.  Pack my
100 box with five dozen liquor jugs.  Pack my box with  five
101 dozen liquor jugs.

 All done.



Problem #1: We didn't ask for "roff compatibility" (shortening
of the line length to accommodate the line number), but we got
it anyway.

Problem #2: The space allocated to the line number in the
"Waltz" paragraph shrank mysteriously.

Problem #3: I asked for the line number to be incremented by 6
for the same paragraph.  I clearly didn't get that.  (The "daft
zebras" paragraph is there to illustrate that blank lines don't
get numbered.)

Problem #4: The first line of the "Waltz" paragraph is adjusted,
but the line length doesn't make sense.  Probably related to
problem #2.

Problem #5: The page offset of the "Pack" paragraph has returned
to where it should be, but one suspects that this is due to the
line number being 3 digits wide (which is what the hard-coded
distance is designed to accommodate).

Problem #6: The final paragraph "All done" should have the same
indentation as the first paragraph, but it is incorrect.

I'll follow up with how my patches to e.tmac deal with these.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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