[XeTeX] hyphenation cases
Jonathan Kew
jonathan_kew at sil.org
Sun Dec 31 17:13:12 CET 2006
On 30 Dec 2006, at 11:40 pm, Pablo Rodríguez wrote:
> Hi there,
>
> after adding \lccode"2019="27 to the preamble of a document to get
> expressions such as d’Aristote (in French), I get ‘real’ hyphenated as
> ‘rea-l’ in Spanish, which is wrong. Is this a bug or am I missing
> something?
By adding \lccode"2019="27, you're causing the apostrophe/right-quote
to be considered a letter; therefore, it becomes part of the "word"
that may be hyphenated.
The Spanish patterns by default allow breaks before (most?) single
consonants, including the pattern "1l". Normally, this wouldn't lead
to a break here because of \righthyphenmin (probably set to 2); this
means that a single letter won't be broken from the end of a word.
However, now that the apostrophe/quote is considered a letter, the
sequence <l’> is eligible for breaking off the end of the word,
because it's two "letters" long.
> I have also noticed that the Spanish word como is not hyphenated at
> all.
> It should be hyphenated as co-mo. I guess the issue here is that the
> word has only four letters and these words are not hyphenated by
> default. How can I enable this hyphenation?
In my testing, it can be hyphenated with the Spanish language
selected. It may be unlikely to show up, though, because TeX prefers
to avoid hyphenation if possible, and being a short word, it'll
usually be possible to find acceptable line-breaks one side or the
other.
By encouraging lots of hyphenation with the settings
\hyphenpenalty=-1000 \pretolerance=-1
I saw hyphenated "co-mo" appearing in my test file.
JK
More information about the XeTeX
mailing list