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 | |
parent | 2953c24114166c782e7828ec3aaf9b8d594ef9d1 (diff) |
eledmac (18dec13)
git-svn-id: svn://tug.org/texlive/trunk@32441 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/eledmac/eledmac.pdf | bin | 878626 -> 891728 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/eledmac/eledpar.pdf | bin | 484454 -> 494695 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/eledmac/eledmac.dtx | 644 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/eledmac/eledpar.dtx | 324 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/eledmac/eledmac.sty | 317 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/eledmac/eledpar.sty | 152 |
6 files changed, 1048 insertions, 389 deletions
diff --git a/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf b/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf Binary files differindex 936b3f6e44e..de100d9a2b9 100644 --- a/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf +++ b/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf diff --git a/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf b/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf Binary files differindex 5ba6b6a1d86..ee5137aa9ac 100644 --- a/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf +++ b/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf diff --git a/Master/texmf-dist/source/latex/eledmac/eledmac.dtx b/Master/texmf-dist/source/latex/eledmac/eledmac.dtx index e6bf5d84352..3ffe9d3d20d 100644 --- a/Master/texmf-dist/source/latex/eledmac/eledmac.dtx +++ b/Master/texmf-dist/source/latex/eledmac/eledmac.dtx @@ -51,7 +51,7 @@ % % \fi % -% \CheckSum{8620} +% \CheckSum{8881} % % \makeatletter % \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters @@ -177,6 +177,7 @@ % \changes{v1.4.6}{2013/04/15}{Bug with memoir class introduced by 1.4.5.} % \changes{v1.4.8}{2013/07/02}{Corrects a bug with parallel texts introduced by 1.1.} % \changes{v1.6.1}{2013/10/27}{Corrects a false hanging verse when a verse is exactly the length of a line.} +% \changes{v1.8.0}{2013/12/13}{Compatibility with parledgroup option of eledpar package.} % \hyphenation{man-u-script man-u-scripts} % % \newcommand{\Lpack}[1]{\textsf{#1}} @@ -2336,6 +2337,10 @@ % \item For the non-starred sections, use the optional argument \meta{text} to provide the text to the table of contents. % \item The \cs{ledchapter} doesn't open a new page. You must use \cs{beforeledchapter} before. This also closes a \cs{pstart} and opens a new. % \end{enumerate} +% +% \changes{v1.8.0}{2013/12/13}{Add \cs{ledsecnolinenumber} option.} +% If you use \Lpack{eledpar}, you must use these commands to have parallel sectioning. +% However, if you want not to have lineation for sectioning commands, use the \verb+ledsecnolinenumber+ option when loading eledmac. Or add \cs{ledsecnolinenumbertrue} in your preamble. % \changes{v1.2}{2012/10/13}{Add \cs{ledsectnotoc} command.} % \DescribeMacro{\ledsectnotoc} % You can create a table of contents that indexes only the titles that appear on the left side of the edition: @@ -2747,7 +2752,7 @@ % \begin{macrocode} %<*code> \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] % \end{macrocode} % % Generally, these are the modifications to the original. @@ -2775,12 +2780,15 @@ \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} % \end{macrocode} % Use the starred form of \verb?\ProcessOptions? which executes options in @@ -3219,6 +3227,7 @@ \global\let\next@page@num=\relax \global\let\sub@change=\relax \resetprevline@ + \resetprevpage@num } % \end{macrocode} @@ -3241,52 +3250,53 @@ % \changes{v1.2}{2012/10/08}{Compatibility of \cs{ledchapter} with the \emph{memoir} class.} % \changes{v1.3}{2012/11/01}{\emph{Quotation} and {quote} environment inside the numbering sections.} % \changes{v1.4.1}{2012/11/16}{New option \emph{noquotation}.} -% \changes{v1.4.7}{2012/06/07}{Compatibility of sectionning commands with \cs{autopar}.} +% \changes{v1.4.7}{2012/06/07}{Compatibility of sectioning commands with \cs{autopar}.} +% \changes{v1.8.0}{2013/12/13}{Correction of sectioning commands in parallel texts.} % \cs{initnumbering@sectcmd} defines sectioning commands inside numbered section. % It also defines quotation environment. -% Note: this supposes that the user didn't change \cs{chapter}. +% Note: this assumes that the user didn't change \cs{chapter}. % If he did, he should redefine \cs{initnumbering@sectcmd}. % \begin{macrocode} \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 } @@ -4135,10 +4145,10 @@ % \end{macro} % % \DescribeMacro{\resetprevline@} -% Inside the apparatus, at each note, the line number is memorized in a macro called \cs{prevlineX}, +% Inside the apparatus, at each note, the line number is stored in a macro called \cs{prevlineX}, % where X is the letter of the current series. % This macro is called when using \cs{numberonlyfirstinline}. -% This maco must be reset at the same time as the line number. +% This macro must be reset at the same time as the line number. % The \cs{resetprevline@} does this resetting for every series. % \begin{macro}{\resetprevline@} % \begin{macrocode} @@ -4148,6 +4158,20 @@ } % \end{macrocode} % \end{macro} +% \DescribeMacro{\resetprevpage@num} +% Inside the apparatus, at each note, the page number is stored in a macro called \cs{prevpageX@num}, +% where X is the letter of the current series. +% This macro is called when using \cs{parafootsep}. +% This macro must be reset at the begining of each numbered section +% The \cs{resetprevpage@} command resets this macro for every series. +% \begin{macro}{\resetprevpage@} +% \begin{macrocode} +\newcommand*{\resetprevpage@num}{% + \def\do##1{\ifcsdef{prevpage##1@num}{\global\csname prevpage##1@num\endcsname=0}{}}% + \dolistloop{\@series}% +} +% \end{macrocode} +% \end{macro} % \subsection{Reading the line-list file} % % @@ -4449,10 +4473,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} @@ -6096,7 +6120,7 @@ % No number is attached if \cs{ifnumberline} is FALSE (the normal value is TRUE). % \changes{v0.15}{2012/06/11}{Line numbering can be disabled.} % \begin{macrocode} -\ifnumberline +\ifledgroupnotesL@\else\ifnumberline \ifl@dskipnumber \global\l@dskipnumberfalse \else @@ -6228,6 +6252,7 @@ \f@x@l@cks \fi \fi +\fi } % \end{macrocode} @@ -7081,9 +7106,21 @@ % \begin{macrocode} \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}} % \end{macrocode} @@ -7523,8 +7560,19 @@ % \begin{macrocode} \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}% @@ -7555,6 +7603,7 @@ % \subsubsection{Insertion of the footnotes separator} %The command \cs{insertparafootsep}\marg{series} must be called at the beginning of \cs{parafootftm} (and like commands). % \begin{macro}{\prevpage@num} +% \changes{v1.8.0}{2013/12/13}{Correct \cs{parafootsep} when using with ledgroup.} % \begin{macro}{\insertparafootsep} % \begin{macrocode} \newcommand{\insertparafootsep}[1]{% @@ -7758,8 +7807,19 @@ % \begin{macrocode} \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 @@ -7854,8 +7914,19 @@ % \begin{macrocode} \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 @@ -8150,8 +8221,19 @@ % \begin{macrocode} \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}} % \end{macrocode} @@ -8311,8 +8393,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}} @@ -8401,8 +8494,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}} @@ -8533,8 +8637,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}% @@ -8595,7 +8711,202 @@ } % \end{macrocode} % \end{macro} +% \section{Endnotes} +% \changes{v1.8.1}{2013/12/15}{Debug endnotes when more than one series is used (change the position where tools for endnotes are defined).} +% \label{endnotes}\relax % +% \begin{macro}{\l@d@end} +% \begin{macro}{\ifl@dend@} +% \begin{macro}{\l@dend@true} +% \begin{macro}{\l@dend@false} +% Endnotes of all varieties are saved up in a file, typically named +% \meta{jobname}\file{.end}. +% \cs{l@d@end} is the output stream number for +% this file, and \verb"\ifl@dend@" is a flag that's \verb"true" when the file is open. +% \begin{macrocode} +\newwrite\l@d@end +\newif\ifl@dend@ +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\l@dend@open} +% \begin{macro}{\l@dend@close} +% \cs{l@dend@open} and \cs{l@dend@close} are the +% macros that are used to open and close the endnote file. Note that +% all our writing to this file is \cs{immediate}: all page and +% line numbers for the endnotes are generated by the same mechanism +% we use for the footnotes, so that there's no need to defer any +% writing to catch information from the output routine. +% \begin{macrocode} +\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} + +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\l@dend@stuff} +% \cs{l@dend@stuff} is used by \cs{beginnumbering} to +% do everything that's necessary for the endnotes at the +% start of each section: it opens the \cs{l@d@end} file, if necessary, +% and writes the section number to the endnote file. +% \begin{macrocode} +\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}}} + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\endprint} +% \begin{macro}{\@gobblethree} +% \begin{macro}{\l@d@section} +% The \cs{endprint} here is nearly identical in its +% functioning to \cs{normalfootfmt}. +% +% The endnote file also contains \cs{l@d@section} commands, which +% supply the section numbers from the main text; standard \Eledmac{} does +% nothing with this information, but it's there if you want to write +% custom macros to do something with it. +% \changes{v0.2.2}{2003/11/05}{Used \cs{providecommand} for \cs{@gobblethree} +% to avoid clash with the amsfonts package} +% \begin{macrocode} +\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 + +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\setprintendlines} +% The \cs{printendlines} macro is similar to \cs{printlines} but is +% for printing endnotes rather than footnotes. +% +% The principal difference between foot- and endnotes is that footnotes +% are printed on the page where they are specified but endnotes +% are printed at a different point in the document. We need an indication +% of the source of an endnote; \cs{setprintendlines} provides this +% by always printing the page number. The coding is slightly simpler than +% \cs{setprintlines}. +% +% First of all, we print the second page number only if +% the ending page number is different +% from the starting page number.\phantomsection\label{printendlines} +% \changes{v0.7}{2005/02/18}{Added \cs{setprintendlines} for use by +% \cs{printendlines}} +% \begin{macrocode} +\newcommand*{\setprintendlines}[6]{% + \l@d@pnumfalse \l@d@dashfalse + \ifnum#4=#1 \else + \l@d@pnumtrue + \l@d@dashtrue + \fi +% \end{macrocode} +% +% We print the ending line number if\/: (1)~we're printing the ending +% page number, or (2)~it's different from the starting line number. +% \begin{macrocode} + \ifl@d@pnum \l@d@elintrue \else \l@d@elinfalse \fi + \ifnum#2=#5 \else + \l@d@elintrue + \l@d@dashtrue + \fi +% \end{macrocode} +% +% We print the starting sub-line if it's nonzero. +% \begin{macrocode} + \l@d@ssubfalse + \ifnum#3=0 \else + \l@d@ssubtrue + \fi +% \end{macrocode} +% +% We print the ending sub-line if it's nonzero and: (1)~it's different +% from the starting sub-line number, or (2)~the ending line number is +% being printed. +% \begin{macrocode} + \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} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\printendlines} +% Now we're ready to print it all. +% \changes{v0.3}{2004/02/14}{Added \cs{linenumr@p} and \cs{sublinenumr@p} +% to \cs{printendlines}} +% \begin{macrocode} +\def\printendlines#1|#2|#3|#4|#5|#6|#7|{\begingroup + \setprintendlines{#1}{#2}{#3}{#4}{#5}{#6}% +% \end{macrocode} +% The only subtlety left here is when to print a period between +% numbers. But the only instance in which this is tricky is for the +% ending sub-line number: it could be coming after the starting +% sub-line number (in which case we want only the dash) or after an +% ending line number (in which case we need to insert a period). +% \begin{macrocode} + \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} + +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\printnpnum} +% A macro to print a page number in an endnote. +% \begin{macrocode} +\newcommand*{\printnpnum}[1]{p.#1) } + +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\doendnotes} +% \cs{doendnotes} is +% the command you use to print one series of endnotes; it +% takes one argument, the series letter of the note series you want +% to print. +% \begin{macrocode} +\newcommand*{\doendnotes}[1]{\l@dend@close + \begingroup + \makeatletter + \expandafter\let\csname #1end\endcsname=\endprint + \input\jobname.end + \endgroup} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\noendnotes} +% You can say \cs{noendnotes} before the first +% \cs{beginnumbering} in your file if you aren't going to be using +% any of the endnote commands: this will suppress the creation of +% an \file{.end} file. If you do have some lingering endnote +% commands in your file, +% the notes will be written to your terminal and to the log file. +% \begin{macrocode} +\newcommand*{\noendnotes}{\global\let\l@dend@stuff=\relax + \global\chardef\l@d@end=16 } +% \end{macrocode} +% \end{macro} % \section{Generate series}% % In this section, X means the name of the series (A, B etc.) % \begin{macro}{\series} @@ -8618,12 +8929,12 @@ % \begin{macrocode} \newcommand{\newseries@}[1]{ % \end{macrocode} -% \subsubsection{Test if series is still existing} +% \subsection{Test if series is still existing} % \begin{macrocode} \xifinlist{#1}{\@series}{\eledmac@warning{Series #1 is still existing !}} {% % \end{macrocode} -% \subsubsection{Create all commands to memorize display options} +% \subsection{Create all commands to memorize display options} % \begin{macrocode} \csgdef{Xhangindent@#1}{0pt}% \csgdef{hangindentX@#1}{0pt} @@ -8666,7 +8977,7 @@ \csgdef{maxhnotesX@#1}{\ledfootinsdim}% \csgdef{maxhXnotes@#1}{\ledfootinsdim} % \end{macrocode} -% \subsubsection{Create inserts, needed to add notes in foot} +% \subsection{Create inserts, needed to add notes in foot} % Concerning inserts, see chapter 15 of the TeXBook by D. Knuth % \begin{macrocode} @@ -8675,7 +8986,7 @@ \expandafter\newinsert\csname #1footins\endcsname \expandafter\newinsert\csname mp#1footins\endcsname % \end{macrocode} -% \subsubsection{Create command for critical apparatus, \cs{Xfootnote}} +% \subsection{Create commands for critical apparatus, \cs{Xfootnote}} % Note the double \# in command: it's because command is made inside another command. % \changes{v1.4}{2012/11/16}{Remembers the language of the lemma, in order to create a correct direction for the footnote separator.} % \begin{macrocode} @@ -8723,7 +9034,7 @@ \csgdef{series@display#1}{} \footnormal{#1} % \end{macrocode} -%\subsubsection{Create tools for familiar footnotes (\cs{footnoteX})} +%\subsection{Create tools for familiar footnotes (\cs{footnoteX})} % First, create the \cs{footnoteX} command. % \begin{macrocode} @@ -8747,7 +9058,7 @@ \csgdef{series@displayX#1}{} \footnormalX{#1} % \end{macrocode} -% \subsubsection{The endnotes} +% \subsection{The endnotes} % The \cs{Xendnote} macro functions to % write one endnote to the \file{.end} file. We change % \cs{newlinechar} so that in the file every space becomes the @@ -8786,11 +9097,11 @@ }% End of \newseries % \end{macrocode} % \end{macro} -% \subsubsection{Init standards series (A,B,C,D,E,Z)} +% \subsection{Init standards series (A,B,C,D,E,Z)} % \begin{macrocode} \newseries{A,B,C,D,E,Z} % \end{macrocode} -% \subsubsection{Some tools} +% \subsection{Some tools} % \changes{v1.1}{2012/09/25}{New tools to change order of series} % \begin{macro}{\firstseries} % \cs{seriesatbegin}\marg{s} changes the order of series, to put the series \meta{s} at the beginning of the list. @@ -8843,7 +9154,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}% }% @@ -8922,6 +9236,7 @@ % \end{macrocode} % \end{macro} % \begin{macro}{\newhookcommand@series@reload} +% \changes{v1.8.0}{2013/11/24}{Debug \cs{beforenotesX} and \cs{maxhnotesX} which didn'nt work.} % \cs{newhookcommand@series@reload} does the same thing as \cs{newhookcommand@series} % but the commands created by this macro also reload the series displaying (normal, paragraph, twocol) % \begin{macrocode} @@ -8953,7 +9268,7 @@ \newhooktoggle@series{nonbreakableafternumber} % \end{macrocode} % \end{macro} -% \subsubsection{Old commands, kept for backward compatibility} +% \subsection{Old commands, kept for backward compatibility} % The next commands are kept for ascendant compatibily, but should'nt be used anymore. % \begin{macro}{\notenumfont} % \begin{macro}{\notefontsetup} @@ -8970,7 +9285,7 @@ % \end{macro} % \end{macro} % \end{macro} -% \subsubsection{Hooks for a particular footnote} +% \subsection{Hooks for a particular footnote} % \begin{macro}{\nonum@} %\cs{nonum@} toggle is used to disable line number printing in a particular footnote. % \begin{macrocode} @@ -8983,7 +9298,7 @@ \newtoggle{nosep@} % \end{macrocode} % \end{macro} -% \subsubsection{Alias} +% \subsection{Alias} % \begin{macro}{\nolemmaseparator} %\cs{nolemmaseparator}\oarg{series} is just an alias for \cs{lemmaseparator}\oarg{series}\verb|{}|. % \begin{macrocode} @@ -9009,7 +9324,7 @@ % \end{macrocode} % \end{macro} % -% \subsubsection{Line number printing} +% \subsection{Line number printing} % \begin{macro}{\printlinefootnote} % The \cs{printlinefootnote} macro is called in each \cs{<type>footfmt} command. % It controls whether the line number is printed or not, according to the previous options. Its first argument is the information about lines, its second is the series of the footnote. @@ -9825,201 +10140,6 @@ % \end{macro} % % -% \section{Endnotes} -% \label{endnotes}\relax -% -% \begin{macro}{\l@d@end} -% \begin{macro}{\ifl@dend@} -% \begin{macro}{\l@dend@true} -% \begin{macro}{\l@dend@false} -% Endnotes of all varieties are saved up in a file, typically named -% \meta{jobname}\file{.end}. -% \cs{l@d@end} is the output stream number for -% this file, and \verb"\ifl@dend@" is a flag that's \verb"true" when the file is open. -% \begin{macrocode} -\newwrite\l@d@end -\newif\ifl@dend@ -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\l@dend@open} -% \begin{macro}{\l@dend@close} -% \cs{l@dend@open} and \cs{l@dend@close} are the -% macros that are used to open and close the endnote file. Note that -% all our writing to this file is \cs{immediate}: all page and -% line numbers for the endnotes are generated by the same mechanism -% we use for the footnotes, so that there's no need to defer any -% writing to catch information from the output routine. -% \begin{macrocode} -\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} - -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\l@dend@stuff} -% \cs{l@dend@stuff} is used by \cs{beginnumbering} to -% do everything that's necessary for the endnotes at the -% start of each section: it opens the \cs{l@d@end} file, if necessary, -% and writes the section number to the endnote file. -% \begin{macrocode} -\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}}} - -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\endprint} -% \begin{macro}{\@gobblethree} -% \begin{macro}{\l@d@section} -% The \cs{endprint} here is nearly identical in its -% functioning to \cs{normalfootfmt}. -% -% The endnote file also contains \cs{l@d@section} commands, which -% supply the section numbers from the main text; standard \Eledmac{} does -% nothing with this information, but it's there if you want to write -% custom macros to do something with it. -% \changes{v0.2.2}{2003/11/05}{Used \cs{providecommand} for \cs{@gobblethree} -% to avoid clash with the amsfonts package} -% \begin{macrocode} -\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 - -% \end{macrocode} -% \end{macro} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\setprintendlines} -% The \cs{printendlines} macro is similar to \cs{printlines} but is -% for printing endnotes rather than footnotes. -% -% The principal difference between foot- and endnotes is that footnotes -% are printed on the page where they are specified but endnotes -% are printed at a different point in the document. We need an indication -% of the source of an endnote; \cs{setprintendlines} provides this -% by always printing the page number. The coding is slightly simpler than -% \cs{setprintlines}. -% -% First of all, we print the second page number only if -% the ending page number is different -% from the starting page number.\phantomsection\label{printendlines} -% \changes{v0.7}{2005/02/18}{Added \cs{setprintendlines} for use by -% \cs{printendlines}} -% \begin{macrocode} -\newcommand*{\setprintendlines}[6]{% - \l@d@pnumfalse \l@d@dashfalse - \ifnum#4=#1 \else - \l@d@pnumtrue - \l@d@dashtrue - \fi -% \end{macrocode} -% -% We print the ending line number if\/: (1)~we're printing the ending -% page number, or (2)~it's different from the starting line number. -% \begin{macrocode} - \ifl@d@pnum \l@d@elintrue \else \l@d@elinfalse \fi - \ifnum#2=#5 \else - \l@d@elintrue - \l@d@dashtrue - \fi -% \end{macrocode} -% -% We print the starting sub-line if it's nonzero. -% \begin{macrocode} - \l@d@ssubfalse - \ifnum#3=0 \else - \l@d@ssubtrue - \fi -% \end{macrocode} -% -% We print the ending sub-line if it's nonzero and: (1)~it's different -% from the starting sub-line number, or (2)~the ending line number is -% being printed. -% \begin{macrocode} - \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} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\printendlines} -% Now we're ready to print it all. -% \changes{v0.3}{2004/02/14}{Added \cs{linenumr@p} and \cs{sublinenumr@p} -% to \cs{printendlines}} -% \begin{macrocode} -\def\printendlines#1|#2|#3|#4|#5|#6|#7|{\begingroup - \setprintendlines{#1}{#2}{#3}{#4}{#5}{#6}% -% \end{macrocode} -% The only subtlety left here is when to print a period between -% numbers. But the only instance in which this is tricky is for the -% ending sub-line number: it could be coming after the starting -% sub-line number (in which case we want only the dash) or after an -% ending line number (in which case we need to insert a period). -% \begin{macrocode} - \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} - -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\printnpnum} -% A macro to print a page number in an endnote. -% \begin{macrocode} -\newcommand*{\printnpnum}[1]{p.#1) } - -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\doendnotes} -% \cs{doendnotes} is -% the command you use to print one series of endnotes; it -% takes one argument, the series letter of the note series you want -% to print. -% \begin{macrocode} -\newcommand*{\doendnotes}[1]{\l@dend@close - \begingroup - \makeatletter - \expandafter\let\csname #1end\endcsname=\endprint - \input\jobname.end - \endgroup} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\noendnotes} -% You can say \cs{noendnotes} before the first -% \cs{beginnumbering} in your file if you aren't going to be using -% any of the endnote commands: this will suppress the creation of -% an \file{.end} file. If you do have some lingering endnote -% commands in your file, -% the notes will be written to your terminal and to the log file. -% \begin{macrocode} -\newcommand*{\noendnotes}{\global\let\l@dend@stuff=\relax - \global\chardef\l@d@end=16 } -% \end{macrocode} -% \end{macro} % % \section{Side notes} % @@ -10330,7 +10450,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}% } @@ -10412,6 +10542,15 @@ \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} % \end{macrocode} @@ -10427,7 +10566,7 @@ % \begin{macrocode} \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% }{% @@ -10501,6 +10640,15 @@ % \end{macrocode} % \end{environment} % +% \begin{macro}{\ifledgroupnotesL@} +% \begin{macro}{\ifledgroupnotesR@} +% These boolean tests check if we are in the notes of a ledgroup. If we are, we don't number the lines. +% \begin{macrocode} +\newif\ifledgroupnotesL@ +\newif\ifledgroupnotesR@ +% \end{macrocode} +% \end{macro} +% \end{macro} % \section{Indexing} % % \changes{v1.5}{2013/07/11}{Correct indexing when the call is made in critical notes.} diff --git a/Master/texmf-dist/source/latex/eledmac/eledpar.dtx b/Master/texmf-dist/source/latex/eledmac/eledpar.dtx index e35ff1ebf96..f1ab7dd8fbe 100644 --- a/Master/texmf-dist/source/latex/eledmac/eledpar.dtx +++ b/Master/texmf-dist/source/latex/eledmac/eledpar.dtx @@ -51,7 +51,7 @@ % % \fi % -% \CheckSum{4254} +% \CheckSum{4479} % % \makeatletter % \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters @@ -694,6 +694,77 @@ % % When you use \cs{lednopb} make sure to use it on both sides in the corresponding % verses to keep the pages in sync. +% \section{Parallel ledgroups} +% \changes{v1.6.0}{2013/12/13}{Add tool and documentation for parallel ledgroups} +% You can also make parallel ledgroups (see the documentation of eledmac about ledgroups). +% To do it you have: +% \begin{itemize} +% \item To load \Lpack{eledpar} package with the \verb+parledgroup+ option, or to add \cs{\parledgrouptrue}. +% \item To push each ledgroup between \cs{pstart}…\cs{pend} command. +% \end{itemize} +% See the following example: +% \begin{verbatim} +% \begin{pages} +% \begin{Leftside} +% \beginnumbering +% \pstart +% \begin{ledgroup} +% ledgroup content +% \end{ledgroup} +% \pend +% \pstart +% \begin{ledgroup} +% ledgroup content +% \end{ledgroup} +% \pend +% \endnumbering +% \end{Leftside} +% \begin{Rightside} +% \beginnumbering +% \pstart +% \begin{ledgroup} +% ledgroup content +% \end{ledgroup} +% \pend +% \pstart +% \begin{ledgroup} +% ledgroup content +% \end{ledgroup} +% \pend +% \endnumbering +% \end{Rightside} +% \Pages +% \end{pages} +% \end{verbatim} +% You can add sectioning a sectioning command, following this scheme: +% \begin{verbatim} +% \begin{..side} +% \beginnumbering +% \pstart +% \section{First ledgroup title} +% \pend +% \pstart +% \begin{ledgroup}\skipnumbering +% ledgroup content +% \end{ledgroup} +% \pend +% \pstart +% \section{Second ledgroup title} +% \pend +% \pstart +% \begin{ledgroup}\skipnumbering +% ledgroup content +% \end{ledgroup} +% \pend +% \endnumbering +% \end{..side} +% \end{verbatim} +% \subsection{Parallel ledgroups and \Lpack{setspace} package}. +% If you use the \Lpack{setspace} package and want your notes in parallel ledgroups ledgroups to be single-spaced (not half-spaced or double-spaced), just add to your preamble: +% \begin{verbatim} +% \let\parledgroupnotespacing\singlespacing +% \end{verbatim} +% \emph{In effect, to have correct spacing, don't change the font size of your notes}. % \StopEventually{} % % \clearpage @@ -734,7 +805,7 @@ % \begin{macrocode} %<*code> \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] % \end{macrocode} % With the option `shiftedpstarts' a long pstart one the left side (or in the right side) don't make a blank on the corresponding pstart, but the blank is put on the bottom of the page. Consequently, the pstarts on the parallel pages are shifted, but the shifted stop at every end of pages. @@ -746,6 +817,7 @@ \let\shiftedversesfalse\shiftedpstartsfalse \DeclareOption{shiftedverses}{\shiftedpstartstrue} \DeclareOption{shiftedpstarts}{\shiftedpstartstrue} +\DeclareOption{parledgroup}{\parledgrouptrue} \ProcessOptions % \end{macrocode} % \end{macro} @@ -953,10 +1025,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 } % \end{macrocode} % \end{macro} @@ -2530,9 +2602,11 @@ \endgroup% \ignorespaces% \@oldnobreak% - \ifnumberpstart% + \ifnumberpstart% \addtocounter{pstartL}{1}% - \fi} + \fi + \parledgroup@beforenotes@save{L}% + } % \end{macrocode} % \end{macro} @@ -2554,9 +2628,10 @@ \endgroup% \ignorespaces% \@oldnobreak% - \ifnumberpstart% + \ifnumberpstart% \addtocounter{pstartR}{1}% - \fi% + \fi% + \parledgroup@beforenotes@save{R} } % \end{macrocode} @@ -2631,6 +2706,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 @@ -2689,6 +2765,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 @@ -2727,7 +2804,7 @@ \global\advance\absline@numR \@ne \do@actionsR \do@ballastR -\ifnumberline +\ifledgroupnotesR@\else\ifnumberline \ifsublines@ \ifnum\sub@lockR<\tw@ \global\advance\subline@numR \@ne @@ -2739,12 +2816,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 @@ -2756,6 +2834,7 @@ \fi \fi \fi +\fi } @@ -2935,7 +3014,7 @@ \newcommand*{\affixline@numR}{% -\ifnumberline +\ifledgroupnotesR@\else\ifnumberline \ifl@dskipnumber \global\l@dskipnumberfalse \else @@ -2978,6 +3057,7 @@ \fi \f@x@l@cksR \fi +\fi \fi} % \end{macrocode} % \end{macro} @@ -3500,8 +3580,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 @@ -3511,8 +3591,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 @@ -4208,6 +4288,7 @@ \newcommand*{\Pages}{% \setcounter{pstartL}{\value{pstartLold}} \setcounter{pstartR}{\value{pstartRold}} + \parledgroup@notespacing@set@correction \typeout{} \typeout{*************************** PAGES ***************************} \ifnum\l@dnumpstartsL=\l@dnumpstartsR\else @@ -4297,8 +4378,7 @@ \checkpageL \l@duselanguage{\theledlanguageL}% %%% \begingroup -{ \loop\ifl@dsamepage - +{ \loop\ifl@dsamepage % \end{macrocode} % Process the next (left) text line, adding it to the page. % \changes{v0.3}{2005/02/10}{Added \cs{ledstrutL} to \cs{Pages}} @@ -4308,13 +4388,13 @@ \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 % \end{macrocode} % Perhaps we have to move to the next (left) box. Check if we have got all % we can onto the page. If not, repeat for the next line. -% \begin{macrocode} - +% \begin{macrocode} \get@nextboxL \checkpageL \checkverseL @@ -4333,10 +4413,11 @@ \@writelinesonpageL{1000}% \fi % \end{macrocode} -% Zero the left page lines count and clear the page to get onto the facing -% (odd, right) page. +% Reset to zero the left-page line count, clear the page to get onto the facing +% (odd, right) page, and reinitialize the accumulated dimension of interline correction for notes in parallel ledgroup. % \begin{macrocode} \numpagelinesL \z@ + \parledgroup@correction@notespacing@init \clearl@dleftpage }% % \end{macrocode} % Now do the same for the right text. @@ -4350,6 +4431,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 @@ -4363,6 +4445,7 @@ \@writelinesonpageR{1000}% \fi \numpagelinesR=\z@ + \parledgroup@correction@notespacing@init % \end{macrocode} % The page is full, so move onto the next (left, odd) page and repeat left % text processing. @@ -4735,10 +4818,14 @@ % output. % \begin{macrocode} \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscL}>\@donetotallinesL + \parledgroup@notes@endL \else % \end{macrocode} % Sufficient lines have been output. % \begin{macrocode} + \ifnum\usenamecount{l@dmaxlinesinpar\the\l@dpscL}=\@donetotallinesL + \parledgroup@notes@endL + \fi \ifwrittenlinesL \else % \end{macrocode} @@ -4769,6 +4856,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} @@ -4779,7 +4868,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 @@ -4801,6 +4894,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} @@ -4857,6 +4952,182 @@ % \end{macro} % \end{macro} % \end{macro} +% \section{Parallel ledgroup} +% \begin{macro}{\parledgroup@} +% \begin{macro}{\parledgroupseries@} +% \begin{macro}{\parledgrouptype@} +% The marks \cs{parledgroup} contains information about the beginnings and endings of notes in a parallel ledgroup. +% \cs{parledgroupseries} contains the footnote series. +% \cs{parledgroupseries} contains the type of the footnote: critical (Xfootnote) or familiar (footnoteX). +% \begin{macrocode} +\newmarks\parledgroup@ +\newmarks\parledgroup@series +\newmarks\parledgroup@type +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\parledgroup@notes@startL} +% \begin{macro}{\parledgroup@notes@startR} +% \cs{parledgroup@notes@startL} and \cs{parledgroup@notes@startR} are used to mark the begining of a note series in a parallel ledgroup. +% \begin{macrocode} +\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}% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\parledgroup@notes@startL} +% \begin{macro}{\parledgroup@notes@startR} +% \cs{parledgroup@notes@endL} and \cs{parledgroup@notes@endR} are used to mark the end of a note series in a parallel ledgroup. +% \begin{macrocode} +\newcommand{\parledgroup@notes@endL}{% + \global\ledgroupnotesL@false% +} +\newcommand{\parledgroup@notes@endR}{% + \global\ledgroupnotesR@false% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\insert@noterule@ledgroup} +% A \cs{vskip} is not used when the boxes are constructed. So we insert it before ledgroup note series when paralling lines are constructed. +% This is the goal of \cs{insert@noterule@ledgroup} +% \begin{macrocode} +\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 + }{} + } + {} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\parledgroupnotespacing} +% \cs{parledgroupnotespacing} can be redefined by the user to change the interline spacing of ledgroup notes. +% \begin{macrocode} +\newcommand{\parledgroupnotespacing}{} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\parledgroup@notespacing@correction} +% \begin{macro}{\parledgroup@notespacing@set@correction} +% \cs{parledgroup@notespacing@correction} is the difference between a normal line skip and a line skip in a note. It's set by \cs{parledgroup@notespacing@set@correction}, called at the begining of \cs{Pages}. +% \begin{macrocode} +\dimdef{\parledgroup@notespacing@correction}{0pt} +\newcommand{\parledgroup@notespacing@set@correction}{% + {\notefontsetup\parledgroupnotespacing\dimgdef{\temp@spacing}{\baselineskip}}% + \dimgdef{\parledgroup@notespacing@correction}{\baselineskip-\temp@spacing}% +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\parledgroup@correction@notespacing@init} +% \cs{parledgroup@correction@notespacing@init} sets the value of accumulated corrections of note spacing to 0~pt. +% It's called at the begining of each pages AND at the end of each ledgroup. +% \begin{macrocode} +\newcommand{\parledgroup@correction@notespacing@init}{ + \dimdef{\parledgroup@notespacing@correction@accumulated}{0pt} + \dimdef{\parledgroup@notespacing@correction@modulo}{0pt} +} +\parledgroup@correction@notespacing@init +% \end{macrocode} +% \end{macro} +% \begin{macro}{\parledgroup@correction@notespacing@final} +% \cs{parledgroup@correction@notespacing@final} adds the total space deleted because of correction for notes, in a parallel ledgroup. +% It also adds the space needed by the other side spaces between note rules and notes. It's called after the print of each pstart/pend. +% \begin{macrocode} +\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 +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\parledgroup@correction@notespacing} +% \cs{parledgroup@correction@notespacing} is used before each printed line. +% If it's a line of notes in parallel ledgroup, the space \cs{parledgroup@notespacing@correction} is decreased, to make interline space correct. +% The decreased space is added to \cs{parledgroup@notespacing@correction@accumulated} and \cs{parledgroup@notespacing@correction@modulo}. +% If \cs{parledgroup@notespacing@correction@modulo} is equal or greater than \cs{baselineskip}: +% \begin{itemize} +% \item It is decreased by \cs{baselineskip}. +% \item The total of line number in the current page is decreased by one. +% \end{itemize} +% For example, suppose an normal interline of 24~pt and interline for note of 12~pt. +% That means that the two lines of notes take the place of one normal line. For every two lines of notes, the line total for the current place is decreased by one. +% \begin{macrocode}{} +\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% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\parledgroup@beforenotesL} +% \begin{macro}{\parledgroup@beforenotesR} +% \cs{parledgroup@beforenotesL} and \cs{parledgroup@beforenotesR} store the total of space before notes in the current parallel ledgroup. +% \begin{macrocode} +\dimdef\parledgroup@beforenotesL{0pt} +\dimdef\parledgroup@beforenotesR{0pt} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\parledgroup@beforenotes@save} +% The macro \cs{parledgroup@beforenotes@save} dumps the space befores notes of the current parallel ledgroup in a macro named with the current pstart number. +% \begin{macrocode} +\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 +} +% \end{macrocode} +% \end{macro} + + % \section{The End}\label{end} % % @@ -4881,15 +5152,16 @@ % With standard \cs{hangingsymbol}: % \setstanzaindents{4,0} % \beginnumbering -% \stanza -% A very long verse should be sometime hanged. The position of the hang verse is fixed.\& +% \stanza +% A very long verse should be sometime hanged. +% The position of the hanging verse is fixed.\& % \endnumbering % % With the modification of \cs{hangingsymbol}: % \renewcommand{\hangingsymbol}{\protect\hfill} % \setstanzaindents{4,0} % \beginnumbering -% \stanza +% \stanza % A very long verse should sometimes be hanging. And we can see that an hanging verse is flush right.\& % \endnumbering % \bibliographystyle{alpha} 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'. |