bugGNU troff - Bugs: bug #45452, MM macrso: .DS with indent uses...

 
 

bug #45452: MM macrso: .DS with indent uses wrong line length

Submitted by:  Carsten Kunze <carstenkunze>
Submitted on:  Wed 01 Jul 2015 09:27:56 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Werner LEMBERG <wl>
Open/Closed: ClosedPlanned Release: 1.22.4

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 16 Jul 2015 10:07:14 AM UTC, comment #1:

Applied to git, thanks.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed 01 Jul 2015 09:27:56 AM UTC, original submission:

If .DS with first argument '1' or 'I' is used with the MM macros the output should be displayed with an additinal indention of \n[Si]n. This is done by writing the text into a diversion with zero indent and output the diversion with the additional indent of \n[Si]n. But since the line length from before .DS is used in the diversion too the effective line length for ".DS 1" is too large. The following patch fixes this:

diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 4b76039..09cc03b 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -2083,7 +2083,9 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%]
'in 0
.di dsdiv!\\n[dssnr]
.\"
-.ds@set-new-ev \\n[ds*old-ll]
+.nr dsdiv-ll \\n[dsold-ll]
+.if \\n[dsformat]=1 .nr dsdiv-ll -\\n(Sin
+.ds@set-new-ev \\n[ds*div-ll]
.nr df*float 0
..
.\"--------------------------------------------

Carsten Kunze <carstenkunze>
Project Member

 

(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 carstenkunze (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 16 Jul 2015 10:07:14 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>1.22.4

    Back to the top


    Powered by Savane 3.1-cleanup1