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
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
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
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
participants (2)
-
Pablo Rodriguez
-
Rik Kabel