summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
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/reledmac.sty
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/reledmac.sty')
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledmac.sty47
1 files changed, 29 insertions, 18 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}}%