Problem with LMTX and heading with alternative=margintext

The following example produces the expected result under --luatex. It hyphenates the long word and positions the chapter number within the frame. Under LMTX, the long word is not hyphenated and the chapter number is shifted out of the frame. \setuphead [chapter][alternative=margintext] \starttext \chapter {Establishment} \input klein \contextversion \stoptext The problem goes back at least to version 20240621 (running on https://www.context-on-web.eu/). I did not experiment with other mechanisms that place text into the margin. -- Rik

Am 14.02.2025 um 19:35 schrieb Rik Kabel:
The following example produces the expected result under --luatex. It hyphenates the long word and positions the chapter number within the frame. Under LMTX, the long word is not hyphenated and the chapter number is shifted out of the frame.
\setuphead [chapter][alternative=margintext] \starttext \chapter {Establishment} \input klein \contextversion \stoptext
The problem goes back at least to version 20240621 (running on https:// www.context-on-web.eu/).
I did not experiment with other mechanisms that place text into the margin.
I was able to simply your example, the problem is the \hkern command which is added between the section number and the first word of the title (when you use the margin alternative) which prevents hyphenation. \starttext \hsize\emwidth 1\hskip\emwidth Establishment 2\hkern\emwidth Establishment \stoptext Wolfgang

On 2/14/2025 7:47 PM, Wolfgang Schuster wrote:
Am 14.02.2025 um 19:35 schrieb Rik Kabel:
The following example produces the expected result under --luatex. It hyphenates the long word and positions the chapter number within the frame. Under LMTX, the long word is not hyphenated and the chapter number is shifted out of the frame.
\setuphead [chapter][alternative=margintext] \starttext \chapter {Establishment} \input klein \contextversion \stoptext
The problem goes back at least to version 20240621 (running on https:// www.context-on-web.eu/).
I did not experiment with other mechanisms that place text into the margin.
I was able to simply your example, the problem is the \hkern command which is added between the section number and the first word of the title (when you use the margin alternative) which prevents hyphenation.
\starttext
\hsize\emwidth
1\hskip\emwidth Establishment
2\hkern\emwidth Establishment
\stoptext
So, should we do \headnumbercontent \hkern\headnumberdistance \wordboundary then? 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 -----------------------------------------------------------------

Am 14.02.2025 um 20:49 schrieb Hans Hagen:
On 2/14/2025 7:47 PM, Wolfgang Schuster wrote:
Am 14.02.2025 um 19:35 schrieb Rik Kabel:
The following example produces the expected result under --luatex. It hyphenates the long word and positions the chapter number within the frame. Under LMTX, the long word is not hyphenated and the chapter number is shifted out of the frame.
\setuphead [chapter][alternative=margintext] \starttext \chapter {Establishment} \input klein \contextversion \stoptext
The problem goes back at least to version 20240621 (running on https:// www.context-on-web.eu/).
I did not experiment with other mechanisms that place text into the margin.
I was able to simply your example, the problem is the \hkern command which is added between the section number and the first word of the title (when you use the margin alternative) which prevents hyphenation.
\starttext
\hsize\emwidth
1\hskip\emwidth Establishment
2\hkern\emwidth Establishment
\stoptext
So, should we do
\headnumbercontent \hkern\headnumberdistance \wordboundary
then?
Yes, it fixes the problem. Wolfgang
participants (3)
-
Hans Hagen
-
Rik Kabel
-
Wolfgang Schuster