diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-01 22:39:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-01 22:39:52 +0000 |
commit | 6df23e6dac0dcc83bb0f3d7efd43fcc41b62a965 (patch) | |
tree | 4b628876c73447a553577261061797f227424e0f /Master/texmf-dist/tex | |
parent | bf8f176f04e36ea6cf1beccef81651084084cfad (diff) |
reledmac (1mar21)
git-svn-id: svn://tug.org/texlive/trunk@58027 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/reledmac/reledmac.sty | 89 |
1 files changed, 55 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty index 253afd6a744..53dfff0e9a3 100644 --- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty +++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty @@ -37,7 +37,7 @@ %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledmac}[2021/02/14 v2.36.1 typesetting critical editions]% +\ProvidesPackage{reledmac}[2021/02/28 v2.37.0 typesetting critical editions]% \RequirePackage{xkeyval} \newif\ifparledgroup \newif\ifsameparallelpagenumber% @@ -310,11 +310,11 @@ \newcommand{\led@err@toendnotes@outsidenumbering}{% \reledmac@error{\string\toendnotes\space and related commands must be called inside a numbered texte (\string\beginnumbering\space ...\space\string\endnumbering)}{\@ehc}% }% -\newcommand{\led@err@EdtextWithoutFootnote}{% - \reledmac@error{edtext without Xfootnote. Check syntaxis}{\@ehc}% +\newcommand{\led@err@EdtextWithoutNote}[1]{% + \reledmac@error{edtext `\unexpanded{#1}` without Xfootnote or Xendnote. Check syntaxis.}{\@ehc}% }% \newcommand{\led@err@FootnoteNotInSecondArgEdtext}[1]{% - \reledmac@error{#1footnote outside of the second argument of an edtext. Check syntax}{\@ehc}% + \reledmac@error{#1footnote outside of the second argument of an edtext. Check syntaxis.}{\@ehc}% }% \newcommand{\led@error@PackageAfterEledmac}[1]{% \reledmac@error{#1 must be loaded before reledmac}{\@ehc}% @@ -1445,35 +1445,25 @@ {\global\@this@c@page=\c@par@page}% {\global\@this@c@page=\c@page}% }% -\newif\if@noneed@Footnote% \newcommand*{\flag@start}{% \ifledRcol% \edef\next{\write\linenum@outR{% \string\@ref[\the\insert@countR][}}% - \next% - \ifnum\insert@countR<1% - \if@noneed@Footnote\else% - \led@err@EdtextWithoutFootnote% - \fi% - \fi% \else% \edef\next{\write\linenum@out{% \string\@ref[\the\insert@count][}}% - \next% - \ifnum\insert@count<1% - \if@noneed@Footnote\else% - \led@err@EdtextWithoutFootnote% - \fi% - \fi% - \fi}% + \fi% + \next% +}% \newcommand*{\flag@end}{% \ifledRcol% \write\linenum@outR{]}% \else% \write\linenum@out{]}% - \fi}% + \fi% +}% \newcommand{\flag@start@RTL}{% \edlabel{edtext:start:\csuse{thisedtext@\the\@edtext@level}}% @@ -1633,10 +1623,14 @@ \newif\if@edtext@secondarg@% \newcounter{edtext} \renewcommand{\theedtext}{edtxt@\the\c@edtext}% +\newcount\edtext@notes% +\newcount\edtext@notes@start% +\newif\if@noneed@notes% \newcommand{\edtext}[2]{\leavevmode% \ifnumberedpar@% \@check@edtext@args{#1}{#2}% \global\advance\@edtext@level by 1% + \global\edtext@notes@start=\edtext@notes% \stepcounter{edtext}% \csxdef{thisedtext@\the\@edtext@level}{\theedtext}% \global\@lemmacommand@false% @@ -1659,6 +1653,11 @@ \@edtext@secondarg@true% \ignorespaces #2\relax% \@edtext@secondarg@false% + \ifnum\edtext@notes=\edtext@notes@start% + \unless\if@noneed@notes% + \led@err@EdtextWithoutNote{#1}% + \fi% + \fi% \if@RTL% \flag@start@RTL% \else% @@ -1691,7 +1690,6 @@ \else% \flag@end% \fi% - \global\@noneed@Footnotefalse% \global\advance\@edtext@level by -1% \global\@lemmacommand@false% \global\let\@beforeinsertofthisedtext\relax% @@ -4046,7 +4044,10 @@ \pretocmd{\@footnotetext}{% \ifnumberedpar@ - \edtext{}{\l@dbfnote{#1}}% + \edtext{}{% + \advance \edtext@notes by 1% + \l@dbfnote{#1}% + }% \else }{}{} \apptocmd{\@footnotetext}{\fi}{}{}% @@ -4330,7 +4331,10 @@ \newcommand{\vnumfootnoteX}[3]{% \ifnumberedpar@ - \edtext{}{\normalbfnoteX{#1}{#2}{#3}}% + \edtext{}{% + \advance\edtext@notes by 1% + \normalbfnoteX{#1}{#2}{#3}% + }% \else \def\this@footnoteX@reading{\the\csname footnote#1@reading\endcsname}% \get@thisfootnoteX{#1}% @@ -5476,6 +5480,7 @@ \fi% \global\notbool{parapparatus@}{\expandafter\newcommand\expandafter *}{\expandafter\newcommand}\csname #1footnote\endcsname[2][]{% \nottoggle{Xnonote@#1}{% + \advance \edtext@notes by 1% \if@edtext@secondarg@% \ifledRcol% \ifcsstring{Xonlyside@#1}{L}{\led@error@note@called@onrightside{#1footnote}}{}% @@ -5572,7 +5577,7 @@ \else% \led@err@FootnoteNotInSecondArgEdtext{#1}% \fi% - }{\@noneed@Footnotetrue}% End of \nottoggle{Xnonote@#1}{% + }{\@noneed@notestrue}% End of \nottoggle{Xnonote@#1}{% \ignorespaces% } \expandafter\newcount\csname #1prevpage@num\endcsname% @@ -5688,9 +5693,9 @@ \expandafter\newif\csname ifl@dend@#1\endcsname% \global\expandafter\newcommandx\csname #1endnote\endcsname[2][1,usedefault]{% + \advance \edtext@notes by 1% \bgroup% \newlinechar='40% - \global\@noneed@Footnotetrue% \newcommand{\content}{##2}% \stepcounter{labidx}% \expandafter\immediate\expandafter\write\csname l@d@#1end\endcsname{% @@ -7074,11 +7079,27 @@ \newcommand*{\ledlsnotefontsetup}{\raggedleft\footnotesize} \newcommand*{\ledrsnotefontsetup}{\raggedright\footnotesize} -\newcommand*{\ledleftnote}[1]{\edtext{}{\l@dlsnote{#1}}} -\newcommand*{\ledrightnote}[1]{\edtext{}{\l@drsnote{#1}}} -\newcommand*{\ledsidenote}[1]{\edtext{}{\l@dcsnote{#1}}}% -\newcommand*{\ledinnernote}[1]{\edtext{}{\l@disnote{#1}}}% -\newcommand*{\ledouternote}[1]{\edtext{}{\l@dosnote{#1}}}% +\newcommand*{\ledleftnote}[1]{% + \ledsidenote@{\l@dlsnote{#1}}% +}% +\newcommand*{\ledrightnote}[1]{% + \ledsidenote@{\l@drsnote{#1}}% +}% +\newcommand*{\ledsidenote}[1]{% + \ledsidenote@{\l@dcsnote{#1}}% +}% +\newcommand*{\ledinnernote}[1]{% + \ledsidenote@{\l@disnote{#1}}% +}% +\newcommand*{\ledouternote}[1]{% + \ledsidenote@{\l@dosnote{#1}}% +}% +\newcommand*{\ledsidenote@}[1]{% + \edtext{}{% + \advance\edtext@notes@start by 1% + #1% + }%+ +}% \newif\ifrightnoteup \rightnoteuptrue @@ -9351,9 +9372,9 @@ {} {} -\@ifpackageloaded{nameref}{ +\ifdef{\H@old@sect}{% - \patchcmd{\NR@sect} + \patchcmd{\H@old@sect}% {#8} {#8% \print@rightmargin@eledsection% @@ -9361,7 +9382,7 @@ {} {} - \patchcmd{\NR@sect} + \patchcmd{\H@old@sect}% {\hskip #3\relax} {\hskip #3\relax% \print@leftmargin@eledsection% @@ -9369,7 +9390,7 @@ {} {} - \patchcmd{\NR@ssect} + \patchcmd{\H@old@@sect}% {#5} {#5% \print@rightmargin@eledsection% @@ -9377,7 +9398,7 @@ {} {} - \patchcmd{\NR@ssect} + \patchcmd{\H@old@@sect}% {\hskip #1} {\hskip #1% \print@leftmargin@eledsection% |