[XeTeX] polyglossia and ledpar conflict

Daron Wilson daron.wilson at gmail.com
Mon Jun 14 18:04:38 CEST 2010


Thanks very much for the timely help--the code you gave worked perfectly for what I need. I'm not using too many of the extended features of ledpar, but with what I've tried so far, nothing seems broken.

This is a good sample for me to work through and learn a little more about TeX stuff too.

Daron


On 14 Jun 2010, at 3:33 AM, 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
> 
> --
> 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
> 
> 
> 
> 
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex




More information about the XeTeX mailing list