On Tue, Jan 13, 2026 at 10:26:04AM +0100, Hans Hagen via luatex wrote: > On 1/13/2026 8:25 AM, luigi scarso wrote: > > > > > > On Tue, 13 Jan 2026 at 01:51, Robert via luatex <[email protected] > > <mailto:[email protected]>> wrote: > > > > On 12.01.26 15:58, luigi scarso wrote: > > > > > > Do you have the same with the luatex-plain format ? > > > > > > > Here is a MWE for -ini mode, which also only yields two protruded > > hyphens instead of three (with luatex or luahbtex 1.21 from TL25), so > > maybe it's something that the luatex-plain format (which I can't test > > right now) fixes, not something that the vanilla plain format breaks? > > > > \catcode`\{=1 > > \catcode`\}=2 > > \input luatexconfig.tex % enable luatex primitives > > \input luatexiniconfig.tex > > \outputmode=1 > > \hsize=10cm > > \vsize=10cm > > \def\\{\hfil\penalty-10000} > > \font\x=cmr10 \x > > \baselineskip=12pt > > \parfillskip=0pt plus 1fil > > \protrudechars2 > > \lpcode\font`-=500 > > > > \noindent > > \vrule width 4cm height 1mm\\ > > -\\ > > -foo\\ > > -\kern0pt foo\\ > > \vrule width 4cm height 1mm > > \end > > > > Best, > > > > > > It doesn't seem like a critical bug -- if it is, maybe we can call it a > > feature. > > I'll leave it to Vitek to investigate. > > > > In case, we can add \tracingall and see the trace. > > > > \input luatexconfig.tex % enable luatex primitives > > \input luatexiniconfig.tex > > \def\tracingall{% > > \tracingonline=1 > > \tracingcommands=3 > > \tracingstats=2 > > \tracingpages=1 > > \tracingoutput=1 > > \tracinglostchars=2 > > \tracingmacros=2 > > \tracingparagraphs=1 > > \tracingrestores=1 > > \showboxbreadth=65535 > > \showboxdepth=65535 > > \errorstopmode > > \tracinggroups=1 > > \tracingifs=1 > > \tracingscantokens=1 > > \tracingnesting=1 > > \tracingassigns=2 > > } > > \tracingall > > > > -- > > luigi > > Indeed. And tracing shows this: > > \hbox(6.94444+0.0)x284.52756, glue set 272.86084fil, direction TLT > ..\kern-5.00002 (left margin) > ..\x - > > > .\hbox(6.94444+0.0)x284.52756, glue set 267.86084fil, direction TLT > ..\discretionary (penalty 0) > ...< \x - > ...= \x - > > where the difference is in setting > > \automatichyphenmode = 1 > > Which is what we do in luatex-plain.tex indeed. There are various conditions > checked for what makes a left or right edge and that mode avoids creating a > discretionary node that hides the hyphen. There have been plenty discussions > about hyphens in the past and this was one of the solutions to accomodate > various scenarios. > > Hans
Thank you, Hans, this is very helpful for isolating the cause of the issue. Setting `\automatichyphenmode = 1` or `\automatichyphenmode = 2` resolves the problem for the minimal working example(s) discussed in this thread. (I am still seeing protrusion-related issues in the original document that prompted this investigation, and those are not fixed by changing the value of `\automatichyphenmode`. This suggests that my format may also be doing something with hyphenation in the background [1], but I have not yet managed to isolate a minimal working example.) More generally, I wonder how much sense it makes to suppress protrusion in the presence of discretionary nodes. From a typographic perspective, wouldn't we want margin protrusion to apply regardless of whether a hyphen is discretionary or not? Is this primarily a technical limitation? Because from the typographic standpoint, I do not quite understand the rationale. [1]: https://github.com/schlcht/microtype/issues/61#issuecomment-3743992442 Vitek
signature.asc
Description: PGP signature
