diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/ledmac/ledmac.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/ledmac/ledmac.sty | 167 |
1 files changed, 80 insertions, 87 deletions
diff --git a/Master/texmf-dist/tex/latex/ledmac/ledmac.sty b/Master/texmf-dist/tex/latex/ledmac/ledmac.sty index 6f241323e96..8b225069a7c 100644 --- a/Master/texmf-dist/tex/latex/ledmac/ledmac.sty +++ b/Master/texmf-dist/tex/latex/ledmac/ledmac.sty @@ -22,7 +22,7 @@ %% %% This work consists of the files listed in the README file. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ledmac}[2012/09/02 v0.18.1 LaTeX port of EDMAC] +\ProvidesPackage{ledmac}[2012/09/05 v0.18.2 LaTeX port of EDMAC] \newif\ifledfinal \DeclareOption{final}{\ledfinaltrue} @@ -659,10 +659,8 @@ \list@create{\end@lemmas} \long\def\dummy@text#1#2/{#1} \newcommand{\dummy@edtext}[2]{#1} -\newcommand*{\no@expands}{\let\rm=0\let\it=0\let\sl=0\let\bf=0\let\tt=0% - \let\b=0\let\c=0\let\d=0\let\t=0% +\newcommand*{\no@expands}{% \let\select@@lemmafont=0% - \def\protect{\noexpand\protect\noexpand}% \let\startsub=\relax \let\endsub=\relax \let\startlock=\relax \let\endlock=\relax \let\edlabel=\@gobble @@ -673,10 +671,10 @@ \morenoexpands} \let\morenoexpands=\relax +\newcommand{\@tag}{} \long\def\critext#1#2/{\leavevmode \begingroup - \no@expands - \global\newcommand{\@tag}{#1}% + \global\renewcommand{\@tag}{\no@expands #1}%% \set@line \global\insert@count=0 \ignorespaces #2\relax @@ -691,7 +689,7 @@ \flag@end} \newcommand{\edtext}[2]{\leavevmode \begingroup - \global\newcommand{\@tag}{#1}% + \global\renewcommand{\@tag}{\no@expands #1}%% \set@line \global\insert@count=0 \ignorespaces #2\relax @@ -719,7 +717,7 @@ \newcommand*{\edfont@info}{\f@encoding/\f@family/\f@series/\f@shape} -\newcommand*{\lemma}[1]{\global\renewcommand{\@tag}{#1}\ignorespaces} +\newcommand*{\lemma}[1]{\global\renewcommand{\@tag}{\no@expands #1}} \newcommand*{\linenum}[1]{% \xdef\@tempa{#1|||||||\noexpand\\\l@d@nums}% \global\let\l@d@nums=\empty @@ -1162,11 +1160,22 @@ {\fontencoding{#1}\fontfamily{#2}\fontseries{#3}\fontshape{#4}% \selectfont} -\newcommand*{\Afootnote}[2][\relax]{% +\newcommandx*{\footnoteoptions@}[3][1=L,usedefault]{% + \renewcommand{\do}[1]{% + \ifstrequal{#1}{L}{% In Leftside + \xright@appenditem{\global\noexpand\settoggle{##1@}{#3}}\to\inserts@list% Switch toogle, in all case + \global\advance\insert@count \@ne% Increment the left insert counter. + }% + {% + \xright@appenditem{\global\noexpand\settoggle{##1@}{#3}}\to\inserts@listR% Switch toogle, in all case + \global\advance\insert@countR \@ne% Increment the right insert counter insert. + }% + }% + \notblank{#2}{\docsvlist{#2}}{}% Parsing all options +} +\newcommand*{\Afootnote}[2][]{% \newcommand{\content}{#2}% - \forcsvlist{\listadd\options}{#1}% Made a list of options - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nolemmaseparatorthisnote@}}\to\inserts@list}{}% + \footnoteoptions@{#1}{true}% \ifnumberedpar@ \xright@appenditem{\noexpand\vAfootnote{A}% {{\l@d@nums}{\csexpandonce{@tag}}{{\csexpandonce{content}}}}}\to\inserts@list @@ -1174,68 +1183,59 @@ \else \vAfootnote{A}{{0|0|0|0|0|0|0}{}{{\csexpandonce{content}}}}% \fi% - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nolemmaseparatorthisnote@}}\to\inserts@list}{}% +\footnoteoptions@{#1}{false}% \ignorespaces} -\newcommand*{\Bfootnote}[2][\relax]{% +\newcommand*{\Bfootnote}[2][]{% \newcommand{\content}{#2}% - \forcsvlist{\listadd\options}{#1}% Made a list of options - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nolemmaseparatorthisnote@}}\to\inserts@list}{}% + \footnoteoptions@{#1}{true}% \ifnumberedpar@ \xright@appenditem{\noexpand\vBfootnote{B}% {{\l@d@nums}{\csexpandonce{@tag}}{{\csexpandonce{content}}}}}\to\inserts@list - \global\advance\insert@count \@ne + \global\advance\insert@count \@ne% + \footnoteoptions@{#1}{false}% \else \vBfootnote{B}{{0|0|0|0|0|0|0}{}{{\csexpandonce{content}}}}% \fi% - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nolemmaseparatorthisnote@}}\to\inserts@list}{}% +\footnoteoptions@{#1}{false}% \ignorespaces} -\newcommand*{\Cfootnote}[2][\relax]{% +\newcommand*{\Cfootnote}[2][]{% \newcommand{\content}{#2}% - \forcsvlist{\listadd\options}{#1}% Made a list of options - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nolemmaseparatorthisnote@}}\to\inserts@list}{}% + \footnoteoptions@{#1}{true}% \ifnumberedpar@ \xright@appenditem{\noexpand\vCfootnote{C}% {{\l@d@nums}{\csexpandonce{@tag}}{{\csexpandonce{content}}}}}\to\inserts@list - \global\advance\insert@count \@ne + \global\advance\insert@count \@ne% + \footnoteoptions@{#1}{false}% \else \vCfootnote{C}{{0|0|0|0|0|0|0}{}{{\csexpandonce{content}}}}% \fi% - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nolemmaseparatorthisnote@}}\to\inserts@list}{}% +\footnoteoptions@{#1}{false}% \ignorespaces} -\newcommand*{\Dfootnote}[2][\relax]{% +\newcommand*{\Dfootnote}[2][]{% \newcommand{\content}{#2}% - \forcsvlist{\listadd\options}{#1}% Made a list of options - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nolemmaseparatorthisnote@}}\to\inserts@list}{}% + \footnoteoptions@{#1}{true}% \ifnumberedpar@ \xright@appenditem{\noexpand\vDfootnote{D}% {{\l@d@nums}{\csexpandonce{@tag}}{{\csexpandonce{content}}}}}\to\inserts@list - \global\advance\insert@count \@ne + \global\advance\insert@count \@ne% + \footnoteoptions@{#1}{false}% \else \vDfootnote{D}{{0|0|0|0|0|0|0}{}{{\csexpandonce{content}}}}% \fi% - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nolemmaseparatorthisnote@}}\to\inserts@list}{}% +\footnoteoptions@{#1}{false}% \ignorespaces} -\newcommand*{\Efootnote}[2][\relax]{% +\newcommand*{\Efootnote}[2][]{% \newcommand{\content}{#2}% - \forcsvlist{\listadd\options}{#1}% Made a list of options - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nolemmaseparatorthisnote@}}\to\inserts@list}{}% + \footnoteoptions@{#1}{true}% \ifnumberedpar@ \xright@appenditem{\noexpand\vEfootnote{E}% {{\l@d@nums}{\csexpandonce{@tag}}{{\csexpandonce{content}}}}}\to\inserts@list - \global\advance\insert@count \@ne + \global\advance\insert@count \@ne% + \footnoteoptions@{#1}{false}% \else \vEfootnote{E}{{0|0|0|0|0|0|0}{}{{\csexpandonce{content}}}}% \fi% - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nolemmaseparatorthisnote@}}\to\inserts@list}{}% +\footnoteoptions@{#1}{false}% \ignorespaces} \newinsert\mpAfootins @@ -1244,80 +1244,70 @@ \newinsert\mpDfootins \newinsert\mpEfootins -\newcommand*{\mpAfootnote}[2][\relax]{% +\newcommand*{\mpAfootnote}[2][]{% \newcommand{\content}{#2}% - \forcsvlist{\listadd\options}{#1}% Made a list of options - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nolemmaseparatorthisnote@}}\to\inserts@list}{}% + \footnoteoptions@{#1}{true}% \ifnumberedpar@ \xright@appenditem{\noexpand\mpvAfootnote{A}% {{\l@d@nums}{\csexpandonce{@tag}}{\csexpandonce{content}}}}\to\inserts@list - \global\advance\insert@count \@ne + \global\advance\insert@count \@ne% + \footnoteoptions@{#1}{false}% \else \mpvAfootnote{A}{{0|0|0|0|0|0|0}{}{#1}}% \fi% - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nolemmaseparatorthisnote@}}\to\inserts@list}{}% +\footnoteoptions@{#1}{false}% \ignorespaces} -\newcommand*{\mpBfootnote}[2][\relax]{% +\newcommand*{\mpBfootnote}[2][]{% \newcommand{\content}{#2}% - \forcsvlist{\listadd\options}{#1}% Made a list of options - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nolemmaseparatorthisnote@}}\to\inserts@list}{}% + \footnoteoptions@{#1}{true}% \ifnumberedpar@ \xright@appenditem{\noexpand\mpvBfootnote{B}% {{\l@d@nums}{\csexpandonce{@tag}}{\csexpandonce{content}}}}\to\inserts@list - \global\advance\insert@count \@ne + \global\advance\insert@count \@ne% + \footnoteoptions@{#1}{false}% \else \mpvBfootnote{B}{{0|0|0|0|0|0|0}{}{#1}}% \fi% - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nolemmaseparatorthisnote@}}\to\inserts@list}{}% +\footnoteoptions@{#1}{false}% \ignorespaces} -\newcommand*{\mpCfootnote}[2][\relax]{% +\newcommand*{\mpCfootnote}[2][]{% \newcommand{\content}{#2}% - \forcsvlist{\listadd\options}{#1}% Made a list of options - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nolemmaseparatorthisnote@}}\to\inserts@list}{}% + \footnoteoptions@{#1}{true}% \ifnumberedpar@ \xright@appenditem{\noexpand\mpvCfootnote{C}% {{\l@d@nums}{\csexpandonce{@tag}}{\csexpandonce{content}}}}\to\inserts@list - \global\advance\insert@count \@ne + \global\advance\insert@count \@ne% + \footnoteoptions@{#1}{false}% \else \mpvCfootnote{C}{{0|0|0|0|0|0|0}{}{#1}}% \fi% - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nolemmaseparatorthisnote@}}\to\inserts@list}{}% +\footnoteoptions@{#1}{false}% \ignorespaces} -\newcommand*{\mpDfootnote}[2][\relax]{% +\newcommand*{\mpDfootnote}[2][]{% \newcommand{\content}{#2}% - \forcsvlist{\listadd\options}{#1}% Made a list of options - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nolemmaseparatorthisnote@}}\to\inserts@list}{}% + \footnoteoptions@{#1}{true}% \ifnumberedpar@ \xright@appenditem{\noexpand\mpvDfootnote{D}% {{\l@d@nums}{\csexpandonce{@tag}}{\csexpandonce{content}}}}\to\inserts@list - \global\advance\insert@count \@ne + \global\advance\insert@count \@ne% + \footnoteoptions@{#1}{false}% \else \mpvDfootnote{D}{{0|0|0|0|0|0|0}{}{#1}}% \fi% - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nolemmaseparatorthisnote@}}\to\inserts@list}{}% + \footnoteoptions@{#1}{false}% \ignorespaces} -\newcommand*{\mpEfootnote}[2][\relax]{% +\newcommand*{\mpEfootnote}[2][]{% \newcommand{\content}{#2}% - \forcsvlist{\listadd\options}{#1}% Made a list of options - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\toggletrue{nolemmaseparatorthisnote@}}\to\inserts@list}{}% + \footnoteoptions@{#1}{true}% \ifnumberedpar@ \xright@appenditem{\noexpand\mpvEfootnote{E}% {{\l@d@nums}{\csexpandonce{@tag}}{\csexpandonce{content}}}}\to\inserts@list - \global\advance\insert@count \@ne + \global\advance\insert@count \@ne% + \footnoteoptions@{#1}{false}% \else \mpvEfootnote{E}{{0|0|0|0|0|0|0}{}{#1}}% \fi% - \ifinlist{nonum}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nonumberthisnote@}}\to\inserts@list}{}% - \ifinlist{nosep}{\options}{\global\advance\insert@count \@ne\xright@appenditem{\global\noexpand\togglefalse{nolemmaseparatorthisnote@}}\to\inserts@list}{}% +\footnoteoptions@{#1}{false}% \ignorespaces} \newcommand*{\normalvfootnote}[2]{% \insert\csname #1footins\endcsname\bgroup @@ -1347,7 +1337,7 @@ \ledsetnormalparstuff% \strut{\printlinefootnote{#1}{#4}}% {\select@lemmafont#1|#2}% - \iftoggle{nolemmaseparatorthisnote@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}% + \iftoggle{nosep@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}% {\hskip\csuse{inplaceoflemmaseparator@#4}}% {\nobreak\hskip\csuse{beforelemmaseparator@#4}\csuse{lemmaseparator@#4}\hskip\csuse{afterlemmaseparator@#4}% }}% @@ -1537,7 +1527,7 @@ \ledsetnormalparstuff% \printlinefootnote{#1}{#4}% {\select@lemmafont#1|#2}% - \iftoggle{nolemmaseparatorthisnote@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}% + \iftoggle{nosep@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}% {\hskip\csuse{inplaceoflemmaseparator@#4}}% {\nobreak\hskip\csuse{beforelemmaseparator@#4}\csuse{lemmaseparator@#4}\hskip\csuse{afterlemmaseparator@#4}% }}% @@ -1626,7 +1616,7 @@ \leavevmode \strut{\printlinefootnote{#1}{#4}}% {\select@lemmafont#1|#2}% - \iftoggle{nolemmaseparatorthisnote@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}% + \iftoggle{nosep@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}% {\hskip\csuse{inplaceoflemmaseparator@#4}}% {\nobreak\hskip\csuse{beforelemmaseparator@#4}\csuse{lemmaseparator@#4}\hskip\csuse{afterlemmaseparator@#4}% }}% @@ -1669,7 +1659,7 @@ \leavevmode \strut{\printlinefootnote{#1}{#4}}% {\select@lemmafont#1|#2}% - \iftoggle{nolemmaseparatorthisnote@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}% + \iftoggle{nosep@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}% {\hskip\csuse{inplaceoflemmaseparator@#4}}% {\nobreak\hskip\csuse{beforelemmaseparator@#4}\csuse{lemmaseparator@#4}\hskip\csuse{afterlemmaseparator@#4}% }}% @@ -1750,8 +1740,8 @@ \settoggle{nonumberinfootnote@#1}{#2} } } -\newtoggle{nonumberthisnote@} -\newtoggle{nolemmaseparatorthisnote@} +\newtoggle{nonum@} +\newtoggle{nosep@} \def\beforenumberinfootnote@A{0pt} \def\beforenumberinfootnote@B{0pt} \def\beforenumberinfootnote@C{0pt} @@ -1980,7 +1970,7 @@ }% } \newcommand{\printlinefootnote}[2]{% - \iftoggle{nonumberthisnote@}{%Try if the line number must printed for this specific not (by default, yes) + \iftoggle{nonum@}{%Try if the line number must printed for this specific not (by default, yes) \hspace{\csuse{inplaceofnumber@#2}}% }% {% @@ -2421,20 +2411,23 @@ \newif\ifrightnoteup \rightnoteuptrue \newcommand*{\l@dlsnote}[1]{% + \newcommand{\content}{#1}% \ifnumberedpar@ - \xright@appenditem{\noexpand\vl@dlsnote{#1}}% + \xright@appenditem{\noexpand\vl@dlsnote{\csexpandonce{content}}}% \to\inserts@list \global\advance\insert@count \@ne \fi\ignorespaces} \newcommand*{\l@drsnote}[1]{% + \newcommand{\content}{#1}% \ifnumberedpar@ - \xright@appenditem{\noexpand\vl@drsnote{#1}}% + \xright@appenditem{\noexpand\vl@drsnote{\csexpandonce{content}}}% \to\inserts@list \global\advance\insert@count \@ne \fi\ignorespaces} \newcommand*{\l@dcsnote}[1]{% + \newcommand{\content}{#1}% \ifnumberedpar@ - \xright@appenditem{\noexpand\vl@dcsnote{#1}}% + \xright@appenditem{\noexpand\vl@dcsnote{\csexpandonce{content}}}% \to\inserts@list \global\advance\insert@count \@ne \fi\ignorespaces} |