summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/eledmac.pdfbin824992 -> 839503 bytes
-rw-r--r--Master/texmf-dist/doc/latex/eledmac/eledpar.pdfbin466216 -> 468334 bytes
-rw-r--r--Master/texmf-dist/source/latex/eledmac/eledmac.dtx616
-rw-r--r--Master/texmf-dist/source/latex/eledmac/eledpar.dtx159
-rw-r--r--Master/texmf-dist/tex/latex/eledmac/eledmac.sty353
-rw-r--r--Master/texmf-dist/tex/latex/eledmac/eledpar.sty136
6 files changed, 951 insertions, 313 deletions
diff --git a/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf b/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf
index 5ffa142d9e0..5d88c8cfa2f 100644
--- a/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/eledmac.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf b/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf
index f6288e69759..c01da9f7e9a 100644
--- a/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf
+++ b/Master/texmf-dist/doc/latex/eledmac/eledpar.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/eledmac/eledmac.dtx b/Master/texmf-dist/source/latex/eledmac/eledmac.dtx
index b327f5ee304..8b4e52d0118 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{7418}
+% \CheckSum{7909}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -144,6 +144,7 @@
% \def\fileversion{v0.17} \def\filedate{2012/08/03}
% \def\fileversion{v1.0}\def\filedate{2012/09/15}
% \def\fileversion{v1.0.1}\def\filedate{2012/09/16}
+% \def\fileversion{v1.1}\def\filedate{2012/09/25}
% \changes{v0.1}{2003/03/25}{First public release}
% \changes{v0.2}{2003/08/16}{Added tabmac code, and extended indexing}
% \changes{v0.2.1}{2003/09/13}{Bug fixes and match with mempatch v1.8}
@@ -178,6 +179,7 @@
% \changes{v0.13.1}{2011/11/18}{\cs{thepstartL} and \cs{thepstartR} use now \cs{bfseries} and not \cs{bf}, which is deprecated and makes conflicts with memoir class.}
% \changes{v0.14}{2012/04/04}{Tweaked \cs{edlabel} to get correct line number if the command is first element of a paragraph.}
% \changes{v1.0}{2012/09/15}{Some compatibility break with eledmac. Change of name: eledmac.}
+% \changes{v1.1}{2012/09/25}{New package option: parapparatus.}
% \hyphenation{man-u-script man-u-scripts}
%
% \newcommand{\Lpack}[1]{\textsf{#1}}
@@ -261,7 +263,7 @@
%
%
% \begin{abstract}
-% \edmac, a set of \PlainTeX\ macros, was made at the begining of 90's
+% \edmac, a set of \PlainTeX\ macros, was made at the beginning of 90's
% for typesetting critical editions in the traditional
% way, i.e., similar to the Oxford Classical Texts, Teubner, Arden
% Shakespeare and other series. A separate set of \PlainTeX\ macros,
@@ -395,7 +397,7 @@
% \Lpack{MauroTeX} (\url{http://www.maurolico.unipi.it/mtex/mtex.htm}).
% These sites are both in Italian.
% \item Dirk-Jan Dekker\index{Dekker, Dirk-Jan} maintains
-% \url{http://www.djdekker.net/eledmac}
+% \url{http://www.djdekker.net/ledmac}
% which is a FAQ for typesetting critical editions and \Eledmac.
% \end{itemize}
%
@@ -775,7 +777,11 @@
%\changes{v0.12}{2011/10/01}{Possibilty to number \cs{pstart}.}
% It's possible to insert a number at every \cs{pstart} command. You must use the \DescribeMacro{\numberpstarttrue}\cs{numberpstarttrue} command to have it. You can stop the numbering with \DescribeMacro{\numberpstartfalse}\cs{numberpstartfalse}. You can redefine the command \DescribeMacro{\thepstart}\cs{thepstart} to change style. On each \cs{beginnumbering} the numbering restarts.
% \changes{v0.15}{2012/06/11}{Possibilty to print \cs{pstart} number in side.}
+%
% With the \cs{sidepstartnumtrue} command, the number of \cs{pstart} will be printed in side. In this case, the line number will be not printed.
+%
+% \changes{v1.1}{2012/09/25}{Add \cs{labelpstarttrue}.}
+% With the \cs{labelpstarttrue} command, a \cs{label} added just after a \cs{pstart} will refer to the number of this pstart.
% \subsection{Lineation commands}
% \DescribeMacro{\numberlinefalse} \DescribeMacro{\numberlinetrue}
% Line numbering can be disabled with \cs{numberlinefalse}. It can be enabled again with \cs{numberlinetrue}.
@@ -948,7 +954,6 @@
%
%
% \section{The apparatus}
-%
% \subsection{Commands}
% \DescribeMacro{\edtext}
% Within numbered paragraphs, all footnotes and endnotes are generated
@@ -1058,6 +1063,12 @@
% (p.\,\pageref{doendnotes}) to call for their
% output at the appropriate point in your document.
%
+% By default, no paragraph can be made in the notes of critical apparatus.
+% You can allow it by adding the options \verb+parapparatus+ when loading the package :
+% \begin{verbatim}
+% \usepackage[parapparatus]{eledmac}
+% \end{verbatim}
+%
% \DescribeMacro{\lemma}
% \changes{v1.0}{2012/09/15}{\cs{lemma} can contain commands.}
% If you want to change the lemma that gets passed to the notes, you
@@ -1189,12 +1200,33 @@
% \changes{v1.0.1}{2012/09/16}{Correction on \cs{numberonlyfirstinline} with lineation by pstart or by page.}
% By default, the line number is printed in every note. If you want to print it only the first time for a value (i.e one time for line 1, one time for line 2 etc.), you can use \cs{numberonlyfirstinline}\oarg{s}. Use \cs{numberonlyfirstinline}\oarg{s}\oarg{false} to cancel it (\verb|<s>| can be empty if you want to disable it for every series).
%
+% \DescribeMacro{\numberonlyfirstintwolines}
+% \changes{v1.1}{2012/09/25}{Add \cs{numberonlyfirstintwolines}}
+% Suppose you have a lemma on line~2 and a lemma between line~2 and line~3.
+% With \cs{numberonlyfirstinline}, the second lemma is considered to be on the same line as the first lemma.
+% But if you add \cs{numberonlyfirstintwolines}\oarg{s}, the distinction is made.
+% Use \cs{numberonlyfirstintwolines}\oarg{s}\oarg{false} to cancel it (\verb|<s>| can be empty if you want to disable it for every series).
+%
% \DescribeMacro{\symlinenum}
% For setting a particular symbol in place of the line number, you can use \cs{symlinenum}\oarg{s}\marg{symbol} in combination with \cs{numberonlyfirstinline}\oarg{s}. From the second lemma of the same line, the symbol will be used instead of line number.
%
% \DescribeMacro{\nonumberinfootnote}
% You can use \cs{nonumberinfootnote}\oarg{s} if you don't want to have the line number in a footnote. To cancel it, use \cs{nonumberinfootnote}\oarg{s}\oarg{false}.
%
+% \changes{v1.1}{2012/09/25}{Add \cs{pstartinfootnote} and \cs{onlypstartinfootnote}}
+% \DescribeMacro{\pstartinfootnote}
+% You can use \cs{pstartinfootnote}\oarg{s} if you want to print the pstart number in the footnote, before the line and subline number.
+% Use \cs{pstartinfootnote}\oarg{s}\oarg{false} to cancel it (\verb|<s>| can be empty if you want to disable it for every series).
+% Note that when you change the lineation system, the option is automatically switched :
+% \begin{itemize}
+% \item If you use lineation by pstart, the option is enabled.
+% \item If you use lineation by section or by page, the option is disabled.
+% \end{itemize}
+%
+% \DescribeMacro{\onlypstartinfootnote}
+% In combination with \cs{pstartinfootnote}, you can use \cs{onlypstartinfootnote}\oarg{s} if you want to print only the pstart number in the footnote, and not the line and subline number.
+% Use \cs{onlypstartinfootnote}\oarg{s}\oarg{false} to cancel it (\verb|<s>| can be empty if you want to disable it for every series).
+%
% \DescribeMacro{\beforenumberinfootnote}
% With \cs{beforenumberinfootnote}\oarg{s}\marg{l}, you can add some space before the line number in a footnote. If the line number is not printed, the space is not either. The default value is 0~pt.
%
@@ -1273,6 +1305,26 @@
% \DescribeMacro{\hangindentX}
% For familiar notes NOT paragraphed you can define an indent with \cs{Xhangindent}\oarg{s}\marg{l}, which will be applied in the second line of notes. It can help to make a distinction between a new note and a break in anote.
%
+% \subsubsection{Arbitrary code at the beginninging of notes}
+% \changes{v1.1}{2012/09/25}{New hook to add arbitrary code at the beginning of the notes}
+% The three next commands add an arbitrary code at the beginning of notes.
+% As the name's space is local to the notes, you can use it to redefine some style inside the notes.
+% For example, if you don't want the pstart number to be in bold, use :
+% \begin{verbatim}
+% \bhookXnote{\renewcommand{\thepstart}{\arabic{pstart}.}}
+% \end{verbatim}
+%
+% \DescribeMacro{\bhookXnote}
+% \cs{bhookXnote}\oarg{series}\marg{code} is to be used at the beginning of the critical footnotes.
+%
+%
+% \DescribeMacro{\bhooknoteX}
+% \cs{bhooknoteX}\oarg{series}\marg{code} is to be used at the beginning of the familiar footnotes.
+%
+%
+% \DescribeMacro{\bhookXendnote}
+% \cs{bhookXendnote}\oarg{series}\marg{code} is to be used at the beginning of the endnotes.
+%
% \subsubsection{Options for notes in columns}
% For the following four macros, be careful that the columns are made from right to left.
%
@@ -1295,6 +1347,43 @@
% \DescribeMacro{\parafootsep}
% For paragraphed footnotes (see below), you can chooce the separator between each note by \cs{parafootsep}\oarg{s}\marg{l}. A common separator is double pipe (\verb+$||$+), which you can set by \cs{parafootsep}\verb+$||$+.
%
+%\subsubsection{Options for block of notes}
+% \changes{v1.1}{2012/09/12}{New options for block of notes.}
+% \DescribeMacro{\txtbeforeXnotes}
+% You can add some text before critical notes with \cs{textbeforeXnotes}\oarg{s}\marg{text}.
+%
+% \DescribeMacro{\beforeXnotes}
+% You can change the vertical space printed before the rule of the critical notes with \cs{beforeXnotes}\oarg{s}\marg{l}.
+% The default value is \verb|1.2em plus .6em minus .6em|.
+%
+% \DescribeMacro{\beforenotesX}
+% You can change the vertical space printed before the rule of the familiar notes with \cs{beforenotesX}\oarg{s}\marg{l}.
+% The default value is \verb|1.2em plus .6em minus .6em|.
+%
+% \DescribeMacro{\preXnotes}
+% You can set the space before the first series of critical notes printed on each page
+% and set a different amount of space for subsequent the series on the page.
+% You can do it with \cs{preXnotes}\marg{l}.
+% You can disable this feature by setting the length to 0~pt.
+%
+% \DescribeMacro{\prenotesX}
+% You can want the space before the first printed (in a page) series of familiar notes not to be the same as before other series.
+% You can do it with \cs{prenotesX}\marg{l}.
+% You can disable this feature by setting the length to 0~pt.
+%
+% \DescribeMacro{\maxhXnotes}
+% By default, one series of critical notes can take 80\% of the page size, before being broken to the next page.
+% If you want to change the size use \cs{maxhXnotes}\oarg{s}\marg{l}.
+% Be careful : the length can't be flexible, and is relative to the the current font.
+% For exemple, if you want that note takes, at most, 33% of the text height, do \verb|\maxhnotes{33\textheight}|.
+%
+% \DescribeMacro{\maxhnotesX}
+% \cs{maxhnotesX}\oarg{s}\marg{l} is the same as previous, but for familiar footnotes.
+%
+% Be careful with the two previous commands.
+% Actually, for technical purposes, one paragraphed note is considered as one block.
+% Consequently, it can't be broken between two pages, even if you used these commands.
+% The debug is in the todolist.
%\subsection{Page layout}
% You should set up the page layout parameters, and in particular the
% \cs{baselineskip} of the footnotes (this is done for you if you
@@ -1727,34 +1816,7 @@
% \DescribeMacro{\pageref}
% \changes{v0.2.1}{2003/08/25}{Added text about normal labeling}
% The normal \cs{label}, \cs{ref} and \cs{pageref} macros may be used
-% within numbered text, and operate in the familiar fashion. As an example,
-% here is one way of numbering paragraphs in numbered text, and then being
-% able to refer to the paragraph numbers, in addition to line and page numbers.
-% \begin{verbatim}
-% \newcounter{para} \setcounter{para}{0}
-% \newcommand{\newpara}{%
-% \refstepcounter{para}%
-% \noindent\llap{\thepar. }\quad}
-% \newcommand{\oldpara}[1]{%
-% \noindent\llap{\ref{#1}. }\quad}
-% \end{verbatim}
-% The definitions of \cs{newpara} and \cs{oldpara} put the numbers in the left
-% margin and the first line of the paragraph is indented. You can now
-% write things like:
-% \begin{verbatim}
-% \linenummargin{right}
-% \beginnumbering
-% \pstart
-% \newpara\label{P1} A paragraph about \ldots
-% \pend
-% In paragraph~\ref{P1} the author \ldots
-% \pstart
-% \oldpara{P1} This has the same
-% \edtext{number}{\Afootnote{\ref{P1} is the paragraph, not line}}
-% as the first paragraph.
-% \pend
-% \endnumbering
-% \end{verbatim}
+% within numbered text, and operate in the familiar fashion.
%
%
% \section{Side notes}
@@ -1808,7 +1870,9 @@
% \end{verbatim}
% These can of course be changed to suit.
%
-%
+% \DescribeMacro{\sidenotesep}
+% If you have two or more sidenotes for the same line, they are separated by a comma.
+% But if you want to change this separator, you can redefine the macro \cs{sidenotesep}.
% \section{Familiar footnotes} \label{sec:desc:familiar}
%
%
@@ -2170,6 +2234,30 @@
% produces a vertical dotted instead of a solid line.
%
%
+% \section{sectioning commands}
+% \changes{v1.1}{2012/09/25}{sectioning commands}
+% The standard sectioning command (\section{chapter}, \cs{section} etc.) can be used inside a numbered text.
+% But the line which contains it won't be numbered, and you can't add critical notes inside.
+%
+% However, eledmac provides the following commands :
+% \begin{itemize}
+% \item \cs{ledchapter}\oarg{text}\marg{critical text}
+% \item \cs{ledchapter*}
+% \item \cs{ledsection}\oarg{text}\marg{critical text}
+% \item \cs{ledsection*}
+% \item \cs{ledsubsection}\oarg{text}\marg{critical text}
+% \item \cs{ledsubsection*}
+% \item \cs{ledsubsubsection}\oarg{text}\marg{critical text}
+% \item \cs{ledsubsubsection*}
+% \end{itemize}
+% Which are the equivalent of the standard LaTeX commands, but be careful.
+% Note the following points :
+% \begin{enumerate}
+% \item All these commands close a \cs{pstart}, and open a new one. The content of the command itself is between \cs{pstart} and \cs{pend}.
+% \item Don't try to make \verb|\let\chapter\ledchapter|, or other things like it: the \cs{led}section commands call the standard commands.
+% \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}
% \section{Miscellaneous}
%
%
@@ -2540,7 +2628,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledmac}[2012/09/16 v1.0.1 LaTeX port of EDMAC]
+\ProvidesPackage{eledmac}[2012/09/25 v1.1 LaTeX port of EDMAC]
% \end{macrocode}
%
@@ -2560,13 +2648,17 @@
%
%
% \begin{macro}{\ifledfinal}
+% \begin{macro}{\ifparapparatus@}
% Use this to remember which option is used, set and execute the options
% with final as the default.
% \changes{v0.4}{2004/02/29}{Added final/draft options}
% \begin{macrocode}
\newif\ifledfinal
+\newif\ifparapparatus@
+\parapparatus@false
\DeclareOption{final}{\ledfinaltrue}
\DeclareOption{draft}{\ledfinalfalse}
+\DeclareOption{parapparatus}{\parapparatus@true}
\ExecuteOptions{final}
% \end{macrocode}
% Use the starred form of \verb?\ProcessOptions? which executes options in
@@ -2579,11 +2671,12 @@
% \end{macrocode}
% \end{macro}
-%
-% Loading package \emph{xargs} to declare commands with optional arguments. \emph{Etoolbox} is also used for more clear code, for example in dynamic command names (it could remplace \cs{csname} etc.)
+% \end{macro}
+% Loading package \emph{xargs} to declare commands with optional arguments. \emph{Etoolbox} is also used for more clear code, for example in dynamic command names (it could replace \cs{csname} etc.). \emph{suffix} to declare commands with starred version.
% \begin{macrocode}
\RequirePackage{xargs}
\RequirePackage{etoolbox}
+\RequirePackage{suffix}
% \end{macrocode}
% \begin{macro}{\showlemma}
% \verb?\showlemma?\marg{lemma} typesets the lemma text in the body.
@@ -2966,6 +3059,8 @@
\line@list@stuff{\jobname.\extensionchars\the\section@num}%
\l@dend@stuff
\setcounter{pstart}{1}
+ \begingroup
+ \initnumbering@sectcmd
}
\newcommand*{\initnumbering@reg}{%
\global\pst@rtedLfalse
@@ -2985,6 +3080,88 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\initnumbering@sectcmd}
+% \begin{macro}{\ledsection}
+% \begin{macro}{\ledsection*}
+% \begin{macro}{\ledsubsection}
+% \begin{macro}{\ledsubsection*}
+% \begin{macro}{\ledsubsubsection}
+% \begin{macro}{\ledsubsubsection*}
+% \begin{macro}{\ledchapter}
+% \begin{macro}{\ledchapter*}
+% \cs{initnumbering@sectcmd} define sectioning commands inside numbered section.
+% Note that it's suppose 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%
+ \pstart%
+ \leavevmode\section[##1]{##2}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend%
+ \vspace{-2\parskip}\vspace{-2\baselineskip}%
+ \pstart
+ }
+ \WithSuffix\newcommand\ledsection*[1]{%
+ \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering%
+ \pstart%
+ \leavevmode\section*{##1}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend%
+ \vspace{-2\parskip}\vspace{-2\baselineskip}%
+ \pstart
+ }
+ \newcommand{\ledsubsection}[2][]{%
+ \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering%
+ \pstart%
+ \leavevmode\subsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend%
+ \vspace{-2\parskip}\vspace{-2\baselineskip}%
+ \pstart
+ }
+ \WithSuffix\newcommand\ledsubsection*[1]{%
+ \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering%
+ \pstart%
+ \leavevmode\subsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend%
+ \vspace{-2\parskip}\vspace{-2\baselineskip}%
+ \pstart
+ }
+ \newcommand{\ledsubsubsection}[2][]{%
+ \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering%
+ \pstart%
+ \leavevmode\subsubsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend%
+ \vspace{-2\parskip}\vspace{-2\baselineskip}%
+ \pstart
+ }
+ \WithSuffix\newcommand\ledsubsubsection*[1]{%
+ \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering%
+ \pstart%
+ \leavevmode\subsubsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend%
+ \vspace{-2\parskip}\vspace{-2\baselineskip}%
+ \pstart
+ }
+ \newcommand\ledchapter[2][]{~\pend\skipnumbering\pstart\chapter[##1]{##2}\pend\pstart}
+ \WithSuffix\newcommand\ledchapter*[1]{~\pend\skipnumbering\pstart\chapter*{##1}\pend\pstart}
+ \patchcmd{\@makeschapterhead}{1\par}{1}{}{}
+ \pretocmd{\@makeschapterhead}{\par}{}{}
+ \apptocmd{\@makeschapterhead}{\par}{}{}
+ \patchcmd{\@makeschapterhead}{\vskip 40\p@}{}{}{}
+ \patchcmd{\@makechapterhead}{1\par}{1}{}{}
+ \pretocmd{\@makechapterhead}{\par}{}{}
+ \apptocmd{\@makechapterhead}{\par}{}{}
+ \patchcmd{\@makechapterhead}{\vskip 40\p@}{}{}{}
+ \apptocmd{\@chapter}{\par\leavevmode\vspace{40 \p@}\skipnumbering}{}{}
+ \apptocmd{\@schapter}{\par\leavevmode\vspace{40 \p@}\skipnumbering}{}{}
+ \newcommand\beforeledchapter{\pend\cleardoublepage\pstart}
+ \patchcmd{\chapter}{\cleardoublepage}{\relax}{}{}
+ \patchcmd{\chapter}{\clearpage}{\relax}{}{}
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\endnumbering}
% \cs{endnumbering} must follow the last text for a numbered section.
% It takes care of notifying you when changes have been noted in the
@@ -3012,7 +3189,7 @@
\else
\led@err@NumberingNotStarted
\fi
- \autoparfalse}
+ \autoparfalse\endgroup}
% \end{macrocode}
% \end{macro}
%
@@ -3102,16 +3279,19 @@
\ifx\@tempa\@tempb
\global\bypage@true
\global\bypstart@false
+ \pstartinfootnote[][false]
\else
\def\@tempb{pstart}%
\ifx\@tempa\@tempb
\global\bypage@false
\global\bypstart@true
+ \pstartinfootnote
\else
\def\@tempb{section}
\ifx\@tempa\@tempb
\global\bypage@false
\global\bypstart@false
+ \pstartinfootnote[][false]
\else
\led@warn@BadLineation
\fi
@@ -5122,6 +5302,8 @@
% \begin{macro}{\pstart}
% \begin{macro}{\numberpstarttrue}
% \begin{macro}{\numberpstartfalse}
+% \begin{macro}{\labelpstarttrue}
+% \begin{macro}{\labelpstartfalse}
% \begin{macro}{thepstart}
% \cs{pstart} starts the paragraph by
% clearing the \cs{inserts@list} list and other
@@ -5146,6 +5328,8 @@
\renewcommand{\thepstart}{{\bfseries\@arabic\c@pstart}. }
\newif\ifnumberpstart
\numberpstartfalse
+\newif\iflabelpstart
+\labelpstartfalse
\newcommand*{\pstart}{
\if@nobreak
\let\@oldnobreak\@nobreaktrue
@@ -5165,12 +5349,17 @@
\global\let\next@insert=\empty
\begingroup\normal@pars
\global\setbox\raw@text=\vbox\bgroup\ifautopar\else\ifnumberpstart\ifinstanza\else\ifsidepstartnum\else\thepstart\fi\fi\fi\fi
- \numberedpar@true}
+ \numberedpar@true
+ \iflabelpstart\protected@edef\@currentlabel
+ {\p@pstart\thepstart}\fi
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\pend}
% \cs{pend} must be used to end a numbered paragraph.
%
@@ -5195,7 +5384,7 @@
\endgraf\global\num@lines=\prevgraf\egroup
\global\par@line=0
% \end{macrocode}
-% We check if lineation is by pstart: in this case, we reset line number, but only in the second line of the pstart, to prevent some trouble. We can't reset line number at the begining of \cs{pstart} \cs{setline} is parsed at the end of previous \cs{pend}, and so, we must do it at the end of first line of pstart.
+% We check if lineation is by pstart: in this case, we reset line number, but only in the second line of the pstart, to prevent some trouble. We can't reset line number at the beginning of \cs{pstart} \cs{setline} is parsed at the end of previous \cs{pend}, and so, we must do it at the end of first line of pstart.
% \begin{macrocode}
\csnumdef{pstartline}{0}
\loop\ifvbox\raw@text
@@ -5346,7 +5535,7 @@
% \begin{macro}{\l@drd@ta}
% \begin{macro}{\l@dcsnotetext}
% Nulls the \cs{...d@ta}, which may later hold line numbers.
-% Similarly for \cs{l@dcsnotetext} for the text of a sidenote.
+% Similarly for \cs{l@dcsnotetext} for the texts of the sidenotes.
% \changes{v0.7}{2005/02/18}{Added \cs{l@demptyd@ta}}
% \begin{macrocode}
\newcommand*{\l@demptyd@ta}{%
@@ -5849,7 +6038,7 @@
% \begin{macro}{\pstartnum}
% \begin{itemize}
% \item The pstarts counter is upgrade in the \cs{pend} command. Consequently, the \cs{affixpstart@num} command has not to upgrade it, unlike the \cs{affixline@num} which upgrades the lines counter.
-% \item To print the pstart number only at the begining of a pstart, and not in every line, a boolean test is made. The \cs{pstartnum} boolean is set to TRUE at every \cs{pend}. It's tried in the \cs{leftpstartnum} and \cs{rightstartnum} commands. After the try, it is set to FALSE.
+% \item To print the pstart number only at the beginning of a pstart, and not in every line, a boolean test is made. The \cs{pstartnum} boolean is set to TRUE at every \cs{pend}. It's tried in the \cs{leftpstartnum} and \cs{rightstartnum} commands. After the try, it is set to FALSE.
% \end{itemize}
% \begin{macro}{\leftpstartnum}
% \begin{macro}{\rightstartnum}
@@ -6169,8 +6358,9 @@
% \cs{insert} for this note, calling on the \cs{footfmt} macro for
% this note series to format the text of the note.
% \begin{macrocode}
-\newcommand*{\normalvfootnote}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalvfootnote}[2]{%
\insert\csname #1footins\endcsname\bgroup
+ \csuse{bhookXnote@#1}
\csuse{Xnotefontsize@#1}
\footsplitskips
\spaceskip=\z@skip \xspaceskip=\z@skip
@@ -6196,9 +6386,10 @@
% And a somewhat different version for minipages.
% \changes{v0.4}{2004/02/29}{Added \cs{mpnormalvfootnote}}
% \begin{macrocode}
-\newcommand*{\mpnormalvfootnote}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\mpnormalvfootnote}[2]{%
\global\setbox\@nameuse{mp#1footins}\vbox{%
\unvbox\@nameuse{mp#1footins}
+ \csuse{bhookXnote@#1}
\csuse{Xnotefontsize@#1}
\hsize\columnwidth
\@parboxrestore
@@ -6232,8 +6423,8 @@
% \begin{macrocode}
\newcommand*{\ledsetnormalparstuff}{%
\normal@pars
- \parindent \z@ \parfillskip \z@ \@plus 1fil}
-\newcommandx*{\normalfootfmt}[4][4=Z]{% 4th arg is optional, for backward compatibility
+ \noindent \parfillskip \z@ \@plus 1fil}
+\notbool{parapparatus@}{\newcommandx*}{\newcommandx}{\normalfootfmt}[4][4=Z]{% 4th arg is optional, for backward compatibility
\ledsetnormalparstuff%
\hangindent=\csuse{Xhangindent@#4}
\strut{\printlinefootnote{#1}{#4}}%
@@ -6273,6 +6464,23 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\printpstart}
+% The \cs{printpstart} macro prints the pstart number for a note.
+% \begin{macrocode}
+\newcommand{\printpstart}[0]{%
+ \ifl@dpairing%
+ \ifledRcol%
+ \thepstartR%
+ \else%
+ \thepstartL%
+ \fi%
+ \else%
+ \thepstart%
+ \fi%
+}
+% \end{macrocode}
+%
+% \end{macro}
% The \cs{printlines} macro prints the line
% numbers for a note---which, in the
% general case, is a rather complicated task.
@@ -6431,17 +6639,6 @@
% \changes{v0.15}{2012/06/11}{Line numbering can be reset at each pstart.}
% \begin{macrocode}
\def\printlines#1|#2|#3|#4|#5|#6|#7|{\begingroup
- \ifbypstart@%
- \ifl@dpairing%
- \ifledRcol%
- \thepstartR%
- \else%
- \thepstartL%
- \fi%
- \else%
- \thepstart%
- \fi%
- \fi%
\setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%
% \end{macrocode}
% One subtlety left here is when to print a period between
@@ -6478,6 +6675,9 @@
% spacing problems if what you add takes up a different amount of
% space.
%
+% But if the skip \verb|\preXnotes@| is greater than 0~pt,
+% it's used instead of \verb"\skip\footins" for the first printed series.
+%
% The \cs{leftskip} and \cs{rightskip} values
% are both zeroed here.\phantomsection\label{footskips}
% Similarly, these skips are cancelled in the \verb"vfootnote" macros
@@ -6491,7 +6691,13 @@
% the footnotes. The footnotes continue to be of width \cs{hsize}.
% \begin{macrocode}
\newcommand*{\normalfootstart}[1]{%
- \vskip\skip\csname #1footins\endcsname
+ \ifdimequal{0pt}{\preXnotes@}{}%
+ {%
+ \iftoggle{preXnotes@}{%
+ \togglefalse{preXnotes@}\skip\csname #1footins\endcsname=\csuse{preXnotes@}}%
+ {}%
+ }%
+ \vskip\skip\csname #1footins\endcsname%
\leftskip0pt \rightskip0pt
\csname #1footnoterule\endcsname}
% \end{macrocode}
@@ -6512,7 +6718,7 @@
% contents of the footnote-insert box to the output page without
% alteration.
% \begin{macrocode}
-\newcommand*{\normalfootgroup}[1]{\unvbox\csname #1footins\endcsname}
+\newcommand*{\normalfootgroup}[1]{{\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\unvbox\csname #1footins\endcsname}
% \end{macrocode}
% \end{macro}
@@ -6525,7 +6731,8 @@
\vskip\skip\@nameuse{mp#1footins}
\normalcolor
\@nameuse{#1footnoterule}
- \unvbox\csname mp#1footins\endcsname}}
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}
+ \unvbox\csname mp#1footins\endcsname}}
% \end{macrocode}
% \end{macro}
@@ -6568,17 +6775,43 @@
%
% \begin{macro}{\ledfootinsdim}
% Have a constant value for the \verb?\dimen\footins?
-% \changes{v0.4.1}{2004/03/25}{Added \cs{ledfootinsdim}}
+% \changes{v1.1}{2012/09/25}{Deprecated \cs{ledfootinsdim}}
% \begin{macrocode}
-\newcommand*{\ledfootinsdim}{0.8\vsize}
-
+\newcommand*{\ledfootinsdim}{0.8\vsize} % kept for backward compatibility, should'nt be used anymore.
% \end{macrocode}
% \end{macro}
+
%
+% \begin{macro}{\preXnotes@}
+% \begin{macro}{\preXnotes}
+% \changes{v1.1}{2012/09/25}{New skip \cs{preXnotes@}}
+% If user redefines \cs{preXnotes@}, via \cs{preXnotes} to a value greater than 0~pt,
+% this skip will be added before first series notes
+% instead of the notes skip.
+% \begin{macrocode}
+\newtoggle{preXnotes@}
+\toggletrue{preXnotes@}
+\newcommand{\preXnotes@}{0pt}
+\newcommand*{\preXnotes}[1]{\renewcommand{\preXnotes@}{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% The same, but for familiar footnotes.
+% \begin{macro}{\preXnotes}
+% \begin{macro}{\preXnotes@}
+% \begin{macrocode}
+\newtoggle{prenotesX@}
+\toggletrue{prenotesX@}
+\newcommand{\prenotes@X}{0pt}
+\newcommand*{\prenotesX}[1]{\renewcommand{\prenotesX@}{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% Now we set up the \cs{footnormal} macro itself. It takes
% one argument: the footnote series letter.
% \begin{macrocode}
\newcommand*{\footnormal}[1]{%
+ \csgdef{series@display#1}{normal}
\expandafter\let\csname #1footstart\endcsname=\normalfootstart
\expandafter\let\csname v#1footnote\endcsname=\normalvfootnote
\expandafter\let\csname #1footfmt\endcsname=\normalfootfmt
@@ -6586,8 +6819,8 @@
\expandafter\let\csname #1footnoterule\endcsname=%
\normalfootnoterule
\count\csname #1footins\endcsname=1000
- \dimen\csname #1footins\endcsname=\ledfootinsdim
- \skip\csname #1footins\endcsname=1.2em \@plus .6em \@minus .6em
+ \dimen\csname #1footins\endcsname=\csuse{maxhXnotes@#1}
+ \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}
% \end{macrocode}
% Now do the setup for minipage footnotes. We use as much as possible of the
% normal setup as we can (so the notes will have a similar layout).
@@ -6596,8 +6829,8 @@
\expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
\expandafter\let\csname mp#1footgroup\endcsname=\mpnormalfootgroup
\count\csname mp#1footins\endcsname=1000
- \dimen\csname mp#1footins\endcsname=\ledfootinsdim
- \skip\csname mp#1footins\endcsname=1.2em \@plus .6em \@minus .6em
+ \dimen\csname mp#1footins\endcsname=\csuse{maxhXnotes@#1}
+ \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}
}
% \end{macrocode}
@@ -6640,6 +6873,7 @@
% (\texttt{A}--\texttt{E}) denoting the series of notes to be paragraphed.
% \begin{macrocode}
\newcommand*{\footparagraph}[1]{%
+ \csgdef{series@display#1}{paragraph}
\expandafter\newcount\csname prevpage#1@num\endcsname
\expandafter\let\csname #1footstart\endcsname=\parafootstart
\expandafter\let\csname v#1footnote\endcsname=\para@vfootnote
@@ -6708,7 +6942,13 @@
% \begin{macrocode}
\newcommand*{\parafootstart}[1]{%
\rightskip=0pt \leftskip=0pt \parindent=0pt
- \vskip\skip\csname #1footins\endcsname
+ \ifdimequal{0pt}{\preXnotes@}{}%
+ {%
+ \iftoggle{preXnotes@}{%
+ \togglefalse{preXnotes@}\skip\csname #1footins\endcsname=\csuse{preXnotes@}}%
+ {}%
+ }%
+ \vskip\skip\csname #1footins\endcsname%
\csname #1footnoterule\endcsname}
% \end{macrocode}
% \end{macro}
@@ -6798,6 +7038,7 @@
\newcommand*{\para@vfootnote}[2]{%
\insert\csname #1footins\endcsname
\bgroup
+ \csuse{bhookXnote@#1}
\csuse{Xnotefontsize@#1}
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
@@ -6837,6 +7078,7 @@
\newcommand*{\mppara@vfootnote}[2]{%
\global\setbox\@nameuse{mp#1footins}\vbox{%
\unvbox\@nameuse{mp#1footins}%
+ \csuse{bhookXnote@#1}
\csuse{Xnotefontsize@#1}
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
@@ -6916,7 +7158,7 @@
\newcommand*{\para@footgroup}[1]{%
\unvbox\csname #1footins\endcsname
\makehboxofhboxes
- \setbox0=\hbox{\unhbox0 \removehboxes}%
+ \setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}}\unhbox0 \removehboxes}%
\csuse{Xnotefontsize@#1}
\noindent\unhbox0\par}
@@ -6932,7 +7174,7 @@
\@nameuse{#1footnoterule}%
\unvbox\csname mp#1footins\endcsname
\makehboxofhboxes
- \setbox0=\hbox{\unhbox0 \removehboxes}%
+ \setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}}\unhbox0 \removehboxes}%
\csuse{Xnotefontsize@#1}
\noindent\unhbox0\par}}
@@ -6958,7 +7200,7 @@
% \end{macro}
%
% \subsubsection{Insertion of the footnotes separator}
-%The command \cs{insertparafootsep}\marg{series} must be called at the begining of \cs{parafootftm} (and like commands).
+%The command \cs{insertparafootsep}\marg{series} must be called at the beginning of \cs{parafootftm} (and like commands).
% \begin{macro}{\prevpage@num}
% \begin{macro}{\insertparafootsep}
% \begin{macrocode}
@@ -7025,6 +7267,7 @@
% \cs{hsize} has been set for the document.
% \begin{macrocode}
\newcommand*{\footthreecol}[1]{%
+ \csgdef{series@display#1}{threecol}
\expandafter\let\csname v#1footnote\endcsname=\threecolvfootnote
\expandafter\let\csname #1footfmt\endcsname=\threecolfootfmt
\expandafter\let\csname #1footgroup\endcsname=\threecolfootgroup
@@ -7095,7 +7338,7 @@
% The arguments are 1)~the note series letter and 2)~the full text
% of the note (including numbers, lemma and text).
% \begin{macrocode}
-\newcommand*{\threecolvfootnote}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\threecolvfootnote}[2]{%
\insert\csname #1footins\endcsname\bgroup
\csuse{Xnotefontsize@#1}
\footsplitskips
@@ -7116,7 +7359,7 @@
% text of the \verb"-footnote" command 4) optional (for backward compatibility): the series.
%
% \begin{macrocode}
-\newcommandx*{\threecolfootfmt}[4][4=Z]{%
+\notbool{parapparatus@}{\newcommandx*}{\newcommandx}{\threecolfootfmt}[4][4=Z]{%
\normal@pars
\hsize \csuse{hsizethreecol@#4}
\parindent=0pt
@@ -7150,6 +7393,7 @@
% \cs{rigidbalance} directly, without any re-boxing.
% \begin{macrocode}
\newcommand*{\threecolfootgroup}[1]{{\notefontsetup
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname #1footins\endcsname \thr@@ \splittopskip}}
@@ -7163,6 +7407,7 @@
\vskip\skip\@nameuse{mp#1footins}
\normalcolor
\@nameuse{#1footnoterule}
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname mp#1footins\endcsname \thr@@ \splittopskip}}
@@ -7178,6 +7423,7 @@
% \cs{hsize} has been set for the document.
% \begin{macrocode}
\newcommand*{\foottwocol}[1]{%
+ \csgdef{series@display#1}{twocol}
\expandafter\let\csname v#1footnote\endcsname=\twocolvfootnote
\expandafter\let\csname #1footfmt\endcsname=\twocolfootfmt
\expandafter\let\csname #1footgroup\endcsname=\twocolfootgroup
@@ -7209,13 +7455,13 @@
\multiply\dimen\csname #1footins\endcsname \tw@}
% \end{macrocode}
% \begin{macrocode}
-\newcommand*{\twocolvfootnote}[2]{\insert\csname #1footins\endcsname\bgroup
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\twocolvfootnote}[2]{\insert\csname #1footins\endcsname\bgroup
\csuse{Xnotefontsize@#1}
\footsplitskips
\csname #1footfmt\endcsname #2[#1]\egroup}
% \end{macrocode}
% \begin{macrocode}
-\newcommandx*{\twocolfootfmt}[4][4=Z]{% 4th arg is optional, for backward compatibility
+\notbool{parapparatus@}{\newcommandx*}{\newcommandx}{\twocolfootfmt}[4][4=Z]{% 4th arg is optional, for backward compatibility
\normal@pars
\hsize \csuse{hsizetwocol@#4}
\parindent=0pt
@@ -7233,6 +7479,7 @@
% \end{macrocode}
% \begin{macrocode}
\newcommand*{\twocolfootgroup}[1]{{\csuse{Xnotefontsize@#1}
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname #1footins\endcsname \tw@ \splittopskip}}
@@ -7256,6 +7503,7 @@
\vskip\skip\@nameuse{mp#1footins}
\normalcolor
\@nameuse{#1footnoterule}
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname mp#1footins\endcsname \tw@ \splittopskip}}
@@ -7454,6 +7702,7 @@
% \begin{macrocode}
\newcommand*{\normalvfootnoteX}[2]{%
\insert\@nameuse{footins#1}\bgroup
+ \csuse{bhooknoteX@#1}
\csuse{notefontsizeX@#1}
\footsplitskips
\spaceskip=\z@skip \xspaceskip=\z@skip
@@ -7468,6 +7717,7 @@
\newcommand*{\mpnormalvfootnoteX}[2]{%
\global\setbox\@nameuse{mpfootins#1}\vbox{%
\unvbox\@nameuse{mpfootins#1}
+ \csuse{bhooknoteX@#1}
\csuse{notefontsizeX@#1}
\hsize\columnwidth
\@parboxrestore
@@ -7505,7 +7755,13 @@
% starting macro used in the output routine.
% \begin{macrocode}
\newcommand*{\normalfootstartX}[1]{%
- \vskip\skip\@nameuse{footins#1}%
+ \ifdimequal{0pt}{\prenotesX@}{}%
+ {%
+ \iftoggle{prenotesX@}{%
+ \togglefalse{prenotesX@} \skip\csname footins#1\endcsname=\csuse{prenotesX@}}%
+ {}%
+ }%
+ \vskip\skip\csname footins#1\endcsname%
\leftskip=\z@
\rightskip=\z@
\@nameuse{footnoterule#1}}
@@ -7589,6 +7845,7 @@
% each series.
% \begin{macrocode}
\newcommand*{\footnormalX}[1]{%
+ \csgdef{series@displayX#1}{normalX}
\expandafter\let\csname footstart#1\endcsname=\normalfootstartX
\@namedef{@footnotemark#1}{\normal@footnotemarkX{#1}}
\@namedef{bodyfootmark#1}{\normalbodyfootmarkX{#1}}
@@ -7599,17 +7856,16 @@
\expandafter\let\csname footgroup#1\endcsname=\normalfootgroupX
\expandafter\let\csname footnoterule#1\endcsname=\normalfootnoteruleX
\count\csname footins#1\endcsname=1000
- \dimen\csname footins#1\endcsname=\ledfootinsdim
- \skip\csname footins#1\endcsname=1.2em \@plus .6em \@minus .6em
+ \dimen\csname footins#1\endcsname=\csuse{maxhnotesX@#1}
+ \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}
% \end{macrocode}
% Aditions for minipages.
% \begin{macrocode}
\expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
\expandafter\let\csname mpfootgroup#1\endcsname=\mpnormalfootgroupX
\count\csname mpfootins#1\endcsname=1000
-% \dimen\csname mpfootins#1\endcsname=0.8\vsize
- \dimen\csname mpfootins#1\endcsname=\ledfootinsdim
- \skip\csname mpfootins#1\endcsname=1.2em \@plus .6em \@minus .6em
+ \dimen\csname mpfootins#1\endcsname=\csuse{maxhnotesX@#1}
+ \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}
}
% \end{macrocode}
@@ -7624,6 +7880,7 @@
% \cs{foottwocolX}\marg{series}
% \begin{macrocode}
\newcommand*{\foottwocolX}[1]{%
+ \csgdef{series@displayX#1}{twocol}
\expandafter\let\csname regvfootnote#1\endcsname=\twocolvfootnoteX
\expandafter\let\csname footfmt#1\endcsname=\twocolfootfmtX
\expandafter\let\csname footgroup#1\endcsname=\twocolfootgroupX
@@ -7711,6 +7968,7 @@
% \cs{footthreecolX}\marg{series}
% \begin{macrocode}
\newcommand*{\footthreecolX}[1]{%
+ \csgdef{series@displayX#1}{threecol}
\expandafter\let\csname regvfootnote#1\endcsname=\threecolvfootnoteX
\expandafter\let\csname footfmt#1\endcsname=\threecolfootfmtX
\expandafter\let\csname footgroup#1\endcsname=\threecolfootgroupX
@@ -7795,6 +8053,7 @@
% \cs{footparagraphX}\marg{series}
% \begin{macrocode}
\newcommand*{\footparagraphX}[1]{%
+ \csgdef{series@displayX#1}{paragraph}
\expandafter\newcount\csname prevpage#1@num\endcsname
\expandafter\let\csname footstart#1\endcsname=\parafootstartX
\expandafter\let\csname regvfootnote#1\endcsname=\para@vfootnoteX
@@ -7829,7 +8088,13 @@
% \cs{parafootstartX}\marg{series}
% \begin{macrocode}
\newcommand*{\parafootstartX}[1]{%
- \vskip\skip\@nameuse{footins#1}%
+ \ifdimequal{0pt}{\prenotesX@}{}%
+ {%
+ \iftoggle{prenotesX@}{%
+ \togglefalse{prenotesX@}\skip\csname footins#1\endcsname=\csuse{prenotesX@}}%
+ {}%
+ }%
+ \vskip\skip\csname footins#1\endcsname%
\leftskip=\z@
\rightskip=\z@
\parindent=\z@
@@ -7846,6 +8111,7 @@
\newcommand*{\para@vfootnoteX}[2]{%
\insert\csname footins#1\endcsname
\bgroup
+ \csuse{bhooknoteX@#1}
\csuse{notefontsizeX@#1}
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
@@ -7859,6 +8125,7 @@
\newcommand*{\mppara@vfootnoteX}[2]{%
\global\setbox\@nameuse{mpfootins#1}\vbox{%
\unvbox\@nameuse{mpfootins#1}
+ \csuse{bhooknoteX@#1}
\csuse{notefontsizeX@#1}
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
@@ -8001,9 +8268,15 @@
\csgdef{Xnotefontsize@#1}{\notefontsetup}%
\csgdef{notefontsizeX@#1}{\notefontsetup}%
\csgdef{Xendnotefontsize@#1}{\notefontsetup}%
+ \csgdef{bhooknoteX@#1}{}%
+ \csgdef{bhookXnote@#1}{}%
+ \csgdef{bhookXendnote@#1}{}%
\csgdef{boxlinenum@#1}{0pt}%
\csgdef{boxsymlinenum@#1}{0pt}%
\newtoggle{numberonlyfirstinline@#1}%
+ \newtoggle{numberonlyfirstintwolines@#1}%
+ \newtoggle{onlypstartinfootnote@#1}%
+ \newtoggle{pstartinfootnote@#1}%
\csgdef{symlinenum@#1}{\symplinenum}%
\newtoggle{nonumberinfootnote@#1}%
\csgdef{beforenumberinfootnote@#1}{0pt}%
@@ -8017,6 +8290,11 @@
\csgdef{inplaceoflemmaseparator@#1}{1em}%
\csgdef{afternote@#1}{1em plus.4em minus.4em}%
\csgdef{parafootsep@#1}{\parafootftmsep}%
+ \csgdef{beforeXnotes@#1}{1.2em \@plus .6em \@minus .6em}
+ \csgdef{beforenotesX@#1}{1.2em \@plus .6em \@minus .6em}
+ \csgdef{txtbeforeXnotes@#1}{}
+ \csgdef{maxhnotesX@#1}{\ledfootinsdim}%
+ \csgdef{maxhXnotes@#1}{\ledfootinsdim}
% \end{macrocode}
% \subsubsection{Create inserts, needed to add notes in foot}
% Concerning inserts, see chapter 15 of the TeXBook by D. Knuth
@@ -8031,7 +8309,7 @@
% Note the double \# in command: it's because command is made inside another command.
% \begin{macrocode}
- \global\expandafter\newcommand\expandafter *\csname #1footnote\endcsname[2][]{%
+ \global\notbool{parapparatus@}{\expandafter\newcommand\expandafter *}{\expandafter\newcommand}\csname #1footnote\endcsname[2][]{%
\begingroup%
\newcommand{\content}{##2}%
\ifnumberedpar@
@@ -8055,8 +8333,9 @@
\endgroup
}
% \end{macrocode}
-%Set standard display
+%Set standard display and remember the display.
% \begin{macrocode}
+ \csgdef{series@display#1}{}
\footnormal{#1}
% \end{macrocode}
%\subsubsection{Create tools for familiar footnotes (\cs{footnoteX})}
@@ -8080,6 +8359,7 @@
% \end{macrocode}
% Don't forget to initialize series
% \begin{macrocode}
+ \csgdef{series@displayX#1}{}
\footnormalX{#1}
% \end{macrocode}
% \subsubsection{The endnotes}
@@ -8125,28 +8405,60 @@
% \begin{macrocode}
\newseries{A,B,C,D,E,Z}
% \end{macrocode}
+% \subsubsection{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.
+% The series can be the result of a command.
+% \begin{macrocode}
+\newcommand{\seriesatbegin}[1]{
+ \edef\series{#1}
+ \def\new{}
+ \listeadd{\new}{\series}
+ \renewcommand{\do}[1]{\ifcsstring{series}{##1}{}{\listadd{\new}{##1}}}
+ \dolistloop{\@series}
+ \xdef\@series{\new}
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\seriesatend}
+% And \cs{seriesatend} moves the series to the end of the list.
+% \begin{macrocode}
+\newcommand{\seriesatend}[1]{
+ \edef\series{#1}
+ \def\new{}
+ \renewcommand{\do}[1]{\ifcsstring{series}{##1}{}{\listadd{\new}{##1}}}
+ \dolistloop{\@series}
+ \listeadd{\new}{\series}
+ \xdef\@series{\new}
+}
+% \end{macrocode}
+% \end{macro}
% \subsection{Display}
% \changes{v1.0}{2012/09/15}{New generic commands to customize footnote display.}
% \subsubsection{Options}
% \begin{macro}{\settoggle@series}
+% \changes{v1.1}{2012/09/25}{\cs{settoggle@series} switch the global value of the toggle, not only the local value.}
% \cs{settoggle@series}\cs{series}{toggle}{value} is a generic command to switch one toggle for one series.
% \begin{macrocode}
\newcommand{\settoggle@series}[3]{%
- \renewcommand{\do}[1]{\settoggle{#2@##1}{#3}}
+ \renewcommand{\do}[1]{\global\settoggle{#2@##1}{#3}}
\ifstrempty{#1}{%
\dolistloop{\@series}%
- }%
- {%
+ }%
+ {%
\docsvlist{#1}%
- }%
+ }%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\setcommand@series}
% \cs{setcommand@series}\marg{series}\marg{command}\marg{value} is a generic command to change one command for one series.
% \begin{macrocode}
-\newcommand{\setcommand@series}[3]{%
- \renewcommand{\do}[1]{\csgdef{#2@##1}{#3}}
+\newcommandx{\setcommand@series}[4][4]{%
+ \renewcommand{\do}[1]{
+ \csgdef{#2@##1}{#3}
+ \ifstrequal{#4}{reload}{\csuse{foot\csuse{series@display##1}}{##1}}{}}
\ifstrempty{#1}{%
\dolistloop{\@series}%
}%
@@ -8176,9 +8488,15 @@
\newhookcommand@series{Xnotenumfont}
+\newhookcommand@series{notenumfontX}
+
\newhookcommand@series{Xendnotenumfont}
-\newhookcommand@series{notenumfontX}
+\newhookcommand@series{bhooknoteX}
+
+\newhookcommand@series{bhookXnote}
+
+\newhookcommand@series{bhookXendnote}
\newhookcommand@series{Xnotefontsize}
@@ -8214,8 +8532,28 @@
\newhookcommand@series{afternote}
+\newhookcommand@series{txtbeforeXnotes}
+
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\newhookcommand@series@reload}
+% \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}
+\newcommand{\newhookcommand@series@reload}[1]{%
+ \global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{%
+ \csuse{setcommand@series}{##1}{#1}{##2}[reload]
+ }%
+}
+\newhookcommand@series@reload{beforeXnotes}
+
+\newhookcommand@series@reload{beforenotesX}
+
+\newhookcommand@series@reload{maxhnotesX}
+
+\newhookcommand@series@reload{maxhXnotes}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\newhooktoggle@series}
%\cs{newhooktoggle@series}\cs{command names} is a generic command to add new commands for new toggle hook, like \cs{numberonlyfirstinline}.
% \begin{macrocode}
@@ -8223,7 +8561,10 @@
\global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{\settoggle@series{##1}{#1}{##2}}%
}
\newhooktoggle@series{numberonlyfirstinline}
+\newhooktoggle@series{numberonlyfirstintwolines}
\newhooktoggle@series{nonumberinfootnote}
+\newhooktoggle@series{pstartinfootnote}
+\newhooktoggle@series{onlypstartinfootnote}
% \end{macrocode}
% \end{macro}
% \subsubsection{Old commands, kept for backward compatibility}
@@ -8288,8 +8629,18 @@
% 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.
% \begin{macrocode}
\newcommand{\printlinefootnote}[2]{%
+ \def\extractline@##1|##2|##3|##4|##5|##6|##7|{##2}%
+ \def\extractsubline@##1|##2|##3|##4|##5|##6|##7|{##3}%
+ \def\extractendline@##1|##2|##3|##4|##5|##6|##7|{##5}%
+ \def\extractendsubline@##1|##2|##3|##4|##5|##6|##7|{##6}%
+ \iftoggle{numberonlyfirstintwolines@#2}{%
+ \edef\lineinfo@{\extractline@ #1| - \extractsubline@ #1| - \extractendline@ #1| - \extractendsubline@ #1|}%
+ }%
+ {%
+ \edef\lineinfo@{\extractline@ #1| - \extractsubline@ #1|}%
+ }%
\iftoggle{nonum@}{%Try if the line number must printed for this specific not (by default, yes)
- \hspace{\csuse{inplaceofnumber@#2}}%
+ \hspace{\csuse{inplaceofnumber@#2}}%
}%
{%
{%
@@ -8302,7 +8653,7 @@
{%
\ifcsdef{prevline#2}%
{%Be sure the \prevline exists.
- \ifnumequal{\csuse{prevline#2}}{\line@num}%Try it
+ \ifcsequal{prevline#2}{lineinfo@}%Try it
{%
\ifcsempty{symlinenum@#2}% Try if a symbol is define
{%
@@ -8310,16 +8661,20 @@
}%
{\hspace{\csuse{beforesymlinenum@#2}}\csuse{Xnotenumfont@#2}%
\ifdimequal{\csuse{boxsymlinenum@#2}}{0pt}%
- {\csuse{symlinenum@#2}}%
- {\hbox to \csuse{boxsymlinenum@#2}{\csuse{symlinenum@#2}\hfill}}%
- \hspace{\csuse{aftersymlinenum@#2}}}%
+ {\csuse{symlinenum@#2}}%
+ {\hbox to \csuse{boxsymlinenum@#2}{\csuse{symlinenum@#2}\hfill}}%
+ \hspace{\csuse{aftersymlinenum@#2}}}%
}%
{%
\hspace{\csuse{beforenumberinfootnote@#2}}\csuse{Xnotenumfont@#2}%
\ifdimequal{\csuse{boxlinenum@#2}}{0pt}{%
+ \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
\printlines#1|}%
{%
- \hbox to \csuse{boxlinenum@#2}{\printlines#1|\hfill}%
+ \hbox to \csuse{boxlinenum@#2}{%
+ \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
+ \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}%
+ \hfill}%
}%
\hspace{\csuse{afternumberinfootnote@#2}}%
}%
@@ -8327,9 +8682,13 @@
{%
\hspace{\csuse{beforenumberinfootnote@#2}}\csuse{Xnotenumfont@#2}%
\ifdimequal{\csuse{boxlinenum@#2}}{0pt}{%
- \printlines#1|}%
+ \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
+ \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}}%
{%
- \hbox to \csuse{boxlinenum@#2}{\printlines#1|\hfill}%
+ \hbox to \csuse{boxlinenum@#2}{%
+ \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
+ \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}%
+ \hfill}%
}%
\hspace{\csuse{afternumberinfootnote@#2}}%
}%
@@ -8337,13 +8696,18 @@
{%
\hspace{\csuse{beforenumberinfootnote@#2}}\csuse{Xnotenumfont@#2}%
\ifdimequal{\csuse{boxlinenum@#2}}{0pt}{%
- \printlines#1|}%
+ \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
+ \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}%
+ }%
{%
- \hbox to \csuse{boxlinenum@#2}{\printlines#1|\hfill}%
+ \hbox to \csuse{boxlinenum@#2}{%
+ \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
+ \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}%
+ \hfill}%
}%
\hspace{\csuse{afternumberinfootnote@#2}}%
}%
- \csnumgdef{prevline#2}{\line@num}%
+ \csxdef{prevline#2}{\lineinfo@}%
}%
}%
}%
@@ -9132,7 +9496,7 @@
% \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{Xendnotefontsize@#4}{\csuse{Xendnotenumfont@#4}\printendlines#1|}%
+\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]{}
@@ -9435,10 +9799,11 @@
% \begin{macro}{\vl@drsnote}
% \begin{macro}{\vl@dcsnote}
% Put the left/right text into boxes, but just save the moveable text.
+% \cs{l@dcsnotetext} is a etoolbox list (comma separated)
% \begin{macrocode}
\newcommand*{\vl@dlsnote}[1]{\setl@dlp@rbox{#1}}
\newcommand*{\vl@drsnote}[1]{\setl@drp@rbox{#1}}
-\newcommand*{\vl@dcsnote}[1]{\gdef\l@dcsnotetext{#1}}
+\newcommand*{\vl@dcsnote}[1]{\listgadd{\l@dcsnotetext}{#1}}
% \end{macrocode}
% \end{macro}
@@ -9461,7 +9826,6 @@
\else
=\vbox to 0.70\baselineskip{\strut#1\vss}%
\fi}}
-%% \global\setbox\l@dlp@rbox=\vbox to\z@{#3\vss}}}% aligns on top line
\newcommand*{\setl@drp@rbox}[1]{%
{\parindent\z@\hsize=\ledrsnotewidth\ledrsnotefontsetup
\global\setbox\l@drp@rbox
@@ -9476,30 +9840,43 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\savel@dcsnote}
-% \begin{macro}{\l@dcsnotetext}
-% Save the moveable note text in \cs{l@dcsnotetext}.
-% \begin{macrocode}
-\newcommand*{\savel@dcsnote}[3]{%
- \gdef\l@dcsnotetext{#3}}
-
-% \end{macrocode}
-% \end{macro}
+% \begin{macro}{\sidenotesep}
+% This macro is used to separate sidenotes of the same line.
+% \begin{macrocode}
+\newcommand{\sidenotesep}{, }
+% \end{macrocode}
% \end{macro}
-%
% \begin{macro}{\affixside@note}
% This macro puts any moveable sidenote text into the left or right sidenote
% box, depending on which margin it is meant to go in. It's a very much
% stripped down version of \cs{affixlin@num}.
+%
+% Before do it, we concatenate all moveable sidenotes of the line, using \cs{sidenotesep} as separator.
+% It's the result that we put on the sidenote.
% \begin{macrocode}
\newcommand*{\affixside@note}{%
+ \def\sidenotecontent@{}%
+ \numdef{\itemcount@}{0}%
+ \renewcommand{\do}[1]{%
+ \ifnumequal{\itemcount@}{0}%
+ {%
+ \appto\sidenotecontent@{##1}}% Not print not separator before the 1st note
+ {\appto\sidenotecontent@{\sidenotesep ##1}%
+ }%
+ \numdef{\itemcount@}{\itemcount@+1}%
+ }%
+ \dolistloop{\l@dcsnotetext}%
+ \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space sidenotes on line \the\line@num\space p. \the\page@num,}}{}
+% \end{macrocode}
+% And now, the main part of the macro
+% \begin{macrocode}
\gdef\@templ@d{}%
\ifx\@templ@d\l@dcsnotetext \else
\if@twocolumn
\if@firstcolumn
- \setl@dlp@rbox{\l@dcsnotetext}%
+ \setl@dlp@rbox{##1}{\sidenotecontent@}%
\else
- \setl@drp@rbox{\l@dcsnotetext}%
+ \setl@drp@rbox{\sidenotecontent@}%
\fi
\else
\@l@dtempcntb=\sidenote@margin
@@ -9507,13 +9884,12 @@
\advance\@l@dtempcntb by\page@num
\fi
\ifodd\@l@dtempcntb
- \setl@drp@rbox{\l@dcsnotetext}%
+ \setl@drp@rbox{\sidenotecontent@}%
\else
- \setl@dlp@rbox{\l@dcsnotetext}%
+ \setl@dlp@rbox{\sidenotecontent@}%
\fi
\fi
- \fi}
-
+\fi}
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/eledmac/eledpar.dtx b/Master/texmf-dist/source/latex/eledmac/eledpar.dtx
index e17b5877653..9f32f43b5d6 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{3836}
+% \CheckSum{3881}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -136,6 +136,7 @@
% \def\fileversion{v0.12}\def\filedate{2012/08/03}
% \def\fileversion{v1.0}\def\filedate{2012/09/14}
% \def\fileversion{v1.0.1}\def\filedate{2012/09/16}
+% \def\fileversion{v1.1}\def\filedate{2012/09/25}
% \changes{v0.1}{2004/12/10}{First public release}
% \changes{v0.2}{2005/01/01}{Fix babel problems}
% \changes{v0.3}{2005/03/24}{Reorganize for ledarab}
@@ -155,6 +156,7 @@
% \changes{v0.10}{2012/04/04}{\cs{edlabel} commands on the right side are now correctly indicated.}
% \changes{v1.0}{2012/09/14}{Compatibility with eledmac. Change name to eledpar.}
% \changes{v1.0.1}{2012/09/16}{Correction on \cs{numberonlyfirstinline} with lineation by pstart or by page.}
+% \changes{v1.1}{2012/09/25}{Shiftedverses becomes shiftedpstarts.}
% \hyphenation{man-u-script man-u-scripts}
%
% \newcommand{\Lpack}[1]{\textsf{#1}}
@@ -499,7 +501,13 @@
% come at different positions --- if one chunk is shorter than the other
% then blank lines are output on the shorter side until the end of the longer
% chunk is reached.
-%
+%
+% However, sometime if the left pstarts are much greater than right pstarts,
+% or \emph{vice-versa},
+% you can decide to shift the pstarts on the left and right side.
+% That means the start of pstarts are not aligned horizontally on the page,
+% the shift is offset at the end of each double pages.
+% To enable this function, load eledpar with the option \verb+shiftedpstarts+.
% \section{Numbering text lines and paragraphs}
%
% \DescribeMacro{\beginnumbering}
@@ -712,17 +720,21 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledpar}[2012/09/16 v1.0.1 eledmac extension for parallel texts]
+\ProvidesPackage{eledpar}[2012/09/25 v1.1 eledmac extension for parallel texts]
% \end{macrocode}
-% With the option `shiftedverses' a long verse one the left side (or in the right side) don't make a blank on the corresponding verse, but the blank is put on the bottom of the page. Consequently, the verses on the parallel pages are shifted, but the shifted stop at every end of pages.
-%
+% 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.
+% The \cs{shiftedverses} is kept for backward compatibility.
+% \begin{macro}{\ifshiftedpstarts}
% \begin{macrocode}
-\newif\ifshiftedverses
-\shiftedversesfalse
-\DeclareOption{shiftedverses}{\shiftedversestrue}
+\newif\ifshiftedpstarts
+\let\shiftedversestrue\shiftedpstartstrue
+\let\shiftedversesfalse\shiftedpstartsfalse
+\DeclareOption{shiftedverses}{\shiftedpstartstrue}
+\DeclareOption{shiftedpstarts}{\shiftedpstartstrue}
\ProcessOptions
% \end{macrocode}
+% \end{macro}
% As noted above, much of the code is a duplication of the original
% \Eledmac{} code to handle the extra box(es) for the right hand side text,
% and sometimes for the left hand side as well. In order to distinguish
@@ -1021,12 +1033,12 @@
\global\bypage@Rfalse
\global\bypstart@Rtrue
\else
- \def@tempb{section}
- \ifx\@tempa\@tempb
+ \def@tempb{section}
+ \ifx\@tempa\@tempb
\global\bypage@Rfalse
\global\bypstart@Rfalse
- \else
- \led@warn@BadLineation
+ \else
+ \led@warn@BadLineation
\fi
\fi
\fi
@@ -2280,6 +2292,7 @@
%
% \begin{macro}{\pstartL}
% \begin{macro}{\pstartR}
+% changes{v1.1}{2012/09/25}{Add \cs{labelpstarttrue} (from eledmac).}
% \cs{pstart} starts the paragraph by
% clearing the \cs{inserts@list} list and other
% relevant variables, and then arranges for the
@@ -2305,11 +2318,11 @@
\newcommand*{\pstartL}{
\if@nobreak
- \let\@oldnobreak\@nobreaktrue
+ \let\@oldnobreak\@nobreaktrue
\else
- \let\@oldnobreak\@nobreakfalse
+ \let\@oldnobreak\@nobreakfalse
\fi
- \@nobreaktrue
+ \@nobreaktrue
\ifnumbering \else
\led@err@PstartNotNumbered
\beginnumbering
@@ -2323,7 +2336,7 @@
% and set \cs{ifpst@rtedL} to FALSE. Save the pstartL counter.
% \begin{macrocode}
\ifpst@rtedL\else
- \setcounter{pstartLold}{\value{pstartL}}%
+ \setcounter{pstartLold}{\value{pstartL}}%
\list@clear{\inserts@list}%
\global\let\next@insert=\empty
\global\pst@rtedLtrue
@@ -2341,17 +2354,20 @@
\fi
\global\setnamebox{l@dLcolrawbox\the\l@dnumpstartsL}=\vbox\bgroup\ifautopar\else\ifnumberpstart\ifsidepstartnum\else\thepstartL\fi\fi\fi%
\hsize=\Lcolwidth
- \numberedpar@true}
+ \numberedpar@true
+ \iflabelpstart\protected@edef\@currentlabel
+ {\p@pstartL\thepstartL}\fi
+ }
% \end{macrocode}
%
% \begin{macrocode}
\newcommand*{\pstartR}{
\if@nobreak
- \let\@oldnobreak\@nobreaktrue
+ \let\@oldnobreak\@nobreaktrue
\else
- \let\@oldnobreak\@nobreakfalse
+ \let\@oldnobreak\@nobreakfalse
\fi
- \@nobreaktrue
+ \@nobreaktrue
\ifnumberingR \else
\led@err@PstartNotNumbered
\beginnumberingR
@@ -2361,7 +2377,7 @@
\pendR
\fi
\ifpst@rtedR\else
- \setcounter{pstartRold}{\value{pstartR}}%
+ \setcounter{pstartRold}{\value{pstartR}}%
\list@clear{\inserts@listR}%
\global\let\next@insertR=\empty
\global\pst@rtedRtrue
@@ -2374,7 +2390,10 @@
\fi
\global\setnamebox{l@dRcolrawbox\the\l@dnumpstartsR}=\vbox\bgroup\ifautopar\else\ifnumberpstart\ifsidepstartnum\else\thepstartR\fi\fi\fi%
\hsize=\Rcolwidth
- \numberedpar@true}
+ \numberedpar@true
+ \iflabelpstart\protected@edef\@currentlabel
+ {\p@pstartR\thepstartR}
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2408,9 +2427,9 @@
\endgroup
\ignorespaces
\@oldnobreak
- \ifnumberpstart
- \addtocounter{pstartL}{1}
- \fi}
+ \ifnumberpstart
+ \addtocounter{pstartL}{1}
+ \fi}
% \end{macrocode}
% \end{macro}
@@ -2431,9 +2450,9 @@
\endgroup
\ignorespaces
\@oldnobreak
- \ifnumberpstart
- \addtocounter{pstartR}{1}
- \fi
+ \ifnumberpstart
+ \addtocounter{pstartR}{1}
+ \fi
}
% \end{macrocode}
@@ -2513,7 +2532,7 @@
\ifnum\@lock>\@ne\inserthangingsymboltrue\else\inserthangingsymbolfalse\fi
\setbox\l@dleftbox
\hb@xt@ \Lcolwidth{%
- \affixpstart@numL
+ \affixpstart@numL
\affixline@num
\l@dld@ta
\add@inserts
@@ -2565,7 +2584,7 @@
\ifnum\@lockR>\@ne\inserthangingsymbolRtrue\else\inserthangingsymbolRfalse\fi
\setbox\l@drightbox
\hb@xt@ \Rcolwidth{%
- \affixpstart@numR
+ \affixpstart@numR
\affixline@numR
\l@dld@ta
\add@insertsR
@@ -2612,7 +2631,7 @@
\fi
}
\newcommand*{\getline@numL}{%
- \global\advance\absline@num \@ne
+ \global\advance\absline@num \@ne
\do@actions
\do@ballast
\ifnumberline
@@ -3144,7 +3163,7 @@
\gl@p\labelref@listR\to\label@refs
\fi
\ifvmode
- \advancelabel@refs
+ \advancelabel@refs
\fi
\protected@write\@auxout{}%
{\string\l@dmake@labelsR\space\thepage|\label@refs|{#1}}%
@@ -3156,7 +3175,7 @@
\gl@p\labelref@list\to\label@refs
\fi
\ifvmode
- \advancelabel@refs
+ \advancelabel@refs
\fi
\protected@write\@auxout{}%
{\string\l@dmake@labels\space\thepage|\label@refs|{#1}}%
@@ -3285,13 +3304,25 @@
% The right text version of \cs{affixside@note}.
% \begin{macrocode}
\newcommand*{\affixside@noteR}{%
+ \def\sidenotecontent@{}%
+ \numdef{\itemcount@}{0}%
+ \renewcommand{\do}[1]{%
+ \ifnumequal{\itemcount@}{0}%
+ {%
+ \appto\sidenotecontent@{##1}}% Not print not separator before the 1st note
+ {\appto\sidenotecontent@{\sidenotesep ##1}%
+ }%
+ \numdef{\itemcount@}{\itemcount@+1}%
+ }%
+ \dolistloop{\l@dcsnotetext}%
+ \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space sidenotes on line \the\line@numR R p. \the\page@numR,}}{}
\gdef\@templ@d{}%
\ifx\@templ@d\l@dcsnotetext \else
\if@twocolumn
\if@firstcolumn
- \setl@dlp@rbox{\l@dcsnotetext}%
+ \setl@dlp@rbox{\sidenotecontent@}%
\else
- \setl@drp@rbox{\l@dcsnotetext}%
+ \setl@drp@rbox{\sidenotecontent@}%
\fi
\else
\@l@dtempcntb=\sidenote@marginR
@@ -3299,9 +3330,9 @@
\advance\@l@dtempcntb by\page@num
\fi
\ifodd\@l@dtempcntb
- \setl@drp@rbox{\l@dcsnotetext}%
+ \setl@drp@rbox{\sidenotecontent@t}%
\else
- \setl@dlp@rbox{\l@dcsnotetext}%
+ \setl@dlp@rbox{\sidenotecontent@}%
\fi
\fi
\fi}
@@ -3365,15 +3396,15 @@
\newif\ifinserthangingsymbolR
\newcommand{\inserthangingsymbolL}{%
\ifinserthangingsymbol%
- \ifinstanzaL%
- \hfill\hangingsymbol%
- \fi%
+ \ifinstanzaL%
+ \hfill\hangingsymbol%
+ \fi%
\fi}
\newcommand{\inserthangingsymbolR}{%
\ifinserthangingsymbolR%
- \ifinstanzaR%
- \hfill\hangingsymbol%
- \fi%
+ \ifinstanzaR%
+ \hfill\hangingsymbol%
+ \fi%
\fi}
% \end{macrocode}
% \end{macro}
@@ -3385,22 +3416,22 @@
% \begin{macrocode}
\newcommand{\correcthangingL}{%
\ifl@dpaging\else%
- \ifinstanzaL%
- \ifinserthangingsymbol%
- \hskip \@ifundefined{sza@0@}{0}{\expandafter%
- \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
- \fi%
- \fi%
+ \ifinstanzaL%
+ \ifinserthangingsymbol%
+ \hskip \@ifundefined{sza@0@}{0}{\expandafter%
+ \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
+ \fi%
+ \fi%
\fi}
\newcommand{\correcthangingR}{%
\ifl@dpaging\else%
- \ifinstanzaR%
- \ifinserthangingsymbolR%
- \hskip \@ifundefined{sza@0@}{0}{\expandafter%
- \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
- \fi%
- \fi%
+ \ifinstanzaR%
+ \ifinserthangingsymbolR%
+ \hskip \@ifundefined{sza@0@}{0}{\expandafter%
+ \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
+ \fi%
+ \fi%
\fi}
% \end{macrocode}
% \end{macro}
@@ -4091,23 +4122,23 @@
\l@duselanguage{\theledlanguageL}%
%%% \begingroup
{ \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}}
% \begin{macrocode}
\do@lineL
\advance\numpagelinesL \@ne
- \ifshiftedverses
- \ifdim\ht\l@dleftbox>0pt\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}\fi%
+ \ifshiftedpstarts
+ \ifdim\ht\l@dleftbox>0pt\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}\fi%
\else
- \hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}%
+ \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}
-
+
\get@nextboxL
\checkpageL
\repeat
@@ -4138,10 +4169,10 @@
{ \loop\ifl@dsamepage
\do@lineR
\advance\numpagelinesR \@ne
- \ifshiftedverses
- \ifdim\ht\l@drightbox>0pt\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}\fi%
+ \ifshiftedpstarts
+ \ifdim\ht\l@drightbox>0pt\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}\fi%
\else
- \hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}%
+ \hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}%
\fi
\get@nextboxR
\checkpageR
@@ -4419,7 +4450,7 @@
% \cs{goalfraction}. \cs{ledthegoal} is calculated via \cs{check@goal}.
% \begin{macrocode}
\newdimen\ledthegoal
-\ifshiftedverses
+\ifshiftedpstarts
\newcommand*{\goalfraction}{0.95}
\else
\newcommand*{\goalfraction}{0.9}
diff --git a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty
index 3c8c433b41c..54050a81e7b 100644
--- a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty
+++ b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty
@@ -24,16 +24,20 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledmac}[2012/09/16 v1.0.1 LaTeX port of EDMAC]
+\ProvidesPackage{eledmac}[2012/09/25 v1.1 LaTeX port of EDMAC]
\newif\ifledfinal
+\newif\ifparapparatus@
+\parapparatus@false
\DeclareOption{final}{\ledfinaltrue}
\DeclareOption{draft}{\ledfinalfalse}
+\DeclareOption{parapparatus}{\parapparatus@true}
\ExecuteOptions{final}
\ProcessOptions*\relax
\RequirePackage{xargs}
\RequirePackage{etoolbox}
+\RequirePackage{suffix}
\ifledfinal
\newcommand*{\showlemma}[1]{#1}
\else
@@ -148,6 +152,8 @@
\line@list@stuff{\jobname.\extensionchars\the\section@num}%
\l@dend@stuff
\setcounter{pstart}{1}
+ \begingroup
+ \initnumbering@sectcmd
}
\newcommand*{\initnumbering@reg}{%
\global\pst@rtedLfalse
@@ -163,6 +169,65 @@
\resetprevline@
}
+\newcommand{\initnumbering@sectcmd}{
+ \newcommand{\ledsection}[2][]{%
+ \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering%
+ \pstart%
+ \leavevmode\section[##1]{##2}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend%
+ \vspace{-2\parskip}\vspace{-2\baselineskip}%
+ \pstart
+ }
+ \WithSuffix\newcommand\ledsection*[1]{%
+ \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering%
+ \pstart%
+ \leavevmode\section*{##1}\leavevmode\vspace{2.3ex \@plus.2ex}\skipnumbering\pend%
+ \vspace{-2\parskip}\vspace{-2\baselineskip}%
+ \pstart
+ }
+ \newcommand{\ledsubsection}[2][]{%
+ \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering%
+ \pstart%
+ \leavevmode\subsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend%
+ \vspace{-2\parskip}\vspace{-2\baselineskip}%
+ \pstart
+ }
+ \WithSuffix\newcommand\ledsubsection*[1]{%
+ \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering%
+ \pstart%
+ \leavevmode\subsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend%
+ \vspace{-2\parskip}\vspace{-2\baselineskip}%
+ \pstart
+ }
+ \newcommand{\ledsubsubsection}[2][]{%
+ \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering%
+ \pstart%
+ \leavevmode\subsubsection[##1]{##2}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend%
+ \vspace{-2\parskip}\vspace{-2\baselineskip}%
+ \pstart
+ }
+ \WithSuffix\newcommand\ledsubsubsection*[1]{%
+ \leavevmode\pend\vspace{3.5ex \@plus 1ex \@minus .2ex}\skipnumbering%
+ \pstart%
+ \leavevmode\subsubsection*{##1}\leavevmode\vspace{1.5ex \@plus .2ex}\skipnumbering\pend%
+ \vspace{-2\parskip}\vspace{-2\baselineskip}%
+ \pstart
+ }
+ \newcommand\ledchapter[2][]{~\pend\skipnumbering\pstart\chapter[##1]{##2}\pend\pstart}
+ \WithSuffix\newcommand\ledchapter*[1]{~\pend\skipnumbering\pstart\chapter*{##1}\pend\pstart}
+ \patchcmd{\@makeschapterhead}{1\par}{1}{}{}
+ \pretocmd{\@makeschapterhead}{\par}{}{}
+ \apptocmd{\@makeschapterhead}{\par}{}{}
+ \patchcmd{\@makeschapterhead}{\vskip 40\p@}{}{}{}
+ \patchcmd{\@makechapterhead}{1\par}{1}{}{}
+ \pretocmd{\@makechapterhead}{\par}{}{}
+ \apptocmd{\@makechapterhead}{\par}{}{}
+ \patchcmd{\@makechapterhead}{\vskip 40\p@}{}{}{}
+ \apptocmd{\@chapter}{\par\leavevmode\vspace{40 \p@}\skipnumbering}{}{}
+ \apptocmd{\@schapter}{\par\leavevmode\vspace{40 \p@}\skipnumbering}{}{}
+ \newcommand\beforeledchapter{\pend\cleardoublepage\pstart}
+ \patchcmd{\chapter}{\cleardoublepage}{\relax}{}{}
+ \patchcmd{\chapter}{\clearpage}{\relax}{}{}
+}
\def\endnumbering{%
\ifnumbering
\global\numberingfalse
@@ -183,7 +248,7 @@
\else
\led@err@NumberingNotStarted
\fi
- \autoparfalse}
+ \autoparfalse\endgroup}
\newcommand{\pausenumbering}{%
\endnumbering\global\numberingtrue}
\newcommand*{\resumenumbering}{%
@@ -209,16 +274,19 @@
\ifx\@tempa\@tempb
\global\bypage@true
\global\bypstart@false
+ \pstartinfootnote[][false]
\else
\def\@tempb{pstart}%
\ifx\@tempa\@tempb
\global\bypage@false
\global\bypstart@true
+ \pstartinfootnote
\else
\def\@tempb{section}
\ifx\@tempa\@tempb
\global\bypage@false
\global\bypstart@false
+ \pstartinfootnote[][false]
\else
\led@warn@BadLineation
\fi
@@ -754,6 +822,8 @@
\renewcommand{\thepstart}{{\bfseries\@arabic\c@pstart}. }
\newif\ifnumberpstart
\numberpstartfalse
+\newif\iflabelpstart
+\labelpstartfalse
\newcommand*{\pstart}{
\if@nobreak
\let\@oldnobreak\@nobreaktrue
@@ -773,7 +843,10 @@
\global\let\next@insert=\empty
\begingroup\normal@pars
\global\setbox\raw@text=\vbox\bgroup\ifautopar\else\ifnumberpstart\ifinstanza\else\ifsidepstartnum\else\thepstart\fi\fi\fi\fi
- \numberedpar@true}
+ \numberedpar@true
+ \iflabelpstart\protected@edef\@currentlabel
+ {\p@pstart\thepstart}\fi
+ }
\newcommand*{\pend}{\ifnumbering \else
\led@err@PendNotNumbered
\fi
@@ -1179,8 +1252,9 @@
}%
\notblank{#2}{\docsvlist{#2}}{}% Parsing all options
}
-\newcommand*{\normalvfootnote}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalvfootnote}[2]{%
\insert\csname #1footins\endcsname\bgroup
+ \csuse{bhookXnote@#1}
\csuse{Xnotefontsize@#1}
\footsplitskips
\spaceskip=\z@skip \xspaceskip=\z@skip
@@ -1191,9 +1265,10 @@
\splittopskip=\ht\strutbox \splitmaxdepth=\dp\strutbox
\leftskip=\z@skip \rightskip=\z@skip}
-\newcommand*{\mpnormalvfootnote}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\mpnormalvfootnote}[2]{%
\global\setbox\@nameuse{mp#1footins}\vbox{%
\unvbox\@nameuse{mp#1footins}
+ \csuse{bhookXnote@#1}
\csuse{Xnotefontsize@#1}
\hsize\columnwidth
\@parboxrestore
@@ -1202,8 +1277,8 @@
\newcommand*{\ledsetnormalparstuff}{%
\normal@pars
- \parindent \z@ \parfillskip \z@ \@plus 1fil}
-\newcommandx*{\normalfootfmt}[4][4=Z]{% 4th arg is optional, for backward compatibility
+ \noindent \parfillskip \z@ \@plus 1fil}
+\notbool{parapparatus@}{\newcommandx*}{\newcommandx}{\normalfootfmt}[4][4=Z]{% 4th arg is optional, for backward compatibility
\ledsetnormalparstuff%
\hangindent=\csuse{Xhangindent@#4}
\strut{\printlinefootnote{#1}{#4}}%
@@ -1217,6 +1292,17 @@
\newcommand*{\fullstop}{\textnormal{.}}
\newcommand*{\rbracket}{\textnormal{\thinspace]}}
+\newcommand{\printpstart}[0]{%
+ \ifl@dpairing%
+ \ifledRcol%
+ \thepstartR%
+ \else%
+ \thepstartL%
+ \fi%
+ \else%
+ \thepstart%
+ \fi%
+}
\newif\ifl@d@pnum
\l@d@pnumfalse
\newif\ifl@d@ssub
@@ -1270,17 +1356,6 @@
\fi
\fi}
\def\printlines#1|#2|#3|#4|#5|#6|#7|{\begingroup
- \ifbypstart@%
- \ifl@dpairing%
- \ifledRcol%
- \thepstartR%
- \else%
- \thepstartL%
- \fi%
- \else%
- \thepstart%
- \fi%
- \fi%
\setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%
\ifl@d@pnum #1\fullstop\fi
\linenumrep{#2}
@@ -1291,21 +1366,37 @@
\ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi
\endgroup}
\newcommand*{\normalfootstart}[1]{%
- \vskip\skip\csname #1footins\endcsname
+ \ifdimequal{0pt}{\preXnotes@}{}%
+ {%
+ \iftoggle{preXnotes@}{%
+ \togglefalse{preXnotes@}\skip\csname #1footins\endcsname=\csuse{preXnotes@}}%
+ {}%
+ }%
+ \vskip\skip\csname #1footins\endcsname%
\leftskip0pt \rightskip0pt
\csname #1footnoterule\endcsname}
\let\normalfootnoterule=\footnoterule
-\newcommand*{\normalfootgroup}[1]{\unvbox\csname #1footins\endcsname}
+\newcommand*{\normalfootgroup}[1]{{\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\unvbox\csname #1footins\endcsname}
\newcommand*{\mpnormalfootgroup}[1]{{
\vskip\skip\@nameuse{mp#1footins}
\normalcolor
\@nameuse{#1footnoterule}
- \unvbox\csname mp#1footins\endcsname}}
-
-\newcommand*{\ledfootinsdim}{0.8\vsize}
-
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}
+ \unvbox\csname mp#1footins\endcsname}}
+
+\newcommand*{\ledfootinsdim}{0.8\vsize} % kept for backward compatibility, should'nt be used anymore.
+
+\newtoggle{preXnotes@}
+\toggletrue{preXnotes@}
+\newcommand{\preXnotes@}{0pt}
+\newcommand*{\preXnotes}[1]{\renewcommand{\preXnotes@}{#1}}
+\newtoggle{prenotesX@}
+\toggletrue{prenotesX@}
+\newcommand{\prenotes@X}{0pt}
+\newcommand*{\prenotesX}[1]{\renewcommand{\prenotesX@}{#1}}
\newcommand*{\footnormal}[1]{%
+ \csgdef{series@display#1}{normal}
\expandafter\let\csname #1footstart\endcsname=\normalfootstart
\expandafter\let\csname v#1footnote\endcsname=\normalvfootnote
\expandafter\let\csname #1footfmt\endcsname=\normalfootfmt
@@ -1313,16 +1404,17 @@
\expandafter\let\csname #1footnoterule\endcsname=%
\normalfootnoterule
\count\csname #1footins\endcsname=1000
- \dimen\csname #1footins\endcsname=\ledfootinsdim
- \skip\csname #1footins\endcsname=1.2em \@plus .6em \@minus .6em
+ \dimen\csname #1footins\endcsname=\csuse{maxhXnotes@#1}
+ \skip\csname #1footins\endcsname=\csuse{beforeXnotes@#1}
\expandafter\let\csname mpv#1footnote\endcsname=\mpnormalvfootnote
\expandafter\let\csname mp#1footgroup\endcsname=\mpnormalfootgroup
\count\csname mp#1footins\endcsname=1000
- \dimen\csname mp#1footins\endcsname=\ledfootinsdim
- \skip\csname mp#1footins\endcsname=1.2em \@plus .6em \@minus .6em
+ \dimen\csname mp#1footins\endcsname=\csuse{maxhXnotes@#1}
+ \skip\csname mp#1footins\endcsname=\csuse{beforeXnotes@#1}
}
\newcommand*{\footparagraph}[1]{%
+ \csgdef{series@display#1}{paragraph}
\expandafter\newcount\csname prevpage#1@num\endcsname
\expandafter\let\csname #1footstart\endcsname=\parafootstart
\expandafter\let\csname v#1footnote\endcsname=\para@vfootnote
@@ -1345,11 +1437,18 @@
\newcommand*{\parafootstart}[1]{%
\rightskip=0pt \leftskip=0pt \parindent=0pt
- \vskip\skip\csname #1footins\endcsname
+ \ifdimequal{0pt}{\preXnotes@}{}%
+ {%
+ \iftoggle{preXnotes@}{%
+ \togglefalse{preXnotes@}\skip\csname #1footins\endcsname=\csuse{preXnotes@}}%
+ {}%
+ }%
+ \vskip\skip\csname #1footins\endcsname%
\csname #1footnoterule\endcsname}
\newcommand*{\para@vfootnote}[2]{%
\insert\csname #1footins\endcsname
\bgroup
+ \csuse{bhookXnote@#1}
\csuse{Xnotefontsize@#1}
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
@@ -1364,6 +1463,7 @@
\newcommand*{\mppara@vfootnote}[2]{%
\global\setbox\@nameuse{mp#1footins}\vbox{%
\unvbox\@nameuse{mp#1footins}%
+ \csuse{bhookXnote@#1}
\csuse{Xnotefontsize@#1}
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
@@ -1397,7 +1497,7 @@
\newcommand*{\para@footgroup}[1]{%
\unvbox\csname #1footins\endcsname
\makehboxofhboxes
- \setbox0=\hbox{\unhbox0 \removehboxes}%
+ \setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}}\unhbox0 \removehboxes}%
\csuse{Xnotefontsize@#1}
\noindent\unhbox0\par}
@@ -1407,7 +1507,7 @@
\@nameuse{#1footnoterule}%
\unvbox\csname mp#1footins\endcsname
\makehboxofhboxes
- \setbox0=\hbox{\unhbox0 \removehboxes}%
+ \setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}}\unhbox0 \removehboxes}%
\csuse{Xnotefontsize@#1}
\noindent\unhbox0\par}}
@@ -1448,6 +1548,7 @@
\unvbox2 }
\newcommand*{\footthreecol}[1]{%
+ \csgdef{series@display#1}{threecol}
\expandafter\let\csname v#1footnote\endcsname=\threecolvfootnote
\expandafter\let\csname #1footfmt\endcsname=\threecolfootfmt
\expandafter\let\csname #1footgroup\endcsname=\threecolfootgroup
@@ -1464,12 +1565,12 @@
\count\csname mp#1footins\endcsname 333
\multiply\dimen\csname mp#1footins\endcsname \thr@@}
-\newcommand*{\threecolvfootnote}[2]{%
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\threecolvfootnote}[2]{%
\insert\csname #1footins\endcsname\bgroup
\csuse{Xnotefontsize@#1}
\footsplitskips
\csname #1footfmt\endcsname #2[#1]\egroup}
-\newcommandx*{\threecolfootfmt}[4][4=Z]{%
+\notbool{parapparatus@}{\newcommandx*}{\newcommandx}{\threecolfootfmt}[4][4=Z]{%
\normal@pars
\hsize \csuse{hsizethreecol@#4}
\parindent=0pt
@@ -1485,6 +1586,7 @@
}}%
#3\strut\par\allowbreak}
\newcommand*{\threecolfootgroup}[1]{{\notefontsetup
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname #1footins\endcsname \thr@@ \splittopskip}}
@@ -1492,11 +1594,13 @@
\vskip\skip\@nameuse{mp#1footins}
\normalcolor
\@nameuse{#1footnoterule}
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname mp#1footins\endcsname \thr@@ \splittopskip}}
\newcommand*{\foottwocol}[1]{%
+ \csgdef{series@display#1}{twocol}
\expandafter\let\csname v#1footnote\endcsname=\twocolvfootnote
\expandafter\let\csname #1footfmt\endcsname=\twocolfootfmt
\expandafter\let\csname #1footgroup\endcsname=\twocolfootgroup
@@ -1509,11 +1613,11 @@
\newcommand*{\twocolfootsetup}[1]{%
\count\csname #1footins\endcsname 500
\multiply\dimen\csname #1footins\endcsname \tw@}
-\newcommand*{\twocolvfootnote}[2]{\insert\csname #1footins\endcsname\bgroup
+\notbool{parapparatus@}{\newcommand*}{\newcommand}{\twocolvfootnote}[2]{\insert\csname #1footins\endcsname\bgroup
\csuse{Xnotefontsize@#1}
\footsplitskips
\csname #1footfmt\endcsname #2[#1]\egroup}
-\newcommandx*{\twocolfootfmt}[4][4=Z]{% 4th arg is optional, for backward compatibility
+\notbool{parapparatus@}{\newcommandx*}{\newcommandx}{\twocolfootfmt}[4][4=Z]{% 4th arg is optional, for backward compatibility
\normal@pars
\hsize \csuse{hsizetwocol@#4}
\parindent=0pt
@@ -1529,6 +1633,7 @@
}}%
#3\strut\par\allowbreak}
\newcommand*{\twocolfootgroup}[1]{{\csuse{Xnotefontsize@#1}
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname #1footins\endcsname \tw@ \splittopskip}}
@@ -1540,6 +1645,7 @@
\vskip\skip\@nameuse{mp#1footins}
\normalcolor
\@nameuse{#1footnoterule}
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
\splittopskip=\ht\strutbox
\expandafter
\rigidbalance\csname mp#1footins\endcsname \tw@ \splittopskip}}
@@ -1613,6 +1719,7 @@
\hbox{\textsuperscript{\normalfont\@nameuse{@thefnmark#1}}}}
\newcommand*{\normalvfootnoteX}[2]{%
\insert\@nameuse{footins#1}\bgroup
+ \csuse{bhooknoteX@#1}
\csuse{notefontsizeX@#1}
\footsplitskips
\spaceskip=\z@skip \xspaceskip=\z@skip
@@ -1621,6 +1728,7 @@
\newcommand*{\mpnormalvfootnoteX}[2]{%
\global\setbox\@nameuse{mpfootins#1}\vbox{%
\unvbox\@nameuse{mpfootins#1}
+ \csuse{bhooknoteX@#1}
\csuse{notefontsizeX@#1}
\hsize\columnwidth
\@parboxrestore
@@ -1637,7 +1745,13 @@
\textsuperscript{\@nameuse{@thefnmark#1}}}
\newcommand*{\normalfootstartX}[1]{%
- \vskip\skip\@nameuse{footins#1}%
+ \ifdimequal{0pt}{\prenotesX@}{}%
+ {%
+ \iftoggle{prenotesX@}{%
+ \togglefalse{prenotesX@} \skip\csname footins#1\endcsname=\csuse{prenotesX@}}%
+ {}%
+ }%
+ \vskip\skip\csname footins#1\endcsname%
\leftskip=\z@
\rightskip=\z@
\@nameuse{footnoterule#1}}
@@ -1672,6 +1786,7 @@
\fi}
\newcommand*{\footnormalX}[1]{%
+ \csgdef{series@displayX#1}{normalX}
\expandafter\let\csname footstart#1\endcsname=\normalfootstartX
\@namedef{@footnotemark#1}{\normal@footnotemarkX{#1}}
\@namedef{bodyfootmark#1}{\normalbodyfootmarkX{#1}}
@@ -1682,16 +1797,17 @@
\expandafter\let\csname footgroup#1\endcsname=\normalfootgroupX
\expandafter\let\csname footnoterule#1\endcsname=\normalfootnoteruleX
\count\csname footins#1\endcsname=1000
- \dimen\csname footins#1\endcsname=\ledfootinsdim
- \skip\csname footins#1\endcsname=1.2em \@plus .6em \@minus .6em
+ \dimen\csname footins#1\endcsname=\csuse{maxhnotesX@#1}
+ \skip\csname footins#1\endcsname=\csuse{beforenotesX@#1}
\expandafter\let\csname mpvfootnote#1\endcsname=\mpnormalvfootnoteX
\expandafter\let\csname mpfootgroup#1\endcsname=\mpnormalfootgroupX
\count\csname mpfootins#1\endcsname=1000
- \dimen\csname mpfootins#1\endcsname=\ledfootinsdim
- \skip\csname mpfootins#1\endcsname=1.2em \@plus .6em \@minus .6em
+ \dimen\csname mpfootins#1\endcsname=\csuse{maxhnotesX@#1}
+ \skip\csname mpfootins#1\endcsname=\csuse{beforenotesX@#1}
}
\newcommand*{\foottwocolX}[1]{%
+ \csgdef{series@displayX#1}{twocol}
\expandafter\let\csname regvfootnote#1\endcsname=\twocolvfootnoteX
\expandafter\let\csname footfmt#1\endcsname=\twocolfootfmtX
\expandafter\let\csname footgroup#1\endcsname=\twocolfootgroupX
@@ -1739,6 +1855,7 @@
\rigidbalance\csname mpfootins#1\endcsname \tw@ \splittopskip}}
\newcommand*{\footthreecolX}[1]{%
+ \csgdef{series@displayX#1}{threecol}
\expandafter\let\csname regvfootnote#1\endcsname=\threecolvfootnoteX
\expandafter\let\csname footfmt#1\endcsname=\threecolfootfmtX
\expandafter\let\csname footgroup#1\endcsname=\threecolfootgroupX
@@ -1785,6 +1902,7 @@
\rigidbalance\csname mpfootins#1\endcsname \thr@@ \splittopskip}}
\newcommand*{\footparagraphX}[1]{%
+ \csgdef{series@displayX#1}{paragraph}
\expandafter\newcount\csname prevpage#1@num\endcsname
\expandafter\let\csname footstart#1\endcsname=\parafootstartX
\expandafter\let\csname regvfootnote#1\endcsname=\para@vfootnoteX
@@ -1806,7 +1924,13 @@
\expandafter\strip@pt\dimen0 }}}
\newcommand*{\parafootstartX}[1]{%
- \vskip\skip\@nameuse{footins#1}%
+ \ifdimequal{0pt}{\prenotesX@}{}%
+ {%
+ \iftoggle{prenotesX@}{%
+ \togglefalse{prenotesX@}\skip\csname footins#1\endcsname=\csuse{prenotesX@}}%
+ {}%
+ }%
+ \vskip\skip\csname footins#1\endcsname%
\leftskip=\z@
\rightskip=\z@
\parindent=\z@
@@ -1816,6 +1940,7 @@
\newcommand*{\para@vfootnoteX}[2]{%
\insert\csname footins#1\endcsname
\bgroup
+ \csuse{bhooknoteX@#1}
\csuse{notefontsizeX@#1}
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
@@ -1829,6 +1954,7 @@
\newcommand*{\mppara@vfootnoteX}[2]{%
\global\setbox\@nameuse{mpfootins#1}\vbox{%
\unvbox\@nameuse{mpfootins#1}
+ \csuse{bhooknoteX@#1}
\csuse{notefontsizeX@#1}
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
@@ -1911,9 +2037,15 @@
\csgdef{Xnotefontsize@#1}{\notefontsetup}%
\csgdef{notefontsizeX@#1}{\notefontsetup}%
\csgdef{Xendnotefontsize@#1}{\notefontsetup}%
+ \csgdef{bhooknoteX@#1}{}%
+ \csgdef{bhookXnote@#1}{}%
+ \csgdef{bhookXendnote@#1}{}%
\csgdef{boxlinenum@#1}{0pt}%
\csgdef{boxsymlinenum@#1}{0pt}%
\newtoggle{numberonlyfirstinline@#1}%
+ \newtoggle{numberonlyfirstintwolines@#1}%
+ \newtoggle{onlypstartinfootnote@#1}%
+ \newtoggle{pstartinfootnote@#1}%
\csgdef{symlinenum@#1}{\symplinenum}%
\newtoggle{nonumberinfootnote@#1}%
\csgdef{beforenumberinfootnote@#1}{0pt}%
@@ -1927,13 +2059,18 @@
\csgdef{inplaceoflemmaseparator@#1}{1em}%
\csgdef{afternote@#1}{1em plus.4em minus.4em}%
\csgdef{parafootsep@#1}{\parafootftmsep}%
+ \csgdef{beforeXnotes@#1}{1.2em \@plus .6em \@minus .6em}
+ \csgdef{beforenotesX@#1}{1.2em \@plus .6em \@minus .6em}
+ \csgdef{txtbeforeXnotes@#1}{}
+ \csgdef{maxhnotesX@#1}{\ledfootinsdim}%
+ \csgdef{maxhXnotes@#1}{\ledfootinsdim}
\expandafter\newinsert\csname mpfootins#1\endcsname
\expandafter\newinsert\csname footins#1\endcsname
\expandafter\newinsert\csname #1footins\endcsname
\expandafter\newinsert\csname mp#1footins\endcsname
- \global\expandafter\newcommand\expandafter *\csname #1footnote\endcsname[2][]{%
+ \global\notbool{parapparatus@}{\expandafter\newcommand\expandafter *}{\expandafter\newcommand}\csname #1footnote\endcsname[2][]{%
\begingroup%
\newcommand{\content}{##2}%
\ifnumberedpar@
@@ -1956,6 +2093,7 @@
\ignorespaces%
\endgroup
}
+ \csgdef{series@display#1}{}
\footnormal{#1}
\global\expandafter\newcommand\csname footnote#1\endcsname[1]{%
@@ -1969,6 +2107,7 @@
}
\newcounter{footnote#1}
\global\expandafter\renewcommand\csname thefootnote#1\endcsname{\arabic{footnote#1}}
+ \csgdef{series@displayX#1}{}
\footnormalX{#1}
\global\expandafter\newcommand\csname #1endnote\endcsname[2]{{\newlinechar='40
@@ -1986,17 +2125,35 @@
}
}% End of \newseries
\newseries{A,B,C,D,E,Z}
+\newcommand{\seriesatbegin}[1]{
+ \edef\series{#1}
+ \def\new{}
+ \listeadd{\new}{\series}
+ \renewcommand{\do}[1]{\ifcsstring{series}{##1}{}{\listadd{\new}{##1}}}
+ \dolistloop{\@series}
+ \xdef\@series{\new}
+}
+\newcommand{\seriesatend}[1]{
+ \edef\series{#1}
+ \def\new{}
+ \renewcommand{\do}[1]{\ifcsstring{series}{##1}{}{\listadd{\new}{##1}}}
+ \dolistloop{\@series}
+ \listeadd{\new}{\series}
+ \xdef\@series{\new}
+}
\newcommand{\settoggle@series}[3]{%
- \renewcommand{\do}[1]{\settoggle{#2@##1}{#3}}
+ \renewcommand{\do}[1]{\global\settoggle{#2@##1}{#3}}
\ifstrempty{#1}{%
\dolistloop{\@series}%
- }%
- {%
+ }%
+ {%
\docsvlist{#1}%
- }%
+ }%
}
-\newcommand{\setcommand@series}[3]{%
- \renewcommand{\do}[1]{\csgdef{#2@##1}{#3}}
+\newcommandx{\setcommand@series}[4][4]{%
+ \renewcommand{\do}[1]{
+ \csgdef{#2@##1}{#3}
+ \ifstrequal{#4}{reload}{\csuse{foot\csuse{series@display##1}}{##1}}{}}
\ifstrempty{#1}{%
\dolistloop{\@series}%
}%
@@ -2021,9 +2178,15 @@
\newhookcommand@series{Xnotenumfont}
+\newhookcommand@series{notenumfontX}
+
\newhookcommand@series{Xendnotenumfont}
-\newhookcommand@series{notenumfontX}
+\newhookcommand@series{bhooknoteX}
+
+\newhookcommand@series{bhookXnote}
+
+\newhookcommand@series{bhookXendnote}
\newhookcommand@series{Xnotefontsize}
@@ -2059,11 +2222,28 @@
\newhookcommand@series{afternote}
+\newhookcommand@series{txtbeforeXnotes}
+
+\newcommand{\newhookcommand@series@reload}[1]{%
+ \global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{%
+ \csuse{setcommand@series}{##1}{#1}{##2}[reload]
+ }%
+}
+\newhookcommand@series@reload{beforeXnotes}
+
+\newhookcommand@series@reload{beforenotesX}
+
+\newhookcommand@series@reload{maxhnotesX}
+
+\newhookcommand@series@reload{maxhXnotes}
\newcommand{\newhooktoggle@series}[1]{%
\global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{\settoggle@series{##1}{#1}{##2}}%
}
\newhooktoggle@series{numberonlyfirstinline}
+\newhooktoggle@series{numberonlyfirstintwolines}
\newhooktoggle@series{nonumberinfootnote}
+\newhooktoggle@series{pstartinfootnote}
+\newhooktoggle@series{onlypstartinfootnote}
\newcommand*{\notenumfont}{\normalfont}
\newcommand*{\notefontsetup}{\footnotesize}
\newif\ifledplinenum
@@ -2078,6 +2258,16 @@
\interparanoteglue{1em plus.4em minus.4em}
\newcommand{\parafootftmsep}{}
\newcommand{\printlinefootnote}[2]{%
+ \def\extractline@##1|##2|##3|##4|##5|##6|##7|{##2}%
+ \def\extractsubline@##1|##2|##3|##4|##5|##6|##7|{##3}%
+ \def\extractendline@##1|##2|##3|##4|##5|##6|##7|{##5}%
+ \def\extractendsubline@##1|##2|##3|##4|##5|##6|##7|{##6}%
+ \iftoggle{numberonlyfirstintwolines@#2}{%
+ \edef\lineinfo@{\extractline@ #1| - \extractsubline@ #1| - \extractendline@ #1| - \extractendsubline@ #1|}%
+ }%
+ {%
+ \edef\lineinfo@{\extractline@ #1| - \extractsubline@ #1|}%
+ }%
\iftoggle{nonum@}{%Try if the line number must printed for this specific not (by default, yes)
\hspace{\csuse{inplaceofnumber@#2}}%
}%
@@ -2092,7 +2282,7 @@
{%
\ifcsdef{prevline#2}%
{%Be sure the \prevline exists.
- \ifnumequal{\csuse{prevline#2}}{\line@num}%Try it
+ \ifcsequal{prevline#2}{lineinfo@}%Try it
{%
\ifcsempty{symlinenum@#2}% Try if a symbol is define
{%
@@ -2100,16 +2290,20 @@
}%
{\hspace{\csuse{beforesymlinenum@#2}}\csuse{Xnotenumfont@#2}%
\ifdimequal{\csuse{boxsymlinenum@#2}}{0pt}%
- {\csuse{symlinenum@#2}}%
-{\hbox to \csuse{boxsymlinenum@#2}{\csuse{symlinenum@#2}\hfill}}%
- \hspace{\csuse{aftersymlinenum@#2}}}%
+ {\csuse{symlinenum@#2}}%
+ {\hbox to \csuse{boxsymlinenum@#2}{\csuse{symlinenum@#2}\hfill}}%
+ \hspace{\csuse{aftersymlinenum@#2}}}%
}%
{%
\hspace{\csuse{beforenumberinfootnote@#2}}\csuse{Xnotenumfont@#2}%
\ifdimequal{\csuse{boxlinenum@#2}}{0pt}{%
+ \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
\printlines#1|}%
{%
- \hbox to \csuse{boxlinenum@#2}{\printlines#1|\hfill}%
+ \hbox to \csuse{boxlinenum@#2}{%
+ \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
+ \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}%
+ \hfill}%
}%
\hspace{\csuse{afternumberinfootnote@#2}}%
}%
@@ -2117,9 +2311,13 @@
{%
\hspace{\csuse{beforenumberinfootnote@#2}}\csuse{Xnotenumfont@#2}%
\ifdimequal{\csuse{boxlinenum@#2}}{0pt}{%
- \printlines#1|}%
+ \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
+ \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}}%
{%
- \hbox to \csuse{boxlinenum@#2}{\printlines#1|\hfill}%
+ \hbox to \csuse{boxlinenum@#2}{%
+ \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
+ \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}%
+ \hfill}%
}%
\hspace{\csuse{afternumberinfootnote@#2}}%
}%
@@ -2127,13 +2325,18 @@
{%
\hspace{\csuse{beforenumberinfootnote@#2}}\csuse{Xnotenumfont@#2}%
\ifdimequal{\csuse{boxlinenum@#2}}{0pt}{%
- \printlines#1|}%
+ \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
+ \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}%
+ }%
{%
- \hbox to \csuse{boxlinenum@#2}{\printlines#1|\hfill}%
+ \hbox to \csuse{boxlinenum@#2}{%
+ \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
+ \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}%
+ \hfill}%
}%
\hspace{\csuse{afternumberinfootnote@#2}}%
}%
- \csnumgdef{prevline#2}{\line@num}%
+ \csxdef{prevline#2}{\lineinfo@}%
}%
}%
}%
@@ -2392,7 +2595,7 @@
\fi
\immediate\write\l@d@end{\string\l@d@section{\the\section@num}}}
-\def\endprint#1#2#3#4{{\csuse{Xendnotefontsize@#4}{\csuse{Xendnotenumfont@#4}\printendlines#1|}%
+\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]{}
@@ -2524,7 +2727,7 @@
\newcommand*{\vl@dlsnote}[1]{\setl@dlp@rbox{#1}}
\newcommand*{\vl@drsnote}[1]{\setl@drp@rbox{#1}}
-\newcommand*{\vl@dcsnote}[1]{\gdef\l@dcsnotetext{#1}}
+\newcommand*{\vl@dcsnote}[1]{\listgadd{\l@dcsnotetext}{#1}}
\newcommand*{\setl@dlp@rbox}[1]{%
{\parindent\z@\hsize=\ledlsnotewidth\ledlsnotefontsetup
@@ -2534,7 +2737,6 @@
\else
=\vbox to 0.70\baselineskip{\strut#1\vss}%
\fi}}
-%% \global\setbox\l@dlp@rbox=\vbox to\z@{#3\vss}}}% aligns on top line
\newcommand*{\setl@drp@rbox}[1]{%
{\parindent\z@\hsize=\ledrsnotewidth\ledrsnotefontsetup
\global\setbox\l@drp@rbox
@@ -2545,17 +2747,27 @@
\fi}}
\newif\ifleftnoteup
\leftnoteuptrue
-\newcommand*{\savel@dcsnote}[3]{%
- \gdef\l@dcsnotetext{#3}}
-
+\newcommand{\sidenotesep}{, }
\newcommand*{\affixside@note}{%
+ \def\sidenotecontent@{}%
+ \numdef{\itemcount@}{0}%
+ \renewcommand{\do}[1]{%
+ \ifnumequal{\itemcount@}{0}%
+ {%
+ \appto\sidenotecontent@{##1}}% Not print not separator before the 1st note
+ {\appto\sidenotecontent@{\sidenotesep ##1}%
+ }%
+ \numdef{\itemcount@}{\itemcount@+1}%
+ }%
+ \dolistloop{\l@dcsnotetext}%
+ \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space sidenotes on line \the\line@num\space p. \the\page@num,}}{}
\gdef\@templ@d{}%
\ifx\@templ@d\l@dcsnotetext \else
\if@twocolumn
\if@firstcolumn
- \setl@dlp@rbox{\l@dcsnotetext}%
+ \setl@dlp@rbox{##1}{\sidenotecontent@}%
\else
- \setl@drp@rbox{\l@dcsnotetext}%
+ \setl@drp@rbox{\sidenotecontent@}%
\fi
\else
\@l@dtempcntb=\sidenote@margin
@@ -2563,13 +2775,12 @@
\advance\@l@dtempcntb by\page@num
\fi
\ifodd\@l@dtempcntb
- \setl@drp@rbox{\l@dcsnotetext}%
+ \setl@drp@rbox{\sidenotecontent@}%
\else
- \setl@dlp@rbox{\l@dcsnotetext}%
+ \setl@dlp@rbox{\sidenotecontent@}%
\fi
\fi
- \fi}
-
+\fi}
\newcommand*{\l@dfeetbeginmini}{\l@dedbeginmini\l@dfambeginmini}
\newcommand*{\l@dfeetendmini}{\l@dedendmini\l@dfamendmini}
diff --git a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty
index eeed6e1bdef..871a524420f 100644
--- a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty
+++ b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty
@@ -24,11 +24,13 @@
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledpar}[2012/09/16 v1.0.1 eledmac extension for parallel texts]
+\ProvidesPackage{eledpar}[2012/09/25 v1.1 eledmac extension for parallel texts]
-\newif\ifshiftedverses
-\shiftedversesfalse
-\DeclareOption{shiftedverses}{\shiftedversestrue}
+\newif\ifshiftedpstarts
+\let\shiftedversestrue\shiftedpstartstrue
+\let\shiftedversesfalse\shiftedpstartsfalse
+\DeclareOption{shiftedverses}{\shiftedpstartstrue}
+\DeclareOption{shiftedpstarts}{\shiftedpstartstrue}
\ProcessOptions
\l@dpairingfalse
\newif\ifl@dpaging
@@ -162,12 +164,12 @@
\global\bypage@Rfalse
\global\bypstart@Rtrue
\else
- \def@tempb{section}
- \ifx\@tempa\@tempb
+ \def@tempb{section}
+ \ifx\@tempa\@tempb
\global\bypage@Rfalse
\global\bypstart@Rfalse
- \else
- \led@warn@BadLineation
+ \else
+ \led@warn@BadLineation
\fi
\fi
\fi
@@ -792,11 +794,11 @@
\newcommand*{\pstartL}{
\if@nobreak
-\let\@oldnobreak\@nobreaktrue
+ \let\@oldnobreak\@nobreaktrue
\else
-\let\@oldnobreak\@nobreakfalse
+ \let\@oldnobreak\@nobreakfalse
\fi
-\@nobreaktrue
+ \@nobreaktrue
\ifnumbering \else
\led@err@PstartNotNumbered
\beginnumbering
@@ -806,7 +808,7 @@
\pend
\fi
\ifpst@rtedL\else
- \setcounter{pstartLold}{\value{pstartL}}%
+ \setcounter{pstartLold}{\value{pstartL}}%
\list@clear{\inserts@list}%
\global\let\next@insert=\empty
\global\pst@rtedLtrue
@@ -819,14 +821,17 @@
\fi
\global\setnamebox{l@dLcolrawbox\the\l@dnumpstartsL}=\vbox\bgroup\ifautopar\else\ifnumberpstart\ifsidepstartnum\else\thepstartL\fi\fi\fi%
\hsize=\Lcolwidth
- \numberedpar@true}
+ \numberedpar@true
+ \iflabelpstart\protected@edef\@currentlabel
+ {\p@pstartL\thepstartL}\fi
+ }
\newcommand*{\pstartR}{
\if@nobreak
-\let\@oldnobreak\@nobreaktrue
+ \let\@oldnobreak\@nobreaktrue
\else
-\let\@oldnobreak\@nobreakfalse
+ \let\@oldnobreak\@nobreakfalse
\fi
-\@nobreaktrue
+ \@nobreaktrue
\ifnumberingR \else
\led@err@PstartNotNumbered
\beginnumberingR
@@ -836,7 +841,7 @@
\pendR
\fi
\ifpst@rtedR\else
- \setcounter{pstartRold}{\value{pstartR}}%
+ \setcounter{pstartRold}{\value{pstartR}}%
\list@clear{\inserts@listR}%
\global\let\next@insertR=\empty
\global\pst@rtedRtrue
@@ -849,7 +854,10 @@
\fi
\global\setnamebox{l@dRcolrawbox\the\l@dnumpstartsR}=\vbox\bgroup\ifautopar\else\ifnumberpstart\ifsidepstartnum\else\thepstartR\fi\fi\fi%
\hsize=\Rcolwidth
- \numberedpar@true}
+ \numberedpar@true
+ \iflabelpstart\protected@edef\@currentlabel
+ {\p@pstartR\thepstartR}
+ }
\newcommand*{\pendL}{\ifnumbering \else
\led@err@PendNotNumbered
\fi
@@ -862,9 +870,9 @@
\endgroup
\ignorespaces
\@oldnobreak
-\ifnumberpstart
-\addtocounter{pstartL}{1}
-\fi}
+ \ifnumberpstart
+ \addtocounter{pstartL}{1}
+ \fi}
\newcommand*{\pendR}{\ifnumberingR \else
\led@err@PendNotNumbered
@@ -878,9 +886,9 @@
\endgroup
\ignorespaces
\@oldnobreak
-\ifnumberpstart
-\addtocounter{pstartR}{1}
-\fi
+ \ifnumberpstart
+ \addtocounter{pstartR}{1}
+ \fi
}
\newbox\l@dleftbox
@@ -910,7 +918,7 @@
\ifnum\@lock>\@ne\inserthangingsymboltrue\else\inserthangingsymbolfalse\fi
\setbox\l@dleftbox
\hb@xt@ \Lcolwidth{%
- \affixpstart@numL
+ \affixpstart@numL
\affixline@num
\l@dld@ta
\add@inserts
@@ -944,7 +952,7 @@
\ifnum\@lockR>\@ne\inserthangingsymbolRtrue\else\inserthangingsymbolRfalse\fi
\setbox\l@drightbox
\hb@xt@ \Rcolwidth{%
- \affixpstart@numR
+ \affixpstart@numR
\affixline@numR
\l@dld@ta
\add@insertsR
@@ -979,7 +987,7 @@
\fi
}
\newcommand*{\getline@numL}{%
-\global\advance\absline@num \@ne
+ \global\advance\absline@num \@ne
\do@actions
\do@ballast
\ifnumberline
@@ -1295,7 +1303,7 @@
\gl@p\labelref@listR\to\label@refs
\fi
\ifvmode
- \advancelabel@refs
+ \advancelabel@refs
\fi
\protected@write\@auxout{}%
{\string\l@dmake@labelsR\space\thepage|\label@refs|{#1}}%
@@ -1307,7 +1315,7 @@
\gl@p\labelref@list\to\label@refs
\fi
\ifvmode
- \advancelabel@refs
+ \advancelabel@refs
\fi
\protected@write\@auxout{}%
{\string\l@dmake@labels\space\thepage|\label@refs|{#1}}%
@@ -1385,13 +1393,25 @@
\fi\ignorespaces}
\newcommand*{\affixside@noteR}{%
+ \def\sidenotecontent@{}%
+ \numdef{\itemcount@}{0}%
+ \renewcommand{\do}[1]{%
+ \ifnumequal{\itemcount@}{0}%
+ {%
+ \appto\sidenotecontent@{##1}}% Not print not separator before the 1st note
+ {\appto\sidenotecontent@{\sidenotesep ##1}%
+ }%
+ \numdef{\itemcount@}{\itemcount@+1}%
+ }%
+ \dolistloop{\l@dcsnotetext}%
+ \ifnumgreater{\itemcount@}{1}{\eledmac@warning{\itemcount@\space sidenotes on line \the\line@numR R p. \the\page@numR,}}{}
\gdef\@templ@d{}%
\ifx\@templ@d\l@dcsnotetext \else
\if@twocolumn
\if@firstcolumn
- \setl@dlp@rbox{\l@dcsnotetext}%
+ \setl@dlp@rbox{\sidenotecontent@}%
\else
- \setl@drp@rbox{\l@dcsnotetext}%
+ \setl@drp@rbox{\sidenotecontent@}%
\fi
\else
\@l@dtempcntb=\sidenote@marginR
@@ -1399,9 +1419,9 @@
\advance\@l@dtempcntb by\page@num
\fi
\ifodd\@l@dtempcntb
- \setl@drp@rbox{\l@dcsnotetext}%
+ \setl@drp@rbox{\sidenotecontent@t}%
\else
- \setl@dlp@rbox{\l@dcsnotetext}%
+ \setl@dlp@rbox{\sidenotecontent@}%
\fi
\fi
\fi}
@@ -1436,34 +1456,34 @@
\newif\ifinserthangingsymbolR
\newcommand{\inserthangingsymbolL}{%
\ifinserthangingsymbol%
-\ifinstanzaL%
-\hfill\hangingsymbol%
-\fi%
+ \ifinstanzaL%
+ \hfill\hangingsymbol%
+ \fi%
\fi}
\newcommand{\inserthangingsymbolR}{%
\ifinserthangingsymbolR%
-\ifinstanzaR%
-\hfill\hangingsymbol%
-\fi%
+ \ifinstanzaR%
+ \hfill\hangingsymbol%
+ \fi%
\fi}
\newcommand{\correcthangingL}{%
\ifl@dpaging\else%
-\ifinstanzaL%
-\ifinserthangingsymbol%
-\hskip \@ifundefined{sza@0@}{0}{\expandafter%
- \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
-\fi%
-\fi%
+ \ifinstanzaL%
+ \ifinserthangingsymbol%
+ \hskip \@ifundefined{sza@0@}{0}{\expandafter%
+ \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
+ \fi%
+ \fi%
\fi}
\newcommand{\correcthangingR}{%
\ifl@dpaging\else%
-\ifinstanzaR%
-\ifinserthangingsymbolR%
-\hskip \@ifundefined{sza@0@}{0}{\expandafter%
- \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
-\fi%
-\fi%
+ \ifinstanzaR%
+ \ifinserthangingsymbolR%
+ \hskip \@ifundefined{sza@0@}{0}{\expandafter%
+ \noexpand\csname sza@0@\endcsname}\stanzaindentbase%
+ \fi%
+ \fi%
\fi}
\chardef\next=\catcode`\&
\catcode`\&=\active
@@ -1775,10 +1795,10 @@
\do@lineL
\advance\numpagelinesL \@ne
- \ifshiftedverses
- \ifdim\ht\l@dleftbox>0pt\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}\fi%
+ \ifshiftedpstarts
+ \ifdim\ht\l@dleftbox>0pt\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}\fi%
\else
- \hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}%
+ \hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}%
\fi
\get@nextboxL
@@ -1796,10 +1816,10 @@
{ \loop\ifl@dsamepage
\do@lineR
\advance\numpagelinesR \@ne
- \ifshiftedverses
- \ifdim\ht\l@drightbox>0pt\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}\fi%
+ \ifshiftedpstarts
+ \ifdim\ht\l@drightbox>0pt\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}\fi%
\else
- \hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}%
+ \hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}%
\fi
\get@nextboxR
\checkpageR
@@ -1937,7 +1957,7 @@
\fi}
\newdimen\ledthegoal
-\ifshiftedverses
+\ifshiftedpstarts
\newcommand*{\goalfraction}{0.95}
\else
\newcommand*{\goalfraction}{0.9}