View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000842 | luatex | luatex bug | public | 2013-07-08 16:20 | 2015-03-16 19:17 |
Reporter | eroux | Assigned To | Hans Hagen | ||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 0.80.0 | ||||
Summary | 0000842: \hyphenpenalty is not taken into account | ||||
Description | The simple (Plain) example \hyphenpenalty=-10000 ab\discretionary{-}{-}{-}cd \bye shows that \hyphenpenalty is not taken into account. See the difference with the output of pdfTeX. | ||||
Tags | No tags attached. | ||||
|
patch-bug-842.patch (746 bytes)
Index: source/texk/web2c/luatexdir/tex/linebreak.w =================================================================== --- source/texk/web2c/luatexdir/tex/linebreak.w (révision 5187) +++ source/texk/web2c/luatexdir/tex/linebreak.w (copie de travail) @@ -1950,7 +1950,7 @@ /* The following code knows that discretionary texts contain only character nodes, kern nodes, box nodes, and rule nodes. */ - if (second_pass) { + if (second_pass || subtype(cur_p) == discretionary_disc) { int actual_penalty = hyphen_penalty; if (subtype(cur_p) == automatic_disc) actual_penalty = ex_hyphen_penalty; |
|
I've uploaded a patch that seems to fix the issue. |
|
probably needs checking with pdftex code base |
|
The issue can be summarized as follows: /* This branch differs a bit from older engines because in LuaTeX we already have hyphenated the list. This means that we need to skip automatic disc nodes. Of better, we need to treat discretionaries and explicit hyphens always, even in the first pass. */ So the patch is: if (second_pass || subtype(cur_p) <= automatic_disc) { And a test: \hyphenpenalty=-10000 \exhyphenpenalty=-10000 ab\discretionary{-}{-}{-}cd \par ab-cd \par ab\-cd \par (So it was a side effect of the fact that where tex hyphenates on the fly luatex does it beforehand and the node list therefore already has disc nodes which then need to be ignored in a first pass.) |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-07-08 16:20 | eroux | New Issue | |
2015-03-14 17:58 | eroux | File Added: patch-bug-842.patch | |
2015-03-14 17:58 | eroux | Note Added: 0001328 | |
2015-03-15 17:10 | Hans Hagen | Note Added: 0001329 | |
2015-03-15 17:12 | Hans Hagen | Assigned To | => Hans Hagen |
2015-03-15 17:12 | Hans Hagen | Status | new => assigned |
2015-03-16 18:19 | Hans Hagen | Note Added: 0001332 | |
2015-03-16 19:17 | Hans Hagen | Status | assigned => resolved |
2015-03-16 19:17 | Hans Hagen | Resolution | open => fixed |
2015-03-16 19:17 | Hans Hagen | Status | resolved => closed |
2015-03-16 19:17 | Hans Hagen | Fixed in Version | => 0.80.0 |