summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ledmac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-09-03 22:55:05 +0000
committerKarl Berry <karl@freefriends.org>2012-09-03 22:55:05 +0000
commit60075902f7b24b4f27df8fa26409d3f206c93957 (patch)
treebf9bc5a1d2c7b31d38fbf004823fe7eb24e5c74f /Master/texmf-dist/tex/latex/ledmac
parent17f080ff7f73e7c412a23e8e7070ec0f164322fb (diff)
ledmac (3sep12)
git-svn-id: svn://tug.org/texlive/trunk@27582 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ledmac')
-rw-r--r--Master/texmf-dist/tex/latex/ledmac/ledmac.sty198
1 files changed, 143 insertions, 55 deletions
diff --git a/Master/texmf-dist/tex/latex/ledmac/ledmac.sty b/Master/texmf-dist/tex/latex/ledmac/ledmac.sty
index 299240c90ef..6f241323e96 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/29 v0.18 LaTeX port of EDMAC]
+\ProvidesPackage{ledmac}[2012/09/02 v0.18.1 LaTeX port of EDMAC]
\newif\ifledfinal
\DeclareOption{final}{\ledfinaltrue}
@@ -35,7 +35,7 @@
\ifledfinal
\newcommand*{\showlemma}[1]{#1}
\else
- \newcommand*{\showlemma}[1]{\textit{#1}}
+ \newcommand*{\showlemma}[1]{\underline{#1}}
\fi
\let\linenumberlist=\empty
@@ -676,7 +676,7 @@
\long\def\critext#1#2/{\leavevmode
\begingroup
\no@expands
- \xdef\@tag{\protect#1}%
+ \global\newcommand{\@tag}{#1}%
\set@line
\global\insert@count=0
\ignorespaces #2\relax
@@ -691,8 +691,7 @@
\flag@end}
\newcommand{\edtext}[2]{\leavevmode
\begingroup
- \no@expands
- \xdef\@tag{\protect#1}%
+ \global\newcommand{\@tag}{#1}%
\set@line
\global\insert@count=0
\ignorespaces #2\relax
@@ -720,7 +719,7 @@
\newcommand*{\edfont@info}{\f@encoding/\f@family/\f@series/\f@shape}
-\newcommand*{\lemma}[1]{\xdef\@tag{\protect#1}\ignorespaces}
+\newcommand*{\lemma}[1]{\global\renewcommand{\@tag}{#1}\ignorespaces}
\newcommand*{\linenum}[1]{%
\xdef\@tempa{#1|||||||\noexpand\\\l@d@nums}%
\global\let\l@d@nums=\empty
@@ -1163,46 +1162,81 @@
{\fontencoding{#1}\fontfamily{#2}\fontseries{#3}\fontshape{#4}%
\selectfont}
-\newcommand*{\Afootnote}[1]{%
+\newcommand*{\Afootnote}[2][\relax]{%
+ \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}{}%
\ifnumberedpar@
\xright@appenditem{\noexpand\vAfootnote{A}%
- {{\l@d@nums}{\@tag}{#1}}}\to\inserts@list
+ {{\l@d@nums}{\csexpandonce{@tag}}{{\csexpandonce{content}}}}}\to\inserts@list
\global\advance\insert@count \@ne
\else
- \vAfootnote{A}{{0|0|0|0|0|0|0}{}{#1}}%
- \fi\ignorespaces}
-\newcommand*{\Bfootnote}[1]{%
+ \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}{}%
+ \ignorespaces}
+\newcommand*{\Bfootnote}[2][\relax]{%
+ \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}{}%
\ifnumberedpar@
\xright@appenditem{\noexpand\vBfootnote{B}%
- {{\l@d@nums}{\@tag}{#1}}}\to\inserts@list
+ {{\l@d@nums}{\csexpandonce{@tag}}{{\csexpandonce{content}}}}}\to\inserts@list
\global\advance\insert@count \@ne
\else
- \vBfootnote{B}{{0|0|0|0|0|0|0}{}{#1}}%
- \fi\ignorespaces}
-\newcommand*{\Cfootnote}[1]{%
+ \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}{}%
+ \ignorespaces}
+\newcommand*{\Cfootnote}[2][\relax]{%
+ \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}{}%
\ifnumberedpar@
\xright@appenditem{\noexpand\vCfootnote{C}%
- {{\l@d@nums}{\@tag}{#1}}}\to\inserts@list
+ {{\l@d@nums}{\csexpandonce{@tag}}{{\csexpandonce{content}}}}}\to\inserts@list
\global\advance\insert@count \@ne
\else
- \vCfootnote{C}{{0|0|0|0|0|0|0}{}{#1}}%
- \fi\ignorespaces}
-\newcommand*{\Dfootnote}[1]{%
+ \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}{}%
+ \ignorespaces}
+\newcommand*{\Dfootnote}[2][\relax]{%
+ \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}{}%
\ifnumberedpar@
\xright@appenditem{\noexpand\vDfootnote{D}%
- {{\l@d@nums}{\@tag}{#1}}}\to\inserts@list
+ {{\l@d@nums}{\csexpandonce{@tag}}{{\csexpandonce{content}}}}}\to\inserts@list
\global\advance\insert@count \@ne
\else
- \vDfootnote{D}{{0|0|0|0|0|0|0}{}{#1}}%
- \fi\ignorespaces}
-\newcommand*{\Efootnote}[1]{%
+ \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}{}%
+ \ignorespaces}
+\newcommand*{\Efootnote}[2][\relax]{%
+ \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}{}%
\ifnumberedpar@
\xright@appenditem{\noexpand\vEfootnote{E}%
- {{\l@d@nums}{\@tag}{#1}}}\to\inserts@list
+ {{\l@d@nums}{\csexpandonce{@tag}}{{\csexpandonce{content}}}}}\to\inserts@list
\global\advance\insert@count \@ne
\else
- \vEfootnote{E}{{0|0|0|0|0|0|0}{}{#1}}%
- \fi\ignorespaces}
+ \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}{}%
+ \ignorespaces}
\newinsert\mpAfootins
\newinsert\mpBfootins
@@ -1210,46 +1244,81 @@
\newinsert\mpDfootins
\newinsert\mpEfootins
-\newcommand*{\mpAfootnote}[1]{%
+\newcommand*{\mpAfootnote}[2][\relax]{%
+ \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}{}%
\ifnumberedpar@
\xright@appenditem{\noexpand\mpvAfootnote{A}%
- {{\l@d@nums}{\@tag}{#1}}}\to\inserts@list
+ {{\l@d@nums}{\csexpandonce{@tag}}{\csexpandonce{content}}}}\to\inserts@list
\global\advance\insert@count \@ne
\else
\mpvAfootnote{A}{{0|0|0|0|0|0|0}{}{#1}}%
- \fi\ignorespaces}
-\newcommand*{\mpBfootnote}[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}{}%
+ \ignorespaces}
+\newcommand*{\mpBfootnote}[2][\relax]{%
+ \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}{}%
\ifnumberedpar@
\xright@appenditem{\noexpand\mpvBfootnote{B}%
- {{\l@d@nums}{\@tag}{#1}}}\to\inserts@list
+ {{\l@d@nums}{\csexpandonce{@tag}}{\csexpandonce{content}}}}\to\inserts@list
\global\advance\insert@count \@ne
\else
\mpvBfootnote{B}{{0|0|0|0|0|0|0}{}{#1}}%
- \fi\ignorespaces}
-\newcommand*{\mpCfootnote}[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}{}%
+ \ignorespaces}
+\newcommand*{\mpCfootnote}[2][\relax]{%
+ \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}{}%
\ifnumberedpar@
\xright@appenditem{\noexpand\mpvCfootnote{C}%
- {{\l@d@nums}{\@tag}{#1}}}\to\inserts@list
+ {{\l@d@nums}{\csexpandonce{@tag}}{\csexpandonce{content}}}}\to\inserts@list
\global\advance\insert@count \@ne
\else
\mpvCfootnote{C}{{0|0|0|0|0|0|0}{}{#1}}%
- \fi\ignorespaces}
-\newcommand*{\mpDfootnote}[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}{}%
+ \ignorespaces}
+\newcommand*{\mpDfootnote}[2][\relax]{%
+ \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}{}%
\ifnumberedpar@
\xright@appenditem{\noexpand\mpvDfootnote{D}%
- {{\l@d@nums}{\@tag}{#1}}}\to\inserts@list
+ {{\l@d@nums}{\csexpandonce{@tag}}{\csexpandonce{content}}}}\to\inserts@list
\global\advance\insert@count \@ne
\else
\mpvDfootnote{D}{{0|0|0|0|0|0|0}{}{#1}}%
- \fi\ignorespaces}
-\newcommand*{\mpEfootnote}[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}{}%
+ \ignorespaces}
+\newcommand*{\mpEfootnote}[2][\relax]{%
+ \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}{}%
\ifnumberedpar@
\xright@appenditem{\noexpand\mpvEfootnote{E}%
- {{\l@d@nums}{\@tag}{#1}}}\to\inserts@list
+ {{\l@d@nums}{\csexpandonce{@tag}}{\csexpandonce{content}}}}\to\inserts@list
\global\advance\insert@count \@ne
\else
\mpvEfootnote{E}{{0|0|0|0|0|0|0}{}{#1}}%
- \fi\ignorespaces}
+ \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}{}%
+ \ignorespaces}
\newcommand*{\normalvfootnote}[2]{%
\insert\csname #1footins\endcsname\bgroup
\notefontsetup
@@ -1278,10 +1347,10 @@
\ledsetnormalparstuff%
\strut{\printlinefootnote{#1}{#4}}%
{\select@lemmafont#1|#2}%
- \ifcsempty{lemmaseparator@#4}%
- {}%
+ \iftoggle{nolemmaseparatorthisnote@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}%
+ {\hskip\csuse{inplaceoflemmaseparator@#4}}%
{\nobreak\hskip\csuse{beforelemmaseparator@#4}\csuse{lemmaseparator@#4}\hskip\csuse{afterlemmaseparator@#4}%
- }%
+ }}%
#3\strut\par}
\def\endashchar{\textnormal{--}}
\newcommand*{\fullstop}{\textnormal{.}}
@@ -1468,10 +1537,10 @@
\ledsetnormalparstuff%
\printlinefootnote{#1}{#4}%
{\select@lemmafont#1|#2}%
- \ifcsempty{lemmaseparator@#4}%
- {}%
+ \iftoggle{nolemmaseparatorthisnote@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}%
+ {\hskip\csuse{inplaceoflemmaseparator@#4}}%
{\nobreak\hskip\csuse{beforelemmaseparator@#4}\csuse{lemmaseparator@#4}\hskip\csuse{afterlemmaseparator@#4}%
- }%
+ }}%
#3\penalty-10 }
\newcommand*{\para@footgroup}[1]{%
\unvbox\csname #1footins\endcsname
@@ -1557,10 +1626,10 @@
\leavevmode
\strut{\printlinefootnote{#1}{#4}}%
{\select@lemmafont#1|#2}%
- \ifcsempty{lemmaseparator@#4}%
- {}%
+ \iftoggle{nolemmaseparatorthisnote@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}%
+ {\hskip\csuse{inplaceoflemmaseparator@#4}}%
{\nobreak\hskip\csuse{beforelemmaseparator@#4}\csuse{lemmaseparator@#4}\hskip\csuse{afterlemmaseparator@#4}%
- }%
+ }}%
#3\strut\par\allowbreak}
\newcommand*{\threecolfootgroup}[1]{{\notefontsetup
\splittopskip=\ht\strutbox
@@ -1600,10 +1669,10 @@
\leavevmode
\strut{\printlinefootnote{#1}{#4}}%
{\select@lemmafont#1|#2}%
- \ifcsempty{lemmaseparator@#4}%
- {}%
+ \iftoggle{nolemmaseparatorthisnote@}{\hskip\csuse{inplaceoflemmaseparator@#4}}{\ifcsempty{lemmaseparator@#4}%
+ {\hskip\csuse{inplaceoflemmaseparator@#4}}%
{\nobreak\hskip\csuse{beforelemmaseparator@#4}\csuse{lemmaseparator@#4}\hskip\csuse{afterlemmaseparator@#4}%
- }%
+ }}%
#3\strut\par\allowbreak}
\newcommand*{\twocolfootgroup}[1]{{\notefontsetup
\splittopskip=\ht\strutbox
@@ -1682,7 +1751,7 @@
}
}
\newtoggle{nonumberthisnote@}
-\newcommand{\nonumberthisnote}{\global\toggletrue{nonumberthisnote@}}
+\newtoggle{nolemmaseparatorthisnote@}
\def\beforenumberinfootnote@A{0pt}
\def\beforenumberinfootnote@B{0pt}
\def\beforenumberinfootnote@C{0pt}
@@ -1845,6 +1914,26 @@
}%
}
\newcommandx*{\nolemmaseparator}[1][1]{\lemmaseparator[#1]{}}
+\def\inplaceoflemmaseparator@A{1em}
+\def\inplaceoflemmaseparator@B{1em}
+\def\inplaceoflemmaseparator@C{1em}
+\def\inplaceoflemmaseparator@D{1em}
+\def\inplaceoflemmaseparator@E{1em}
+\def\inplaceoflemmaseparator@Z{1em}
+\newcommandx*{\inplaceoflemmaseparator}[2][1,usedefault]{%
+ \ifstrequal{#1}{}% If arg 1 is empty
+ {%
+ \csdef{inplaceoflemmaseparator@A}{#2}%
+ \csdef{inplaceoflemmaseparator@B}{#2}%
+ \csdef{inplaceoflemmaseparator@C}{#2}%
+ \csdef{inplaceoflemmaseparator@D}{#2}%
+ \csdef{inplaceoflemmaseparator@E}{#2}%
+ \csdef{inplaceoflemmaseparator@Z}{#2}%
+ }%
+ {%
+ \csdef{inplaceoflemmaseparator@#1}{#2}%
+ }%
+}
\def\afternote@A{1em plus.4em minus.4em}
\def\afternote@B{1em plus.4em minus.4em}
\def\afternote@C{1em plus.4em minus.4em}
@@ -1893,7 +1982,6 @@
\newcommand{\printlinefootnote}[2]{%
\iftoggle{nonumberthisnote@}{%Try if the line number must printed for this specific not (by default, yes)
\hspace{\csuse{inplaceofnumber@#2}}%
- \global\togglefalse{nonumberthisnote@}%
}%
{%
{%