[XeTeX] polyglossia becoming reality...
Jonathan Kew
jonathan_kew at sil.org
Thu Jan 10 13:37:31 CET 2008
On 10 Jan 2008, at 10:34 am, François Charette wrote:
> * I had to comment out \local at hyphenmins{russian}{2}{2} from
> gloss-russian.ldf, otherwise the number 22 would be printed at the
> beginning of the russian environment (and before the date). Again I
> find
> this very puzzling, because this does not occur with other languages.
This comes from \local at hyphenmins trying to use the pre-existing
hyphenmins values; see:
\newcommand{\local at hyphenmins}[3]{%
\@ifundefined{#1hyphenmins}%
{\lefthyphenmin=#2\righthyphenmin=#3\relax}%
{\csname #1hyphenmins\endcsname}%
}
The macro \russianhyphenmins (I guess it comes from Babel?), however,
simply expands to "22", not to the full \lefthyphenmin=.... commands.
So that's your "22" that appears in the text.
Assuming this is the "standard" usage in LaTeX/Babel, you'd need
something like
\newcommand{\local at hyphenmins}[3]{%
\@ifundefined{#1hyphenmins}%
{\lefthyphenmin=#2\righthyphenmin=#3\relax}%
{\expandafter\set at local@hyphenmins\csname #1hyphenmins
\endcsname}%
}
\newcommand{\set at local@hyphenmins}[2]{%
\lefthyphenmin=#1\righthyphenmin=#2\relax
}
However, this also fails because some Babel languages seem to have
their hyphenmins equal to \relax, rather than undefined. And my quick-
and-dirty attempts to test for that ran into other problems...
I suspect there may be other situations where you need a \relax or
similar to ensure that TeX doesn't ever scan too far when reading
things like \language codes from macros, btw.... that's one of the
tricky macro programming things that can show up in odd places.
JK
More information about the XeTeX
mailing list