bugGNU troff - Bugs: bug #43306, -me macro .(c block misaligned

 
 

bug #43306: -me macro .(c block misaligned

Submitted by:  Dave <barx>
Submitted on:  Sat 27 Sep 2014 07:35:22 AM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  Werner LEMBERG <wl>
Open/Closed:  Closed Planned 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.

 

Tue 22 Nov 2016 07:01:41 AM UTC, comment #2: 

Patch applied, thanks!

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 21 Nov 2016 11:55:47 AM UTC, comment #1: 

This is definitely a bug - if a display/float/quote/table appeared before the .(c ... .)c it would work right.  The attached patch initializes the environment properly for the test case.  You'll have to narrow the line length with, say, .xl -2u*\n(qiu .. .xl bracketing the centered text to see some indenting though.

(file #39037)

George Helffrich <georgeh>
Sat 27 Sep 2014 07:35:22 AM UTC, original submission:  

This documents a bug that Tadziu discovered in the -me macro set's .(c and .)c macros.  This test case illustrates the bug:

.mso me.tmac
This is regular text.
This is regular text.
This is regular text.
This is regular text.
This is regular text.
This is regular text.
This is regular text.
This is regular text.
This is regular text.
This is regular text.
This is regular text.
This is regular text.
This is regular text.
This is regular text.
.(c
This is a centered block.
This is a centered block.
This is a centered block.
This is a centered block.
This is a centered block.
This is a centered block.
.)c
This is more regular text.
This is more regular text.
This is more regular text.
This is more regular text.
This is more regular text.

His description of the bug and its cause, taken from two posts to the groff email list:

"If the block contains more text than can fit on one line, the text is line-wrapped with the current line width, but output indented, so it sticks out at the right. It would look much nicer if the line width of the block were reduced by twice the indent.

The 'me' macros ... change the line width to 6.0 inches, but the indent for blocks is computed in environment 1 which retains the default line width of 6.5 inches. Thus, blocks get formatted to a width of 6 inches but are printed with an indent of .25 inches and thus stick out at the right. (I had originally thought that the indent was intentional (and we should therefore reduce the line width), but this appears not to be the case.)"

(Original posts:
http://lists.gnu.org/archive/html/groff/2011-11/msg00004.html
http://lists.gnu.org/archive/html/groff/2012-01/msg00063.html
)

Dave <barx>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #39037:  me-center.diff added by georgeh (309B - application/octet-stream - patch against repository tmac/e.tmac-u)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-22 wl StatusNone => Fixed
        Assigned toNone => wl
        Open/ClosedOpen => Closed
        Planned ReleaseNone => 1.22.4
    2016-11-21 georgeh Attached File- => Added me-center.diff, #39037

    Back to the top


    Powered by Savane 3.5