Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to polyglossia makes a redefinition by reledpar invalid #829

Closed
eg9 opened this issue Nov 4, 2019 · 0 comments

Comments

@eg9
Copy link

@eg9 eg9 commented Nov 4, 2019

Version 2019/07/21 v2.32.1

Description

The subpackage reledpar redefines \otherlanguage when used along with polyglossia. So far, so good.

However, the latest version of polyglossia (2019/10/27 v1.45) has changed the definition of \otherlanguage, adding \xpg@set@group@aux in front of \selectlanguage

   1566 \renewenvironment{otherlanguage}[2][]
   1567 {
   1568   \xpg@set@group@aux%
   1569   \selectlanguage[#1]{#2}
   1570 }
   1571 {\xpg@unset@group@aux}

Thus the code in reledpar.sty should be changed to

   2226   {    \let\old@otherlanguage\otherlanguage%
   2227        \renewcommand{\otherlanguage}[2][]{%
                    \xpg@set@group@aux% <-------- ADD THIS
   2228         \selectlanguage[#1]{#2}%
   2229         \ifledRcol  \gdef\theledlanguageR{#2}%
   2230         \else      \gdef\theledlanguageL{#2}%
   2231         \fi}%

Minimal Working Example

\documentclass{article}
\usepackage{polyglossia}
\usepackage{reledmac}
\usepackage[]{reledpar}

\setmainlanguage{italian}
\setotherlanguage{french}

\begin{document}

\begin{pairs}
\begin{Leftside}
  \beginnumbering
  \pstart
  \begin{otherlanguage}{french}
  Mots en français
  \end{otherlanguage}
  \pend
  \pausenumbering
\end{Leftside}

\begin{Rightside}
  \beginnumbering
  \pstart
  Parole in italiano
  \pend
  \pausenumbering
\end{Rightside}
\end{pairs}
\Columns

\end{document}

Errors when reading the .aux file

! Extra }, or forgotten \endgroup.

Contents of the .aux file

\relax 
\catcode `"\active 
\selectlanguage *{italian}
\@writefile{toc}{\selectlanguage *{italian}}
\@writefile{lof}{\selectlanguage *{italian}}
\@writefile{lot}{\selectlanguage *{italian}}
\selectlanguage *{french}
\@writefile{toc}{\selectlanguage *{french}}
\@writefile{lof}{\selectlanguage *{french}}
\@writefile{lot}{\selectlanguage *{french}}
\egroup 
\@writefile{toc}{\egroup }
\@writefile{lof}{\egroup }
\@writefile{lot}{\egroup }
\selectlanguage *{italian}
\@writefile{toc}{\selectlanguage *{italian}}
\@writefile{lof}{\selectlanguage *{italian}}
\@writefile{lot}{\selectlanguage *{italian}}

With the addition of \xpg@set@group@aux, we get the correct .aux file

\relax 
\catcode `"\active 
\selectlanguage *{italian}
\@writefile{toc}{\selectlanguage *{italian}}
\@writefile{lof}{\selectlanguage *{italian}}
\@writefile{lot}{\selectlanguage *{italian}}
\bgroup 
\@writefile{toc}{\bgroup }
\@writefile{lof}{\bgroup }
\@writefile{lot}{\bgroup }
\selectlanguage *{french}
\@writefile{toc}{\selectlanguage *{french}}
\@writefile{lof}{\selectlanguage *{french}}
\@writefile{lot}{\selectlanguage *{french}}
\egroup 
\@writefile{toc}{\egroup }
\@writefile{lof}{\egroup }
\@writefile{lot}{\egroup }
\selectlanguage *{italian}
\@writefile{toc}{\selectlanguage *{italian}}
\@writefile{lof}{\selectlanguage *{italian}}
\@writefile{lot}{\selectlanguage *{italian}}

Reference: https://tex.stackexchange.com/q/514911/4427

maieul added a commit that referenced this issue Nov 4, 2019
@maieul maieul closed this in 3f747aa Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.