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

* Re: How to repeat the hyphen?
  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
  0 siblings, 1 reply; 9+ messages in thread
From: Taco Hoekwater @ 2019-03-21 15:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

\definebreakpoint [compound] [-] [nleft=3,nright=3,type=4]
\setbreakpoints[compound]

But also check the wiki, there can be side-effects to \setbreakpoints[compound]

  https://wiki.contextgarden.net/Compound_words


Best wishes,
Taco

> On 21 Mar 2019, at 16:23, Tomas Hala <tomas.hala@mendelu.cz> wrote:
> 
> 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
> ___________________________________________________________________________________

Taco Hoekwater
Elvenkind BV




___________________________________________________________________________________
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

* Re: How to repeat the hyphen?
  2019-03-21 15:45 ` Taco Hoekwater
@ 2019-03-22  9:37   ` Tomas Hala
  2019-03-22 12:56     ` Taco Hoekwater
  0 siblings, 1 reply; 9+ messages in thread
From: Tomas Hala @ 2019-03-22  9:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

thanks, that's it. I did some tests and no side-effects appeared. 
Moreover, it seems that it has no influence on \hyphentatedurl which is also ok.

But only one point I do not understand -- when I used the key 
language=cz, repeated hyphens disappeared. It would by fine if one
can set it only for the given language(s), eg. for cz+sk yes and for en no.
Is there any way for this? 

Best wishes,

Tomáš 


\definebreakpoint [compound] [-] [nleft=3,nright=3,type=4, language=cz]
\setbreakpoints[compound]


Thu, Mar 21, 2019 ve 04:45:49PM +0100 Taco Hoekwater napsal(a):
# Hi,
# 
# \definebreakpoint [compound] [-] [nleft=3,nright=3,type=4]
# \setbreakpoints[compound]
# 
# But also check the wiki, there can be side-effects to \setbreakpoints[compound]
# 
#   https://wiki.contextgarden.net/Compound_words
# 
# 
# Best wishes,
# Taco
# 
# > On 21 Mar 2019, at 16:23, Tomas Hala <tomas.hala@mendelu.cz> wrote:
# > 
# > 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
# > ___________________________________________________________________________________
# 
# Taco Hoekwater
# Elvenkind BV
# 
# 
# 
# 
# ___________________________________________________________________________________
# 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
# ___________________________________________________________________________________

                                         Tomáš Hála
--------------------------------------------------------------------
Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
--------------------------------------------------------------------
http://akela.mendelu.cz/~thala
___________________________________________________________________________________
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

* Re: How to repeat the hyphen?
  2019-03-22  9:37   ` Tomas Hala
@ 2019-03-22 12:56     ` Taco Hoekwater
  2019-03-22 14:38       ` Tomas Hala
  0 siblings, 1 reply; 9+ messages in thread
From: Taco Hoekwater @ 2019-03-22 12:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Tomáš,

Sorry but I do not know. I *do* know that you can do this:

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

And perhaps hook that into a language switch. Does that help?



> On 22 Mar 2019, at 10:37, Tomas Hala <tomas.hala@mendelu.cz> wrote:
> 
> Hi,
> 
> thanks, that's it. I did some tests and no side-effects appeared. 
> Moreover, it seems that it has no influence on \hyphentatedurl which is also ok.
> 
> But only one point I do not understand -- when I used the key 
> language=cz, repeated hyphens disappeared. It would by fine if one
> can set it only for the given language(s), eg. for cz+sk yes and for en no.
> Is there any way for this? 
> 
> Best wishes,
> 
> Tomáš 
> 
> 
> \definebreakpoint [compound] [-] [nleft=3,nright=3,type=4, language=cz]
> \setbreakpoints[compound]
> 
> 
> Thu, Mar 21, 2019 ve 04:45:49PM +0100 Taco Hoekwater napsal(a):
> # Hi,
> # 
> # \definebreakpoint [compound] [-] [nleft=3,nright=3,type=4]
> # \setbreakpoints[compound]
> # 
> # But also check the wiki, there can be side-effects to \setbreakpoints[compound]
> # 
> #   https://wiki.contextgarden.net/Compound_words
> # 
> # 
> # Best wishes,
> # Taco
> # 
> # > On 21 Mar 2019, at 16:23, Tomas Hala <tomas.hala@mendelu.cz> wrote:
> # > 
> # > 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
> # > ___________________________________________________________________________________
> # 
> # Taco Hoekwater
> # Elvenkind BV
> # 
> # 
> # 
> # 
> # ___________________________________________________________________________________
> # 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
> # ___________________________________________________________________________________
> 
>                                         Tomáš Hála
> --------------------------------------------------------------------
> Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
> Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
> --------------------------------------------------------------------
> http://akela.mendelu.cz/~thala
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

Taco Hoekwater
Elvenkind BV




___________________________________________________________________________________
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

* Re: How to repeat the hyphen?
  2019-03-22 12:56     ` Taco Hoekwater
@ 2019-03-22 14:38       ` Tomas Hala
  2019-03-22 15:16         ` Taco Hoekwater
  0 siblings, 1 reply; 9+ messages in thread
From: Tomas Hala @ 2019-03-22 14:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Taco,
 
good idea, I tried it but the problem is that it does not switch itself off
automatically when the language is changed again. 

The following code works but I guess that must be some more sophisticated
ConTeXt way.

Best wishes,

Tomáš 


%%%%%%%%%%%%%%
\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}\par\thinrule}

\starttext
\definebreakpoints[czcompound]   

\let\oldlanguage=\language
\def\language[#1]{\oldlanguage[#1]
  \ifx\mylanguage\currentlanguage \definebreakpoint[czcompound][-][nleft=3,nright=3,type=4] \setbreakpoints[czcompound] 
                            \else \definebreakpoint[czcompound][-][nleft=3,nright=3,type=1] \setbreakpoints[czcompound]
  \fi}    %%%% and the same for \mainlanguage

\def\mylanguage{cs}

\language[en] \mybox{modro-zelený}
\language[cz] \mybox{modro-zelený}
\language[en] \mybox{modro-zelený}

\stoptext
%%%%%%%%%%%%%%%%%%%%

Fri, Mar 22, 2019 ve 01:56:40PM +0100 Taco Hoekwater napsal(a):
# Hi Tomáš,
# 
# Sorry but I do not know. I *do* know that you can do this:
# 
#   \definebreakpoints [czcompound]
#   \definebreakpoint  [czcompound] [-] [nleft=3,nright=3,type=4]
#   \setbreakpoints    [czcompound]
# 
# And perhaps hook that into a language switch. Does that help?
# 
# 
# 
# > On 22 Mar 2019, at 10:37, Tomas Hala <tomas.hala@mendelu.cz> wrote:
# > 
# > Hi,
# > 
# > thanks, that's it. I did some tests and no side-effects appeared. 
# > Moreover, it seems that it has no influence on \hyphentatedurl which is also ok.
# > 
# > But only one point I do not understand -- when I used the key 
# > language=cz, repeated hyphens disappeared. It would by fine if one
# > can set it only for the given language(s), eg. for cz+sk yes and for en no.
# > Is there any way for this? 
# > 
# > Best wishes,
# > 
# > Tomáš 
# > 
# > 
# > \definebreakpoint [compound] [-] [nleft=3,nright=3,type=4, language=cz]
# > \setbreakpoints[compound]
# > 
# > 
# > Thu, Mar 21, 2019 ve 04:45:49PM +0100 Taco Hoekwater napsal(a):
# > # Hi,
# > # 
# > # \definebreakpoint [compound] [-] [nleft=3,nright=3,type=4]
# > # \setbreakpoints[compound]
# > # 
# > # But also check the wiki, there can be side-effects to \setbreakpoints[compound]
# > # 
# > #   https://wiki.contextgarden.net/Compound_words
# > # 
# > # 
# > # Best wishes,
# > # Taco
# > # 
# > # > On 21 Mar 2019, at 16:23, Tomas Hala <tomas.hala@mendelu.cz> wrote:
# > # > 
# > # > 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
# > # > ___________________________________________________________________________________
# > # 
# > # Taco Hoekwater
# > # Elvenkind BV
# > # 
# > # 
# > # 
# > # 
# > # ___________________________________________________________________________________
# > # 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
# > # ___________________________________________________________________________________
# > 
# >                                         Tomáš Hála
# > --------------------------------------------------------------------
# > Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
# > Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
# > --------------------------------------------------------------------
# > http://akela.mendelu.cz/~thala
# > ___________________________________________________________________________________
# > 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
# > ___________________________________________________________________________________
# 
# Taco Hoekwater
# Elvenkind BV
# 
# 
# 
# 
# ___________________________________________________________________________________
# 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
# ___________________________________________________________________________________

                                         Tomáš Hála
--------------------------------------------------------------------
Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
--------------------------------------------------------------------
http://akela.mendelu.cz/~thala
___________________________________________________________________________________
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

* Re: How to repeat the hyphen?
  2019-03-22 14:38       ` Tomas Hala
@ 2019-03-22 15:16         ` Taco Hoekwater
  2019-03-22 15:57           ` Tomas Hala
  0 siblings, 1 reply; 9+ messages in thread
From: Taco Hoekwater @ 2019-03-22 15:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Somewhat cleaner is to do it this way:

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

  \appendtoks
   \ifx\mylanguage\currentlanguage 
      \setbreakpoints[czcompound] 
   \else 
      \resetbreakpoints
   \fi
  \to\everylanguage


It would be nice if that language= key would work, though (it is ignored, it seems)

Taco


> On 22 Mar 2019, at 15:38, Tomas Hala <tomas.hala@mendelu.cz> wrote:
> 
> Hi Taco,
> 
> good idea, I tried it but the problem is that it does not switch itself off
> automatically when the language is changed again. 
> 
> The following code works but I guess that must be some more sophisticated
> ConTeXt way.
> 
> Best wishes,
> 
> Tomáš 
> 
> 
> %%%%%%%%%%%%%%
> \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}\par\thinrule}
> 
> \starttext
> \definebreakpoints[czcompound]   
> 
> \let\oldlanguage=\language
> \def\language[#1]{\oldlanguage[#1]
>  \ifx\mylanguage\currentlanguage \definebreakpoint[czcompound][-][nleft=3,nright=3,type=4] \setbreakpoints[czcompound] 
>                            \else \definebreakpoint[czcompound][-][nleft=3,nright=3,type=1] \setbreakpoints[czcompound]
>  \fi}    %%%% and the same for \mainlanguage
> 
> \def\mylanguage{cs}
> 
> \language[en] \mybox{modro-zelený}
> \language[cz] \mybox{modro-zelený}
> \language[en] \mybox{modro-zelený}
> 
> \stoptext
> %%%%%%%%%%%%%%%%%%%%
> 
> Fri, Mar 22, 2019 ve 01:56:40PM +0100 Taco Hoekwater napsal(a):
> # Hi Tomáš,
> # 
> # Sorry but I do not know. I *do* know that you can do this:
> # 
> #   \definebreakpoints [czcompound]
> #   \definebreakpoint  [czcompound] [-] [nleft=3,nright=3,type=4]
> #   \setbreakpoints    [czcompound]
> # 
> # And perhaps hook that into a language switch. Does that help?
> # 
> # 
> # 
> # > On 22 Mar 2019, at 10:37, Tomas Hala <tomas.hala@mendelu.cz> wrote:
> # > 
> # > Hi,
> # > 
> # > thanks, that's it. I did some tests and no side-effects appeared. 
> # > Moreover, it seems that it has no influence on \hyphentatedurl which is also ok.
> # > 
> # > But only one point I do not understand -- when I used the key 
> # > language=cz, repeated hyphens disappeared. It would by fine if one
> # > can set it only for the given language(s), eg. for cz+sk yes and for en no.
> # > Is there any way for this? 
> # > 
> # > Best wishes,
> # > 
> # > Tomáš 
> # > 
> # > 
> # > \definebreakpoint [compound] [-] [nleft=3,nright=3,type=4, language=cz]
> # > \setbreakpoints[compound]
> # > 
> # > 
> # > Thu, Mar 21, 2019 ve 04:45:49PM +0100 Taco Hoekwater napsal(a):
> # > # Hi,
> # > # 
> # > # \definebreakpoint [compound] [-] [nleft=3,nright=3,type=4]
> # > # \setbreakpoints[compound]
> # > # 
> # > # But also check the wiki, there can be side-effects to \setbreakpoints[compound]
> # > # 
> # > #   https://wiki.contextgarden.net/Compound_words
> # > # 
> # > # 
> # > # Best wishes,
> # > # Taco
> # > # 
> # > # > On 21 Mar 2019, at 16:23, Tomas Hala <tomas.hala@mendelu.cz> wrote:
> # > # > 
> # > # > 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
> # > # > ___________________________________________________________________________________
> # > # 
> # > # Taco Hoekwater
> # > # Elvenkind BV
> # > # 
> # > # 
> # > # 
> # > # 
> # > # ___________________________________________________________________________________
> # > # 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
> # > # ___________________________________________________________________________________
> # > 
> # >                                         Tomáš Hála
> # > --------------------------------------------------------------------
> # > Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
> # > Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
> # > --------------------------------------------------------------------
> # > http://akela.mendelu.cz/~thala
> # > ___________________________________________________________________________________
> # > 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
> # > ___________________________________________________________________________________
> # 
> # Taco Hoekwater
> # Elvenkind BV
> # 
> # 
> # 
> # 
> # ___________________________________________________________________________________
> # 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
> # ___________________________________________________________________________________
> 
>                                         Tomáš Hála
> --------------------------------------------------------------------
> Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
> Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
> --------------------------------------------------------------------
> http://akela.mendelu.cz/~thala
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

Taco Hoekwater
Elvenkind BV




___________________________________________________________________________________
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

* Re: How to repeat the hyphen?
  2019-03-22 15:16         ` Taco Hoekwater
@ 2019-03-22 15:57           ` Tomas Hala
  2019-03-26  5:24             ` Sam May
  0 siblings, 1 reply; 9+ messages in thread
From: Tomas Hala @ 2019-03-22 15:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Taco,

this is exactly what I needed, thank you very much.

Fri, Mar 22, 2019 ve 04:16:20PM +0100 Taco Hoekwater napsal(a):
# Somewhat cleaner is to do it this way:
#   %%%%%%%
#   \definebreakpoints[czcompound]   
#   \definebreakpoint[czcompound][-][nleft=3,nright=3,type=4] 
# 
#   \appendtoks
#    \ifx\mylanguage\currentlanguage 
#       \setbreakpoints[czcompound] 
#    \else 
#       \resetbreakpoints
#    \fi
#   \to\everylanguage
# 
# It would be nice if that language= key would work, though (it is ignored, it seems)

I agree...

Best wishes,

Tomáš 

# Taco
# 
# 
# > On 22 Mar 2019, at 15:38, Tomas Hala <tomas.hala@mendelu.cz> wrote:
# > 
# > Hi Taco,
# > 
# > good idea, I tried it but the problem is that it does not switch itself off
# > automatically when the language is changed again. 
# > 
# > The following code works but I guess that must be some more sophisticated
# > ConTeXt way.
# > 
# > Best wishes,
# > 
# > Tomáš 
# > 
# > 
# > %%%%%%%%%%%%%%
# > \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}\par\thinrule}
# > 
# > \starttext
# > \definebreakpoints[czcompound]   
# > 
# > \let\oldlanguage=\language
# > \def\language[#1]{\oldlanguage[#1]
# >  \ifx\mylanguage\currentlanguage \definebreakpoint[czcompound][-][nleft=3,nright=3,type=4] \setbreakpoints[czcompound] 
# >                            \else \definebreakpoint[czcompound][-][nleft=3,nright=3,type=1] \setbreakpoints[czcompound]
# >  \fi}    %%%% and the same for \mainlanguage
# > 
# > \def\mylanguage{cs}
# > 
# > \language[en] \mybox{modro-zelený}
# > \language[cz] \mybox{modro-zelený}
# > \language[en] \mybox{modro-zelený}
# > 
# > \stoptext
# > %%%%%%%%%%%%%%%%%%%%
# > 
# > Fri, Mar 22, 2019 ve 01:56:40PM +0100 Taco Hoekwater napsal(a):
# > # Hi Tomáš,
# > # 
# > # Sorry but I do not know. I *do* know that you can do this:
# > # 
# > #   \definebreakpoints [czcompound]
# > #   \definebreakpoint  [czcompound] [-] [nleft=3,nright=3,type=4]
# > #   \setbreakpoints    [czcompound]
# > # 
# > # And perhaps hook that into a language switch. Does that help?
# > # 
# > # 
# > # 
# > # > On 22 Mar 2019, at 10:37, Tomas Hala <tomas.hala@mendelu.cz> wrote:
# > # > 
# > # > Hi,
# > # > 
# > # > thanks, that's it. I did some tests and no side-effects appeared. 
# > # > Moreover, it seems that it has no influence on \hyphentatedurl which is also ok.
# > # > 
# > # > But only one point I do not understand -- when I used the key 
# > # > language=cz, repeated hyphens disappeared. It would by fine if one
# > # > can set it only for the given language(s), eg. for cz+sk yes and for en no.
# > # > Is there any way for this? 
# > # > 
# > # > Best wishes,
# > # > 
# > # > Tomáš 
# > # > 
# > # > 
# > # > \definebreakpoint [compound] [-] [nleft=3,nright=3,type=4, language=cz]
# > # > \setbreakpoints[compound]
# > # > 
# > # > 
# > # > Thu, Mar 21, 2019 ve 04:45:49PM +0100 Taco Hoekwater napsal(a):
# > # > # Hi,
# > # > # 
# > # > # \definebreakpoint [compound] [-] [nleft=3,nright=3,type=4]
# > # > # \setbreakpoints[compound]
# > # > # 
# > # > # But also check the wiki, there can be side-effects to \setbreakpoints[compound]
# > # > # 
# > # > #   https://wiki.contextgarden.net/Compound_words
# > # > # 
# > # > # 
# > # > # Best wishes,
# > # > # Taco
# > # > # 
# > # > # > On 21 Mar 2019, at 16:23, Tomas Hala <tomas.hala@mendelu.cz> wrote:
# > # > # > 
# > # > # > 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
# > # > # > ___________________________________________________________________________________
# > # > # 
# > # > # Taco Hoekwater
# > # > # Elvenkind BV
# > # > # 
# > # > # 
# > # > # 
# > # > # 
# > # > # ___________________________________________________________________________________
# > # > # 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
# > # > # ___________________________________________________________________________________
# > # > 
# > # >                                         Tomáš Hála
# > # > --------------------------------------------------------------------
# > # > Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
# > # > Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
# > # > --------------------------------------------------------------------
# > # > http://akela.mendelu.cz/~thala
# > # > ___________________________________________________________________________________
# > # > 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
# > # > ___________________________________________________________________________________
# > # 
# > # Taco Hoekwater
# > # Elvenkind BV
# > # 
# > # 
# > # 
# > # 
# > # ___________________________________________________________________________________
# > # 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
# > # ___________________________________________________________________________________
# > 
# >                                         Tomáš Hála
# > --------------------------------------------------------------------
# > Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
# > Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
# > --------------------------------------------------------------------
# > http://akela.mendelu.cz/~thala
# > ___________________________________________________________________________________
# > 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
# > ___________________________________________________________________________________
# 
# Taco Hoekwater
# Elvenkind BV
# 
# 
# 
# 
# ___________________________________________________________________________________
# 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
# ___________________________________________________________________________________

                                         Tomáš Hála
--------------------------------------------------------------------
Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
--------------------------------------------------------------------
http://akela.mendelu.cz/~thala
___________________________________________________________________________________
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

* Re: How to repeat the hyphen?
  2019-03-22 15:57           ` Tomas Hala
@ 2019-03-26  5:24             ` Sam May
  2019-03-26  5:54               ` Alan Braslau
  0 siblings, 1 reply; 9+ messages in thread
From: Sam May @ 2019-03-26  5:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Sounds like you've got it working, but just to provide an alternative 
that should* work, according to the sources:

  \setuplanguage[cz]
     [compoundhyphen=-,%        Or, to keep the \setuphyphenmark
      rightcompoundhyphen=-,%   configuration mentioned in Taco's link:
      leftcompoundhyphen=-]%    `*compoundhyphen=\compoundhyphen`

That does require you to replace all the hyphens with `||`, which it 
understandably sounds like you want to avoid, but it can be good for 
someone like me who likes that explicit markup, or for someone who needs 
more control over which symbols go where (I'm using for Esperanto -- 
slightly non-standard -- a vertical tick mark for the inner-line and the 
left but the hyphen for the right).  The main benefit, though, is that 
you can do the same thing for line-breaking hyphenation if you need to 
change that, just drop the `compound` in the keys.

* I've been running into it working for the first break or two but than 
switching back to the default for the rest of the document, and haven't 
been able to track down why.  Though it might have something to do with 
me still using the ridiculously out-of-date 2016.05.17 because I haven't 
gotten around to overriding the Gentoo package manager yet...

Sam

On Fri, Mar 22, 2019 at 04:57:24PM +0100, Tomas Hala wrote:
>Hi Taco,
>
>this is exactly what I needed, thank you very much.
>
>Fri, Mar 22, 2019 ve 04:16:20PM +0100 Taco Hoekwater napsal(a):
># Somewhat cleaner is to do it this way:
>#   %%%%%%%
>#   \definebreakpoints[czcompound]
>#   \definebreakpoint[czcompound][-][nleft=3,nright=3,type=4]
>#
>#   \appendtoks
>#    \ifx\mylanguage\currentlanguage
>#       \setbreakpoints[czcompound]
>#    \else
>#       \resetbreakpoints
>#    \fi
>#   \to\everylanguage
>#
># It would be nice if that language= key would work, though (it is ignored, it seems)
>
>I agree...
>
>Best wishes,
>
>Tomá??
>
># Taco
>#
>#
># > On 22 Mar 2019, at 15:38, Tomas Hala <tomas.hala@mendelu.cz> wrote:
># >
># > Hi Taco,
># >
># > good idea, I tried it but the problem is that it does not switch itself off
># > automatically when the language is changed again.
># >
># > The following code works but I guess that must be some more sophisticated
># > ConTeXt way.
># >
># > Best wishes,
># >
># > Tomá??
># >
># >
># > %%%%%%%%%%%%%%
># > \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}\par\thinrule}
># >
># > \starttext
># > \definebreakpoints[czcompound]
># >
># > \let\oldlanguage=\language
># > \def\language[#1]{\oldlanguage[#1]
># >  \ifx\mylanguage\currentlanguage \definebreakpoint[czcompound][-][nleft=3,nright=3,type=4] \setbreakpoints[czcompound]
># >                            \else \definebreakpoint[czcompound][-][nleft=3,nright=3,type=1] \setbreakpoints[czcompound]
># >  \fi}    %%%% and the same for \mainlanguage
># >
># > \def\mylanguage{cs}
># >
># > \language[en] \mybox{modro-zelený}
># > \language[cz] \mybox{modro-zelený}
># > \language[en] \mybox{modro-zelený}
># >
># > \stoptext
># > %%%%%%%%%%%%%%%%%%%%
># >
># > Fri, Mar 22, 2019 ve 01:56:40PM +0100 Taco Hoekwater napsal(a):
># > # Hi Tomá??,
># > #
># > # Sorry but I do not know. I *do* know that you can do this:
># > #
># > #   \definebreakpoints [czcompound]
># > #   \definebreakpoint  [czcompound] [-] [nleft=3,nright=3,type=4]
># > #   \setbreakpoints    [czcompound]
># > #
># > # And perhaps hook that into a language switch. Does that help?
># > #
># > #
># > #
># > # > On 22 Mar 2019, at 10:37, Tomas Hala <tomas.hala@mendelu.cz> wrote:
># > # >
># > # > Hi,
># > # >
># > # > thanks, that's it. I did some tests and no side-effects appeared.
># > # > Moreover, it seems that it has no influence on \hyphentatedurl which is also ok.
># > # >
># > # > But only one point I do not understand -- when I used the key
># > # > language=cz, repeated hyphens disappeared. It would by fine if one
># > # > can set it only for the given language(s), eg. for cz+sk yes and for en no.
># > # > Is there any way for this?
># > # >
># > # > Best wishes,
># > # >
># > # > Tomá??
># > # >
># > # >
># > # > \definebreakpoint [compound] [-] [nleft=3,nright=3,type=4, language=cz]
># > # > \setbreakpoints[compound]
># > # >
># > # >
># > # > Thu, Mar 21, 2019 ve 04:45:49PM +0100 Taco Hoekwater napsal(a):
># > # > # Hi,
># > # > #
># > # > # \definebreakpoint [compound] [-] [nleft=3,nright=3,type=4]
># > # > # \setbreakpoints[compound]
># > # > #
># > # > # But also check the wiki, there can be side-effects to \setbreakpoints[compound]
># > # > #
># > # > #   https://wiki.contextgarden.net/Compound_words
># > # > #
># > # > #
># > # > # Best wishes,
># > # > # Taco
># > # > #
># > # > # > On 21 Mar 2019, at 16:23, Tomas Hala <tomas.hala@mendelu.cz> wrote:
># > # > # >
># > # > # > 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
># > # > # > ___________________________________________________________________________________
># > # > #
># > # > # Taco Hoekwater
># > # > # Elvenkind BV
># > # > #
># > # > #
># > # > #
># > # > #
># > # > # ___________________________________________________________________________________
># > # > # 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
># > # > # ___________________________________________________________________________________
># > # >
># > # >                                         Tomá?? Hála
># > # > --------------------------------------------------------------------
># > # > Mendelova univerzita, Provozn?? ekonomická fakulta, ústav informatiky
># > # > Zem??d??lská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
># > # > --------------------------------------------------------------------
># > # > http://akela.mendelu.cz/~thala
># > # > ___________________________________________________________________________________
># > # > 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
># > # > ___________________________________________________________________________________
># > #
># > # Taco Hoekwater
># > # Elvenkind BV
># > #
># > #
># > #
># > #
># > # ___________________________________________________________________________________
># > # 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
># > # ___________________________________________________________________________________
># >
># >                                         Tomá?? Hála
># > --------------------------------------------------------------------
># > Mendelova univerzita, Provozn?? ekonomická fakulta, ústav informatiky
># > Zem??d??lská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
># > --------------------------------------------------------------------
># > http://akela.mendelu.cz/~thala
># > ___________________________________________________________________________________
># > 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
># > ___________________________________________________________________________________
>#
># Taco Hoekwater
># Elvenkind BV
>#
>#
>#
>#
># ___________________________________________________________________________________
># 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
># ___________________________________________________________________________________
>
>                                         Tomá?? Hála
>--------------------------------------------------------------------
>Mendelova univerzita, Provozn?? ekonomická fakulta, ústav informatiky
>Zem??d??lská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
>--------------------------------------------------------------------
>http://akela.mendelu.cz/~thala
>___________________________________________________________________________________
>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
>___________________________________________________________________________________
___________________________________________________________________________________
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

* Re: How to repeat the hyphen?
  2019-03-26  5:24             ` Sam May
@ 2019-03-26  5:54               ` Alan Braslau
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Braslau @ 2019-03-26  5:54 UTC (permalink / raw)
  To: Sam May; +Cc: mailing list for ConTeXt users

On Mon, 25 Mar 2019 22:24:34 -0700
Sam May <ag.eitilt@gmail.com> wrote:

> still using the ridiculously out-of-date 2016.05.17 because I haven't 
> gotten around to overriding the Gentoo package manager yet...

You can install the standalone Context distribution anywhere you want, in parallel with your OS package manager version. Both can very peacefully coexist. To select or use your standalone version, simply add its bin path (i.e. $CONTEXTROOT/tex/texmf-linux-64/bin) at the front of your PATH.

One strategy could be to keep a version of the standalone distribution in your project directory, even having multiple versions, one per project. This has the advantage that if one does not update the distribution it will always work with the project files, that is any future changes to Context will not affect the compiling of the project sources, for each project holds its own (frozen) version of Context.

In this case, your path can be:
export PATH=./context/tex/texmf-linux-64/bin:$PATH
so that it will select whatever is in the context subdirectory of the current directory.
(you can also use this PATH scheme adding a (soft)link in a project directory to whatever context distribution you like, or none, in which case it will fall-back on the system-installed texlive version.)

Alan
___________________________________________________________________________________
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).