summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-09-02 22:41:52 +0000
committerKarl Berry <karl@freefriends.org>2012-09-02 22:41:52 +0000
commitb65f0d960936e701af2377d60458f03cc11558c1 (patch)
tree39ad5d298954a705d0e8390d99b41bb8856c5211 /Master/texmf-dist/tex/latex
parentcef049e8672bfe38ebb3a818e7deb8cd7afae990 (diff)
ledmac (31aug12)
git-svn-id: svn://tug.org/texlive/trunk@27572 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/ledmac/ledmac.sty504
-rw-r--r--Master/texmf-dist/tex/latex/ledmac/ledpar.sty14
2 files changed, 419 insertions, 99 deletions
diff --git a/Master/texmf-dist/tex/latex/ledmac/ledmac.sty b/Master/texmf-dist/tex/latex/ledmac/ledmac.sty
index 1afbb55234b..299240c90ef 100644
--- a/Master/texmf-dist/tex/latex/ledmac/ledmac.sty
+++ b/Master/texmf-dist/tex/latex/ledmac/ledmac.sty
@@ -6,9 +6,9 @@
%%
%% ledmac.dtx (with options: `code')
%%
-%% Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
-%% Copyright 2003 -- 2005 Peter R. Wilson
-%%
+%% Author: Author: Peter Wilson ; Herries Press herries dot press at earthlink dot net ; Maïeul Rouquette maieul at maieul dot net
+%% Copyright 2004, 2005 Peter R. Wilson
+%% 2011- Maïeul Rouquette
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3 of this license or (at your option) any
@@ -18,12 +18,11 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "unmaintained".
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
-%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ledmac}[2012/08/03 v0.17 LaTeX port of EDMAC]
+\ProvidesPackage{ledmac}[2012/09/29 v0.18 LaTeX port of EDMAC]
\newif\ifledfinal
\DeclareOption{final}{\ledfinaltrue}
@@ -31,6 +30,8 @@
\ExecuteOptions{final}
\ProcessOptions*\relax
+\RequirePackage{xargs}
+\RequirePackage{etoolbox}
\ifledfinal
\newcommand*{\showlemma}[1]{#1}
\else
@@ -145,7 +146,6 @@
\line@list@stuff{\jobname.\extensionchars\the\section@num}%
\l@dend@stuff
\setcounter{pstart}{1}
- \firstpstarttrue
}
\newcommand*{\initnumbering@reg}{%
\global\pst@rtedLfalse
@@ -211,12 +211,12 @@
\global\bypage@false
\global\bypstart@true
\else
- \def@tempb{section}
- \ifx\@tempa\@tempb
+ \def\@tempb{section}
+ \ifx\@tempa\@tempb
\global\bypage@false
\global\bypstart@false
- \else
- \led@warn@BadLineation
+ \else
+ \led@warn@BadLineation
\fi
\fi
\fi
@@ -747,16 +747,8 @@
\newcounter{pstart}
\renewcommand{\thepstart}{{\bfseries\@arabic\c@pstart}. }
\newif\ifnumberpstart
-\newif\iffirstpstart
-\firstpstarttrue
\numberpstartfalse
\newcommand*{\pstart}{
-\ifbypstart@\iffirstpstart
- \firstpstartfalse
- \else
- \setline{0}
- \fi
-\fi
\if@nobreak
\let\@oldnobreak\@nobreaktrue
\else
@@ -785,17 +777,22 @@
\l@dzeropenalties
\endgraf\global\num@lines=\prevgraf\egroup
\global\par@line=0
+ \csnumdef{pstartline}{0}
\loop\ifvbox\raw@text
- \do@line
+ \csnumdef{pstartline}{\pstartline+1}%
+ \do@line
+ \ifbypstart@%
+ \ifnumequal{\pstartline}{1}{\setline{1}}{}%
+ \fi
\repeat
\flush@notes
\endgroup
\ignorespaces
\ifnumberpstart
-\addtocounter{pstart}{1}
-\pstartnumtrue
-\fi
- \@oldnobreak}
+ \pstartnumtrue
+ \fi
+ \@oldnobreak
+ \addtocounter{pstart}{1}}
\newcommand*{\l@dzeropenalties}{%
\brokenpenalty \z@ \clubpenalty \z@
@@ -861,7 +858,7 @@
\newcommand*{\getline@num}{%
\ifnumberline
- \global\advance\absline@num \@ne
+ \global\advance\absline@num \@ne
\fi
\do@actions
\do@ballast
@@ -1258,7 +1255,7 @@
\notefontsetup
\footsplitskips
\spaceskip=\z@skip \xspaceskip=\z@skip
- \csname #1footfmt\endcsname #2\egroup}
+ \csname #1footfmt\endcsname #2[#1]\egroup}
\newcommand*{\footsplitskips}{%
\interlinepenalty=\interfootnotelinepenalty
\floatingpenalty=\@MM
@@ -1272,16 +1269,20 @@
\hsize\columnwidth
\@parboxrestore
\color@begingroup
- \csname #1footfmt\endcsname #2\color@endgroup}}
+ \csname #1footfmt\endcsname #2[#1]\color@endgroup}}
\newcommand*{\ledsetnormalparstuff}{%
\normal@pars
\parindent \z@ \parfillskip \z@ \@plus 1fil}
-\newcommand*{\normalfootfmt}[3]{%
- \ledsetnormalparstuff
- {\notenumfont\printlines#1|}\strut\enspace
- {\select@lemmafont#1|#2}\rbracket\enskip#3\strut\par}
-
+\newcommandx*{\normalfootfmt}[4][4=Z]{% 4th arg is optional, for ascendant compatibility
+ \ledsetnormalparstuff%
+ \strut{\printlinefootnote{#1}{#4}}%
+ {\select@lemmafont#1|#2}%
+ \ifcsempty{lemmaseparator@#4}%
+ {}%
+ {\nobreak\hskip\csuse{beforelemmaseparator@#4}\csuse{lemmaseparator@#4}\hskip\csuse{afterlemmaseparator@#4}%
+ }%
+ #3\strut\par}
\def\endashchar{\textnormal{--}}
\newcommand*{\fullstop}{\textnormal{.}}
\newcommand*{\rbracket}{\textnormal{\thinspace]}}
@@ -1296,10 +1297,6 @@
\l@d@eslfalse
\newif\ifl@d@dash
\l@d@dashfalse
-\newif\ifledplinenum
- \ledplinenumtrue
-\newcommand*{\symplinenum}{}
-
\newcommand*{\l@dparsefootspec}[3]{\l@dp@rsefootspec#1|}
\def\l@dp@rsefootspec#1|#2|#3|#4|#5|#6|#7|{%
\gdef\l@dparsedstartpage{#1}%
@@ -1356,14 +1353,13 @@
\fi%
\setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%
\ifl@d@pnum #1\fullstop\fi
- \ifledplinenum \linenumrep{#2}\else \symplinenum\fi
+ \linenumrep{#2}
\ifl@d@ssub \fullstop \sublinenumrep{#3}\fi
\ifl@d@dash \endashchar\fi
\ifl@d@pnum #4\fullstop\fi
\ifl@d@elin \linenumrep{#5}\fi
\ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi
\endgroup}
-
\newcommand*{\normalfootstart}[1]{%
\vskip\skip\csname #1footins\endcsname
\leftskip0pt \rightskip0pt
@@ -1406,6 +1402,7 @@
\footnormal{E}
\newcommand*{\footparagraph}[1]{%
+ \expandafter\newcount\csname prevpage#1@num\endcsname
\expandafter\let\csname #1footstart\endcsname=\parafootstart
\expandafter\let\csname v#1footnote\endcsname=\para@vfootnote
\expandafter\let\csname #1footfmt\endcsname=\parafootfmt
@@ -1416,7 +1413,6 @@
\expandafter\let\csname mp#1footgroup\endcsname=\mppara@footgroup
\count\csname mp#1footins\endcsname=1000
}
-
\providecommand{\footfudgefiddle}{64}
\newcommand*{\para@footsetup}[1]{{\notefontsetup
\dimen0=\baselineskip
@@ -1436,8 +1432,8 @@
\notefontsetup
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
- \noindent\csname #1footfmt\endcsname#2}%
- \setbox0=\hbox{\unvxh0}%
+ \noindent\csname #1footfmt\endcsname#2[#1]}%
+ \setbox0=\hbox{\unvxh0[#1]}%
\dp0=0pt
\ht0=\csname #1footfudgefactor\endcsname\wd0
\box0
@@ -1450,33 +1446,32 @@
\notefontsetup
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
- \noindent\color@begingroup\csname #1footfmt\endcsname #2\color@endgroup}%
- \setbox0=\hbox{\unvxh0}%
+ \noindent\color@begingroup\csname #1footfmt\endcsname #2[#1]\color@endgroup}%
+ \setbox0=\hbox{\unvxh0[#1]}%
\dp0=\z@
\ht0=\csname #1footfudgefactor\endcsname\wd0
\box0
\penalty0
}}
-\newcommand*{\unvxh}[1]{%
+\newcommandx*{\unvxh}[2][2=Z]{% 2th is optional for retro-compatibility
\setbox0=\vbox{\unvbox#1%
\global\setbox1=\lastbox}%
\unhbox1
\unskip % remove \rightskip,
\unskip % remove \parfillskip,
\unpenalty % remove \penalty of 10000,
- \hskip\ipn@skip} % but add the glue to go between the notes
-
-\newskip\ipn@skip
-\newcommand*{\interparanoteglue}[1]{%
- {\notefontsetup\global\ipn@skip=#1 \relax}}
-\interparanoteglue{1em plus.4em minus.4em}
-
-\newcommand*{\parafootfmt}[3]{%
- \insertparafootftmsep%
- \ledsetnormalparstuff
- {\notenumfont\printlines#1|}\enspace
- {\select@lemmafont#1|#2}\rbracket\enskip
+ \hskip\csuse{afternote@#2}} % but add the glue to go between the notes
+
+\newcommandx*{\parafootfmt}[4][4=Z]{%
+ \insertparafootsep{#4}%
+ \ledsetnormalparstuff%
+ \printlinefootnote{#1}{#4}%
+ {\select@lemmafont#1|#2}%
+ \ifcsempty{lemmaseparator@#4}%
+ {}%
+ {\nobreak\hskip\csuse{beforelemmaseparator@#4}\csuse{lemmaseparator@#4}\hskip\csuse{afterlemmaseparator@#4}%
+ }%
#3\penalty-10 }
\newcommand*{\para@footgroup}[1]{%
\unvbox\csname #1footins\endcsname
@@ -1506,13 +1501,17 @@
\newcommand*{\removehboxes}{\setbox0=\lastbox
\ifhbox0{\removehboxes}\unhbox0 \fi}
-\newcommand{\parafootftmsep}{}
-\newcount\prevpage@num
-\newcommand{\insertparafootftmsep}{%
- \ifnum\prevpage@num=\page@num%
- \parafootftmsep%
- \fi%
- \global\prevpage@num=\page@num%
+\newcommand{\insertparafootsep}[1]{%
+ \ifnumequal{\csuse{prevpage#1@num}}{\page@num}%
+ {\ifcsdef{prevline#1}% Be sur \prevline#1 exists.
+ {\ifnumequal{\csuse{prevline#1}}{\line@num}%
+ {\ifcsempty{symplinenum}{\csuse{parafootsep@#1}}{}}%
+ {\csuse{parafootsep@#1}}%
+ }%
+ {\csuse{parafootsep@#1}}%
+ }%
+ {}%
+ \global\csname prevpage#1@num\endcsname=\page@num%
}
\newcount\@k \newdimen\@h
\newcommand*{\rigidbalance}[3]{\setbox0=\box#1 \@k=#2 \@h=#3
@@ -1548,16 +1547,20 @@
\insert\csname #1footins\endcsname\bgroup
\notefontsetup
\footsplitskips
- \csname #1footfmt\endcsname #2\egroup}
-\newcommand*{\threecolfootfmt}[3]{%
+ \csname #1footfmt\endcsname #2[#1]\egroup}
+\newcommandx*{\threecolfootfmt}[4][4=Z]{%
\normal@pars
\hsize .3\hsize
\parindent=0pt
\tolerance=5000
\raggedright
\leavevmode
- \strut{\notenumfont\printlines#1|}\enspace
- {\select@lemmafont#1|#2}\rbracket\enskip
+ \strut{\printlinefootnote{#1}{#4}}%
+ {\select@lemmafont#1|#2}%
+ \ifcsempty{lemmaseparator@#4}%
+ {}%
+ {\nobreak\hskip\csuse{beforelemmaseparator@#4}\csuse{lemmaseparator@#4}\hskip\csuse{afterlemmaseparator@#4}%
+ }%
#3\strut\par\allowbreak}
\newcommand*{\threecolfootgroup}[1]{{\notefontsetup
\splittopskip=\ht\strutbox
@@ -1587,16 +1590,20 @@
\newcommand*{\twocolvfootnote}[2]{\insert\csname #1footins\endcsname\bgroup
\notefontsetup
\footsplitskips
- \csname #1footfmt\endcsname #2\egroup}
-\newcommand*{\twocolfootfmt}[3]{%
+ \csname #1footfmt\endcsname #2[#1]\egroup}
+\newcommandx*{\twocolfootfmt}[4][4=Z]{% 4th arg is optional, for ascendant compatibility
\normal@pars
\hsize .45\hsize
\parindent=0pt
\tolerance=5000
\raggedright
\leavevmode
- \strut{\notenumfont\printlines#1|}\enspace
- {\select@lemmafont#1|#2}\rbracket\enskip
+ \strut{\printlinefootnote{#1}{#4}}%
+ {\select@lemmafont#1|#2}%
+ \ifcsempty{lemmaseparator@#4}%
+ {}%
+ {\nobreak\hskip\csuse{beforelemmaseparator@#4}\csuse{lemmaseparator@#4}\hskip\csuse{afterlemmaseparator@#4}%
+ }%
#3\strut\par\allowbreak}
\newcommand*{\twocolfootgroup}[1]{{\notefontsetup
\splittopskip=\ht\strutbox
@@ -1614,6 +1621,316 @@
\expandafter
\rigidbalance\csname mp#1footins\endcsname \tw@ \splittopskip}}
+\newtoggle{numberonlyfirstinline@A}
+\newtoggle{numberonlyfirstinline@B}
+\newtoggle{numberonlyfirstinline@C}
+\newtoggle{numberonlyfirstinline@D}
+\newtoggle{numberonlyfirstinline@E}
+\newtoggle{numberonlyfirstinline@Z}
+
+\newcommandx{\numberonlyfirstinline}[2][1,2={true}]{%
+ \ifstrempty{#1}{
+ \settoggle{numberonlyfirstinline@A}{#2}
+ \settoggle{numberonlyfirstinline@B}{#2}
+ \settoggle{numberonlyfirstinline@C}{#2}
+ \settoggle{numberonlyfirstinline@D}{#2}
+ \settoggle{numberonlyfirstinline@E}{#2}
+ }
+ {
+ \settoggle{numberonlyfirstinline@#1}{#2}
+ }
+}
+\newif\ifledplinenum
+ \ledplinenumtrue
+\newcommand*{\symplinenum}{}
+\def\symlinenum@A{\symplinenum}
+\def\symlinenum@B{\symplinenum}
+\def\symlinenum@C{\symplinenum}
+\def\symlinenum@D{\symplinenum}
+\def\symlinenum@E{\symplinenum}
+\def\symlinenum@Z{\symplinenum}
+\newcommandx{\symlinenum}[2][1]{%
+ \ifstrequal{#1}{}% If arg 1 is empty
+ {%
+ \csdef{symlinenum@A}{#2}%
+ \csdef{symlinenum@B}{#2}%
+ \csdef{symlinenum@C}{#2}%
+ \csdef{symlinenum@D}{#2}%
+ \csdef{symlinenum@E}{#2}%
+ \csdef{symlinenum@Z}{#2}%
+ }%
+ {%
+ \csdef{symlinenum@#1}{#2}%
+ }
+}
+\newtoggle{nonumberinfootnote@A}
+\newtoggle{nonumberinfootnote@B}
+\newtoggle{nonumberinfootnote@C}
+\newtoggle{nonumberinfootnote@D}
+\newtoggle{nonumberinfootnote@E}
+\newtoggle{nonumberinfootnote@Z}
+\newcommandx{\nonumberinfootnote}[2][1,2={true}]{%
+ \ifstrempty{#1}{
+ \settoggle{nonumberinfootnote@A}{#2}
+ \settoggle{nonumberinfootnote@B}{#2}
+ \settoggle{nonumberinfootnote@C}{#2}
+ \settoggle{nonumberinfootnote@D}{#2}
+ \settoggle{nonumberinfootnote@E}{#2}
+ }
+ {
+ \settoggle{nonumberinfootnote@#1}{#2}
+ }
+}
+\newtoggle{nonumberthisnote@}
+\newcommand{\nonumberthisnote}{\global\toggletrue{nonumberthisnote@}}
+\def\beforenumberinfootnote@A{0pt}
+\def\beforenumberinfootnote@B{0pt}
+\def\beforenumberinfootnote@C{0pt}
+\def\beforenumberinfootnote@D{0pt}
+\def\beforenumberinfootnote@E{0pt}
+\def\beforenumberinfootnote@Z{0pt}
+\newcommandx*{\beforenumberinfootnote}[2][1,usedefault]{%
+ \ifstrequal{#1}{}% If arg 1 is empty
+ {%
+ \csdef{beforenumberinfootnote@A}{#2}%
+ \csdef{beforenumberinfootnote@B}{#2}%
+ \csdef{beforenumberinfootnote@C}{#2}%
+ \csdef{beforenumberinfootnote@D}{#2}%
+ \csdef{beforenumberinfootnote@E}{#2}%
+ \csdef{beforenumberinfootnote@Z}{#2}%
+ }%
+ {%
+ \csdef{beforenumberinfootnote@#1}{#2}%
+ }%
+}
+\def\afternumberinfootnote@A{0.5em}
+\def\afternumberinfootnote@B{0.5em}
+\def\afternumberinfootnote@C{0.5em}
+\def\afternumberinfootnote@D{0.5em}
+\def\afternumberinfootnote@E{0.5em}
+\def\afternumberinfootnote@Z{0.5em}
+\newcommandx*{\afternumberinfootnote}[2][1,usedefault]{%
+ \ifstrequal{#1}{}% If arg 1 is empty
+ {%
+ \csdef{afternumberinfootnote@A}{#2}%
+ \csdef{afternumberinfootnote@B}{#2}%
+ \csdef{afternumberinfootnote@C}{#2}%
+ \csdef{afternumberinfootnote@D}{#2}%
+ \csdef{afternumberinfootnote@E}{#2}%
+ \csdef{afternumberinfootnote@Z}{#2}%
+ }%
+ {%
+ \csdef{afternumberinfootnote@#1}{#2}%
+ }%
+}
+\def\beforesymlinenum@A{\beforenumberinfootnote@A}
+\def\beforesymlinenum@B{\beforenumberinfootnote@B}
+\def\beforesymlinenum@C{\beforenumberinfootnote@C}
+\def\beforesymlinenum@D{\beforenumberinfootnote@D}
+\def\beforesymlinenum@E{\beforenumberinfootnote@E}
+\def\beforesymlinenum@Z{\beforenumberinfootnote@Z}
+\newcommandx*{\beforesymlinenum}[2][1,usedefault]{%
+ \ifstrequal{#1}{}% If arg 1 is empty
+ {%
+ \csdef{beforesymlinenum@A}{#2}%
+ \csdef{beforesymlinenum@B}{#2}%
+ \csdef{beforesymlinenum@C}{#2}%
+ \csdef{beforesymlinenum@D}{#2}%
+ \csdef{beforesymlinenum@E}{#2}%
+ \csdef{beforesymlinenum@Z}{#2}%
+ }%
+ {%
+ \csdef{beforesymlinenum@#1}{#2}%
+ }%
+}
+\def\aftersymlinenum@A{\afternumberinfootnote@A}
+\def\aftersymlinenum@B{\afternumberinfootnote@B}
+\def\aftersymlinenum@C{\afternumberinfootnote@C}
+\def\aftersymlinenum@D{\afternumberinfootnote@D}
+\def\aftersymlinenum@E{\afternumberinfootnote@E}
+\def\aftersymlinenum@Z{\afternumberinfootnote@Z}
+\newcommandx*{\aftersymlinenum}[2][1,usedefault]{%
+ \ifstrequal{#1}{}% If arg 1 is empty
+ {%
+ \csdef{aftersymlinenum@A}{#2}%
+ \csdef{aftersymlinenum@B}{#2}%
+ \csdef{aftersymlinenum@C}{#2}%
+ \csdef{aftersymlinenum@D}{#2}%
+ \csdef{aftersymlinenum@E}{#2}%
+ \csdef{aftersymlinenum@Z}{#2}%
+ }%
+ {%
+ \csdef{aftersymlinenum@#1}{#2}%
+ }%
+}
+\def\inplaceofnumber@A{1em}
+\def\inplaceofnumber@B{1em}
+\def\inplaceofnumber@C{1em}
+\def\inplaceofnumber@D{1em}
+\def\inplaceofnumber@E{1em}
+\def\inplaceofnumber@Z{1em}
+\newcommandx*{\inplaceofnumber}[2][1,usedefault]{%
+ \ifstrequal{#1}{}% If arg 1 is empty
+ {%
+ \csdef{inplaceofnumber@A}{#2}%
+ \csdef{inplaceofnumber@B}{#2}%
+ \csdef{inplaceofnumber@C}{#2}%
+ \csdef{inplaceofnumber@D}{#2}%
+ \csdef{inplaceofnumber@E}{#2}%
+ \csdef{inplaceofnumber@Z}{#2}%
+ }%
+ {%
+ \csdef{inplaceofnumber@#1}{#2}%
+ }%
+}
+\let\lemmaseparator@A\rbracket
+\let\lemmaseparator@B\rbracket
+\let\lemmaseparator@C\rbracket
+\let\lemmaseparator@D\rbracket
+\let\lemmaseparator@E\rbracket
+\let\lemmaseparator@E\rbracket
+\let\lemmaseparator@Z\rbracket
+\newcommandx*{\lemmaseparator}[2][1,usedefault]{%
+ \ifstrequal{#1}{}% If arg 1 is empty
+ {%
+ \csdef{lemmaseparator@A}{#2}%
+ \csdef{lemmaseparator@B}{#2}%
+ \csdef{lemmaseparator@C}{#2}%
+ \csdef{lemmaseparator@D}{#2}%
+ \csdef{lemmaseparator@E}{#2}%
+ \csdef{lemmaseparator@Z}{#2}%
+ }%
+ {%
+ \csdef{lemmaseparator@#1}{#2}%
+ }%
+}
+\def\beforelemmaseparator@A{0em}
+\def\beforelemmaseparator@B{0em}
+\def\beforelemmaseparator@C{0em}
+\def\beforelemmaseparator@D{0em}
+\def\beforelemmaseparator@E{0em}
+\def\beforelemmaseparator@Z{0em}
+\newcommandx*{\beforelemmaseparator}[2][1,usedefault]{%
+ \ifstrequal{#1}{}% If arg 1 is empty
+ {%
+ \csdef{beforelemmaseparator@A}{#2}%
+ \csdef{beforelemmaseparator@B}{#2}%
+ \csdef{beforelemmaseparator@C}{#2}%
+ \csdef{beforelemmaseparator@D}{#2}%
+ \csdef{beforelemmaseparator@E}{#2}%
+ \csdef{beforelemmaseparator@Z}{#2}%
+ }%
+ {%
+ \csdef{beforelemmaseparator@#1}{#2}%
+ }%
+}
+\def\afterlemmaseparator@A{0.5em}
+\def\afterlemmaseparator@B{0.5em}
+\def\afterlemmaseparator@C{0.5em}
+\def\afterlemmaseparator@D{0.5em}
+\def\afterlemmaseparator@E{0.5em}
+\def\afterlemmaseparator@Z{0.5em}
+\newcommandx*{\afterlemmaseparator}[2][1,usedefault]{%
+ \ifstrequal{#1}{}% If arg 1 is empty
+ {%
+ \csdef{afterlemmaseparator@A}{#2}%
+ \csdef{afterlemmaseparator@B}{#2}%
+ \csdef{afterlemmaseparator@C}{#2}%
+ \csdef{afterlemmaseparator@D}{#2}%
+ \csdef{afterlemmaseparator@E}{#2}%
+ \csdef{afterlemmaseparator@Z}{#2}%
+ }%
+ {%
+ \csdef{afterlemmaseparator@#1}{#2}%
+ }%
+}
+\newcommandx*{\nolemmaseparator}[1][1]{\lemmaseparator[#1]{}}
+\def\afternote@A{1em plus.4em minus.4em}
+\def\afternote@B{1em plus.4em minus.4em}
+\def\afternote@C{1em plus.4em minus.4em}
+\def\afternote@D{1em plus.4em minus.4em}
+\def\afternote@E{1em plus.4em minus.4em}
+\def\afternote@Z{1em plus.4em minus.4em}
+\newcommandx*{\afternote}[2][1,usedefault]{%
+ \ifstrequal{#1}{}% If arg 1 is empty
+ {%
+ \csdef{afternote@A}{#2}%
+ \csdef{afternote@B}{#2}%
+ \csdef{afternote@C}{#2}%
+ \csdef{afternote@D}{#2}%
+ \csdef{afternote@E}{#2}%
+ \csdef{afternote@Z}{#2}%
+ }%
+ {%
+ \csdef{afternote@#1}{#2}%
+ }%
+}
+\newskip\ipn@skip
+\newcommand*{\interparanoteglue}[1]{%
+ {\notefontsetup\global\ipn@skip=#1 \relax}}
+\interparanoteglue{1em plus.4em minus.4em}
+\newcommand{\parafootftmsep}{}
+\def\parafootsep@A{\parafootftmsep}
+\def\parafootsep@B{\parafootftmsep}
+\def\parafootsep@C{\parafootftmsep}
+\def\parafootsep@D{\parafootftmsep}
+\def\parafootsep@E{\parafootftmsep}
+\def\parafootsep@Z{\parafootftmsep}
+\newcommandx*{\parafootsep}[2][1,usedefault]{%
+ \ifstrequal{#1}{}% If arg 1 is empty
+ {%
+ \csdef{parafootsep@A}{#2}%
+ \csdef{parafootsep@B}{#2}%
+ \csdef{parafootsep@C}{#2}%
+ \csdef{parafootsep@D}{#2}%
+ \csdef{parafootsep@E}{#2}%
+ \csdef{parafootsep@Z}{#2}%
+ }%
+ {%
+ \csdef{parafootsep@#1}{#2}%
+ }%
+}
+\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@}%
+ }%
+ {%
+ {%
+ \iftoggle{nonumberinfootnote@#2}%Try if the line number must printed (by default, yes)
+ {%
+ \hspace{\csuse{inplaceofnumber@#2}}%
+ }%
+ {%
+ {\iftoggle{numberonlyfirstinline@#2}% If for this series the line number must be printed only in the first time.
+ {%
+ \ifcsdef{prevline#2}%
+ {%Be sure the \prevline exists.
+ \ifnumequal{\csuse{prevline#2}}{\line@num}%Try it
+ {%
+ \ifcsstring{symlinenum@#2}{}% Try if a symbol is define
+ {%
+ \hspace{\csuse{inplaceofnumber@#2}}%
+ }%
+ {\hspace{\csuse{beforesymlinenum@#2}}\notenumfont\csuse{symlinenum@#2}\hspace{\csuse{aftersymlinenum@#2}}}%
+ }%
+ {%
+ \hspace{\csuse{beforenumberinfootnote@#2}}\notenumfont\printlines#1|\hspace{\csuse{afternumberinfootnote@#2}}%
+ }%
+ }%
+ {%
+ \hspace{\csuse{beforenumberinfootnote@#2}}\notenumfont\printlines#1|\hspace{\csuse{afternumberinfootnote@#2}}%
+ }%
+ }%
+ {%
+ \hspace{\csuse{beforenumberinfootnote@#2}}\notenumfont\printlines#1|\hspace{\csuse{afternumberinfootnote@#2}}%
+ }%
+ \csnumgdef{prevline#2}{\line@num}%
+ }%
+ }%
+ }%
+ }%
+}
\countdef\pageno=0 \pageno=1
\newcommand*{\advancepageno}{\ifnum\pageno<\z@ \global\advance\pageno\m@ne
\else\global\advance\pageno\@ne\fi}
@@ -1793,7 +2110,7 @@
\else
\gl@p\labelref@list\to\label@refs
\ifvmode
- \advancelabel@refs
+ \advancelabel@refs
\fi
\fi
\protected@write\@auxout{}%
@@ -1801,19 +2118,19 @@
\@esphack}
\newcommand{\advancelabel@refs}{%
-\newcount\line%
-\ledmac@warning{\label@refs}
-\line=\expandafter\labelrefsparseline\label@refs%
-\advance\line by 1%
-\ifsublines@%
-\newcount\subline%
-\subline=\labelrefsparsesubline\label@refs%
-\advance\subline by 1%
-\def\label@refs{\the\line|\the\subline}%
-\else%
-\def\label@refs{\the\line|0}%
-\fi%
-}
+ \newcount\line%
+ \ledmac@warning{\label@refs}
+ \line=\expandafter\labelrefsparseline\label@refs%
+ \advance\line by 1%
+ \ifsublines@%
+ \newcount\subline%
+ \subline=\labelrefsparsesubline\label@refs%
+ \advance\subline by 1%
+ \def\label@refs{\the\line|\the\subline}%
+ \else%
+ \def\label@refs{\the\line|0}%
+ \fi%
+ }
\def\labelrefsparseline#1|#2{#1}
\def\labelrefsparsesubline#1|#2{#2}
\newcommand*{\l@dmake@labels}{}
@@ -2339,6 +2656,7 @@
\rigidbalance\csname mpfootins#1\endcsname \thr@@ \splittopskip}}
\newcommand*{\footparagraphX}[1]{%
+ \expandafter\newcount\csname prevpage#1@num\endcsname
\expandafter\let\csname footstart#1\endcsname=\parafootstartX
\expandafter\let\csname regvfootnote#1\endcsname=\para@vfootnoteX
\expandafter\let\csname footfmt#1\endcsname=\parafootfmtX
@@ -2373,7 +2691,7 @@
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
\noindent\@nameuse{footfmt#1}{#1}{#2}}%
- \setbox0=\hbox{\unvxh0}%
+ \setbox0=\hbox{\unvxh0[#1]}%
\dp0=\z@
\ht0=\csname footfudgefactor#1\endcsname\wd0
\box0
@@ -2386,14 +2704,14 @@
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
\noindent\color@begingroup\@nameuse{footfmt#1}{#1}{#2}\color@endgroup}%
- \setbox0=\hbox{\unvxh0}%
+ \setbox0=\hbox{\unvxh0[#1]}%
\dp0=\z@
\ht0=\csname footfudgefactor#1\endcsname\wd0
\box0
\penalty0}}
\newcommand*{\parafootfmtX}[2]{%
- \insertparafootftmsep
+ \insertparafootsep{#1}%
\ledsetnormalparstuff
{\notenumfont\@nameuse{footfootmark#1}\strut%\enspace
#2\penalty-10}}
@@ -2690,9 +3008,9 @@
\newif\ifinserthangingsymbol
\newcommand{\inserthangingsymbol}{%
\ifinserthangingsymbol%
-\ifinstanza%
-\hfill\hangingsymbol%
-\fi%
+ \ifinstanza%
+ \hfill\hangingsymbol%
+ \fi%
\fi%
}
\newcommand*{\ampersand}{\char`\&}
@@ -2744,11 +3062,11 @@
\hangafter\@ne}
\def\sza@penalty{\count@\csname szp@\number\stanza@count @\endcsname
\ifnum\count@>\@M\advance\count@-\@M\penalty-\else
- \penalty\fi\count@}
+ \penalty\fi\count@}
\let\startstanzahook\relax
\let\endstanzaextra\relax
\xdef\stanza{\noexpand\instanzatrue\expandafter
- \begingroup\startstanzahook%
+ \begingroup\startstanzahook%
\catcode`\&\active\global\stanza@count\@ne\stanza@modulo\@ne
\noexpand\ifnum\expandafter\noexpand
\csname sza@0@\endcsname=\z@\let\noexpand\stanza@hang\relax
diff --git a/Master/texmf-dist/tex/latex/ledmac/ledpar.sty b/Master/texmf-dist/tex/latex/ledmac/ledpar.sty
index ff1018f0e2d..7c388ec8882 100644
--- a/Master/texmf-dist/tex/latex/ledmac/ledpar.sty
+++ b/Master/texmf-dist/tex/latex/ledmac/ledpar.sty
@@ -6,9 +6,9 @@
%%
%% ledpar.dtx (with options: `code')
%%
-%% Author: Author: Peter Wilson Maïeul Rouquette maieul at maieul dot net (Herries Press) herries dot press at earthlink dot net
+%% Author: Author: Peter Wilson ; Herries Press herries dot press at earthlink dot net ; Maïeul Rouquette maieul at maieul dot net
%% Copyright 2004, 2005 Peter R. Wilson
-%%
+%% 2011- Maïeul Rouquette
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3 of this license or (at your option) any
@@ -18,13 +18,13 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
-%% This work has the LPPL maintenance status "unmaintained".
+%% This work has the LPPL maintenance status "maintained".
%%
%% This work consists of the files listed in the README file.
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ledpar}[2012/08/03 v0.12 ledmac extension for parallel texts]
+\ProvidesPackage{ledpar}[2012/08/30 v0.13 ledmac extension for parallel texts]
\newif\ifshiftedverses
\shiftedversesfalse
@@ -567,9 +567,11 @@
\fi}
\providecommand*{\@pend}[1]{}
\renewcommand*{\@pend}[1]{%
+ \ifbypstart@\global\line@num=0\fi%
\xright@appenditem{#1}\to\linesinpar@listL}
\providecommand*{\@pendR}[1]{}
\renewcommand*{\@pendR}[1]{%
+ \ifbypstart@R\global\line@numR=0\fi
\xright@appenditem{#1}\to\linesinpar@listR}
\providecommand*{\@lopL}[1]{}
@@ -2121,7 +2123,7 @@
\ifbypstart@
\ifnum\value{pstartL}<\value{pstartLold}
\else
- \setline{0}
+ \global\line@num=0
\fi
\fi
\addtocounter{pstartL}{1}
@@ -2149,7 +2151,7 @@
\ifbypstart@R
\ifnum\value{pstartR}<\value{pstartRold}
\else
- \write\linenum@outR{\string\@set[0]}
+ \global\line@numR=0
\fi
\fi
\addtocounter{pstartR}{1}