summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/reledmac/reledmac.sty')
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledmac.sty77
1 files changed, 44 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
index 00743f7b334..d2d99743656 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
@@ -27,16 +27,10 @@
-
-
-
-
-
-
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2015/08/26 v2.1.2 typesset critical edition]%
+\ProvidesPackage{reledmac}[2015/09/05 v2.1.3 typeset critical edition]%
\RequirePackage{xkeyval}
\newif\ifparledgroup
\DeclareOptionX{series}[A,B,C,D,E]{\xdef\default@series{#1}}
@@ -109,6 +103,9 @@
\RequirePackage{ragged2e}
\RequirePackage{ragged2e}
\RequirePackage{ifxetex}%
+\ifx\directlua\undefined\else%
+ \directlua{tex.enableprimitives("",{"textdir","pardir","bodydir"})}
+\fi
\newif\ifl@dmemoir
\@ifclassloaded{memoir}{\l@dmemoirtrue}{\l@dmemoirfalse}
@@ -570,7 +567,7 @@
\newcommand*{\ledlinenum}{%
\bgroup%
\ifluatex%
- \luatextextdir TLT%
+ \textdir TLT%
\fi%
\numlabfont\linenumrep{\line@num}%
\ifsublines@
@@ -1436,7 +1433,7 @@
\autopar%
\fi%
\ifluatex%
- \edef\l@luatextextdir@L{\the\luatextextdir}%
+ \edef\l@luatextextdir@L{\the\textdir}%
\fi%
\if@nobreak%
\let\@oldnobreak\@nobreaktrue%
@@ -1583,7 +1580,7 @@
\l@dlsn@te
{\ledllfill\hb@xt@ \wd\one@line{\new@line%
\ifluatex%
- \luatextextdir\l@luatextextdir@L%
+ \textdir\l@luatextextdir@L%
\fi%
\inserthangingsymbol %Space keept for backward compatibility
\l@dunhbox@line{\one@line}}%
@@ -1954,15 +1951,15 @@
}
\newcommandx*{\footnotelang@lua}[1][1=L,usedefault]{%
\ifstrequal{#1}{L}{%
- \xright@appenditem{{\csxdef{footnote@luatextextdir}{\the\luatextextdir}}}\to\inserts@list%Know the dir of lemma
+ \xright@appenditem{{\csxdef{footnote@luatextextdir}{\the\textdir}}}\to\inserts@list%Know the dir of lemma
\global\advance\insert@count \@ne%
- \xright@appenditem{{\csxdef{footnote@luatexpardir}{\the\luatexpardir}}}\to\inserts@list%Know the dir of lemma
+ \xright@appenditem{{\csxdef{footnote@luatexpardir}{\the\pardir}}}\to\inserts@list%Know the dir of lemma
\global\advance\insert@count \@ne%
}%
{%
- \xright@appenditem{{\csxdef{footnote@luatextextdir}{\the\luatextextdir}}}\to\inserts@listR%Know the dir of lemma
+ \xright@appenditem{{\csxdef{footnote@luatextextdir}{\the\textdir}}}\to\inserts@listR%Know the dir of lemma
\global\advance\insert@countR \@ne%
- \xright@appenditem{{\csxdef{footnote@luatexpardir}{\the\luatexpardir}}}\to\inserts@listR%Know the dir of lemma
+ \xright@appenditem{{\csxdef{footnote@luatexpardir}{\the\pardir}}}\to\inserts@listR%Know the dir of lemma
\global\advance\insert@countR \@ne%
}%
}
@@ -2061,6 +2058,7 @@
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalfootfmt}[4]{%
\Xledsetnormalparstuff{#4}%
\hangindent=\csuse{Xhangindent@#4}
+ \everypar{\hangindent=\csuse{Xhangindent@#4}}%
\strut{\printlinefootnote{#1}{#4}}%
{\nottoggle{Xlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}%
\iftoggle{nosep@}{\hskip\csuse{Xinplaceoflemmaseparator@#4}}{\ifcsempty{Xlemmaseparator@#4}%
@@ -2149,7 +2147,8 @@
\expandafter\strip@pt\dimen0 }}}
\newcommand*{\parafootstart}[1]{%
- \rightskip=0pt \leftskip=0pt \parindent=0pt
+ \rightskip=0pt \leftskip=0pt%
+ \nottoggle{Xparindent@#1}{\parindent=\z@}{}%
\ifdimequal{0pt}{\preXnotes@}{}%
{%
\iftoggle{preXnotes@}{%
@@ -2206,7 +2205,7 @@
\newcommand*{\parafootfmt}[4]{%
\Xinsertparafootsep{#4}%
- \Xledsetnormalparstuff{#4}%
+ \ledsetnormalparstuff@common%
\printlinefootnote{#1}{#4}%
{\nottoggle{Xlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}%
\iftoggle{nosep@}{\hskip\csuse{Xinplaceoflemmaseparator@#4}}{\ifcsempty{Xlemmaseparator@#4}%
@@ -2221,7 +2220,7 @@
\makehboxofhboxes
\setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{Xtxtbeforenotes@#1}}\unhbox0 \removehboxes}%
\csuse{Xnotefontsize@#1}
- \noindent\unhbox0\par%
+ \unhbox0\par%
\global\hsize=\old@hsize%
}%
@@ -2251,7 +2250,7 @@
\makehboxofhboxes
\setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{Xtxtbeforenotes@#1}}\unhbox0 \removehboxes}%
\csuse{Xnotefontsize@#1}
- \noindent\unhbox0\par}}
+ \unhbox0\par}}
\newcommand*{\makehboxofhboxes}{\setbox0=\hbox{}%
\loop
@@ -2327,7 +2326,10 @@
\tolerance=5000
\hangindent=\csuse{Xhangindent@#4}
\leavevmode
+ \everypar{\hangindent=\csuse{Xhangindent@#4}}%
+ \@tempdima=\parindent%
\csuse{Xcolalign@#4}%
+ \parindent=\@tempdima%
\strut{\printlinefootnote{#1}{#4}}%
{\nottoggle{Xlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}%
\iftoggle{nosep@}{\hskip\csuse{Xinplaceoflemmaseparator@#4}}{\ifcsempty{Xlemmaseparator@#4}%
@@ -2397,7 +2399,10 @@
\tolerance=5000
\hangindent=\csuse{Xhangindent@#4}
\leavevmode
+ \everypar{\hangindent=\csuse{Xhangindent@#4}}%
+ \@tempdima=\parindent%
\csuse{Xcolalign@#4}%
+ \parindent=\@tempdima%
\strut{\printlinefootnote{#1}{#4}}%
{\nottoggle{Xlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}%
\iftoggle{nosep@}{\hskip\csuse{Xinplaceoflemmaseparator@#4}}{\ifcsempty{Xlemmaseparator@#4}%
@@ -2662,7 +2667,7 @@
\def\printlines#1|#2|#3|#4|#5|#6|#7|{%
\begingroup%
\ifluatex%
- \luatextextdir TLT%
+ \textdir TLT%
\fi%
\setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%
\ifdimequal{\csuse{Xboxstartlinenum@\@currentseries}}{0pt}%
@@ -2803,8 +2808,8 @@
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalfootfmtX}[2]{%
\ifluatex%
- \luatextextdir\footnote@luatextextdir%
- \luatexpardir\footnote@luatexpardir%
+ \textdir\footnote@luatextextdir%
+ \pardir\footnote@luatexpardir%
\par%
\fi%
\protected@edef\@currentlabel{%
@@ -2812,6 +2817,7 @@
}%
\ledsetnormalparstuffX{#1}%
\hangindent=\csuse{hangindentX@#1}%
+ \everypar{\hangindent=\csuse{hangindentX@#1}}%
{{\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}}\strut%
#2\strut\par}}
@@ -2972,11 +2978,14 @@
}%
\normal@pars
\hangindent=\csuse{hangindentX@#1}%
+ \everypar{\hangindent=\csuse{hangindentX@#1}}%
\hsize \csuse{hsizetwocolX@#1}
\nottoggle{parindentX@#1}{\parindent=\z@}{}
\tolerance=5000\relax
\leavevmode
+ \@tempdima=\parindent%
\csuse{colalignX@#1}%
+ \parindent=\@tempdima%
{\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%
#2\strut\par}\allowbreak}
@@ -3044,12 +3053,15 @@
\@nameuse{@thefnmark#1}%
}%
\hangindent=\csuse{hangindentX@#1}%
+ \everypar{\hangindent=\csuse{hangindentX@#1}}%
\normal@pars
\hsize \csuse{hsizethreecolX@#1}
\nottoggle{parindentX@#1}{\parindent=\z@}{} %
\tolerance=5000\relax
\leavevmode
+ \@tempdima=\parindent%
\csuse{colalignX@#1}%
+ \parindent=\@tempdima%
{\csuse{notenumfontX@#1}\@nameuse{footfootmark#1}\strut%
#2\strut\par}\allowbreak}
@@ -3123,10 +3135,9 @@
}%
{}%
}%
- \vskip\skip\csname footins#1\endcsname%
\leftskip=\z@
\rightskip=\z@
- \parindent=\z@
+ \nottoggle{parindentX@#1}{\parindent=\z@}{}%
\vskip\skip\@nameuse{footins#1}%
\setnoteswidthliketwocolumnsX@{#1}%
\setnotesXpositionliketwocolumns@{#1}%
@@ -3176,7 +3187,7 @@
\@nameuse{@thefnmark#1}%
}%
\insertparafootsepX{#1}%
- \ledsetnormalparstuffX{#1}%
+ \ledsetnormalparstuff@common%
{\csuse{notenumfontX@#1}%
\csuse{notenumfontX@#1}%
\@nameuse{footfootmark#1}%
@@ -3190,7 +3201,7 @@
\makehboxofhboxes
\setbox0=\hbox{\unhbox0 \removehboxes}%
\csuse{notefontsizeX@#1}
- \noindent\unhbox0\par}
+ \unhbox0\par}
\newcommand*{\mppara@footgroupX}[1]{{%
\setnoteswidthliketwocolumnsX@{#1}%
\vskip\skip\@nameuse{mpfootins#1}
@@ -3218,7 +3229,7 @@
\makehboxofhboxes
\setbox0=\hbox{\unhbox0 \removehboxes}%
\csuse{notefontsizeX@#1}
- \noindent\unhbox0\par}}
+ \unhbox0\par}}
\newcommand{\insertparafootsepX}[1]{%
\ifnumequal{\csuse{prevpage#1@num}}{\page@num}%
@@ -3227,8 +3238,8 @@
}
\newcommand*{\ledsetnormalparstuff@common}{%
\ifluatex%
- \luatextextdir\footnote@luatextextdir%
- \luatexpardir\footnote@luatexpardir%
+ \textdir\footnote@luatextextdir%
+ \pardir\footnote@luatexpardir%
\fi%
\csuse{\csuse{footnote@dir}}%
\normal@pars%
@@ -3236,12 +3247,12 @@
\newcommand*{\Xledsetnormalparstuff}[1]{%
\ledsetnormalparstuff@common%
- \nottoggle{Xparindent@#1}{\noindent}{}%\noindent and and not \parindent=0pt to avoid to break the (bad) change made when moving from ledmac to eledmac
+ \nottoggle{Xparindent@#1}{\parindent=\z@}{\hspace{\parindent}}%
}%
\newcommand*{\ledsetnormalparstuffX}[1]{%
\ledsetnormalparstuff@common%
- \nottoggle{parindentX@#1}{\noindent}{}%\noindent and and not \parindent=0pt to avoid to break the (bad) change made when moving from ledmac to eledmac
+ \nottoggle{parindentX@#1}{\parindent=\z@}{\hspace{\parindent}}%
}%
\newdimen\old@hsize%
@@ -3705,8 +3716,8 @@
{\csuse{@footnotemark#1}}%
{}%
\ifluatex%
- \xdef\footnote@luatextextdir{\the\luatextextdir}%
- \xdef\footnote@luatexpardir{\the\luatexpardir}%
+ \xdef\footnote@luatextextdir{\the\textdir}%
+ \xdef\footnote@luatexpardir{\the\pardir}%
\fi%
\csuse{vfootnote#1}{#1}{\expandonce\content}\m@mmf@prepare%
\endgroup%
@@ -4881,7 +4892,7 @@
\newcommand{\get@edindex@hyperref}[1]{%
\edef\temp@{%
\catcode`\ =9 %space need for catcode
- #1%
+ \detokenize{#1}%For active character in unicode
\catcode`\ =10 % space need for catcode
}%
\ifdefequal{\iftrue}{\ifHy@hyperindex}{%