summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/reledmac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-08 21:48:18 +0000
committerKarl Berry <karl@freefriends.org>2020-03-08 21:48:18 +0000
commit5c9876514ae068b20d15aca507a156dcccabe7f8 (patch)
tree846549290bb49abec3210154eaa17743e949f40c /Master/texmf-dist/tex/latex/reledmac
parent8853974591602003b6ea3948c580bcd7ad2b8784 (diff)
reledmac (8mar20)
git-svn-id: svn://tug.org/texlive/trunk@54180 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/reledmac')
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledmac.sty47
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledpar.sty37
2 files changed, 61 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
index d9ceba3886c..79d0a91f970 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
@@ -35,7 +35,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2020/02/04 v2.32.4 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2020/03/08 v2.32.5 typesetting critical editions]%
\RequirePackage{xkeyval}
\newif\ifparledgroup
\newif\ifsameparallelpagenumber%
@@ -139,6 +139,11 @@
\ifx\directlua\undefined\else%
\directlua{tex.enableprimitives("",{"textdir","pardir","bodydir"})}
\fi
+\ifluatex%
+ \ifnum\luatexversion<110%
+ \PackageWarning{reledmac}{You need to use LuaTeX 1.1.0 or higher}{\@ehc}%
+ \fi%
+\fi%
\newif\ifl@dmemoir
\@ifclassloaded{memoir}{\l@dmemoirtrue}{\l@dmemoirfalse}
@@ -165,6 +170,9 @@
\reledmac@error{Numbering was not started}{\@ehc}}
\newcommand*{\led@err@NumberingShouldHaveStarted}{%
\reledmac@error{Numbering should already have been started}{\@ehc}}
+\newcommand*{\led@err@samewordRTL}{%
+ \reledmac@error{You can't use \string\sameword \MessageBreak with XeLaTeX \MessageBreak when typesetting RTL text.\MessageBreak Please use LuaTeX instead.}{\@ehc}%
+}%
\newcommand*{\led@err@edtextoutsidepstart}{%
\reledmac@error{\string\edtext\space outside numbered paragraph (\pstart\space ...\space\pend)}{\@ehc}}%
@@ -1339,6 +1347,7 @@
}%
\newcommand*{\new@line}{%
+ \set@this@c@page%
\ifnumberline%
\IfStrEq{\led@pb@setting}{after}%
{\xifinlist{\the\absline@num}{\l@prev@nopb}%
@@ -1346,9 +1355,9 @@
{\numgdef{\@next@page}{\c@par@page+\@ne}%
\write\linenum@out{\string\@nl[\@next@page][\@next@page]}%
}%
- {\write\linenum@out{\string\@nl[\the\c@par@page][\thepage]}}%
+ {\write\linenum@out{\string\@nl[\the\@this@c@page][\thepage]}}%
}%
- {\write\linenum@out{\string\@nl[\the\c@par@page][\thepage]}}}%
+ {\write\linenum@out{\string\@nl[\the\@this@c@page][\thepage]}}}%
{}%
\IfStrEq{\led@pb@setting}{before}%
{\numdef{\next@absline}{\the\absline@num+\@ne}%
@@ -1357,9 +1366,9 @@
{\numgdef{\nc@page}{\c@par@page+\@ne}%
\write\linenum@out{\string\@nl[\nc@page][\nc@page]}%
}%
- {\write\linenum@out{\string\@nl[\the\c@par@page][\thepage]}}%
+ {\write\linenum@out{\string\@nl[\the\@this@c@page][\thepage]}}%
}%
- {\write\linenum@out{\string\@nl[\the\c@par@page][\thepage]}}%
+ {\write\linenum@out{\string\@nl[\the\@this@c@page][\thepage]}}%
}%
{}%
\IfStrEqCase{\led@pb@setting}%
@@ -1367,18 +1376,19 @@
{before}{\relax}%
{after}{\relax}%
}[%
- \write\linenum@out{\string\@nl[\the\c@par@page][\thepage]}%
+ \write\linenum@out{\string\@nl[\the\@this@c@page][\thepage]}%
]%
\fi%
}
-\newcommand{\l@the@c@page}{%
+\newcount\@this@c@page%%
+\newcommand{\set@this@c@page}{%
\ifboolexpr{%
bool{sameparallelpagenumber}%
or bool{prevpgnotnumbered}%
}%
- {\the\c@par@page}%
- {\the\c@page}%
+ {\global\@this@c@page=\c@par@page}%
+ {\global\@this@c@page=\c@page}%
}%
\newif\if@noneed@Footnote%
@@ -1711,11 +1721,7 @@
\else%
\def\@tmpa##1{##1}%
\fi%
- \ifxetex%
- \@tmpa{\xdef\sw@txt{#1}}%
- \else%
- \@tmpa{\expandafter\xdef\expandafter\sw@txt\expandafter{\detokenize{#1}}}%
- \fi%
+ \@tmpa{\protected@xdef\sw@txt{#1}}%
\endgroup%
}%
\newcommand{\swnoexpands}{%
@@ -1740,6 +1746,11 @@
\fi%
}%
\newcommandx{\sameword}[2][1,usedefault]{%
+ \ifxetex%
+ \if@RTL%
+ \led@err@samewordRTL%
+ \fi%
+ \fi%
\leavevmode%
\get@sw@txt{#2}%
\unless\ifledRcol%
@@ -2111,6 +2122,7 @@
\add@penalties%
}
\def\print@eledsection{%
+ \disable@edindex%
\if@firstlineofpage%
\set@Xtxtbeforenotes%
\set@txtbeforenotesX%
@@ -2141,6 +2153,7 @@
\fi%
\vskip-\baselineskip%
\continuousnumberingwithcolumns@sync@linenumber@singletext%
+ \restore@edindex%
}
\newcommand*{\do@linehook}{}
\newcommand*{\do@insidelinehook}{}
@@ -3707,10 +3720,6 @@
}%
\def\printlines#1|#2|#3|#4|#5|#6|#7|#8|{%
\begingroup%
- \ifluatex%
- \edef\@tmp{\the\textdir}%
- \ifdefstring{\@tmp}{TLT}{}{\textdir TLT}%Test in order to prevent spurious space (bug #397)
- \fi%
\setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%
\ifdimequal{\csuse{Xboxstartlinenum@\@currentseries}}{0pt}%
{\bgroup}%
@@ -7340,6 +7349,8 @@
{\led@error@fail@patch@makeindex}%
\newcommand{\edindex}[1]{\@bsphack\@esphack}
\newcommandx{\dummy@edindex}[2][1=\expandonce\jobname,usedefault]{}%
+\newcommand{\disable@edindex}{\let\old@edindex\edindex\let\edindex\dummy@edindex}%
+\newcommand{\restore@edindex}{\let\edindex\old@edindex}%
\newcommand{\hyperlinkformat}[3]{%
\ifstrempty{#1}%
{\hyperlink{#2}{#3}}%
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
index 103fa4b31ab..1b947c1305f 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
@@ -28,7 +28,7 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2019/11/04 v2.22.4 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2020/03/08 v2.23.0 reledmac extension for parallel texts]%
\RequirePackage{xspace}%
\RequirePackage{xkeyval}
@@ -768,13 +768,15 @@
}%
\newcommand*{\new@lineL}{%
+ \set@this@c@page%
\ifnumberline%
- \write\linenum@out{\string\@nl[\the\c@par@page][\thepage]}%
+ \write\linenum@out{\string\@nl[\the\@this@c@page][\thepage]}%
\fi%
}%
\newcommand*{\new@lineR}{%
+ \set@this@c@page%
\ifnumberline%
- \write\linenum@outR{\string\@nl[\the\c@par@page][\thepar@page]}%
+ \write\linenum@outR{\string\@nl[\the\@this@c@page][\thepage]}%
\fi%
}%
@@ -904,6 +906,8 @@
\newif\ifinstanzaL
\newif\ifinstanzaR
+ \newif\ifinastanzaL%
+ \newif\ifinastanzaR%
\newenvironment{Leftside}{%
\expandafter\ifvoid\csname l@dLcolrawbox1\endcsname\else%
\led@err@Leftside@PreviousNotPrinted%
@@ -927,6 +931,8 @@
\newcommand*{\Rightsidehook}{}
\newcommand*{\Rightsidehookend}{}
+\newcommand*{\Rightpagehook}{}%
+\newcommand*{\Leftpagehook}{}%
\newenvironment{Rightside}{%
\expandafter\ifvoid\csname l@dRcolrawbox1\endcsname\else%
\led@err@Rightside@PreviousNotPrinted%
@@ -1308,6 +1314,7 @@
\l@drsn@te}}%
\def\print@eledsectionL{%%
+ \disable@edindex%
\addtocounter{pstartL}{-1}%
\ifdefstring{\@eledsectnotoc}{L}{\ledsectnotoc}{}
\ifdefstring{\@eledsectmark}{L}{}{\ledsectnomark}
@@ -1333,6 +1340,7 @@
{\new@line \hbox{\l@dunhbox@line{\one@line}}}%
\fi%
\vskip\eledsection@correcting@skip%
+ \restore@edindex%
}
\newcommand{\add@apparatusL}{%
@@ -1451,6 +1459,7 @@
}
\def\print@eledsectionR{%
+ \disable@edindex%
\addtocounter{pstartR}{-1}%
\set@sectcountR%
\ifdefstring{\@eledsectnotoc}{R}{\ledsectnotoc}{}%
@@ -1476,7 +1485,8 @@
\hspace{3\paperwidth}%
{\new@lineR \hbox{\l@dunhbox@line{\one@lineR}}}%
\fi%
- \vskip\eledsection@correcting@skip
+ \vskip\eledsection@correcting@skip%
+ \restore@edindex%
}
\newcommand{\add@apparatusR}{%
\if@firstlineofpageR%
@@ -2105,6 +2115,9 @@
\noexpand\csname sza@0@\endcsname}\stanzaindentbase%
\@hangingsymbol%
\fi%
+ \ifinastanzaL%
+ \@hangingsymbol%
+ \fi%
\fi%
}%
\newcommand{\inserthangingsymbolR}{%
@@ -2114,6 +2127,9 @@
\noexpand\csname sza@0@\endcsname}\stanzaindentbase%
\@hangingsymbol%
\fi%
+ \ifinastanzaR%
+ \@hangingsymbol%
+ \fi%
\fi%
}%
@@ -2121,6 +2137,11 @@
\catcode`\&=\active
\newenvironmentx{astanza}[2][1,2,usedefault]{%
+ \ifledRcol%
+ \global\inastanzaRtrue%
+ \else%
+ \global\inastanzaLtrue%
+ \fi%
\catcode`\&\active
\global\stanza@count\@ne\stanza@modulo\@ne
\newdimen\parindent@beforestanza%
@@ -2225,7 +2246,9 @@
}
{ \let\old@otherlanguage\otherlanguage%
\renewcommand{\otherlanguage}[2][]{%
- \xpg@set@group@aux%
+ \ifdefined\xpg@set@group@aux%
+ \xpg@set@group@aux%
+ \fi%
\selectlanguage[#1]{#2}%
\ifledRcol \gdef\theledlanguageR{#2}%
\else \gdef\theledlanguageL{#2}%
@@ -2780,6 +2803,7 @@
\checkraw@text%
{ \loop\ifaraw@text%
\checkpageL%
+ \Leftpagehook%
\l@duselanguage{\theledlanguageL}%
{ \loop\ifl@dsamepage%
\ifdefstring{\@eledsectnotoc}{L}{\ledsectnotoc}{}%
@@ -2839,6 +2863,7 @@
\parledgroup@correction@notespacing@init%
\clearl@dleftpage }%
\checkpageR%
+ \Rightpagehook%
\l@duselanguage{\theledlanguageR}%
{ \loop\ifl@dsamepage%
\set@sectcountR%
@@ -2916,6 +2941,8 @@
\global\l@dnumpstartsR=\z@%
\global\instanzaLfalse%
\global\instanzaRfalse%
+ \global\inastanzaLfalse%
+ \global\inastanzaRfalse%
\global\l@dprintingpagesfalse%
\ifnum\edtext@later=\edtext@now%
\else%