bugGNU troff - Bugs: bug #57616, explicit hyphenation given in...


bug #57616: explicit hyphenation given in tmac/hyphenex.us violated

Submitted by:  Dave <barx>
Submitted on:  Fri 17 Jan 2020 05:12:12 AM UTC  
Category:  Core Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None

Add a New Comment (Rich Markup)

You are not logged in

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


Fri 07 Feb 2020 04:11:40 AM UTC, comment #4: 

Trivia: five words appear on both this list and the one in bug #57601.

geodetic marginal procedural roundtable wastewater

But note that this bug's list is bounded and complete, while there is no theoretical limit to the number of words that could trigger bug 57601.

Dave <barx>
Project Member
Fri 07 Feb 2020 03:41:21 AM UTC, comment #3: 

Since this bug concerns only the 1439 words in tmac/hyphenex.us, a script can generate a complete list of those words that exhibit the problem.

Under .hy 4, groff gives the following 53 words extra breakpoints not appearing in hyphenex.us.  (As comment #1 shows, sometimes .hy 1 gives better results, but the documentation states this value is invalid in US English, so I confined my script to the sanctioned .hy value.)

assignor catarrhs codesigner codesigners distraughtly electromechanoacoustic freeloaders geodetic granduncle granduncles grievances halfspaces ignorespaces impedances interviewee landscaper letterspaces linespacing marginal metastable metatable metatables minesweepers monospacing namespaces paradimethylbenzene paragrapher phenolphthalein postural procedural prosciutto rabbitry rearrange rearranges rearranged ringleaders roundtable roundtables singlespacing skyscrapers sportswriters stupider subtables unerringly wastewater whitespaces Hoekwater ImageMagick Legendre OpenOffice Presbyterians Ravikumar Thiruvanandapuram

Dave <barx>
Project Member
Tue 28 Jan 2020 04:28:17 AM UTC, comment #2: 

Now meet the word "freeloaders."  hyphenex.us gives exactly one legal breakpoint for the word:

$ grep '^  free' /usr/share/groff/current/tmac/hyphenex.us

But groff gives it more than one:

$ printf ".hy 4\n.ll 1u\n%s\n" freeloaders | nroff 2> /dev/null | sed '/^$/d'

While both of those are reasonable breakpoints, the explicit hyphenation in hyphenex.us should disallow the second one.  (This is arguably a bug in the hyphenex.us list, but that file originates in TeX, so its bugs must be addressed there.)

So the "distraughtly" and "freeloaders" examples seem to invoke the same bug -- in both cases, groff is adding a breakpoint that is not specified in hyphenex.us -- but they also have some notable differences:

  • For "freeloaders," groff breaks the word the same way with .hy values of 1, 4, 8, and 12.  As mentioned in comment #1, ".hy 1" and ".hy 4" give different results for "distraughtly."
  • Unlike "distraughtly," groff broke "freeloaders" the same way (for all relevant .hy values) in 1.22.3, before the fix for bug #53196 (commit 4b299723) was applied.  So that fix did not introduce the general bug.
Dave <barx>
Project Member
Sat 18 Jan 2020 08:22:09 AM UTC, comment #1: 

The erroneous "distraughtly" hyphenation only happens under ".hy 4"; with the default settings (.hy 1), the word is broken correctly.

However, the documentation says ".hy 4" is required for US English hyphenation to work correctly.  For this word, ".hy 4" turns a correct hyphenation into an incorrect one.

Dave <barx>
Project Member
Fri 17 Jan 2020 05:12:12 AM UTC, original submission:  

In US English, my understanding is that a hyphenation expressly provided in tmac/hyphenex.us overrules whatever other hyphenation points may be generated by the general patterns in tmac/hyphen.us.  The hyphenex.us entries may be subject to further restrictions, of course: different .hy values may inhibit breakpoints that a word in hyphenex.us has.  But groff should never break a word in hyphenex.us at a point other than the ones it provides.

Meet the word "distraughtly."  hyphenex.us gives it two legal breakpoints:

$ fgrep traugh /usr/share/groff/current/tmac/hyphenex.us

But with ".hy 4" set, the trick from http://lists.gnu.org/archive/html/groff/2018-11/msg00023.html to find where groff hyphenates a word gives:

$ printf ".hy 4\n.ll 1u\n%s\n" distraughtly | nroff 2> /dev/null | sed '/^$/d'

The latter is clearly not a reasonable breakpoint.

Interestingly, before the fix for bug #53196 was applied, this unwanted breakpoint did not happen.  I don't yet know whether the fix for that bug introduced this problem, or something else did.

Dave <barx>
Project Member


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

Attach Files:

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 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.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.6