Fonts used for luatex discretionaries
Normally a hyphen inserted at a line break comes from the font used for the current word. If the luatex extended {before}{after}{nobreak} syntax is used in \hyphenation the same is true unless the nobreak field is empty in which case the font from (I think) the end of the paragraph is used. This is LuaTeX, Version 1.15.0 (TeX Live 2022) You can work around the issue by repeating the following character so {-}{w}{w} instead of {-}{}{}w in the attached example, but this seems wrong? David
On 7/29/2022 9:39 PM, David Carlisle wrote:
Normally a hyphen inserted at a line break comes from the font used for the current word.
If the luatex extended {before}{after}{nobreak} syntax is used in \hyphenation the same is true unless the nobreak field is empty in which case the font from (I think) the end of the paragraph is used.
This is LuaTeX, Version 1.15.0 (TeX Live 2022)
You can work around the issue by repeating the following character so
{-}{w}{w} instead of {-}{}{}w
in the attached example, but this seems wrong? works ok in luametatex where it uses the wordstart font so i'll see if i can backport that bit (the language code is quite different so i need to check carefully)
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 -----------------------------------------------------------------
On Sat, Jul 30, 2022 at 11:38 AM Hans Hagen
On 7/29/2022 9:39 PM, David Carlisle wrote:
Normally a hyphen inserted at a line break comes from the font used for the current word.
If the luatex extended {before}{after}{nobreak} syntax is used in \hyphenation the same is true unless the nobreak field is empty in which case the font from (I think) the end of the paragraph is used.
This is LuaTeX, Version 1.15.0 (TeX Live 2022)
You can work around the issue by repeating the following character so
{-}{w}{w} instead of {-}{}{}w
in the attached example, but this seems wrong? works ok in luametatex where it uses the wordstart font so i'll see if i can backport that bit (the language code is quite different so i need to check carefully)
Hans
Committed revision 7531. -- luigi
On Sat, 30 Jul 2022 at 10:37, Hans Hagen
On 7/29/2022 9:39 PM, David Carlisle wrote:
Normally a hyphen inserted at a line break comes from the font used for the current word.
If the luatex extended {before}{after}{nobreak} syntax is used in \hyphenation the same is true unless the nobreak field is empty in which case the font from (I think) the end of the paragraph is used.
This is LuaTeX, Version 1.15.0 (TeX Live 2022)
You can work around the issue by repeating the following character so
{-}{w}{w} instead of {-}{}{}w
in the attached example, but this seems wrong? works ok in luametatex where it uses the wordstart font so i'll see if i can backport that bit (the language code is quite different so i need to check carefully)
Hans
Hans, thanks. Mostly this started from a latex user on stackexchange, I was just removing latex idioms to report here. https://tex.stackexchange.com/q/652458/1090 This seems to be a possibly related issue, why in the first example here, does the "i" which is not in a discretionary get dropped? \hyphenation{Ab{-}{s}{s}{-}{t}{t}rak{-}{t}{t}i{-}{o}{o}ns-ebe{-}{n}{n}e} X\hskip 400pt Abstraktionsebene X\hskip 420pt Abstraktionsebene \bye This seems similar to this example in the luatex manual (texlive 2022 version, last table in section 5.4). \hyphenation{z{a-}{-b}{z}{a-}{-b}{z}[3]{a-}{-b}{z}[1]{a-}{-b}{z}z} \hfuzz30pt \parindent0pt \hsize0em 123 zzzzzz 123 \bye the final z, the word space and the 1 at the start of the next word all get dropped so the text ends -b23 which matches the manual but I suspect is wrong? David
participants (3)
-
David Carlisle
-
Hans Hagen
-
luigi scarso