As a follow up to another question I would like to ask for help with the \hyphenation
command. The following MWE illustrates the problem:
\defineframedtext[secondary][
frame=off,
leftframe=on,
framecolor=lightgray,
rulethickness=6pt,
offset=none, % 0pt,
loffset=6pt,
indenting=no,
align=flushleft,
style=\em,
]
% ----------
\hyphenation{Tatjana}
\hyphenation{Cunningham}
% ----------
\starttext
\section{Testing hyphenation}
\startsecondary
I consider myself fortunate to be in friendship with Tatjana Cunningham. We met in 2018
at the renovated farm in Yorkshire, where the painter has been living with his wife for
the last 30 years. I consider myself very fortunate to be in close friendship with
Tatjana Cunningham. We met in 2018 at the renovated farm in Yorkshire, where the painter
has been living with his wife for the last 30 years.
\stopsecondary
I consider myself very fortunate to be in close friendship with Tatjana Cunningham.
We met in 2018 at the renovated farm in Yorkshire, where the painter has been living with
his wife for the last 30 years. I consider myself very fortunate to be in close friendship
with Tatjana Cunningham. We met in 2018 at the renovated farm in Yorkshire, where the
painter has been living with his wife for the last 30 years.
\stoptext
The result is as follows:
Note that the word Tatjana is hyphenated, even though I included the line \hyphenation{Tatjana}
. Also note that the result is different (correct), when declaring the command like this: \hyphenation{Tatjana Cunnigham}
.
So, I'm guessing the second \hyphenation
command somehow re-defines the first one? Is this really what's happening? If so, what can I do to prevent that?
UPDATE: So, I noticed that the behaviour of the hyphenation algorithm is non-deterministic, as the problems (a specific word – here Tatjana – being hyphenated, even though hyphenation for this word has been turned off by \hyphenation{Tatjana}
) appear and disappear, when the compilation (context ...
) is called repeatedly.
Can anybody offer an explanation for this? Or, even better: a solution? (Refer to my comment below.)
\hyphenation
at that point and as you say, it fails, odd...