bugGNU troff - Bugs: bug #57601, .hy 8 inhibits some breakpoints...

 
 

bug #57601: .hy 8 inhibits some breakpoints that it should not

Submitted by:  Dave <barx>
Submitted on:  Wed 15 Jan 2020 07:00:55 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:36 AM UTC, comment #2: 

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

geodetic marginal procedural roundtable wastewater

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

Dave <barx>
Fri 17 Jan 2020 10:24:51 AM UTC, comment #1: 

Two additional points.

(1) The original problem description compares the default state (that is, a .hy value of 1) with .hy 8, using US English patterns (also the default).  But the manual says, "US-English patterns as distributed with groff need two characters at the beginning and three characters at the end; this means that value 4 of 'hy' is mandatory."  So neither 1 nor 8 is technically a valid .hy value.

However, the bug exhibits in exactly the same way when 4 and 12 are compared:

$ printf ".hy 4\n.ll 1u\n%s\n" behavioral | nroff 2> /dev/null | sed '/^$/d'
be-
hav-
io-
ral
$ printf ".hy 12\n.ll 1u\n%s\n" behavioral | nroff 2> /dev/null | sed '/^$/d'
behav-
ioral

(2) I wrote a script to hyphenate every word on my list with both .hy values (4 and 12), then compare to see which ones exhibited the bug.  Of the 20K entries, only 80 words do.

abominable absorbent agricultural allegiant andesite appetite architectural arrival asbestos behavioral billionth bimetallism brucellosis calliope centipede chalcedony collegiate committable conjectural connivance consular consulate creosote cultural discriminable dragonhead equitable escapade espionage exhibit exhibitor exploration forgettable geodetic goldenseal governess guttural hazardous hereafter hereinafter homogenate immutable incommutable inequitable inequity inescapable inhibit inhibitor inhibitory insignia irreclaimable libelous marginal millionth nobelium polariscope procedural prohibit prohibitory puppeteer rebellious regrettable revival roundtable ruinous saltpeter scriptural sculptural stereoscopy structural survival thereafter transmittable tumultuous verbiage virginal voltmeter voluptuous wastewater worktable

Dave <barx>
Wed 15 Jan 2020 07:00:55 AM UTC, original submission:  

This bug is present in a groff built from a recent pull from git.  It's not the absolute latest code, but was pulled and built within the past month:

$ groff --version
GNU groff version 1.22.4.74-b400-dirty

The effect of ".hy 8" is documented to be "Do not hyphenate the first two characters of a word."  And usually, this is its only effect.  But for a few words, it inhibits other breakpoints later in the word that should not be affected.

To find out how groff hyphenates a word, you can use the command line posted in http://lists.gnu.org/archive/html/groff/2018-11/msg00023.html.  For instance, to see the division of the word "behavioral":

$ printf ".ll 1u\n%s\n" behavioral | nroff 2> /dev/null | sed '/^$/d'
be-
hav-
io-
ral

The documentation of ".hy 8" means the first hyphenation point should disappear -- "be-" is only two letters, and .hy 8 disallows that break -- and the other breakpoints should remain the same.  But in fact, one of the other breakpoints disappears as well:

$ printf ".hy 8\n.ll 1u\n%s\n" behavioral | nroff 2> /dev/null | sed '/^$/d'
behav-
ioral

A trawl through a 20,000-entry word list reveals that each of the following words exhibits the same odd behavior:

architectural
arrival
calliope
collegiate
conjectural
consular
creosote
espionage
guttural
hereafter
hereinafter
immutable
inequitable
inescapable
insignia
rebellious
revival
ruinous
saltpeter
scriptural
sculptural
structural
survival
thereafter
tumultuous
verbiage
virginal
voltmeter
voluptuous
wastewater

(This is not meant to be a comprehensive list; my script only looked for a specific subset of failing patterns.  But these are all words that exhibit the bug when used in the example command lines above.)

Dave <barx>

 

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