ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to repeat the hyphen?
@ 2019-03-21 15:23 Tomas Hala
  2019-03-21 15:45 ` Taco Hoekwater
  0 siblings, 1 reply; 9+ messages in thread
From: Tomas Hala @ 2019-03-21 15:23 UTC (permalink / raw)
  To: Mailing list ConTeXt

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

%%%%%%

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-26  5:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 15:23 How to repeat the hyphen? Tomas Hala
2019-03-21 15:45 ` Taco Hoekwater
2019-03-22  9:37   ` Tomas Hala
2019-03-22 12:56     ` Taco Hoekwater
2019-03-22 14:38       ` Tomas Hala
2019-03-22 15:16         ` Taco Hoekwater
2019-03-22 15:57           ` Tomas Hala
2019-03-26  5:24             ` Sam May
2019-03-26  5:54               ` Alan Braslau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).