
Dear list, I have the following sample: \setupbodyfont[dejavu] \mainlanguage[agr] \setuplanguage[es][patterns={es, agr}] \starttext \startTEXpage[offset=1em] \hyphenatedword{πράγματα}\\ \es\hyphenatedword{πρᾶγματα}\\ \hyphenatedword{τέκνον}\\ \stopTEXpage \stoptext On the first line, I get the hyphenated word πράγ-μα-τα. But on the second line (with I thought they were the same paterns), I get the same word hyphenated as πρά-γμα-τα. What am I missing here? I would expect the same results. BTW, shouldn’t be τέκνον hyphenated as τέκ-νον? Many thanks for your help, Pablo

Hi Pablo, On Sun, Feb 16, 2025 at 11:54:18AM +0100, Pablo Rodriguez via ntg-context wrote:
\setupbodyfont[dejavu] \mainlanguage[agr] \setuplanguage[es][patterns={es, agr}] \starttext \startTEXpage[offset=1em] \hyphenatedword{πράγματα}\\ \es\hyphenatedword{πρᾶγματα}\\ \hyphenatedword{τέκνον}\\ \stopTEXpage \stoptext
On the first line, I get the hyphenated word πράγ-μα-τα.
But on the second line (with I thought they were the same paterns), I get the same word hyphenated as πρά-γμα-τα.
What am I missing here? I would expect the same results.
Me too, that is to say, πρά-γμα-τα and πρᾶ-γμα-τα. The matching patterns are respectively α1, ά1, .π4 and α1, ᾶ1, .π4, i.e. they break after any α, with or without diacritics (the pattern “.π4” is irrelevant).
BTW, shouldn’t be τέκνον hyphenated as τέκ-νον?
I get τέ-κνον, which seems fine. See also this answer by me from 7½ years ago, to a similar question by you: https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/ENQHMKLMIOUR... In the case of “τέκνον”, the patterns would need to contain “2κ1ν”, which I would expect between lines and 340 of 341 of https://github.com/hyphenation/tex-hyphen/blob/a76f2ad/hyph-utf8/tex/generic... Since it is missing, it means that the break τέ-κνον (or indeed τε-κνον) was intended by the author of the patterns. Best, Arthur

On 2/17/25 11:51, Arthur Rosendahl wrote:
On Sun, Feb 16, 2025 at 11:54:18AM +0100, Pablo Rodriguez wrote:
[...] On the first line, I get the hyphenated word πράγ-μα-τα.
But on the second line (with I thought they were the same paterns), I get the same word hyphenated as πρά-γμα-τα.
What am I missing here? I would expect the same results.
Me too, that is to say, πρά-γμα-τα and πρᾶ-γμα-τα. The matching patterns are respectively
Many thanks for you reply, Arthur. The same happens with ἄπαντα: ἄπα-ντα for \agr and ἄπαν-τα for \es (with added agr patterns). Even registering hyphenation exceptions (to get πράγ-μα-τα and ἅπαν-τα) seems not to work as expected: \setupbodyfont[dejavu] \setuphyphenation[method=traditional] \registerhyphenationpattern[agr][2γ1μ] %~ \registerhyphenationpattern[agr][2ν1τ] \setuplanguage[es][patterns={es, agr}] \mainlanguage[agr] \starttext \startTEXpage[offset=1em] \hyphenatedword{πράγματα}\\ {\es\hyphenatedword{πράγματα}}\\ \hyphenatedword{ἅπαντα}\\ {\es\hyphenatedword{ἅπαντα}}\\ \stopTEXpage \stoptext I do get ἅπαν-τα, even with its hyphenation exception commented out.
BTW, shouldn’t be τέκνον hyphenated as τέκ-νον?
I get τέ-κνον, which seems fine. See also this answer by me from 7½ years ago, to a similar question by you:
Sorry, my fault. The intented word wasn’t τέκνον, but ἅπαντα. The patterns follow the rule that two consonants that start a word cannot be hyphenated. Since we have (among many others) Κνωσός, τέκνον must be τέ-κνον. My mistake mentioning the wrong word. Many thanks for your help, Pablo

On Mon, Feb 17, 2025 at 03:43:52PM +0100, Pablo Rodriguez via ntg-context wrote:
The same happens with ἄπαντα: ἄπα-ντα for \agr and ἄπαν-τα for \es (with added agr patterns).
That’s clearly wrong.
I do get ἅπαν-τα, even with its hyphenation exception commented out.
That’s probably because of \lefthyphenmin: if (as I would except), its value is two, you won’t get the hyphenation ἅ-. Try setting it to one and see what happens. According to the patterns, the breakpoints are ἅ-παν-τα. Best, Arthur

On 2/17/25 16:05, Arthur Rosendahl wrote:
On Mon, Feb 17, 2025 at 03:43:52PM +0100, Pablo Rodriguez via ntg-context wrote:
The same happens with ἄπαντα: ἄπα-ντα for \agr and ἄπαν-τα for \es (with added agr patterns).
That’s clearly wrong.
This is the main problem I’m seeing.
I do get ἅπαν-τα, even with its hyphenation exception commented out.
That’s probably because of \lefthyphenmin: if (as I would except), its value is two, you won’t get the hyphenation ἅ-. Try setting it to one and see what happens.
Sorry, is not the first hyphen the one that I’m missing. The issue here for me is that I get a change in \agr from ἅπα-ντα to ἅπαν-τα, just by adding a totally unrelated pattern (2γ1μ). I don’t know what is wrong here, but I might be hitting a curious corner case (to say the least). Many thanks for your help, Pablo

On Mon, Feb 17, 2025 at 04:22:11PM +0100, Pablo Rodriguez via ntg-context wrote:
I do get ἅπαν-τα, even with its hyphenation exception commented out.
That’s probably because of \lefthyphenmin: if (as I would except), its value is two, you won’t get the hyphenation ἅ-. Try setting it to one and see what happens.
Sorry, is not the first hyphen the one that I’m missing.
But that’s the one I was commenting on :-)
The issue here for me is that I get a change in \agr from ἅπα-ντα to ἅπαν-τα, just by adding a totally unrelated pattern (2γ1μ).
I can see that, but that’s a red herring. As you can see in the following example, there is already an issue with mixing patterns in one language: ---- \setupbodyfont[dejavu] \setuphyphenation[method=traditional] \setuplanguage[es][patterns={es,agr}] \mainlanguage[agr] \startTEXpage[offset=1em] \type{single language:} \hyphenatedword{ἅπαντα} \type{two languages:} {\es\hyphenatedword{ἅπαντα}} \stopTEXpage \stoptext ---- The first example yields ἅπα-ντα (incorrect according to the patterns), the second one ἅπαν-τα (correct up to \lefthyphenmin). Hans, please comment :-) The result should be the same in both cases, since the Spanish and Ancient Greek patterns don’t interfere with each other -- and in any case the example with only the Greek patterns is already incorrect. Best, Arthur

On 2/17/25 17:21, Arthur Rosendahl wrote:
[...] The first example yields ἅπα-ντα (incorrect according to the patterns), the second one ἅπαν-τα (correct up to \lefthyphenmin). Hans, please comment :-) The result should be the same in both cases, since the Spanish and Ancient Greek patterns don’t interfere with each other -- and in any case the example with only the Greek patterns is already incorrect.
I think I (partially) discovered what is misbejaving here. In lang-def.{mkxl|mkiv}, ancient Greek is defined: \installlanguage [\s!agr] [\s!default=\s!gr, \c!leftquote=\upperleftsinglesixquote, \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\upperrightdoubleninequote] If a last line loading the patterns isn’t added (\s!patterns=\s!agr), monotonic Greek patterns are loaded. With that change, \registerhyphenationpattern and \registerhyphenationexception work for \agr, but not for secondary loaded patterns (such as in \setuplanguage[en][patterns={en, agr}]). It seems that cases such as \setuplanguage[en][patterns={en, agr}], exceptions to the main patterns aren’t loaded at all. Hans, could you confirm this? Many thanks for your help, Pablo
participants (2)
-
Arthur Rosendahl
-
Pablo Rodriguez