* Hyphenation with apostrophes
@ 2007-12-14 12:50 Zeus Gómez Marmolejo
2007-12-17 10:09 ` Taco Hoekwater
0 siblings, 1 reply; 4+ messages in thread
From: Zeus Gómez Marmolejo @ 2007-12-14 12:50 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
I'm writing a text in catalan language. Hyphenation patterns are loaded
correctly, however when I want to write an apostrophed word, hyphenation
doesn't work.
For example, the word "instructions" is written "instruccions". When I
want to say "of instructions" is "d'instruccions". Hyphenation rules in
catalan work normally in this case, that is: "d'ins-truc-cions" but I
see in context the whole word at the end of a column line surpassing the
margin limits without hyphenation. I see that this is happening in all
words beginning with contracted articles or prepositions like d' l' etc...
How can I solve this,
Thanks to all,
Zeus.
___________________________________________________________________________________
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://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Hyphenation with apostrophes
2007-12-14 12:50 Hyphenation with apostrophes Zeus Gómez Marmolejo
@ 2007-12-17 10:09 ` Taco Hoekwater
2007-12-17 20:12 ` Peter Münster
0 siblings, 1 reply; 4+ messages in thread
From: Taco Hoekwater @ 2007-12-17 10:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
Zeus Gómez Marmolejo wrote:
> Hi,
>
> I'm writing a text in catalan language. Hyphenation patterns are loaded
> correctly, however when I want to write an apostrophed word, hyphenation
> doesn't work.
>
> For example, the word "instructions" is written "instruccions". When I
> want to say "of instructions" is "d'instruccions". Hyphenation rules in
> catalan work normally in this case, that is: "d'ins-truc-cions" but I
> see in context the whole word at the end of a column line surpassing the
> margin limits without hyphenation. I see that this is happening in all
> words beginning with contracted articles or prepositions like d' l' etc...
>
> How can I solve this,
At the tex level you need either
\lccode`\'=`\'
or make the ' an active character running a macro that is a bit like
||, e.g. this:
\catcode`\'=\active
\unexpanded\def'{\string'\prewordbreak}
With the second solution, you have to be careful with your input
(active characters are always dangerout in the regard) but the
first solution has the downside that it decreases the \lefthyphenmin
by two: d'ins-truc-cions then is a single word with 5-4-5 charachers
in it, and that may change hyphenation into e.g. d'i-ns-truc-cions.
Whether that is a problem depends on your actual language.
Best wishes,
Taco
___________________________________________________________________________________
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://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Hyphenation with apostrophes
2007-12-17 10:09 ` Taco Hoekwater
@ 2007-12-17 20:12 ` Peter Münster
2007-12-18 8:20 ` Taco Hoekwater
0 siblings, 1 reply; 4+ messages in thread
From: Peter Münster @ 2007-12-17 20:12 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Mon, Dec 17, 2007 at 11:09:44AM +0100, Taco Hoekwater wrote:
>
> At the tex level you need either
>
> \lccode`\'=`\'
>
> or make the ' an active character running a macro that is a bit like
> ||, e.g. this:
>
> \catcode`\'=\active
> \unexpanded\def'{\string'\prewordbreak}
Hello,
Do you know, how this is done in LaTeX? I remember, that such things have
never been a problem there.
Greetings, Peter
--
http://pmrb.free.fr/contact/
___________________________________________________________________________________
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://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Hyphenation with apostrophes
2007-12-17 20:12 ` Peter Münster
@ 2007-12-18 8:20 ` Taco Hoekwater
0 siblings, 0 replies; 4+ messages in thread
From: Taco Hoekwater @ 2007-12-18 8:20 UTC (permalink / raw)
To: mailing list for ConTeXt users
Peter Münster wrote:
> On Mon, Dec 17, 2007 at 11:09:44AM +0100, Taco Hoekwater wrote:
>> At the tex level you need either
>>
>> \lccode`\'=`\'
>>
>> or make the ' an active character running a macro that is a bit like
>> ||, e.g. this:
>>
>> \catcode`\'=\active
>> \unexpanded\def'{\string'\prewordbreak}
>
> Hello,
>
> Do you know, how this is done in LaTeX? I remember, that such things have
> never been a problem there.
IIRC, the languages that needed this used the \lccode change together
with higher values of \lefthyphenmin and \righthyphenmin to prevent
bad hyphenations like ``instruccion-s''. But that was at least half
a decade ago, so I may recall this wrong or something may have changed
since then.
Best wishes,
Taco
___________________________________________________________________________________
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://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-12-18 8:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-14 12:50 Hyphenation with apostrophes Zeus Gómez Marmolejo
2007-12-17 10:09 ` Taco Hoekwater
2007-12-17 20:12 ` Peter Münster
2007-12-18 8:20 ` Taco Hoekwater
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).