bugGNU roff - Bugs: bug #42503, .hy request not honored for some...

 
 

bug #42503: .hy request not honored for some words

Submitter:  Dave <barx>
Submitted:  Wed 04 Jun 2014 12:33:36 AM UTC
   
 
Category:  Core Severity:  2 - Minor
Item Group:  Incorrect behaviour Status:  Duplicate
Privacy:  Public Assigned to:  schwarze
Open/Closed:  Closed Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 01 Mar 2021 06:06:22 AM UTC, comment #6: 

True, I just never went back and adjusted the summaries of closed bugs like this one.  This bug's replacement (bug #53196, now closed, spawned from comment #1 here) and another descendant (bug #53837, currently still open, spawned from comment #0 here) have accurate summaries.

Because different comments of the present bug detail different problems (and even things that aren't actually problems, such as comment #3), there's not really a good summary, but I came up with something I hope is suitably generic to cover all these cases.

Dave <barx>
Group Member
Mon 01 Mar 2021 04:26:00 AM UTC, comment #5: 

Dave,

I believe you've gained Savannah superpowers since comment #4 that allow you to alter bug titles ("summaries") at will.

--Branden

G. Branden Robinson <gbranden>
Group administrator
Wed 21 Feb 2018 05:00:55 AM UTC, comment #4: 

Because this bug's description is spread over multiple comments, its title is obsolete, and this bug tracker seemingly lacks the ability to edit a bug title, I have consolidated the various comments here and placed them under a more accurate bug title in bug #53196.  The present bug can thus be closed (which the submitter is seemingly unable to do).

Dave <barx>
Group Member
Tue 11 Apr 2017 11:43:30 PM UTC, comment #3: 

Additionally, a user asking groff not to split words by leaving only two characters on a line might reasonably expect this to include words already containing hyphens.  However, groff does not honor this restriction, either:

.\" don't hyphenate the first and last two characters of a word
.hy 12
.
.ll 1i
He's been my go-to guy for math questions.

Dave <barx>
Group Member
Wed 16 Dec 2015 12:48:14 AM UTC, comment #2: 

(I don't seem to have the ability to change the title of this bug, but the present title is inaccurate, since the bug doesn't depend on the user using .hw at all.)

Dave <barx>
Group Member
Wed 16 Dec 2015 12:40:40 AM UTC, comment #1: 

Groff also does not obey the .hy value for any words in /usr/share/groff/current/tmac/hyphenex.us.  An example to illustrate:

    .ll 1i
    Visit yonder arboretum.
    .br
    Visit yonder archipelago.
    .br
   
    .hy 8  \"should prevent breaking after only two characters
    Visit yonder arboretum.
    .br
    Visit yonder archipelago.

This is a more severe issue than the one originally reported: a user should not be expected to redefine the hyphenation of the over 1000 words in this file.  The average user, for that matter, would have no way of even knowing this file was the source of the trouble.

Dave <barx>
Group Member
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>
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 schwarze (Updated the item)
  • -email is unavailable- added by barx (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-09-30 gbranden Assigned toNone schwarze
    2022-06-15 gbranden CategoryNone Core
    2021-03-01 barx SummaryIllogical precedence of .hw over .hy .hy request not honored for some words
    2018-02-21 schwarze Severity1 - Wish 2 - Minor
        Item GroupFeature change Incorrect behaviour
        StatusNone Duplicate
        Open/ClosedOpen Closed
    2018-02-16 schwarze Severity3 - Normal 1 - Wish
        Item GroupNone Feature change

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code