bugGNU roff - Bugs: bug #45452, [mm] .DS with indent uses wrong...

 
 

bug #45452: [mm] .DS with indent uses wrong line length

Submitter:  Carsten Kunze <carstenkunze>
Submitted:  Wed 01 Jul 2015 09:27:56 AM UTC
   
 
Category:  Macro mm Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Fixed
Privacy:  Public Assigned to:  wl
Open/Closed:  Closed Planned Release:  1.22.4
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 22 Jan 2022 12:55:19 PM UTC, comment #2: 


commit 06dbfabd78c4b7b7a6c85aa3e187d6dc6bb7f6f5
Author: Carsten Kunze <carsten.kunze@arcor.de>
Date:   Thu Jul 16 12:05:55 2015 +0200

    [mm] Fix line length of `.DS' with indentation (#45452).

    If `.DS' with first argument `1' or `I' is used the output should
    use an indentation of `\n[Si]n'.  To make this work, the line length
    within the `.DS' diversion must be set to zero, otherwise the
    effective line length is too large.

    * m.tmac (DS): Call `ds@set-new-ev' with correct indentation value.


G. Branden Robinson <gbranden>
Group administrator
Thu 16 Jul 2015 10:07:14 AM UTC, comment #1: 

Applied to git, thanks.

Werner LEMBERG <wl>
Group administrator
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 ds*div!\\n[ds*snr]
 .\"
-.ds@set-new-ev \\n[ds*old-ll]
+.nr ds*div-ll \\n[ds*old-ll]
+.if \\n[ds*format]=1 .nr ds*div-ll -\\n(Sin
+.ds@set-new-ev \\n[ds*div-ll]
 .nr df*float 0
 ..
 .\"--------------------------------------------

Carsten Kunze <carstenkunze>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by carstenkunze (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-01-22 gbranden SummaryMM macrso: .DS with indent uses wrong line length [mm] .DS with indent uses wrong line length
    2022-01-22 gbranden CategoryNone Macro mm
        Item GroupNone Incorrect behaviour
    2015-07-16 wl StatusNone Fixed
        Assigned toNone wl
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.22.4

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code