diff options
author | Karl Berry <karl@freefriends.org> | 2013-12-18 22:03:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-12-18 22:03:54 +0000 |
commit | 00be60da8df9f90d4ad3914ed813951c0639b409 (patch) | |
tree | d5bcf7fdfd0e514b240cd782008473fa76b10f8a /Master/texmf-dist/tex/latex/eledmac | |
parent | 2953c24114166c782e7828ec3aaf9b8d594ef9d1 (diff) |
eledmac (18dec13)
git-svn-id: svn://tug.org/texlive/trunk@32441 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/eledmac')
-rw-r--r-- | Master/texmf-dist/tex/latex/eledmac/eledmac.sty | 317 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/eledmac/eledpar.sty | 152 |
2 files changed, 354 insertions, 115 deletions
diff --git a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty index 5061da66731..275bad0fc5e 100644 --- a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty +++ b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty @@ -24,17 +24,20 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{eledmac}[2013/11/08 v1.7.0 LaTeX port of EDMAC] +\ProvidesPackage{eledmac}[2013/12/15 v1.8.1 LaTeX port of EDMAC] \newif\ifledfinal \newif\ifparapparatus@ \newif\ifnoquotation@ \newif\iflednopbinverse +\newif\ifparledgroup +\newif\ifledsecnolinenumber \parapparatus@false \DeclareOption{noquotation}{\noquotation@true} \DeclareOption{final}{\ledfinaltrue} \DeclareOption{draft}{\ledfinalfalse} \DeclareOption{parapparatus}{\parapparatus@true} \DeclareOption{nopbinverse}{\lednopbinversetrue} +\DeclareOption{ledsecnolinenumber}{\ledsecnolinenumbertrue} \ExecuteOptions{final} \ProcessOptions*\relax @@ -179,48 +182,49 @@ \global\let\next@page@num=\relax \global\let\sub@change=\relax \resetprevline@ + \resetprevpage@num } \newcommand{\initnumbering@sectcmd}{ \newcommand{\ledsection}[2][]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering% + \ifl@dpairing\else\leavevmode\fi\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi%% \pstart% - \leavevmode\section[##1]{##2}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\section[##1]{##2}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend% \vspace{-2\parskip}\vspace{-2\baselineskip}% \ifautopar\else\pstart\fi } \WithSuffix\newcommand\ledsection*[1]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering% + \ifl@dpairing\else\leavevmode\fi\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% \pstart% - \leavevmode\section*{##1}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\section*{##1}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend% \vspace{-2\parskip}\vspace{-2\baselineskip}% \ifautopar\else\pstart\fi } \newcommand{\ledsubsection}[2][]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering% + \ifl@dpairing\else\leavevmode\fi\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% \pstart% - \leavevmode\subsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% \vspace{-2\parskip}\vspace{-2\baselineskip}% \ifautopar\else\pstart\fi } \WithSuffix\newcommand\ledsubsection*[1]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering% + \ifl@dpairing\else\leavevmode\fi\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% \pstart% - \leavevmode\subsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% \vspace{-2\parskip}\vspace{-2\baselineskip}% \ifautopar\else\pstart\fi } \newcommand{\ledsubsubsection}[2][]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering% + \ifl@dpairing\else\leavevmode\fi\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% \pstart% - \leavevmode\subsubsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsubsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% \vspace{-2\parskip}\vspace{-2\baselineskip}% \ifautopar\else\pstart\fi } \WithSuffix\newcommand\ledsubsubsection*[1]{% - \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering% + \ifl@dpairing\else\leavevmode\fi\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\ifl@dpairing\else\skipnumbering\fi% \pstart% - \leavevmode\subsubsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% + \leavevmode\ifledsecnolinenumber\skipnumbering\fi\subsubsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend% \vspace{-2\parskip}\vspace{-2\baselineskip}% \ifautopar\else\pstart\fi } @@ -492,6 +496,10 @@ \def\do##1{\global\csundef{prevline##1}}% \dolistloop{\@series}% } +\newcommand*{\resetprevpage@num}{% + \def\do##1{\ifcsdef{prevpage##1@num}{\global\csname prevpage##1@num\endcsname=0}{}}% + \dolistloop{\@series}% +} \newread\@inputcheck \newcommand*{\read@linelist}[1]{% \list@clearing@reg @@ -597,10 +605,10 @@ \newcommand*{\sub@on}{\ifsublines@ \let\sub@change=\relax \else - \def\sub@change{1}% + \def\sub@changes{1}% \fi} \newcommand*{\sub@off}{\ifsublines@ - \def\sub@change{-1}% + \def\sub@changes{-1}% \else \let\sub@change=\relax \fi} @@ -1151,7 +1159,7 @@ \fi} \newcommand*{\affixline@num}{% -\ifnumberline +\ifledgroupnotesL@\else\ifnumberline \ifl@dskipnumber \global\l@dskipnumberfalse \else @@ -1213,6 +1221,7 @@ \f@x@l@cks \fi \fi +\fi } \newcommand*{\ch@cksub@l@ck}{% @@ -1556,9 +1565,21 @@ \newcommand*{\mpnormalfootgroup}[1]{{ \vskip\skip\@nameuse{mp#1footins} - \normalcolor - \@nameuse{#1footnoterule} - {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}} + \ifl@dpairing\ifparledgroup% + \leavevmode\marks\parledgroup@{begin}% + \marks\parledgroup@series{#1}% + \marks\parledgroup@type{Xfootnote}% + \fi\fi\normalcolor% + \ifparledgroup% + \ifl@dpairing% + \else% + \@nameuse{#1footnoterule}% + \fi% + \else% + \@nameuse{#1footnoterule}% + \fi% + \setlength{\parindent}{0pt} + {\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}} \unvbox\csname mp#1footins\endcsname}} \newcommand*{\ledfootinsdim}{0.8\vsize} % kept for backward compatibility, should'nt be used anymore. @@ -1679,8 +1700,19 @@ \newcommand*{\mppara@footgroup}[1]{{% \vskip\skip\@nameuse{mp#1footins} - \normalcolor - \@nameuse{#1footnoterule}% + \ifl@dpairing\ifparledgroup% + \leavevmode\marks\parledgroup@{begin}% + \marks\parledgroup@series{#1}% + \marks\parledgroup@type{Xfootnote}% + \fi\fi\normalcolor + \ifparledgroup% + \ifl@dpairing% + \else% + \@nameuse{#1footnoterule}% + \fi% + \else% + \@nameuse{#1footnoterule}% + \fi% \unvbox\csname mp#1footins\endcsname \makehboxofhboxes \setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}}\unhbox0 \removehboxes}% @@ -1768,8 +1800,19 @@ \rigidbalance\csname #1footins\endcsname \thr@@ \splittopskip}} \newcommand*{\mpthreecolfootgroup}[1]{{% \vskip\skip\@nameuse{mp#1footins} - \normalcolor - \@nameuse{#1footnoterule} + \ifl@dpairing\ifparledgroup% + \leavevmode\marks\parledgroup@{begin}% + \marks\parledgroup@series{#1}% + \marks\parledgroup@type{Xfootnote}% + \fi\fi\normalcolor + \ifparledgroup% + \ifl@dpairing% + \else% + \@nameuse{#1footnoterule}% + \fi% + \else% + \@nameuse{#1footnoterule}% + \fi% {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par \splittopskip=\ht\strutbox \expandafter @@ -1819,8 +1862,19 @@ \multiply\dimen\csname mp#1footins\endcsname \tw@} \newcommand*{\mptwocolfootgroup}[1]{{% \vskip\skip\@nameuse{mp#1footins} - \normalcolor - \@nameuse{#1footnoterule} + \ifl@dpairing\ifparledgroup% + \leavevmode\marks\parledgroup@{begin}% + \marks\parledgroup@series{#1}% + \marks\parledgroup@type{Xfootnote}% + \fi\fi\normalcolor + \ifparledgroup% + \ifl@dpairing% + \else% + \@nameuse{#1footnoterule}% + \fi% + \else% + \@nameuse{#1footnoterule}% + \fi% {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par \splittopskip=\ht\strutbox \expandafter @@ -1942,8 +1996,19 @@ \newcommand*{\mpnormalfootgroupX}[1]{% \vskip\skip\@nameuse{mpfootins#1} - \normalcolor - \@nameuse{footnoterule#1} + \ifl@dpairing\ifparledgroup% + \leavevmode\marks\parledgroup@{begin}% + \marks\parledgroup@series{#1}% + \marks\parledgroup@type{footnoteX}% + \fi\fi\normalcolor + \ifparledgroup% + \ifl@dpairing% + \else% + \@nameuse{footnoterule#1}% + \fi% + \else% + \@nameuse{footnoterule#1}% + \fi% \unvbox\@nameuse{mpfootins#1}} \newcommand{\normalbfnoteX}[2]{% @@ -2031,8 +2096,19 @@ \rigidbalance\csname footins#1\endcsname \tw@ \splittopskip}} \newcommand*{\mptwocolfootgroupX}[1]{{% \vskip\skip\@nameuse{mpfootins#1} - \normalcolor - \@nameuse{footnoterule#1} + \ifl@dpairing\ifparledgroup% + \leavevmode\marks\parledgroup@{begin}% + \marks\parledgroup@series{#1}% + \marks\parledgroup@type{footnoteX}% + \fi\fi\normalcolor + \ifparledgroup% + \ifl@dpairing% + \else% + \@nameuse{footnoterule#1}% + \fi% + \else% + \@nameuse{footnoterule#1}% + \fi% \splittopskip=\ht\strutbox \expandafter \rigidbalance\csname mpfootins#1\endcsname \tw@ \splittopskip}} @@ -2081,8 +2157,19 @@ \rigidbalance\csname footins#1\endcsname \thr@@ \splittopskip}} \newcommand*{\mpthreecolfootgroupX}[1]{{% \vskip\skip\@nameuse{mpfootins#1} - \normalcolor - \@nameuse{footnoterule#1} + \ifl@dpairing\ifparledgroup + \leavevmode\marks\parledgroup@{begin}% + \marks\parledgroup@series{#1}% + \marks\parledgroup@type{footnoteX}% + \fi\fi\normalcolor + \ifparledgroup% + \ifl@dpairing% + \else% + \@nameuse{footnoterule#1}% + \fi% + \else% + \@nameuse{footnoterule#1}% + \fi% \splittopskip=\ht\strutbox \expandafter \rigidbalance\csname mpfootins#1\endcsname \thr@@ \splittopskip}} @@ -2168,8 +2255,20 @@ \noindent\unhbox0\par} \newcommand*{\mppara@footgroupX}[1]{{% \vskip\skip\@nameuse{mpfootins#1} - \normalcolor - \@nameuse{footnoterule#1} + \ifl@dpairing\ifparledgroup + \leavevmode% + \leavevmode\marks\parledgroup@{begin}% + \marks\parledgroup@series{#1}% + \marks\parledgroup@type{footnoteX}% + \fi\fi\normalcolor + \ifparledgroup% + \ifl@dpairing% + \else% + \@nameuse{footnoterule#1}% + \fi% + \else% + \@nameuse{footnoterule#1}% + \fi% \unvbox\csname mpfootins#1\endcsname \makehboxofhboxes \setbox0=\hbox{\unhbox0 \removehboxes}% @@ -2206,6 +2305,67 @@ \g@addto@macro{\l@dfamendmini}{% \ifvoid\@nameuse{mpfootins#1}\else\@nameuse{mpfootgroup#1}{#1}\fi}% } +\newwrite\l@d@end +\newif\ifl@dend@ +\newcommand{\l@dend@open}[1]{\global\l@dend@true\immediate\openout\l@d@end=#1\relax} +\newcommand{\l@dend@close}{\global\l@dend@false\immediate\closeout\l@d@end} + +\newcommand{\l@dend@stuff}{% + \ifl@dend@\relax\else + \l@dend@open{\jobname.end}% + \fi + \immediate\write\l@d@end{\string\l@d@section{\the\section@num}}} + +\def\endprint#1#2#3#4{{\csuse{bhookXendnote@#4}\csuse{Xendnotefontsize@#4}{\csuse{Xendnotenumfont@#4}\printendlines#1|}% + \enspace{\select@lemmafont#1|#2}\enskip#3\par}} +\providecommand*{\@gobblethree}[3]{} + +\let\l@d@section=\@gobble + +\newcommand*{\setprintendlines}[6]{% + \l@d@pnumfalse \l@d@dashfalse + \ifnum#4=#1 \else + \l@d@pnumtrue + \l@d@dashtrue + \fi + \ifl@d@pnum \l@d@elintrue \else \l@d@elinfalse \fi + \ifnum#2=#5 \else + \l@d@elintrue + \l@d@dashtrue + \fi + \l@d@ssubfalse + \ifnum#3=0 \else + \l@d@ssubtrue + \fi + \l@d@eslfalse + \ifnum#6=0 \else + \ifnum#6=#3 + \ifl@d@elin \l@d@esltrue \else \l@d@eslfalse \fi + \else + \l@d@esltrue + \l@d@dashtrue + \fi + \fi} +\def\printendlines#1|#2|#3|#4|#5|#6|#7|{\begingroup + \setprintendlines{#1}{#2}{#3}{#4}{#5}{#6}% + \printnpnum{#1} \linenumrep{#2}% + \ifl@d@ssub \fullstop \sublinenumrep{#3}\fi + \ifl@d@dash \endashchar\fi + \ifl@d@pnum \printnpnum{#4}\fi + \ifl@d@elin \linenumrep{#5}\fi + \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi +\endgroup} + +\newcommand*{\printnpnum}[1]{p.#1) } + +\newcommand*{\doendnotes}[1]{\l@dend@close + \begingroup + \makeatletter + \expandafter\let\csname #1end\endcsname=\endprint + \input\jobname.end + \endgroup} +\newcommand*{\noendnotes}{\global\let\l@dend@stuff=\relax + \global\chardef\l@d@end=16 } \newcommand{\newseries}[1]{% \def\do##1{\newseries@{##1}}% \docsvlist{#1} @@ -2357,7 +2517,10 @@ \newcommandx{\setcommand@series}[4][4]{% \def\do##1{ \csgdef{#2@##1}{#3} - \ifstrequal{#4}{reload}{\csuse{foot\csuse{series@display##1}}{##1}}{}} + \ifstrequal{#4}{reload}{ + \csuse{foot\csuse{series@display##1}}{##1} + \csuse{foot\csuse{series@displayX##1}}{##1} + }{}} \ifstrempty{#1}{% \dolistloop{\@series}% }% @@ -2790,67 +2953,6 @@ \newcommand*{\edmakelabel}[2]{\expandafter\xdef\csname the@label#1\endcsname{#2}} -\newwrite\l@d@end -\newif\ifl@dend@ -\newcommand{\l@dend@open}[1]{\global\l@dend@true\immediate\openout\l@d@end=#1\relax} -\newcommand{\l@dend@close}{\global\l@dend@false\immediate\closeout\l@d@end} - -\newcommand{\l@dend@stuff}{% - \ifl@dend@\relax\else - \l@dend@open{\jobname.end}% - \fi - \immediate\write\l@d@end{\string\l@d@section{\the\section@num}}} - -\def\endprint#1#2#3#4{{\csuse{bhookXendnote@#4}\csuse{Xendnotefontsize@#4}{\csuse{Xendnotenumfont@#4}\printendlines#1|}% - \enspace{\select@lemmafont#1|#2}\enskip#3\par}} -\providecommand*{\@gobblethree}[3]{} - -\let\l@d@section=\@gobble - -\newcommand*{\setprintendlines}[6]{% - \l@d@pnumfalse \l@d@dashfalse - \ifnum#4=#1 \else - \l@d@pnumtrue - \l@d@dashtrue - \fi - \ifl@d@pnum \l@d@elintrue \else \l@d@elinfalse \fi - \ifnum#2=#5 \else - \l@d@elintrue - \l@d@dashtrue - \fi - \l@d@ssubfalse - \ifnum#3=0 \else - \l@d@ssubtrue - \fi - \l@d@eslfalse - \ifnum#6=0 \else - \ifnum#6=#3 - \ifl@d@elin \l@d@esltrue \else \l@d@eslfalse \fi - \else - \l@d@esltrue - \l@d@dashtrue - \fi - \fi} -\def\printendlines#1|#2|#3|#4|#5|#6|#7|{\begingroup - \setprintendlines{#1}{#2}{#3}{#4}{#5}{#6}% - \printnpnum{#1} \linenumrep{#2}% - \ifl@d@ssub \fullstop \sublinenumrep{#3}\fi - \ifl@d@dash \endashchar\fi - \ifl@d@pnum \printnpnum{#4}\fi - \ifl@d@elin \linenumrep{#5}\fi - \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi -\endgroup} - -\newcommand*{\printnpnum}[1]{p.#1) } - -\newcommand*{\doendnotes}[1]{\l@dend@close - \begingroup - \makeatletter - \expandafter\let\csname #1end\endcsname=\endprint - \input\jobname.end - \endgroup} -\newcommand*{\noendnotes}{\global\let\l@dend@stuff=\relax - \global\chardef\l@d@end=16 } \let\l@dold@xympar\@xympar \renewcommand{\@xympar}{% \ifnumberedpar@ @@ -3002,7 +3104,17 @@ \flush@notes \fi \fi - \def\do##1{\ifvoid\csuse{mp##1footins}\else\csuse{mp##1footgroup}{##1}\fi}% + \def\do##1{ + \ifvoid\csuse{mp##1footins}\else% + \ifl@dpairing\ifparledgroup% + \ifledRcol% + \dimgdef{\parledgroup@beforenotesR}{\parledgroup@beforenotesR+\skip\@nameuse{mp##1footins}} + \else% + \dimgdef{\parledgroup@beforenotesL}{\parledgroup@beforenotesL+\skip\@nameuse{mp##1footins}} + \fi% + \fi\fi% + \csuse{mp##1footgroup}{##1}% + \fi}% \dolistloop{\@series}% } @@ -3045,11 +3157,20 @@ \vskip\skip\@mpfootins \normalcolor \footnoterule + \ifparledgroup + \ifl@dpairing + \ifledRcol + \dimgdef{\parledgroup@beforenotesR}{\parledgroup@beforenotesR+\skip\@mpfootins} + \else + \dimgdef{\parledgroup@beforenotesL}{\parledgroup@beforenotesL+\skip\@mpfootins} + \fi + \fi + \fi \unvbox\@mpfootins} \newif\if@ledgroup \newenvironment{ledgroup}{% - \@ledgrouptrue\def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@ + \resetprevpage@num\@ledgrouptrue\def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@ \let\@footnotetext\@mpfootnotetext \l@dfeetbeginmini% }{% @@ -3091,6 +3212,8 @@ \@ledgroupfalse% } +\newif\ifledgroupnotesL@ +\newif\ifledgroupnotesR@ \newcommand{\pagelinesep}{-} \newcommand{\edindexlab}{$&} \newcounter{labidx} diff --git a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty index 18890617f82..d8b6334c180 100644 --- a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty +++ b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty @@ -24,13 +24,14 @@ %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{eledpar}[2013/11/08 v1.5.0 eledmac extension for parallel texts] +\ProvidesPackage{eledpar}[2013/12/13 v1.6.0 eledmac extension for parallel texts] \newif\ifshiftedpstarts \let\shiftedversestrue\shiftedpstartstrue \let\shiftedversesfalse\shiftedpstartsfalse \DeclareOption{shiftedverses}{\shiftedpstartstrue} \DeclareOption{shiftedpstarts}{\shiftedpstartstrue} +\DeclareOption{parledgroup}{\parledgrouptrue} \ProcessOptions \l@dpairingfalse \newif\ifl@dpaging @@ -124,10 +125,10 @@ \newcounter{subsectionR} \newcounter{subsubsectionR} \newcommand{\initnumbering@sectcountR}{ -\let\c@chapter\c@chapterR -\let\c@section\c@sectionR -\let\c@subsection\c@subsectionR -\let\c@subsubsection\c@subsubsectionR + \let\c@chapter\c@chapterR + \let\c@section\c@sectionR + \let\c@subsection\c@subsectionR + \let\c@subsubsection\c@subsubsectionR } \newcommand*{\pausenumberingR}{% \endnumberingR\global\numberingRtrue} @@ -932,9 +933,11 @@ \endgroup% \ignorespaces% \@oldnobreak% - \ifnumberpstart% + \ifnumberpstart% \addtocounter{pstartL}{1}% - \fi} + \fi + \parledgroup@beforenotes@save{L}% + } \newcommand*{\pendR}{\ifnumberingR \else% \led@err@PendNotNumbered% @@ -948,9 +951,10 @@ \endgroup% \ignorespaces% \@oldnobreak% - \ifnumberpstart% + \ifnumberpstart% \addtocounter{pstartR}{1}% - \fi% + \fi% + \parledgroup@beforenotes@save{R} } \newbox\l@dleftbox @@ -975,6 +979,7 @@ \l@demptyd@ta \global\setbox\one@line=\vsplit\namebox{l@dLcolrawbox\the\l@dpscL} to\baselineskip}% + \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startL}{} \unvbox\one@line \global\setbox\one@line=\lastbox \getline@numL \ifnum\@lock>\@ne\inserthangingsymboltrue\else\inserthangingsymbolfalse\fi @@ -1011,6 +1016,7 @@ \l@demptyd@ta \global\setbox\one@lineR=\vsplit\namebox{l@dRcolrawbox\the\l@dpscR} to\baselineskip}% + \IfStrEq{\splitfirstmarks\parledgroup@}{begin}{\parledgroup@notes@startR}{} \unvbox\one@lineR \global\setbox\one@lineR=\lastbox \getline@numR \ifnum\@lockR>\@ne\inserthangingsymbolRtrue\else\inserthangingsymbolRfalse\fi @@ -1037,7 +1043,7 @@ \global\advance\absline@numR \@ne \do@actionsR \do@ballastR -\ifnumberline +\ifledgroupnotesR@\else\ifnumberline \ifsublines@ \ifnum\sub@lockR<\tw@ \global\advance\subline@numR \@ne @@ -1049,12 +1055,13 @@ \fi \fi \fi +\fi } \newcommand*{\getline@numL}{% \global\advance\absline@num \@ne \do@actions \do@ballast -\ifnumberline +\ifledgroupnotesL@\else\ifnumberline \ifsublines@ \ifnum\sub@lock<\tw@ \global\advance\subline@num \@ne @@ -1066,6 +1073,7 @@ \fi \fi \fi +\fi } \newcommand*{\do@ballastR}{\global\ballast@count=\z@ @@ -1200,7 +1208,7 @@ \fi} \newcommand*{\affixline@numR}{% -\ifnumberline +\ifledgroupnotesR@\else\ifnumberline \ifl@dskipnumber \global\l@dskipnumberfalse \else @@ -1243,6 +1251,7 @@ \fi \f@x@l@cksR \fi +\fi \fi} \newcommand*{\affixpstart@numL}{% @@ -1518,8 +1527,8 @@ \footnotelang@lua[R]% \fi \@ifundefined{xpg@main@language}%if polyglossia -{}% -{\footnotelang@poly[R]}% + {}% + {\footnotelang@poly[R]}% \protected@csxdef{thisfootnote}{\csuse{thefootnote#1}}% \xright@appenditem{\noexpand\vbfnoteX{#1}{#2}{\csexpandonce{thisfootnote}}}% \to\inserts@listR @@ -1529,8 +1538,8 @@ \footnotelang@lua% \fi \@ifundefined{xpg@main@language}%if polyglossia -{}% -{\footnotelang@poly}% + {}% + {\footnotelang@poly}% \protected@csxdef{thisfootnote}{\csuse{thefootnote#1}}% \xright@appenditem{\noexpand\vbfnoteX{#1}{#2}{\csexpandonce{thisfootnote}}}% \to\inserts@list @@ -1863,6 +1872,7 @@ \newcommand*{\Pages}{% \setcounter{pstartL}{\value{pstartLold}} \setcounter{pstartR}{\value{pstartRold}} + \parledgroup@notespacing@set@correction \typeout{} \typeout{*************************** PAGES ***************************} \ifnum\l@dnumpstartsL=\l@dnumpstartsR\else @@ -1909,15 +1919,14 @@ \l@duselanguage{\theledlanguageL}% %%% \begingroup { \loop\ifl@dsamepage - \do@lineL \advance\numpagelinesL \@ne \ifshiftedpstarts \ifdim\ht\l@dleftbox>0pt\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}\fi% \else% + \parledgroup@correction@notespacing{L} \hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}% \fi - \get@nextboxL \checkpageL \checkverseL @@ -1929,6 +1938,7 @@ \@writelinesonpageL{1000}% \fi \numpagelinesL \z@ + \parledgroup@correction@notespacing@init \clearl@dleftpage }% \checkpageR \l@duselanguage{\theledlanguageR}% @@ -1938,6 +1948,7 @@ \ifshiftedpstarts \ifdim\ht\l@drightbox>0pt\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}\fi% \else% + \parledgroup@correction@notespacing{R} \hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}% \fi \get@nextboxR @@ -1951,6 +1962,7 @@ \@writelinesonpageR{1000}% \fi \numpagelinesR=\z@ + \parledgroup@correction@notespacing@init \clearl@drightpage} \checkraw@text \ifaraw@text @@ -2140,7 +2152,11 @@ \ifvbox\namebox{l@dLcolrawbox\the\l@dpscL}% box is not empty \else% box is empty \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscL}>\@donetotallinesL + \parledgroup@notes@endL \else + \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscL}=\@donetotallinesL + \parledgroup@notes@endL + \fi \ifwrittenlinesL \else \@writelinesinparL @@ -2162,6 +2178,8 @@ {\usenamecount{l@dmaxlinesinpar\the\l@dpscL}}% \global\@donetotallinesL \z@ \global\advance\l@dpscL \@ne + \parledgroup@notes@endL + \parledgroup@correction@notespacing@final{L} \fi \fi \fi} @@ -2169,7 +2187,11 @@ \ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}% box is not empty \else% box is empty \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscR}>\@donetotallinesR + \parledgroup@notes@endR \else + \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscR}=\@donetotallinesR + \parledgroup@notes@endR + \fi \ifwrittenlinesR \else \@writelinesinparR @@ -2191,6 +2213,8 @@ {\usenamecount{l@dmaxlinesinpar\the\l@dpscR}}% \global\@donetotallinesR \z@ \global\advance\l@dpscR \@ne + \parledgroup@notes@endR + \parledgroup@correction@notespacing@final{R} \fi \fi \fi} @@ -2205,6 +2229,98 @@ \newcommand{\led@pbnumR}[1]{\listcsxadd{l@prev@pbR}{#1}} \newcommand{\led@nopbR}{\listcsxadd{l@prev@nopbR}{\the\absline@numR}} \newcommand{\led@nopbnumR}[1]{\listcsxadd{l@prev@nopbR}{#1}} +\newmarks\parledgroup@ +\newmarks\parledgroup@series +\newmarks\parledgroup@type +\newcommand{\parledgroup@notes@startL}{% + \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscL}>0% + \IfStrEq{\splitfirstmarks\parledgroup@type}{footnoteX}{\csuse{bhooknoteX@\splitfirstmarks\parledgroup@series}}{}% + \IfStrEq{\splitfirstmarks\parledgroup@type}{Xfootnote}{\csuse{bhookXnote@\splitfirstmarks\parledgroup@series}}{}% + \fi% + \global\ledgroupnotesL@true% + \insert@noterule@ledgroup{L}% +} +\newcommand{\parledgroup@notes@startR}{% + \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscR}>0% + \IfStrEq{\splitfirstmarks\parledgroup@type}{footnoteX}{\csuse{bhooknoteX@\splitfirstmarks\parledgroup@series}}{}% + \IfStrEq{\splitfirstmarks\parledgroup@type}{Xfootnote}{\csuse{bhookXnote@\splitfirstmarks\parledgroup@series}}{}% + \fi% + \global\ledgroupnotesR@true% + \insert@noterule@ledgroup{R}% +} +\newcommand{\parledgroup@notes@endL}{% + \global\ledgroupnotesL@false% +} +\newcommand{\parledgroup@notes@endR}{% + \global\ledgroupnotesR@false% +} +\newcommand{\insert@noterule@ledgroup}[1]{ + \IfStrEq{\splitbotmarks\parledgroup@}{begin}{% + \IfStrEq{\splitbotmarks\parledgroup@type}{Xfootnote}{ + \csuse{ifledgroupnotes#1@} + \vskip\skip\csuse{mp\splitbotmarks\parledgroup@series footins} + \csuse{\splitbotmarks\parledgroup@series footnoterule} + \fi + } + {} + \IfStrEq{\splitbotmarks\parledgroup@type}{footnoteX}{ + \csuse{ifledgroupnotes#1@} + \vskip\skip\csuse{mpfootins\splitbotmarks\parledgroup@series} + \csuse{footnoterule\splitbotmarks\parledgroup@series} + \fi + }{} + } + {} +} +\newcommand{\parledgroupnotespacing}{} +\dimdef{\parledgroup@notespacing@correction}{0pt} +\newcommand{\parledgroup@notespacing@set@correction}{% + {\notefontsetup\parledgroupnotespacing\dimgdef{\temp@spacing}{\baselineskip}}% + \dimgdef{\parledgroup@notespacing@correction}{\baselineskip-\temp@spacing}% +} +\newcommand{\parledgroup@correction@notespacing@init}{ + \dimdef{\parledgroup@notespacing@correction@accumulated}{0pt} + \dimdef{\parledgroup@notespacing@correction@modulo}{0pt} +} +\parledgroup@correction@notespacing@init +\newcommand{\parledgroup@correction@notespacing@final}[1]{ + \ifparledgroup + \vspace{\parledgroup@notespacing@correction@accumulated} + \parledgroup@correction@notespacing@init% + \ifstrequal{#1}{L}{ + \numdef{\@checking}{\the\l@dpscL-1} + }{ + \numdef{\@checking}{\the\l@dpscR-1} + } + \dimdef{\@beforenotes@current@diff}{\csuse{@parledgroup@beforenotes@\@checking L}-\csuse{@parledgroup@beforenotes@\@checking R}}% + \ifstrequal{#1}{L}% + {% Left + \ifdimgreater{\@beforenotes@current@diff}{0pt}{}{\vspace{-\@beforenotes@current@diff}}% + }% + {% Right + \ifdimgreater{\@beforenotes@current@diff}{0pt}{\vspace{\@beforenotes@current@diff}}{} + }% + \fi +} +\newcommand{\parledgroup@correction@notespacing}[1]{% + \csuse{ifledgroupnotes#1@}% + \vspace{-\parledgroup@notespacing@correction}% + \dimdef{\parledgroup@notespacing@correction@accumulated}{\parledgroup@notespacing@correction@accumulated+\parledgroup@notespacing@correction}% + \dimdef{\parledgroup@notespacing@correction@modulo}{\parledgroup@notespacing@correction@modulo+\parledgroup@notespacing@correction}% + \ifdimless{\parledgroup@notespacing@correction@modulo}{\baselineskip}{}{\advance\numpagelinesL -\@ne% + \dimdef{\parledgroup@notespacing@correction@modulo}{\parledgroup@notespacing@correction@modulo-\baselineskip}% + }% mean greater than equal + \fi% +} +\dimdef\parledgroup@beforenotesL{0pt} +\dimdef\parledgroup@beforenotesR{0pt} +\newcommand{\parledgroup@beforenotes@save}[1]{ + \ifparledgroup + \csdimgdef{@parledgroup@beforenotes@\the\csuse{l@dnumpstarts#1}#1}{\csuse{parledgroup@beforenotes#1}} + \csdimgdef{parledgroup@beforenotes#1}{0pt} + \fi +} + \endinput %% %% End of file `eledpar.sty'. |