diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/reledmac/reledmac.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/reledmac/reledmac.sty | 126 |
1 files changed, 99 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty index 7381db48cee..38958fc7ea8 100644 --- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty +++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty @@ -33,7 +33,7 @@ %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledmac}[2015/11/13 v2.5.0 typeset critical edition]% +\ProvidesPackage{reledmac}[2015/11/20 v2.6.0 typeset critical edition]% \RequirePackage{xkeyval} \newif\ifparledgroup \DeclareOptionX{series}[A,B,C,D,E]{\xdef\default@series{#1}} @@ -278,6 +278,7 @@ \let\linenumberlist=\empty \newcount\@l@dtempcnta \newcount\@l@dtempcntb + \newif\ifl@dpairing \newif\ifl@dpaging% \newif\ifl@dprintingpages% @@ -288,6 +289,9 @@ \newif\ifledRcol@ \newif\ifnumberingR \newif\ifXnote@% +\providebool{indtl@innote}% +\providebool{indtl@notenumber}% + \newcount\section@num \section@num=0 \let\extensionchars=\empty @@ -2799,7 +2803,9 @@ {\stepcounter\@mpfn}% {% \ifl@dpairing% - \global\advance\footnote@reading by \@ne% + \global\advance\footnote@reading by \@ne% + \get@thisfootnote% + \get@fnmark{\thisfootnote}% \ifcsdef{footnotereading\the\footnote@reading=typeset}% {\setcounter{\@mpfn}{\csuse{footnotereading\the\footnote@reading=typeset}}}% {\setcounter{\@mpfn}{\footnote@reading}}% @@ -2809,13 +2815,18 @@ }% {} {} -\newcommand{\l@dbfnote}[1]{% - \ifnumberedpar@ + +\newcommand{\get@thisfootnote}{% \ifl@dpairing \protected@xdef\thisfootnote{\the\footnote@reading}% \else% \protected@xdef\thisfootnote{\thefootnote}% \fi% +}% + +\newcommand{\l@dbfnote}[1]{% + \ifnumberedpar@% + \get@thisfootnote% \gdef\@tag{#1\relax}% \ifledRcol% \xright@appenditem{\noexpand\vl@dbfnote{{\expandonce\@tag}}{\thisfootnote}}% @@ -2828,21 +2839,25 @@ \fi \fi\ignorespaces} -\newcommand{\vl@dbfnote}[2]{% +\newcommand{\get@fnmark}[1]{% \ifboolexpr{bool{l@dprintingpages} or bool{l@dprintingcolumns}}% {% - \global\advance\footnote@typeset by \@ne% - \setcounter{footnote}{\footnote@typeset}% + \stepcounter{footnote@typeset}% + \setcounter{footnote}{\c@footnote@typeset}% \immediate\write\@mainaux{% - \global\csdef{footnotereading#2=typeset}{\the\footnote@typeset}% + \global\csdef{footnotereading#1=typeset}{\the\c@footnote@typeset}% }% - \def\@thefnmark{\the\footnote@typeset}% + \def\@thefnmark{\thefootnote}% }% {% - \@namedef{@thefnmark}{#2}% + \@namedef{@thefnmark}{#1}% }% - \@footnotetext{#1}% - }% +}% + +\newcommand{\vl@dbfnote}[2]{% + \get@fnmark{#2}% + \@footnotetext{#1}% +}% \newcommand*{\prebodyfootmark}{% \leavevmode \ifhmode @@ -2886,6 +2901,8 @@ \csuse{\csuse{footnote@dir}}\@nameuse{footfmt#1}{#1}{#2}\egroup} \newcommand*{\mpnormalvfootnoteX}[2]{% + \get@thisfootnoteX{#1}% + \get@fnmarkX{#1}{\thisfootnote}% \global\setbox\@nameuse{mpfootins#1}\vbox{% \unvbox\@nameuse{mpfootins#1} \noindent\csuse{bhooknoteX@#1}% @@ -2967,11 +2984,7 @@ \newcommand{\normalbfnoteX}[2]{% \ifnumberedpar@ - \ifl@dpairing - \protected@xdef\thisfootnote{\the\csname footnote#1@reading\endcsname}% - \else% - \protected@xdef\thisfootnote{\csuse{thefootnote#1}}% - \fi% + \get@thisfootnoteX{#1}% \ifledRcol% \ifluatex \footnotelang@lua[R]% @@ -2995,22 +3008,32 @@ \fi \fi\ignorespaces} +\newcommand{\get@thisfootnoteX}[1]{% + \ifl@dpairing% + \protected@xdef\thisfootnote{\the\csname footnote#1@reading\endcsname}% + \else% + \protected@xdef\thisfootnote{\csuse{thefootnote#1}}% + \fi% +}% \newcommand{\vbfnoteX}[3]{% + \get@fnmarkX{#1}{#3}% + \@nameuse{regvfootnote#1}{#1}{#2}% +}% + +\newcommand{\get@fnmarkX}[2]{% \ifboolexpr{bool{l@dprintingpages} or bool{l@dprintingcolumns}}% {% - \global\expandafter\advance\csname footnote#1@typeset\endcsname by \@ne% - \setcounter{footnote#1}{\csuse{footnote#1@typeset}}% + \stepcounter{footnote#1@typeset}% + \setcounter{footnote#1}{\value{footnote#1@typeset}}% \@namedef{@thefnmark#1}{\csuse{thefootnote#1}}% \immediate\write\@mainaux{% - \global\csdef{footnote#1reading#3=typeset}{\the\csname footnote#1@typeset\endcsname}% + \global\csdef{footnote#1reading#2=typeset}{\the\csname c@footnote#1@typeset\endcsname}% }% }% {% - \@namedef{@thefnmark#1}{#3}% + \@namedef{@thefnmark#1}{#2}% }% - \@nameuse{regvfootnote#1}{#1}{#2}% } - \newcommand{\vnumfootnoteX}[2]{% \ifnumberedpar@ \edtext{}{\normalbfnoteX{#1}{#2}}% @@ -3257,7 +3280,7 @@ } \newcommand*{\para@vfootnoteX}[2]{% - \insert\csname footins#1\endcsname + \insert\csname footins#1\endcsname% \bgroup \csuse{notefontsizeX@#1} \footsplitskips @@ -3272,6 +3295,8 @@ \penalty0 \egroup} \newcommand*{\mppara@vfootnoteX}[2]{% + \get@thisfootnoteX{#1}% + \get@fnmarkX{#1}{\thisfootnote}% \global\setbox\@nameuse{mpfootins#1}\vbox{% \unvbox\@nameuse{mpfootins#1} \csuse{notefontsizeX@#1} @@ -3836,6 +3861,15 @@ {\footnotelang@poly[R]}% \footnoteoptions@{R}{##1}{true}% \xright@appenditem{% + \ifbool{indtl@innote}% + {\unexpanded{\let\index\nindex}}% + {}% + \ifbool{indtl@notenumber}% + {\unexpanded{\let\index\nindex}}%There is no note number… so + {}% + \ifbool{indtl@notenumber}% + {\unexpanded{\let\index\orig@@index}}% + {}% \noexpand\Xnote@true% \noexpand\prepare@preXnotes{#1}% \noexpand\prepare@edindex@fornote{\l@d@nums}% @@ -3844,6 +3878,9 @@ \noexpand\csuse{v#1footnote}{#1}% {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}% \noexpand\Xnote@false% + \ifbool{indtl@innote}% + {\unexpanded{\let\index\orig@@index}}% + {}% }\to\inserts@listR \footnoteoptions@{R}{##1}{false}% \global\advance\insert@countR \@ne% @@ -3856,6 +3893,12 @@ {\footnotelang@poly}% \footnoteoptions@{L}{##1}{true}% \xright@appenditem{% + \ifbool{indtl@innote}% + {\unexpanded{\let\index\nindex}}% + {}% + \ifbool{indtl@notenumber}% + {\unexpanded{\let\index\nindex}}%There is no note number… so + {}% \noexpand\Xnote@true% \noexpand\prepare@preXnotes{#1}% \noexpand\prepare@edindex@fornote{\l@d@nums}% @@ -3866,6 +3909,12 @@ \noexpand\csuse{v#1footnote}{#1}% {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}% \noexpand\Xnote@false% + \ifbool{indtl@innote}% + {\unexpanded{\let\index\orig@@index}}% + {}% + \ifbool{indtl@notenumber}% + {\unexpanded{\let\index\orig@@index}}% + {}% }\to\inserts@list \global\advance\insert@count \@ne% \footnoteoptions@{L}{##1}{false}% @@ -3924,7 +3973,25 @@ \xdef\footnote@luatextextdir{\the\textdir}% \xdef\footnote@luatexpardir{\the\pardir}% \fi% + \ifbool{indtl@innote}% + {\let\index\nindex}% + {}% + \ifbool{indtl@notenumber}% + {% + \renewcommand{\index}[2][]{% + \orig@@index[####1]{% + ####2|innotenumber{\csuse{thefootnote#1}}% + }% + }% + }% + {}% \csuse{vfootnote#1}{#1}{\expandonce\content}\m@mmf@prepare% + \ifbool{indtl@innote}% + {\let\index\orig@@index}% + {}% + \ifbool{indtl@notenumber}% + {\let\index\orig@@index}% + {}% \endgroup% } \newcounter{footnote#1} @@ -5022,8 +5089,9 @@ \fi% \fi% } +\newif\if@ledgroup% \ifnoledgroup@\else% -\newcommand*{\l@dfeetbeginmini}{\l@dedbeginmini\l@dfambeginmini} +\newcommand*{\l@dfeetbeginmini}{\@ledgrouptrue\l@dedbeginmini\l@dfambeginmini} \newcommand*{\l@dfeetendmini}{% \IfStrEq{critical-familiar}{\@mpfnpos}% {\l@dedendmini\l@dfamendmini}% @@ -5117,6 +5185,7 @@ \fi \fi } + \newenvironment{ledgroup}{% \resetprevpage@num% \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@% @@ -5129,12 +5198,15 @@ \l@dunboxmpfoot \fi \l@dfeetendmini% + \@ledgroupfalse% } +\apptocmd{\endledgroup}{% + \l@dprintingpagesfalse% + \l@dprintingcolumnsfalse% +}{}{} \newenvironment{ledgroupsized}[2][l]{% \hsize #2\relax -%% \textwidth #2\relax -%% \columnwidth #2\relax \let\ledllfill\hfil \let\ledrlfill\hfil \def\@tempa{#1}\def\@tempb{l}% |