On Wed, Dec 06, 2006 at 03:46:54PM +0100, Vincent Hennebert wrote: > Luca Furini a écrit : > > Vincent wrote: > > > >> I don't follow you: IIUC the glue-penalty-glue triplet is generated only > >> the second time, when the first breaking doesn't give acceptable > >> results? What do you mean by "the penalty is not taken into account"? > > > > No, the sequence is always the same: since the beginning it represents > > the hyphenation points too, but at the first call to > > findBreakingPoints() there is a parameter saying that only > > non-hyphenated breaks should be looked at. > > Doesn't that have an impact on performance? I know we are no longer at > the time when TeX was created, but, still, performing hyphenation only > when the first pass has failed should be more effective?
As far as I understand, it is necessary to do hyphenation first, because it is not possible to modify the set of Knuth elements later because the LMs (?) already contain references to them by index. > > Another question: should the hyphen characters in the text be feasible > > breaks even if hyphenation is disabled? > > I'd say yes. In French, at least, there are lots of compound words that > it is totally acceptable to break even if hyphenation is disabled. They > should simply be discouraged by setting a positive penalty value (the > same as for other hyphens). > When we hyphenate words it's as if we were adding soft hyphens at some > places in the input text --these wouldn't be the same hyphens. I agree with both points. And a soft hyphen inserted by the user is equivalent to a legal linebreak created by the hyphenation process. Simon -- Simon Pepping home page: http://www.leverkruid.eu