bugGNU troff - Bugs: bug #43239, broken interaction between line...

 
 

bug #43239: broken interaction between line numbering and diversions

Submitted by:  Dave <barx>
Submitted on:  Wed 17 Sep 2014 01:54:19 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: Werner LEMBERG <wl>
Open/Closed: ClosedPlanned Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 17 Sep 2014 04:35:02 AM UTC, comment #1:

Well, it's definitely not a bug. In groff, a `diversion' really does what its name says: It diverts formatted groff output from the normal output stream to a macro. Of course, this includes line numbering.

The proper way to solve this issue is to switch environments, e.g.

... before diversion ...
.ev my-env
.di my-div
... diversion text ...
.br
.di
.ev
... after diversion ...
.di my-div
... more text ...

(and don't forgot to end a diversion with `.br' to finish the current partially collected line).

I'm closing this as invalid. However, I invite you to discuss documentation improvements on the groff mailing list, which is a better place than this tracker issue.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed 17 Sep 2014 01:54:19 AM UTC, original submission:

.nm +1
Text before diversion.
Text before diversion.
Text before diversion.
Text before diversion.
Text before diversion.
Text before diversion.
Text before diversion.
Text before diversion.
.br
.di my_diversion
Diverted text.
Diverted text.
Diverted text.
Diverted text.
Diverted text.
Diverted text.
Diverted text.
Diverted text.
Diverted text.
Diverted text.
Diverted text.
Diverted text.
Diverted text.
Diverted text.
Diverted text.
Diverted text.
Diverted text.
.di
.my_diversion
Text after diversion.
Text after diversion.
Text after diversion.
Text after diversion.
Text after diversion.
Text after diversion.

The problem with the above input can be seen in either text (via nroff) or PostScript output. This behavior is not documented, and not what any user would reasonably expect or want.

You can make the output sane by putting ".nm" immediately before the beginning of the diversion's definition, and ".nm +0" immediately after the end of the definition. So if line numbering is turned on when a diversion definition begins, groff ought to do this automatically.

Dave <barx>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by barx (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 17 Sep 2014 04:35:02 AM UTCwlStatusNone=>Invalid
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1