On 13/06/2010 22:33, enrico.grego...@univr.it wrote:
Daron Wilson<daron.wil...@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
--- /usr/share/texmf-dist/tex/latex/ledmac/ledpar.sty 2010-01-11 13:06:07.000000000 +0100
+++ ledparX.sty 2010-03-10 10:51:13.848398404 +0100
@@ -1479,23 +1479,34 @@
\gdef\theledlanguageR{}
\AtBeginDocument{%
- \...@ifundefined{bbl@m...@language}{%
- \...@dusedbabelfalse
- \renewcommand*{\selectlanguage}[1]{}}{%
- \...@dusedbabeltrue
- \le...@doldselectlanguage\selectlanguage
- \le...@doldbbl@s...@language\bbl@s...@language
- \let\...@set@languag...@dbbl@s...@language
- \renewcommand{\selectlanguage}[1]{%
- \...@doldselectlanguage{#1}%
- \ifledRcol \gdef\theledlanguageR{#1}%
- \else \gdef\theledlanguageL{#1}%
- \fi}
- \renewcommand*...@duselanguage}[1]{%
- \...@doldselectlanguage{#1}}
- \gdef\theledlanguagel{\...@main@language}%
- \gdef\theledlanguager{\...@main@language}%
-}}
+ \...@ifundefined{xpg@m...@language}{%
+ \...@ifundefined{bbl@m...@language}{% no babel, no polyglossia
+ \...@dusedbabelfalse
+ \renewcommand*{\selectlanguage}[1]{}%
+ }{% else babel loaded
+ \...@dusedbabeltrue
+ \le...@doldselectlanguage\selectlanguage
+ \le...@doldbbl@s...@language\bbl@s...@language
+ \let\...@set@languag...@dbbl@s...@language
+ \renewcommand{\selectlanguage}[1]{%
+ \...@doldselectlanguage{#1}%
+ \ifledRcol \gdef\theledlanguageR{#1}%
+ \else \gdef\theledlanguageL{#1}%
+ \fi}
+ \renewcommand*...@duselanguage}[1]{%
+ \...@doldselectlanguage{#1}}
+ \gdef\theledlanguagel{\...@main@language}%
+ \gdef\theledlanguager{\...@main@language}%
+ }%
+ }{%else polyglossia loaded
+ \apptocmd{\...@set@language}{%
+ \ifledRcol \gdef\theledlanguageR{#1}%
+ \else \gdef\theledlanguageL{#1}%
+ \fi}%
+ \le...@duselanguage\xpg@s...@language
+ \gdef\theledlanguagel{\...@main@language}%
+ \gdef\theledlanguager{\...@main@language}%
+ }}
\newcommand*{\Columns}{%
\ifnu...@dnumpstartsl=\l@dnumpstartsR\else
\...@err@badleftrightpstarts{\th...@dnumpstartsl}{\the\l@dnumpstartsR}%
--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex