[XeTeX] polyglossia and ledpar conflict

Daron Wilson daron.wilson at gmail.com
Fri Jun 18 14:51:55 CEST 2010

Thanks for the file.  The patch worked perfectly for me.



On 17 Jun 2010, at 9:27 PM, François Charette wrote:

> 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
> <ledpar.patch>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex

More information about the XeTeX mailing list