[luatex] \hyphenpenalty not working

Hans Hagen pragma at wxs.nl
Tue Jul 9 13:36:17 CEST 2013

```On 7/9/2013 9:34 AM, Élie Roux wrote:
>> There seems to be some interaction with \pretolerance.
>>
>> If you add \pretolerance=-10000, LuaTeX does break at the penalty.
>
> Let me try to understand what's going on...
>
> On http://www.tug.org/utilities/plain/cseq.html#pretolerance-rp it says
> that if you set pretolerance to a negative value (and indeed -1 is
> enough to get the expected result), TeX will skip its first attempt to
> build the paragraph without hyphenation.
>
> This means that:
>
>   * in pdfTeX, the first attempt results in breaking at the discretionary
>     due to hyphenpenalty
>
>   * in LuaTeX, the hyphenpenalty is not taken into account in the first
>     attempt (which is the big difference), but if the first attempt is
>     skipped with pretolerance=-1, then it's taken into account in the
>     second attempt
>
> Am I correct?
>
> Would it be possible to make hyphenpenalty taken into account in the
> first attempt?

in the first pass there is no hyphenation at all, only the replace field
is consulted so there is no reason to take that penalty into account

-----------------------------------------------------------------