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

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------

Reply via email to