![](https://secure.gravatar.com/avatar/e43f801221c07785c6136d4983be6f4a.jpg?s=120&d=mm&r=g)
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.
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/cedc4d83943006afe3994fb0a0455f82.jpg?s=120&d=mm&r=g)
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/
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
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
participants (3)
-
Peter Münster
-
Taco Hoekwater
-
Zeus Gómez Marmolejo