[XeTeX] Strange hyphenation
Jonathan Kew
jonathan_kew at sil.org
Sun Jul 10 17:45:04 CEST 2005
On 10 Jul 2005, at 2:23 pm, Musa Furber wrote:
> Something I noticed after updating to the current version of XeTeX
> is that the word Allāh (transliterated, just as it appears in this
> email) is sometimes hyphenated after Al-. I can suppress this using
> by putting the word within a \makebox{...}.
>
> Isn't the default that hyphenation is suppressed for words such as
> this?
Think about what would cause it to be suppressed.... If you do
something like "All\={a}h" in plain TeX or LaTeX, then the accent
command means that the word is not just a plain sequence of
characters, and so it becomes ineligible for hyphenation. And if you
enter it as "Allāh", and use LaTeX macros such as \usepackage[utf8]
{inputenc} to interpret this, then the input bytes will be getting
translated into internal macros of some kind, probably rendering in
the end via an \accent command or similar. So again, the word is not
a simple character sequence. And TeX doesn't hyphenate such "complex"
words.
But if you're using Xe(La)TeX with Unicode text and a Unicode-
compliant font, then "Allāh" is a simple sequence of five characters,
with no internal TeX commands or anything, and so is eligible for
hyphenation according to the patterns currently in force.
If this is not appropriate, you could tag the word as being in a
different \language, or you could add it to the \hyphenation
exceptions, or (as you've observed) you could box it so that it isn't
part of the top-level text in the paragraph.
JK
More information about the XeTeX
mailing list