ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \hyphenation problem
@ 2017-10-22 17:18 Rik Kabel
  2017-10-22 17:43 ` Pablo Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: Rik Kabel @ 2017-10-22 17:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 492 bytes --]

Or am I doing something wrong?

With the following, Schwarzenegger is not hyphenated according to the 
instruction. I get:

    \mainlanguage[en]
    \hyphenation{Schwarz-en-egger}
    \startexceptions[en]
    epi-graphs
    Mount-weazels
    Mount-weazel
    \stopexceptions
    \starttext
    \hyphenatedword{Schwarzenegger} \\
    \hyphenatedword{Mountweazel} \\
    \hyphenatedword{Mountweazels} \\
    \hyphenatedword{epigraph} \\
    \hyphenatedword{epigraphs}
    \stoptext

-- 

Rik


[-- Attachment #1.2.1: Type: text/html, Size: 1181 bytes --]

[-- Attachment #1.2.2: modjldooekibnbhg.png --]
[-- Type: image/png, Size: 4716 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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] 4+ messages in thread

* Re: \hyphenation problem
  2017-10-22 17:18 \hyphenation problem Rik Kabel
@ 2017-10-22 17:43 ` Pablo Rodriguez
  2017-10-22 20:16   ` Rik Kabel
  0 siblings, 1 reply; 4+ messages in thread
From: Pablo Rodriguez @ 2017-10-22 17:43 UTC (permalink / raw)
  To: ntg-context

On 10/22/2017 07:18 PM, Rik Kabel wrote:
> Or am I doing something wrong?
> 
> With the following, Schwarzenegger is not hyphenated according to the
> instruction. I get:

Hi Rik,

is there any reason not to include Schwarzenegger in the exceptions?

In any case, either you use \hyphenation *after* the exceptions, or you
include it in them. Both work fine.

Just in case it helps,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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] 4+ messages in thread

* Re: \hyphenation problem
  2017-10-22 17:43 ` Pablo Rodriguez
@ 2017-10-22 20:16   ` Rik Kabel
  2017-10-23 16:07     ` Pablo Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: Rik Kabel @ 2017-10-22 20:16 UTC (permalink / raw)
  To: ntg-context

Thank you, Pablo, for the workaround.

As to your question, it originally came about because of the order in 
which environment files were included in a document (one general to many 
documents, one specific to a new document). Between the times I created 
them, I switched from \hyphenation to \startexceptions.

In general, however, it seems that \startexceptions provides 
fine-grained control by language, whilst \hyphenation appears to be 
broad-stroke across all languages, and so it might make sense to use 
both (or not) depending on how you want to hyphenate, for example, trade 
names or other proper nouns in a multi-language work.

But this does have me wondering if I am cancelling hyphenation overrides 
made in the ConTeXt base code by way of \hyphenation when I use 
\startexceptions. Are there any such overrides standard? (I could not 
see any in a quick search of the source, but they may not be obvious to 
me if they exist.)

In any case, the wiki has been updated, at least to warn of this 
ordering issue and to suggest that \startexceptions exists. I have no 
documentation of \startexceptions to add.

-- 
Rik

On 2017-10-22 13:43, Pablo Rodriguez wrote:
> On 10/22/2017 07:18 PM, Rik Kabel wrote:
>> Or am I doing something wrong?
>>
>> With the following, Schwarzenegger is not hyphenated according to the
>> instruction. I get:
> Hi Rik,
>
> is there any reason not to include Schwarzenegger in the exceptions?
>
> In any case, either you use \hyphenation *after* the exceptions, or you
> include it in them. Both work fine.
>
> Just in case it helps,
>
> Pablo


___________________________________________________________________________________
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] 4+ messages in thread

* Re: \hyphenation problem
  2017-10-22 20:16   ` Rik Kabel
@ 2017-10-23 16:07     ` Pablo Rodriguez
  0 siblings, 0 replies; 4+ messages in thread
From: Pablo Rodriguez @ 2017-10-23 16:07 UTC (permalink / raw)
  To: ntg-context

On 10/22/2017 10:16 PM, Rik Kabel wrote:
> Thank you, Pablo, for the workaround.
> 
> As to your question, it originally came about because of the order in 
> which environment files were included in a document (one general to many 
> documents, one specific to a new document). Between the times I created 
> them, I switched from \hyphenation to \startexceptions.
> 
> In general, however, it seems that \startexceptions provides 
> fine-grained control by language, whilst \hyphenation appears to be 
> broad-stroke across all languages, and so it might make sense to use 
> both (or not) depending on how you want to hyphenate, for example, trade 
> names or other proper nouns in a multi-language work.

Hi Rik,

see this sample:

    {\es \hyphenation{Schwarz-en-egger}}
    {\en \hyphenation{epi-graphs Mount-weazels Mount-weazel}}
    \hyphenation{Schwarz-en-egger}
    \starttext
    \startTEXpage[offset=1em]
    \hyphenatedword{Schwarzenegger} \\
    {\es\hyphenatedword{Schwarzenegger}} \\
    \hyphenatedword{Mountweazel} \\
    \hyphenatedword{Mountweazels} \\
    \hyphenatedword{epigraph} \\
    \hyphenatedword{epigraphs}
    \stopTEXpage
    \stoptext

I have just realized that it isn’t a question of \startexceptions, it is
just \hyphenation itself.

BTW, either I totally missing the issue or \hyphenation doesn’t work for
all languages, it only works for US English (the default language).

That being said, I wonder whether it makes sense to define two instances
of hyphenation exceptions.

> But this does have me wondering if I am cancelling hyphenation overrides 
> made in the ConTeXt base code by way of \hyphenation when I use 
> \startexceptions. Are there any such overrides standard? (I could not 
> see any in a quick search of the source, but they may not be obvious to 
> me if they exist.)

I used \registerhyphenationexceptions and I didn’t get the impression it
was so tricky. But this was years ago and I don’t remember which file it
was.

Sorry for not giving more help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2017-10-23 16:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-22 17:18 \hyphenation problem Rik Kabel
2017-10-22 17:43 ` Pablo Rodriguez
2017-10-22 20:16   ` Rik Kabel
2017-10-23 16:07     ` Pablo Rodriguez

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