[XeTeX] hyphenmins for default language

enrico.gregorio at univr.it enrico.gregorio at univr.it
Tue Dec 7 00:29:07 CET 2010


From: Vadim Radionov <vadim.radionov at gmail.com>


> Dear all,
> 
> Consider the following example. The default value of 
> righthyphenmin (2 in Russian) depends on the order
> in which language declarations occur: just transpose lines 4 and 
> 5.  Is it OK?
> 
> Yours,
> 
> Vadim
> 
> \documentclass{book}
> \usepackage{xltxtra}
> \usepackage{polyglossia}
> \setdefaultlanguage{russian}
> \setotherlanguage{english}
> 
> \newfontfamily\russianfont{Linux Libertine}
> \begin{document}
> \showthe\righthyphenmin
> \end{document}


Of course it was wrong. :(


I have committed a change in polyglossia.sty; change lines 219--222 with



  \define at key[xpg at setup]{#1}{hyphenmins}[{2,3}]%
    {\begingroup\edef\x{\endgroup
       \noexpand\setlocalhyphenmins{#1}{\xpg at first##1}{\xpg at second##1}}\x}


The problem with the former definition was that \@tmpfirst and \@tmpsecond were
not expanded at the right time. Now we get


\setlocalhyphenmins {english}{2}{3}
...
\setlocalhyphenmins {russian}{2}{2}


where, before, we got


\setlocalhyphenmins {english}{\@tmpfirst}{\@tmpsecond}
...
\setlocalhyphenmins {russian}{\@tmpfirst}{\@tmpsecond}


and the order depended on the declaration of the languages.


Ciao
Enrico

--
Enrico Gregorio          + Dipartimento di Informatica          + Tel: +39 045 8027937
Enrico.Gregorio at univr.it + Università degli Studi di Verona     +
(gregorio at math.unipd.it) + Strada le Grazie 15 / I-37134 Verona + Fax: +39 045 8027928


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20101207/c86550b2/attachment.html>


More information about the XeTeX mailing list