bugGNU troff - Bugs: bug #42503, Illogical precedence of .hw over...

 
 

bug #42503: Illogical precedence of .hw over .hy

Submitted by:  Dave <barx>
Submitted on:  Wed 04 Jun 2014 12:33:36 AM UTC  
 
Severity: 3 - NormalItem Group: None
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Planned Release: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Wed 04 Jun 2014 12:33:36 AM UTC, original submission:

This may not technically be a bug, but it is undocumented that it works this way, and, I believe, not the ideal way to handle this case.

Consider this example:

$ groff -a << EOF

> .hw in-sa-lub-rious
> .hy 8
> insalubrious insalubrious insalubrious insalubrious insalubrious insalubrious
> insalubrious insalubrious i i i i i i i i insalubrious
> EOF

<beginning of page>
insalubrious insalubrious insalubrious insalubrious insalubrious insalubrious insalubrious insalubrious i i i i i i i i in<hy>
salubrious
$

The hyphenation provided in the .hw example says this is a valid hyphenation point. However, .hy mode 8 should tell groff not to hyphenate after only two characters.

I believe it makes more sense to have the .hy mode take precedence over a possible two-character hyphenation given in .hw, for the following reasons:

1) If you want to change hyphenation behavior, you should only have to change the number given to .hy. As it stands now, to change hyphenation behavior across the board, one must change both the .hy value and all the words passed to .hw that contain a syllable break after two characters.

2) If .hy mode 2 is active, it applies regardless of any .hw settings. The precedence rules should be consistent across all interactions between .hw and .hy.

If the behavior is left as is, it should be documented in the .hw command.

(Also posted to bug-groff: http://lists.gnu.org/archive/html/bug-groff/2013-10/msg00000.html)

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 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):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup