Hi Wolfgang,

# You can use the default language for the reset:
# 
# \startsetups [language:czech]
#   \setbreakpoints [czcompound]
# \stopsetups
# 
# \startsetups [language:other]
#   \resetbreakpoints
# \stopsetups
# 
# \setuplanguage
#   [cz]
#   [setups=language:czech]
# 
# \setuplanguage
#   [default]
#   [setups=language:other]

I used these definitions and it works really better, the hyphen is not
repeated in other languages anymore, thanks for this setting.
Unfortunately, two side-effects appeared after switching language back to uk:

* after the hyphen, no linebreak seems to be allowed,
* hyphenation patterns have been applied on the composed word, while before 
switching (default) not.

Tested with TL2019 as well as with the newest.

How can these side-effects be suppressed? 

Tomáš


%%%%%%%%%%%%%%%%%%%%%% MWE
\startluacode
fonts.protrusions.classes.tomas_hala = {
    vector = 'tomas_hala',
    factor = 1,
}

fonts.protrusions.vectors.tomas_hala = table.merged (
    fonts.protrusions.vectors.quality,
    {
        [0x002D] = { 0.4, 0.7 }, -- hyphen
    }
)

\stopluacode

\definebreakpoints [czcompound]
\definebreakpoint [czcompound] [-] [nleft=3,nright=3,type=4]

\startsetups [language:czech]
  \setbreakpoints [czcompound]
\stopsetups
\startsetups [language:other]
  \resetbreakpoints
\stopsetups

\setuplanguage[cz][setups=language:czech]
\setuplanguage[default][setups=language:other]
\definefontfeature [default] [default] [protrusion=tomas_hala]
\setupalign [hz,hanging]

\showframe [text] [text]
\starttext
\hsize=1pt

\mainlanguage [uk] {\bf uk}
        modro-zelený
        \hyphenatedpar{Stratford Stratford-upon-Avon}  

\mainlanguage [cz] {\bf cz}
        modro-zelený
        \hyphenatedpar{Stratford Stratford-upon-Avon}

\mainlanguage [uk] {\bf uk} 
        modro-zelený
        \hyphenatedpar{uk Stratford Stratford-upon-Avon}

\stoptext
%%%%%%%%%%%%%%%%%%%% RESULT
uk
modro-
zelený
Strat-
ford
Stratford-
upon-
Avon
cz
modro-
-ze-
lený
Strat-
ford
Strat-
ford-
-upon-
-Avon
uk
modro-zelený
uk
Strat-
ford
Strat-
ford-upon-Avon
%%%%%%%%%%%%%%%%%% END
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to