[NTG-context] How to repeat the hyphen?

Tomas Hala tomas.hala at mendelu.cz
Thu Mar 21 16:23:43 CET 2019


Hi all,

in composed words with hyphen inside (e.g. modro-zelený = blue-green), the
hyphen character must be repeated at the beginning of the new line
(modro-/-zelený). This rule is obligatory for Czech and Slovak typesetting.

I am able to implement this feature by defining a new command (see \def\= below)
but it means that all appearances of "-" must be replaced (manually) in the source
text. I tried all options of \setuphyphenation but no one gives the correct
result. 

Is there any way in ConTeXt how to set it by default?

Best wishes,

Tomáš

%%%%%% MWE:

\starttext\mainlanguage[cz]
\def\myboxik#1#2{\start\setuphyphenation[cz][method=#1]\startframedtext[width=1dd]\hbox{{\bf#1}}\crlf#2\stopframedtext\stop\par}
\def\mybox#1{\myboxik{traditional}{#1}\myboxik{default}{#1}\myboxik{expanded}{#1}\myboxik{original}{#1}\myboxik{tex}{#1}\myboxik{hyphenate}{#1}\myboxik{none}{#1}}

\mybox{modro-zelený}

\def\={\discretionary{-}{-}{-}}
\mybox{modro\=zelený}
\stoptext

%%%%%%



More information about the ntg-context mailing list