[XeTeX] polyglossia and ledpar conflict

François Charette firmicus at ankabut.net
Thu Jun 17 16:27:02 CEST 2010


On 13/06/2010 22:33, enrico.gregorio at univr.it wrote:
> Daron Wilson<daron.wilson at gmail.com>  writes:
>
>    
>> I'm using the XeLaTeX on Mac OS X 10.6, with MacTeX 2009
>> installed. According to the TeXLive Utility that comes with
>> MacTeX 2009, all the packages installed are up to date
>>
>> I've been working on typesetting a document with parallel texts,
>> having English on the left and Greek on the
>> right.    I started with the LateX packages
>> ledmac and ledpar because I would like to keep the English and
>> Greek synchronized, and I've managed to get a reasonably long
>> source document to compile satisfactorily, apart from a couple
>> of protruding lines due to lack of hyphenation support.
>> I'm fairly new to LaTeX, but after poking around a bit, it
>> seemed like the polyglossia package would help here.  On
>> adding polyglossia, the document would no longer compile, though
>> I've managed to narrow the problem down to an apparent conflict
>> between polyglossia and ledpar.
>>
>> I've included a small document below that illustrates the
>> problem.  When I try to compile as written, I get the error
>> message shown at the bottom here. When I comment out the ledpar
>> package, everything compiles perfectly. In my editor, the line
>> number listed for the error is always the line containing the
>> actual Greek. (line 15 here)
>>      
> The problem is that ledpar redefines \selectlanguage, which is ultimately used
> by \begin{greek}, in a way that is incompatible with polyglossia.
>
> You can patch it by replicating the definitions made by ledpar:
>
> ==== Change the two lines for ledmac and ledpar into this ====
> \letcs\POLYselectlanguage{\string\selectlanguage}
> \usepackage{ledmac}
> \usepackage{ledpar}
> \AtBeginDocument{
> \renewcommand{\selectlanguage}[2][]{%
>     \POLYselectlanguage[#1]{#2}%
>     \ifledRcol
>       \gdef\theledlanguageR{#2}%
>     \else
>       \gdef\theledlanguageL{#2}%
>    \fi}
> }
> ====
>
> The strange \letcs is for accessing the internal name of \selectlanguage without incurring
> in a loop; commands with an optional argument are bad beasts. :)
>
> Give it a try, maybe something else will be necessary.
>
> Ciao
> Enrico
>    

Other users have reported this problem recently. I have sent them a 
patch for ledpar which appears to work (see attachment). I have also 
submitted the patch to Vafa Khalighi, the current maintainer of ledpar.

Hope it helps,
FC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ledpar.patch
Type: text/x-patch
Size: 2074 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20100617/b1d4056c/attachment.bin>


More information about the XeTeX mailing list