summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/eledmac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-02-23 22:44:10 +0000
committerKarl Berry <karl@freefriends.org>2015-02-23 22:44:10 +0000
commitb860a122b3f401880629bd012909c84ca7d8ce5d (patch)
treee1ea654861ea23a0c20d9bd2aab4919c2d82245c /Master/texmf-dist/source/latex/eledmac
parentd2042950476abfbb4b757f512dee4152811c1ca7 (diff)
eledmac (23feb15)
git-svn-id: svn://tug.org/texlive/trunk@36361 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/eledmac')
-rw-r--r--Master/texmf-dist/source/latex/eledmac/eledmac.dtx663
-rw-r--r--Master/texmf-dist/source/latex/eledmac/eledpar.dtx221
2 files changed, 540 insertions, 344 deletions
diff --git a/Master/texmf-dist/source/latex/eledmac/eledmac.dtx b/Master/texmf-dist/source/latex/eledmac/eledmac.dtx
index ebadbcdd15a..eb102628169 100644
--- a/Master/texmf-dist/source/latex/eledmac/eledmac.dtx
+++ b/Master/texmf-dist/source/latex/eledmac/eledmac.dtx
@@ -31,7 +31,7 @@
]{hyperref}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
-\usepackage{graphicx,eledmac}
+\usepackage{graphicx,eledmac,metalogo}
\makeatletter
\@mparswitchfalse
\makeatother
@@ -51,7 +51,7 @@
%
% \fi
%
-% \CheckSum{10613}
+% \CheckSum{10643}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -167,7 +167,7 @@
% deleted the commented out original edmac texts}
% \changes{v0.7}{2011/06/17}{Ma\"ieul Rouquette new maintainer}
% \changes{v0.8}{2011/17/06}{Bug on endnotes fixed: in a // text, all endnotes will print and be placed at the ends of columns (!)}
-% \changes{v0.8.1}{2011/07/14}{Bug on \cs{edtext} ; \cs{critex} ; \cs{lemma} fixed: we can now us not switching commands}
+% \changes{v0.8.1}{2011/07/14}{Bug on \cs{edtext} ; \cs{critex} ; \cs{lemma} fixed: we can now us non-switching commands}
% \changes{v0.9}{2011/08/03}{No more ledpatch. All patches are now in the main file.}
% \changes{v0.9.1}{2011/08/08}{Fix some bugs linked to integrating ledpatch on the main file.}
% \changes{v0.10}{2011/08/22}{Corrections to \cs{section} and other titles in numbered sections}
@@ -215,6 +215,7 @@
% \changes{v1.15.0}{2015/01/12}{Fix bug with footnotes layout when using some options of the geometry package (bug add by v1.13.0).}
% \changes{v1.16.0}{2015/01/23}{Compatibility of standard footnotes with some biblatex styles.}
% \changes{v1.16.0}{2015/01/23}{New \cs{stanzaindent} command.}
+% \changes{v1.18.0}{2015/02/23}{Compatibility with \LuaLaTeX RTL languages.}
% \hyphenation{man-u-script man-u-scripts}
%
%
@@ -320,7 +321,6 @@
% \renewcommand{\numberline}[1]{#1~}
% \tableofcontents
%
-% \listoffigures
%
%
% \section{Introduction}
@@ -642,6 +642,7 @@
% external files that are generated).
%
% \subsection{Paragraphs}
+% \subsubsection{Basis}
% \DescribeMacro{\pstart}
% \DescribeMacro{\pend}
% Within a numbered section, each paragraph of numbered text must
@@ -697,12 +698,8 @@
% begins again.\par}
% \egend
%
+% \subsubsection{Content before specific \cs{pstart} and after \cs{pend}}\label{pstart:optionalarg}
% \changes{v1.12.0}{2014/08/05}{Optional arguments for \cs{pstart} and \cs{pend}.}
-% \changes{v1.15.0}{2015/01/12}{New commands \cs{AtEveryPstart} and \cs{AtEveryPend}.}\label{pstart:optionalarg}
-% \DescribeMacro{\AtEveryPstart}\DescribeMacro{\AtEveryPend}
-% You can use both \cs{AtEveryPstart} and \cs{AtEveryPend}.
-% Their arguments will be printed before every \cs{pstart} begins / after every \cs{pend} ends.
-%
% Both \cs{pstart} and \cs{pend} can take a optional argument, in brackets.
% Its content will be printed before the beginning of \cs{pstart} / after the end of \cs{pend} instead of the argument of \cs{AtEveryPstart} / \cs{AtEveryPend}.
% If you need to start a \cs{pstart} by brackets, or to add brackets after a \cs{pend}, just add a \cs{relax} between \cs{pstart}/\cs{pend} and the brackets.
@@ -710,7 +707,12 @@
% This feature is not needed for normal use of \Lpack{eledmac}, but it is needed when using verse (see~\ref{verse} p.~\pageref{verse}) or \Lpack{eledpar} (see~\ref{eledpar} p.~\pageref{eledpar}).
%
% A \cs{noindent} is automatically added before this argument.
-%
+% \subsubsection{Content before every \cs{pstart} and after every \cs{pend}}
+% \changes{v1.15.0}{2015/01/12}{New commands \cs{AtEveryPstart} and \cs{AtEveryPend}.}
+% \DescribeMacro{\AtEveryPstart}\DescribeMacro{\AtEveryPend}
+% You can use both \cs{AtEveryPstart} and \cs{AtEveryPend}.
+% Their arguments will be printed before every \cs{pstart} begins / after every \cs{pend} ends.
+% \subsubsection{Producting automatically \cs{pstart}…\cs{pend}}
% \DescribeMacro{\autopar}
% You can use \cs{autopar} to avoid the nuisance of this paragraph markup
% and still have every paragraph automatically numbered. The scope of the
@@ -750,28 +752,26 @@
% rites', \textit{TUGboat} \textbf{12} (1991),
% pp.\,257--258.\protect\index{Beeton, Barbara Ann Neuhaus Friend}}
%
-% \DescribeMacro{\firstlinenum}
-% \DescribeMacro{\linenumincrement}
-% By default, \Eledmac{} numbers every 5th line. There are two counters,
-% \verb?firstlinenum? and \verb?linenumincrement?, that control this
-% behaviour; they can be changed using \cs{firstlinenum}\marg{num} and
-% \cs{linenumincrement}\marg{num}. \cs{firstlinenum} specifies the first
-% line that will have a printed number, and \cs{linenumincrement} is
-% the difference between succesive
-% numbered lines. For example, to start printing numbers at the first line
-% and to have every other line numbered: \\
-% \verb?\firstlinenum{1} \linenumincrement{2}?
-%
-% \DescribeMacro{\firstsublinenum}
-% \DescribeMacro{\sublinenumincrement}
-% There are similar commands, \cs{firstsublinenum}\marg{num} and
-% \cs{sublinenumincrement}\marg{num} for controlling sub-line numbering.
-%
-% \DescribeMacro{\numberpstarttrue}You can use the command \cs{numberpstarttrue} to insert a number on every \cs{pstart}. To stop the numbering, you must use \cs{numberpstartfalse}. To reset the numebering of \cs{pstarts}, insert
+% \subsubsection{Numbering paragraphs (\cs{pstart})}
+%\changes{v0.12}{2011/10/01}{Possibility to number \cs{pstart}.}
+% It is 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.
+% You can change the value of the pstart number by using \emph{after} \cs{beginnumbering}:
% \begin{verbatim}
-%\setcounter{pstart}{0}
+% \setcounter{numberpstart}{value}
% \end{verbatim}
+% On each \cs{beginnumbering} the numbering restarts.
+% \changes{v0.15}{2012/06/11}{Possibility to print \cs{pstart} number inside.}
%
+% With the \cs{sidepstartnumtrue} command, the number of \cs{pstart} will be printed inside. 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.
+% \subsubsection{Languages written in Right to Left}
+% If you use languages writtin in Right to Left, we \LuaLaTeX\ or \XeLaTeX,
+% you must switch text direction \cs{before} the \cs{pstart} command.
+% \subsubsection{Memory limits}
+% \textbf{This paragraph is kept for history, but problem described below should not appear with \Lpack{eledmac}.}
% \DescribeMacro{\pausenumbering}
% \DescribeMacro{\resumenumbering}
% \phantomsection\label{pause}\relax
@@ -824,17 +824,42 @@
% and say \cs{memorybreak} between the relevant \cs{pend} and
% \cs{pstart}.
%
-%\changes{v0.12}{2011/10/01}{Possibility 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}
+% \subsubsection{Disabling lineation}
% \DescribeMacro{\numberlinefalse} \DescribeMacro{\numberlinetrue}
% Line numbering can be disabled with \cs{numberlinefalse}. It can be enabled again with \cs{numberlinetrue}.
+% \subsubsection{Setting lineation start and step}
+% \DescribeMacro{\firstlinenum}
+% \DescribeMacro{\linenumincrement}
+% By default, \Eledmac{} numbers every 5th line. There are two counters,
+% \verb?firstlinenum? and \verb?linenumincrement?, that control this
+% behaviour; they can be changed using \cs{firstlinenum}\marg{num} and
+% \cs{linenumincrement}\marg{num}. \cs{firstlinenum} specifies the first
+% line that will have a printed number, and \cs{linenumincrement} is
+% the difference between succesive
+% numbered lines. For example, to start printing numbers at the first line
+% and to have every other line numbered: \\
+% \verb?\firstlinenum{1} \linenumincrement{2}?
+%
+% \DescribeMacro{\firstsublinenum}
+% \DescribeMacro{\sublinenumincrement}
+% There are similar commands, \cs{firstsublinenum}\marg{num} and
+% \cs{sublinenumincrement}\marg{num} for controlling sub-line numbering.
+% \DescribeMacro{\linenumberlist}
+% You can define \cs{linenumberlist} to specify a non-uniform distribution
+% of printed line numbers. For example: \\
+% \verb?\def\linenumberlist{1,2,3,5,7,11,13,17,19,23,29}? \\
+% to have numbers printed on prime-numbered lines only. There must be
+% no spaces within the definition which consists of comma-separated decimal
+% numbers. The numbers can be in any order but it is easier to read if you
+% put them in numerical order. Either omitting the definition of
+% \cs{linenumberlist} or following the vacuous definition \\
+% \verb?\def\linenumberlist{}? \\
+% the standard numbering sequence is applied. The standard sequence
+% is that specified by the combination of the \texttt{firstlinenum},
+% \texttt{linenumincrement}, \texttt{firstsublinenum} and
+% \texttt{linenumincrement} counter values.
+% \subsubsection{Setting lineation reset}
% \DescribeMacro{\lineation}
% \changes{v1.0}{2012/09/15}{Debug in lineation command}
% Lines can be numbered either by page, by pstart or by section; you specify
@@ -846,6 +871,7 @@
% have to use the same lineation system.
% The package's standard setting is \verb"\lineation{section}". If the lineation is by pstart, the pstart number will be printed before the line number in the notes.
%
+% \subsubsection{Setting line number margin}
% \DescribeMacro{\linenummargin}
% The command \cs{linenummargin}\meta{location} specifies the margin
% where the line (or pstart) numbers will be printed. The permissable value
@@ -867,36 +893,7 @@
% pair will apply the change to all the current paragraph).
%
%
-%
-% \DescribeMacro{\firstlinenum}
-% \DescribeMacro{\linenumincrement}
-% \DescribeMacro{\firstsublinenum}
-% \DescribeMacro{\sublinenumincrement}
-% In most cases, you will not want a number printed for every
-% single line of the text. Four \LaTeX{} \verb"counters" control
-% the printing of marginal numbers and they can be set by the
-% macros \cs{firstlinenum}\marg{num}, etc.
-% \cs{firstlinenum} specifies the number of the first line in a
-% section to number, and \cs{linenumincrement} is the increment
-% between numbered lines. \cs{firstsublinenum} and
-% \cs{sublinenumincrement} do the same for
-% sub-lines. Initially, all these are set to $5$ (e.g.,
-% \verb?\firstlinenum{5}?.
-%
-% \DescribeMacro{\linenumberlist}
-% You can define \cs{linenumberlist} to specify a non-uniform distribution
-% of printed line numbers. For example: \\
-% \verb?\def\linenumberlist{1,2,3,5,7,11,13,17,19,23,29}? \\
-% to have numbers printed on prime-numbered lines only. There must be
-% no spaces within the definition which consists of comma-separated decimal
-% numbers. The numbers can be in any order but it is easier to read if you
-% put them in numerical order. Either omitting the definition of
-% \cs{linenumberlist} or following the vacuous definition \\
-% \verb?\def\linenumberlist{}? \\
-% the standard numbering sequence is applied. The standard sequence
-% is that specified by the combination of the \texttt{firstlinenum},
-% \texttt{linenumincrement}, \texttt{firstsublinenum} and
-% \texttt{linenumincrement} counter values.
+% \subsubsection{Other settings}
%
% \DescribeMacro{\leftlinenum}
% \DescribeMacro{\rightlinenum}
@@ -1210,7 +1207,7 @@
% \begin{verbatim}
% lupus \sameword{aut} canis \edtext{\sameword{aut}}{\Afootnote{et}} felix
% \end{verbatim}
-% In this example, \verb+aut+ will be followed, in the critical note, by the exponant \verb+2+ if it is printed in the same line as the first \verb+aut+, but it won't if it is printed in a different line. The number is printed only after the second run.
+% In this example, \verb+aut+ will be followed, in the critical note, by the exponent \verb+2+ if it is printed in the same line as the first \verb+aut+, but it won't if it is printed in a different line. The number is printed only after the second run.
%
% If you use the \cs{lemma} command, \Lpack{eledmac} assumes that the word marked with \cs{sameword} is not already found in \cs{lemma}.
% However, if it is actually found in it, you must use this method:
@@ -1294,6 +1291,8 @@
% 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}\verb+[false]+.
%
% \changes{v1.1}{2012/09/25}{Add \cs{pstartinfootnote} and \cs{onlypstartinfootnote}}
+% \changes{v1.18.0}{2015/02/23}{Add \cs{pstartinfootnoteeverytime}}
+% \changes{v1.18.0}{2015/02/23}{Debug \cs{onlypstartinfootnote} when using \cs{numberonlyfirstinline} and the current line number differs from the previous.}
% \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}\verb+[false]+ to cancel it (\verb|<s>| can be empty if you want to disable it for every series).
@@ -1303,6 +1302,12 @@
% \item If you use lineation by section or by page, the option is disabled.
% \end{itemize}
%
+% \DescribeMacro{\pstartinfootnoteeverytime}
+% By default, the pstart number is printed only in the part of text where you have called \cs{numberpstarttrue}.
+% We don't know why you would like to print the pstart number in the notes and not in the main text.
+% However, if you want to do it, you can call \cs{pstartinfootnoteeverytime}\oarg{s}.
+% In this case, the pstart number will be printed every time in footnote.
+%
% \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}\verb+[false]+ to cancel it (\verb|<s>| can be empty if you want to disable it for every series).
@@ -1718,11 +1723,12 @@
% \subsection{Manual stanza indent}
% \DescribeMacro{\stanzaindent}
% \DescribeMacro{\stanzaindent*}
-% You can set the indent of some specific verse by calling \cs{stanzaindent}\marg{value} at the begining of the verse, before any other character. In this case, the indent defined by \cs{setstanzaindents} for this verse is skipped, and \marg{value} is used instead.
+% You can set the indent of some specific verse by calling \cs{stanzaindent}\marg{value} at the beginning of the verse, before any other character. In this case, the indent defined by \cs{setstanzaindents} for this verse is skipped, and \marg{value} is used instead.
%
-% If you use the mechanism of indent repetition, the next verse will be printed as it should be even if the current verse would have its normal indent value. In other word, using \cs{stanzaindent} in a verse does not shift the indent repetition.
+% If you use the mechanism of indent repetition, the next verse will be printed as it should be even if the current verse would have its normal indent value.
+% In other words, using \cs{stanzaindent} in a verse does not shift the indent repetition.
%
-% However, if you want to shift the indent repetition, and so the next verse to have the indent which should have been used for the current verse, use \cs{stanzaindent*} instead of \cs{stanzaindent}.
+% However, if you want to shift the indent repetition, so the next verse has the indent normally used for the current verse, use \cs{stanzaindent*} instead of \cs{stanzaindent}.
% \subsection{Stanza breaking}
% \DescribeMacro{\setstanzapenalties}
% When the stanzas run over several pages, it is often
@@ -2026,7 +2032,7 @@
% \DescribeMacro{\sidenotemargin}
% \cs{ledsidenote}\marg{text} will put \meta{text} into the margin specified
% by the current setting of \cs{sidenotemargin}\marg{location}. The
-% permissable value for \meta{location} is one out of the list
+% permissible value for \meta{location} is one out of the list
% \texttt{left}, \texttt{right}, \texttt{inner}, or \texttt{outer}, for
% example \verb?\sidenotemargin{outer}?. The package's default setting
% is \\
@@ -2725,127 +2731,6 @@
%
%
%
-% \subsection{Notes for EDMAC users} \label{sec:lastuser}
-%
-% If you have never used \edmac, ignore this section. If you have used
-% \edmac{} and are starting on a completely new document, ignore this section.
-% Only read this section if you are converting an original \edmac{}
-% document to use \eledmac.
-%
-% The package still provides the original \cs{text} command, but it is
-% (a) deprecated, and
-% (b) its name has been changed\footnote{A name like \cs{text} is likely to be defined by
-% other \LaTeX\ packages (it certainly is by the AMS packages) and it
-% seems sensible to try and avoid clashes with other definitions.}
-% to \cs{critext};
-% use the \cs{edtext} macro instead. However, if you do
-% use \cs{critext} (the new name for \cs{text}), the following is a reminder.
-%
-%
-% \DescribeMacro{\critext}
-% Within numbered paragraphs, footnotes and endnotes are generated
-% by forms of the \cs{critext} macro:
-% \begin{verse}
-% \cs{critext}\marg{lemma}\meta{commands}\verb"/"
-% \end{verse}
-%
-%
-% The \meta{lemma} argument is the lemma in the main text: \cs{critext}
-% both prints this as part of the text, and makes it available to the
-% \meta{commands} you specify to generate notes. The \verb"/" at the
-% end terminates the command; it is part of the macro's definition so
-% that spaces after the macro will be treated as significant.
-%
-% For example:
-% \egstart
-% \begin{verbatim}
-% I saw my friend \critext{Smith}
-% \Afootnote{Jones C, D.}/
-% on Tuesday.
-% \end{verbatim}
-% \egmid
-% 1\enspace I saw my friend\\
-% 2\enspace Smith on Tuesday.\smallskip
-% \hrule width 1.5cm
-% \strut {\bf 2} Smith] Jones C, D.
-% \egend
-%
-% The lemma \verb"Smith" is printed as part of this sentence in
-% the text, and is also made available to the footnote
-% that specifies a variant, \verb"Jones C, D". The footnote macro
-% is supplied with the line number at which the lemma appears
-% in the main text.
-%
-% The \meta{lemma} may contain further \cs{critext} commands.
-% Nesting makes
-% it possible to print an explanatory note on a long passage together with
-% notes on variants for individual words within the passage. For
-% example:
-% \egstart
-% \begin{verbatim}
-% \critext{I saw my friend
-% \critext{Smith}{\Afootnote{Jones
-% C, D.}/ on Tuesday.}
-% \Bfootnote{The date was
-% July 16, 1954.}
-% /
-% \end{verbatim}
-% \egmid
-% 1\enspace I saw my friend\\
-% 2\enspace Smith on Tuesday.\smallskip
-% \hrule width 1.5cm
-% \strut {\bf 2} Smith] Jones C, D.\smallskip
-% \hrule width 1.5cm
-% \strut {\bf 1--2} I saw my friend \\
-% Smith on Tuesday.] The\\ date was
-% July 16, 1954.
-% \egend
-%
-% However, \cs{critext} cannot handle overlapping but unnested
-% notes---for example, one note covering lines 10--15, and another
-% covering 12--18; a \cs{critext} that starts in the \meta{lemma}
-% argument of another \cs{critext} must end there, too. (The
-% \cs{lemma} and \cs{linenum} commands may be used to
-% generate overlapping notes if necessary.)
-%
-% The second argument of the \cs{critext} macro, \meta{commands},
-% is the same as the second argument to the \cs{edtext} macro.
-%
-%
-% It is possible to define aliases for \cs{critext}, which
-% can be easier to type. You can make a single character substitute
-% for \cs{critext} by saying this:
-% \begin{verbatim}
-% \catcode`\<=\active
-% \let<=\critext
-% \end{verbatim}
-%
-% Then you might say \verb"<{Smith}\variant{Jones}/". This of course
-% destroys the ability to use \verb"<" in any new macro definitions, so
-% long as it remains in effect; hence it should be used with care.
-%
-% Changing the character at the end of the command requires more work:
-% \begin{verbatim}
-% \catcode`\<=\active
-% \def\xtext#1#2>{\critext{#1}{#2}/}
-% \let<=\xtext
-% \end{verbatim}
-% This allows you to say \verb"<{Smith}\Afootnote{Jones}>".
-%
-% Aliases for \cs{critext}
-% of the first kind shown here also can't be nested---that is,
-% you can't use the alias in the text that forms the first argument
-% to \cs{critext}. (See section~\ref{text} to find out why.) Aliases of
-% the second kind may be nested without any problem.
-%
-%
-% If you really have to use |\critext| in any of the tabular or
-% array environments, then |\edtext| must not be used in the same
-% environment. If you use |\critext| in one of these environments
-% then you have to issue the declaration |\usingcritext| beforehand.
-% The declaration |\usingedtext| must be issued to revert to the
-% default assumption that |\edtext| will be used.
-%
%
% \StopEventually{}
%
@@ -2905,7 +2790,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledmac}[2015/02/09 v1.17.0 LaTeX port of EDMAC]%
+\ProvidesPackage{eledmac}[2015/02/23 v1.18.0 LaTeX port of EDMAC]%
% \end{macrocode}
%
% Generally, these are the modifications to the original.
@@ -3445,6 +3330,12 @@
% \begin{macro}{\ifl@dpaging}
% \begin{macro}{\l@dpagingtrue}
% \begin{macro}{\l@dpagingfalse}
+% \begin{macro}{\ifl@dprintingpages}
+% \begin{macro}{\l@dprintingpagestrue}
+% \begin{macro}{\l@dprintingpagesfalse}
+% \begin{macro}{\ifl@dprintingcolumns}
+% \begin{macro}{\l@dprintingcolumnstrue}
+% \begin{macro}{\l@dprintingcolumnsfalse}
% \begin{macro}{\l@dpairingtrue}
% \begin{macro}{\l@dpairingfalse}
% \begin{macro}{\ifpst@rtedL}
@@ -3462,11 +3353,16 @@
% \changes{v0.12}{2005/10/01}{Added \cs{ifledRcol} and \cs{ifnumberingR} for/from \Lpack{eledpar}}
% \changes{v1.12.0}{2014/08/05}{Add \cs{ifledRcol@} for \Lpack{eledpar}}
% \changes{v1.13.2}{2014/09/31}{Add \cs{ifl@dpaging} for \Lpack{eledpar}}
+% \changes{v1.18.0}{2015/02/23}{Add \cs{ifl@dprintingpages} and \cs{@dprintingcolumns} for \Lpack{eledpar}}
% \begin{macrocode}
\newif\ifl@dpairing
\l@dpairingfalse
\newif\ifl@dpaging%
\l@dpagingfalse%
+\newif\ifl@dprintingpages%
+ \l@dprintingpagesfalse%
+\newif\ifl@dprintingcolumns%
+ \l@dprintingcolumnsfalse%
\newif\ifpst@rtedL
\pst@rtedLfalse
\newcount\l@dnumpstartsL
@@ -3494,6 +3390,12 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\beginnumbering}
% \begin{macro}{\initnumbering@reg}
% \cs{beginnumbering} begins a section of numbered text.
@@ -6043,6 +5945,9 @@
\labelpstartfalse
\newcommandx*{\pstart}[1][1]{%
\ifstrempty{#1}{\at@every@pstart}{\noindent#1}%
+ \ifluatex%
+ \edef\l@luatextextdir@L{\the\luatextextdir}%
+ \fi%
\if@nobreak%
\let\@oldnobreak\@nobreaktrue%
\else%
@@ -6278,18 +6183,66 @@
% \end{macro}
% \end{macro}
%
-% \changes{v1.13.1}{2014/09/25}{Coming back of add@penalties, mistakenly deleted in version 0.17!}
% \begin{macro}{\print@line}
-% \begin{macrocode}
+% \changes{v1.13.1}{2014/09/25}{Coming back of add@penalties, mistakenly deleted in version 0.17!}
+% \changes{v1.18.0}{2015/02/23}{Compatibility with \LuaLaTeX RTL languages.}
% \cs{print@line} is for normal line, i. e line without sectioning command.
+% \begin{macrocode}
\def\print@line{
+% \end{macrocode}
+% Insert the pstart number in side, if we are in the first line of a pstart.
+% \begin{macrocode}
\affixpstart@num%
- \hb@xt@ \linewidth{\do@insidelinehook\l@dld@ta%
+% \end{macrocode}
+% The line will be boxed, to have the good width.
+% \begin{macrocode}
+ \hb@xt@ \linewidth{%
+% \end{macrocode}
+% User hook.
+% \begin{macrocode}
+ \do@insidelinehook%
+% \end{macrocode}
+% Left line number
+% \begin{macrocode}
+ \l@dld@ta%
+% \end{macrocode}
+% Restore marginal and footnotes.
+% \begin{macrocode}
\add@inserts\affixside@note%
+% \end{macrocode}
+% Print left notes.
+% \begin{macrocode}
\l@dlsn@te
- {\ledllfill\hb@xt@ \wd\one@line{\new@line\inserthangingsymbol \l@dunhbox@line{\one@line}}\ledrlfill\l@drd@ta%
+% \end{macrocode}
+% Boxes the line, writes information about new line in the numbered file.
+% \begin{macrocode}
+ {\ledllfill\hb@xt@ \wd\one@line{\new@line%
+% \end{macrocode}
+% If we use \LuaLaTeX, then restore the direction.
+% \begin{macrocode}
+ \ifluatex%
+ \luatextextdir\l@luatextextdir@L%
+ \fi%
+% \end{macrocode}
+% Insert, if needed, the hanging symbol.
+% \begin{macrocode}
+ \inserthangingsymbol %Space keept for backward compatibility
+% \end{macrocode}
+% And so, print the line.
+% \begin{macrocode}
+ \l@dunhbox@line{\one@line}}%
+% \end{macrocode}
+% Right line number
+% \begin{macrocode}
+ \ledrlfill\l@drd@ta%
+% \end{macrocode}
+% Print right notes.
+% \begin{macrocode}
\l@drsn@te
}}%
+% \end{macrocode}
+% And reinsert penalties (for page breaking)...
+% \begin{macrocode}
\add@penalties%
}
% \end{macrocode}
@@ -6309,10 +6262,10 @@
\global\csundef{eled@sectioning@\the\l@dnumpstartsL}%
\if@RTL%
\hspace{-3\paperwidth}%
- {\hbox{\l@dunhbox@line{\one@line}}\new@line}%
+ {\hbox{\l@dunhbox@line{\one@line}} \new@line}%
\else%
\hspace{3\paperwidth}%
- {\new@line \hbox{\l@dunhbox@line{\one@line}}}%
+ {\new@line \hbox{\l@dunhbox@line{\one@line}}}%
\fi%
\vskip-\baselineskip%
}
@@ -7358,17 +7311,18 @@
%
% \begin{macro}{\printpstart}
% The \cs{printpstart} macro prints the pstart number for a note.
+% \changes{v1.18.0}{2015/02/23}{Debug \cs{pstartinfootnote} with parallel pages and columns (eledpar)}
% \begin{macrocode}
\newcommand{\printpstart}[0]{%
- \ifl@dpairing%
+ \ifboolexpr{bool{l@dpairing} or bool{l@dprintingpages} or bool{l@dprintingcolumns}}{%
\ifledRcol%
\thepstartR%
\else%
\thepstartL%
\fi%
- \else%
+ }{%
\thepstart%
- \fi%
+ }%
}
% \end{macrocode}
%
@@ -9484,9 +9438,9 @@
% supply the section numbers from the main text; standard \Eledmac{} does
% nothing with this information, but it's there if you want to write
% custom macros to do something with it.
-
+% \changes{v1.18.0}{2015/02/23}{Option parapparatus works for endnotes.}
% \begin{macrocode}
-\def\endprint#1#2#3#4{{\csuse{bhookXendnote@#4}\csuse{Xendnotefontsize@#4}{\csuse{Xendnotenumfont@#4}\printendlines#1|}%
+\global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4{{\csuse{bhookXendnote@#4}\csuse{Xendnotefontsize@#4}{\csuse{Xendnotenumfont@#4}\printendlines#1|}%
\enspace{\nottoggle{Xendlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}\enskip#3\par}}
\let\l@d@section=\@gobble
@@ -9669,6 +9623,7 @@
\newtoggle{numberonlyfirstinline@#1}%
\newtoggle{numberonlyfirstintwolines@#1}%
\newtoggle{onlypstartinfootnote@#1}%
+ \newtoggle{pstartinfootnoteeverytime@#1}%
\newtoggle{pstartinfootnote@#1}%
\csgdef{symlinenum@#1}{\symplinenum}%
\newtoggle{nonumberinfootnote@#1}%
@@ -9824,7 +9779,7 @@
% \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}
+% \begin{macrocode}
\newcommand{\seriesatbegin}[1]{
\edef\series{#1}
\def\new{}
@@ -9833,7 +9788,7 @@
\dolistloop{\@series}
\xdef\@series{\new}
}
-% \end{macrocode}
+% \end{macrocode}
% \end{macro}
% \begin{macro}{\seriesatend}
% And \cs{seriesatend} moves the series to the end of the list.
@@ -10006,6 +9961,7 @@
\newhooktoggle@series{numberonlyfirstintwolines}
\newhooktoggle@series{nonumberinfootnote}
\newhooktoggle@series{pstartinfootnote}
+\newhooktoggle@series{pstartinfootnoteeverytime}%
\newhooktoggle@series{onlypstartinfootnote}
\newhooktoggle@series{nonbreakableafternumber}
\newhooktoggle@series{Xlemmadisablefontselection}
@@ -10087,7 +10043,10 @@
% \subsection{Line number printing}
% \begin{macro}{\printlinefootnote}
% The \cs{printlinefootnote} macro is called in each \cs{<type>footfmt} command.
-% It controls whether the line number is printed or not, according to the previous options. Its first argument is the information about lines, its second is the series of the footnote.
+% 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.
+% The printing of the line number is shared in
+% \cs{printlinefootnotenumbers}.
+% \changes{v1.18.0}{2015/02/23}{Code refactoring in \cs{printlinefootnote}: the printing of the numbers are factorized in \cs{printlinefootnotearea}}
% \begin{macrocode}
\newcommand{\printlinefootnote}[2]{%
\def\extractline@##1|##2|##3|##4|##5|##6|##7|{##2}%
@@ -10127,55 +10086,90 @@
\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}{%
- \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
- \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}%
- \hfill}%
- }%
- \iftoggle{nonbreakableafternumber@#2}{\nobreak}{}\hspace{\csuse{afternumberinfootnote@#2}}%
+ \printlinefootnotearea{#1}{#2}%
}%
}%
{%
- \hspace{\csuse{beforenumberinfootnote@#2}}\csuse{Xnotenumfont@#2}%
- \ifdimequal{\csuse{boxlinenum@#2}}{0pt}{%
- \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
- \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}}%
- {%
- \hbox to \csuse{boxlinenum@#2}{%
- \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
- \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}%
- \hfill}%
- }%
- \iftoggle{nonbreakableafternumber@#2}{\nobreak}{}\hspace{\csuse{afternumberinfootnote@#2}}%
+ \printlinefootnotearea{#1}{#2}%
}%
}%
{%
- \hspace{\csuse{beforenumberinfootnote@#2}}\csuse{Xnotenumfont@#2}%
- \ifdimequal{\csuse{boxlinenum@#2}}{0pt}{%
- \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
- \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}%
- }%
- {%
- \hbox to \csuse{boxlinenum@#2}{%
- \iftoggle{pstartinfootnote@#2}{\printpstart}{}%
- \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}%
- \hfill}%
- }%
- \iftoggle{nonbreakableafternumber@#2}{\nobreak}{}\hspace{\csuse{afternumberinfootnote@#2}}%
+ \printlinefootnotearea{#1}{#2}%
}%
\csxdef{prevline#2}{\lineinfo@}%
- }%
+ }%
}%
}%
}%
}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\printlinefootnotearea}
+% This macro prints the space before the line number, changes the font, then prints the line number and the space after it.
+% It is called by \cs{printlinefootnote}
+% depending of the options about repeating line numbers.
+% The first argument is line information, the second is the notes series (A, B, C. etc.)
+% \begin{macrocode}
+\newcommand{\printlinefootnotearea}[2]{%
+ \printbeforenumberinfootnote{#2}%
+ \csuse{Xnotenumfont@#2}%
+ \boxfootnotenumbers{#1}{#2}%
+ \printafternumberinfootnote{#2}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\boxfootnotenumbers}
+% Depending on the user settings, this macro will box line numbers (or not).
+% The first argument is line information, the second is the notes series (A, B, C. etc.)
+% The previous \cs{printlinefootnotearea} calls it.
+% \begin{macrocode}
+\newcommand{\boxfootnotenumbers}[2]{%
+ \ifdimequal{\csuse{boxlinenum@#2}}{0pt}{%
+ \printlinefootnotenumbers{#1}{#2}%
+ }%
+ {%
+ \hbox to \csuse{boxlinenum@#2}{%
+ \printlinefootnotenumbers{#1}{#2}%
+ \hfill}%
+ }%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\printlinefootnotenumbers}
+% This macro prints, if needed, the pstart number and the line number.
+% The first argument is line information, the second is the notes series (A, B, C. etc.)
+% The previous \cs{boxlinefootnote} calls it.
+% \begin{macrocode}
+\newcommand{\printlinefootnotenumbers}[2]{%
+ \ifboolexpr{%
+ (togl{pstartinfootnote@#2} and bool{numberpstart})%
+ or togl{pstartinfootnoteeverytime@#2}}%
+ {\printpstart}{}%
+ \iftoggle{onlypstartinfootnote@#2}{}{\printlines#1|}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\printbeforenumberinfootnote}
+% This macro prints a space (before the line number) in footnote.
+% It is called by \cs{printlinefootnotearea}.
+% Its only argument is the series
+% \begin{macrocode}
+\newcommand{\printbeforenumberinfootnote}[1]{%
+ \hspace{\csuse{beforenumberinfootnote@#1}}%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\printafternumberinfootnote}
+% This macro prints the space, adding eventually a \cs{nobreak}, after the line number, in footnote.
+% It is called by \cs{printlinefootnotearea}.
+% Its only argument is the series
+% \begin{macrocode}
+\newcommand{\printafternumberinfootnote}[1]{%
+ \iftoggle{nonbreakableafternumber@#1}{\nobreak}{}%
+ \hspace{\csuse{afternumberinfootnote@#1}}%
+}%
+% \end{macrocode}
+% \end{macro}
% \section{Output routine}
% \label{output}\relax
%
@@ -10645,27 +10639,48 @@
%
% \changes{v0.2.1}{2003/08/26}{Tweaked \cs{edlabel} to get correct page numbers}
% \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.18.0}{2015/02/23}{\cs{edlabel} is now defined only one time for both eledmac and eledpar}
+
% \begin{macrocode}
-\newcommand*{\edlabel}[1]{\@bsphack
- \write\linenum@out{\string\@lab}%
- \ifx\labelref@list\empty
- \xdef\label@refs{\zz@@@}%
- \else
- \gl@p\labelref@list\to\label@refs
- \ifvmode
- \advancelabel@refs
- \fi
- \fi
+\newcommand*{\edlabel}[1]{%
+ \ifl@dpairing\ifautopar%
+ \strut%
+ \fi\fi%
+ \@bsphack%
+ \ifledRcol%
+ \write\linenum@outR{\string\@lab}%
+ \ifx\labelref@listR\empty%
+ \xdef\label@refs{\zz@@@}%
+ \else%
+ \gl@p\labelref@listR\to\label@refs%
+ \fi%
+ \ifvmode%
+ \advancelabel@refs%
+ \fi%
% \end{macrocode}
% Use code from the kernel \cs{label} command to write the correct
% page number (it seems possible that the original \edmac's \cs{page@num}
% scheme might also have had problems in this area).
% Also define an hypertarget if \Lpack{hyperref} package is loaded.
% \begin{macrocode}
+ \protected@write\@auxout{}%
+ {\string\l@dmake@labelsR\space\thepage|\label@refs|\the\c@pstartR|{#1}}%
+ \ifdef{\hypertarget}{\hypertarget{#1}{}}{}%
+ \else%
+ \write\linenum@out{\string\@lab}%
+ \ifx\labelref@list\empty%
+ \xdef\label@refs{\zz@@@}%
+ \else%
+ \gl@p\labelref@list\to\label@refs%
+ \fi%
+ \ifvmode%
+ \advancelabel@refs%
+ \fi%
\protected@write\@auxout{}%
{\string\l@dmake@labels\space\thepage|\label@refs|\the\c@pstart|{#1}}%
- \ifdef{\hypertarget}{\hypertarget{#1}{}}{}%
- \@esphack}
+ \ifdef{\hypertarget}{\hypertarget{#1}{}}{}%
+ \fi%
+\@esphack}%
% \end{macrocode}
% \end{macro}
@@ -11260,9 +11275,9 @@
%
% \begin{macro}{\sidenotesep}
% This macro is used to separate sidenotes of the same line.
-% \begin{macrocode}
+% \begin{macrocode}
\newcommand{\sidenotesep}{, }
-% \end{macrocode}
+% \end{macrocode}
% \end{macro}
% \begin{macro}{\affixside@note}
% This macro puts any moveable sidenote text into the left or right sidenote
@@ -11892,6 +11907,7 @@
% \begin{macro}{\@edindex@hyperref}
% \changes{v1.12.5}{2014/08/28}{Debug \cs{edindex} when \Lpack{hyperref} is not loaded}
% \cs{get@edindex@hyperref} is to be used to define the \cs{@edindex@hyperref} macro, which, in index, links to the point where the index was called (with \Lpack{hyperref}.
+% \changes{v1.18.0}{2015/08/21}{Fix spurious space with \cs{edindex} when using \Lpack{imakeidx}/\Lpack{indextools} + hyperref.}
% \begin{macrocode}
\newcommand{\get@edindex@hyperref}[1]{%
\ifdef{\hyperlink}%
@@ -11916,7 +11932,7 @@
{\edindexlab\thelabidx}}%
\fi%
}%
- {\get@index@command#1|+
+ {\get@index@command#1|+%
\ifledRcol%
\gdef\@edindex@hyperref{|hyperlinkR{\edindexlab\thelabidx}}%
\else%
@@ -12257,8 +12273,8 @@
%
% \begin{macro}{\stanzaindent}
% \begin{macro}{\stanzaindent*}
-% The macro \cs{stanzaindent}, when called at the begining of a verse, change the indentation normally defined for this verse by \cs{setstanzaindent}.
-% The starred version skip the current verse for the repetition of stanza indent.
+% The macro \cs{stanzaindent}, when called at the beginning of a verse, changes the indentation normally defined for this verse by \cs{setstanzaindent}.
+% The starred version skips the current verse for the repetition of stanza indent.
% \begin{macrocode}
\newcommand{\stanzaindent}[1]{%
\hspace{\dimexpr#1\stanzaindentbase-\parindent\relax}%
@@ -14655,6 +14671,127 @@
% \let\oldthesection\thesection
% \renewcommand{\thesection}{Appendix \oldthesection}
% \section{Some things to do when changing version}
+% \subsection{Migrating from edmac} \label{sec:lastuser}
+%
+% If you have never used \edmac, ignore this section. If you have used
+% \edmac{} and are starting on a completely new document, ignore this section.
+% Only read this section if you are converting an original \edmac{}
+% document to use \eledmac.
+%
+% The package still provides the original \cs{text} command, but it is
+% (a) deprecated, and
+% (b) its name has been changed\footnote{A name like \cs{text} is likely to be defined by
+% other \LaTeX\ packages (it certainly is by the AMS packages) and it
+% seems sensible to try and avoid clashes with other definitions.}
+% to \cs{critext};
+% use the \cs{edtext} macro instead. However, if you do
+% use \cs{critext} (the new name for \cs{text}), the following is a reminder.
+%
+%
+% \DescribeMacro{\critext}
+% Within numbered paragraphs, footnotes and endnotes are generated
+% by forms of the \cs{critext} macro:
+% \begin{verse}
+% \cs{critext}\marg{lemma}\meta{commands}\verb"/"
+% \end{verse}
+%
+%
+% The \meta{lemma} argument is the lemma in the main text: \cs{critext}
+% both prints this as part of the text, and makes it available to the
+% \meta{commands} you specify to generate notes. The \verb"/" at the
+% end terminates the command; it is part of the macro's definition so
+% that spaces after the macro will be treated as significant.
+%
+% For example:
+% \egstart
+% \begin{verbatim}
+% I saw my friend \critext{Smith}
+% \Afootnote{Jones C, D.}/
+% on Tuesday.
+% \end{verbatim}
+% \egmid
+% 1\enspace I saw my friend\\
+% 2\enspace Smith on Tuesday.\smallskip
+% \hrule width 1.5cm
+% \strut {\bf 2} Smith] Jones C, D.
+% \egend
+%
+% The lemma \verb"Smith" is printed as part of this sentence in
+% the text, and is also made available to the footnote
+% that specifies a variant, \verb"Jones C, D". The footnote macro
+% is supplied with the line number at which the lemma appears
+% in the main text.
+%
+% The \meta{lemma} may contain further \cs{critext} commands.
+% Nesting makes
+% it possible to print an explanatory note on a long passage together with
+% notes on variants for individual words within the passage. For
+% example:
+% \egstart
+% \begin{verbatim}
+% \critext{I saw my friend
+% \critext{Smith}{\Afootnote{Jones
+% C, D.}/ on Tuesday.}
+% \Bfootnote{The date was
+% July 16, 1954.}
+% /
+% \end{verbatim}
+% \egmid
+% 1\enspace I saw my friend\\
+% 2\enspace Smith on Tuesday.\smallskip
+% \hrule width 1.5cm
+% \strut {\bf 2} Smith] Jones C, D.\smallskip
+% \hrule width 1.5cm
+% \strut {\bf 1--2} I saw my friend \\
+% Smith on Tuesday.] The\\ date was
+% July 16, 1954.
+% \egend
+%
+% However, \cs{critext} cannot handle overlapping but unnested
+% notes---for example, one note covering lines 10--15, and another
+% covering 12--18; a \cs{critext} that starts in the \meta{lemma}
+% argument of another \cs{critext} must end there, too. (The
+% \cs{lemma} and \cs{linenum} commands may be used to
+% generate overlapping notes if necessary.)
+%
+% The second argument of the \cs{critext} macro, \meta{commands},
+% is the same as the second argument to the \cs{edtext} macro.
+%
+%
+% It is possible to define aliases for \cs{critext}, which
+% can be easier to type. You can make a single character substitute
+% for \cs{critext} by saying this:
+% \begin{verbatim}
+% \catcode`\<=\active
+% \let<=\critext
+% \end{verbatim}
+%
+% Then you might say \verb"<{Smith}\variant{Jones}/". This of course
+% destroys the ability to use \verb"<" in any new macro definitions, so
+% long as it remains in effect; hence it should be used with care.
+%
+% Changing the character at the end of the command requires more work:
+% \begin{verbatim}
+% \catcode`\<=\active
+% \def\xtext#1#2>{\critext{#1}{#2}/}
+% \let<=\xtext
+% \end{verbatim}
+% This allows you to say \verb"<{Smith}\Afootnote{Jones}>".
+%
+% Aliases for \cs{critext}
+% of the first kind shown here also can't be nested---that is,
+% you can't use the alias in the text that forms the first argument
+% to \cs{critext}. (See section~\ref{text} to find out why.) Aliases of
+% the second kind may be nested without any problem.
+%
+%
+% If you really have to use |\critext| in any of the tabular or
+% array environments, then |\edtext| must not be used in the same
+% environment. If you use |\critext| in one of these environments
+% then you have to issue the declaration |\usingcritext| beforehand.
+% The declaration |\usingedtext| must be issued to revert to the
+% default assumption that |\edtext| will be used.
+%
% \subsection{Migration from ledmac to eledmac}\label{migration}
% In eledmac, some changes were made in the code to allow for easy customization.
% This can cause problems for people who have made their own customizations. The next sections explain how to correct this.
@@ -14712,6 +14849,12 @@
% In this case, just add a \cs{relax} between \cs{pstart}/\cs{pend} and the brackets.
% The version 1.12.0 adds new best way to manage section title inside numbered text. Please read §~\ref{eledsection} (p.~\pageref{eledsection}).
+% \subsection{Migration to eledmac 17.1}
+% The version change the default behavior of \cs{pstartinfootnote}.
+% Henceforth, the pstart will be printed if footnote only for the section of text where you have called \cs{numberpstarttrue}.
+
+% We don't see any reason to print it in other section. However, if you want to print the pstart number in all footnote, with or without \cs{numberpstarttrue}, you can use
+% \cs{pstartinfootnoteeverytime}.
% \clearpage
% \bibliographystyle{alpha}
% \phantomsection
diff --git a/Master/texmf-dist/source/latex/eledmac/eledpar.dtx b/Master/texmf-dist/source/latex/eledmac/eledpar.dtx
index 026be610994..078a8d81023 100644
--- a/Master/texmf-dist/source/latex/eledmac/eledpar.dtx
+++ b/Master/texmf-dist/source/latex/eledmac/eledpar.dtx
@@ -31,7 +31,7 @@
]{hyperref}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
-\usepackage{graphicx,eledmac,eledpar}
+\usepackage{graphicx,eledmac,eledpar,metalogo}
\makeatletter
\@mparswitchfalse
\makeatother
@@ -51,7 +51,7 @@
%
% \fi
%
-% \CheckSum{4698}
+% \CheckSum{4704}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -183,6 +183,7 @@
% \changes{v1.10.0}{2015/01/12}{Restore critical notes in \cs{eledsection} in parallel columns (this bug was added in 1.8.2).}
% \changes{v1.10.0}{2015/01/12}{Compatibility with \cs{AtEveryPstart} and \cs{AtEveryPend}}
% \changes{v1.11.0}{2015/01/23}{Compatibility of standard footnotes with some biblatex styles.}
+% \changes{v1.12.0}{2015/02/23}{Compatibility with \LuaLaTeX RTL languages.}
% \hyphenation{man-u-script man-u-scripts}
%
%
@@ -234,7 +235,6 @@
% \renewcommand{\numberline}[1]{#1~}
% \tableofcontents
%
-% \listoffigures
%
%
% \section{Introduction}
@@ -872,10 +872,10 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledpar}[2015/01/23 v1.11.0 eledmac extension for parallel texts]%
+\ProvidesPackage{eledpar}[2015/02/23 v1.12.0 eledmac extension for parallel texts]%
% \end{macrocode}
-% With the option `shiftedpstarts' a long pstart one the left side (or in the right side) don't make a blank on the corresponding pstart, but the blank is put on the bottom of the page. Consequently, the pstarts on the parallel pages are shifted, but the shifted stop at every end of pages.
+% With the option `shiftedpstarts' a long pstart one the left side (or in the right side) doesn'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 shift stops at every end of pages.
% The \cs{shiftedverses} is kept for backward compatibility.
% \begin{macro}{\ifshiftedpstarts}
% \begin{macrocode}
@@ -2076,7 +2076,7 @@
% macro. It is called by \cs{beginnumberingR} and performs
% all the line-list operations needed at the start of a section.
% Its argument is the name of the line-list file.
-% \changes{v1.10.1}{2015/01/16}{Revert modification of 1.4.2 which makes bug with numbering. Leave vertical mode to solve spurious space before minipage.}
+% \changes{v1.10.1}{2015/01/16}{Revert modification of 1.4.2, which makes bugs with numbering. Leave vertical mode to solve spurious space before minipage.}
% \begin{macrocode}
\newcommand*{\line@list@stuffR}[1]{%
\read@linelist{#1}%
@@ -2285,6 +2285,60 @@
% \end{macrocode}
% \end{macro}
%
+% \section{Pstart numbers dumping and restoration}
+% While in \Lpack{eledmac} the footnotes are inserted in the same time as the \cs{pstart} …\cs{pend} are read, in \Lpack{eledpar} they are inserted when the \cs{Columns} or \cs{Pages} commands are called.
+% Consequently, if we do nothing, the value of the PstartL and PstartR counters are not the same in the main text and in the notes.
+% To solve this problem, we dump the values in two list (one by side) when processing \cs{pstart} and restore these at each \cs{pstart} when calling \cs{Columns} or \cs{Pages}.
+% We also dump and restore the value of the boolean \cs{ifnumberpstart}.
+
+% So, first step, creating the lists.
+% Here, ``pc'' means ``public counters''.
+% \begin{macro}{\list@pstartL@pc}
+% \begin{macro}{\list@pstartR@pc}
+% \begin{macrocode}
+\list@create{\list@pstartL@pc}%
+\list@create{\list@pstartR@pc}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% Two commands to dump current pstarts.
+% We prefer two commands to one with argument indicating the side,
+% because the commands are short, and so we save one test (or a \cs{csname} construction).
+% \begin{macro}{\dump@pstartL@pc}
+% \begin{macro}{\dump@pstartR@pc}
+% \begin{macrocode}
+\def\dump@pstartL@pc{%
+ \xright@appenditem{\the\c@pstartL}\to\list@pstartL@pc%
+ \global\cslet{numberpstart@L\the\l@dnumpstartsL}{\ifnumberpstart}%
+}%
+
+\def\dump@pstartR@pc{%
+ \xright@appenditem{\the\c@pstartR}\to\list@pstartR@pc%
+ \global\cslet{numberpstart@R\the\l@dnumpstartsR}{\ifnumberpstart}%
+}%
+
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\restore@pstartL@pc}
+% \begin{macro}{\restore@pstartR@pc}
+% And so, the commands to restore them
+% \begin{macrocode}
+\def\restore@pstartL@pc{%
+ \ifx\list@pstartL@pc\empty\else%
+ \gl@p\list@pstartL@pc\to\@temp%
+ \global\c@pstartL=\@temp%
+ \fi%
+}%
+\def\restore@pstartR@pc{%
+ \ifx\list@pstartR@pc\empty\else%
+ \gl@p\list@pstartR@pc\to\@temp%
+ \global\c@pstartR=\@temp%
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \section{Parallel environments}
%
% The initial set up for parallel processing is deceptively simple.
@@ -2485,15 +2539,13 @@
% them to survive past the end of the paragraph.
%
% We have to have specific left and right \cs{pstart} when parallel processing;
-% among other things because of potential changes in the linewidth. The \verb|old| counters are used to have the good reset of the pstart counters at the begining of the \cs{Pages} command.
+% among other things because of potential changes in the linewidth.
%
% \begin{macrocode}
\newcounter{pstartL}
-\newcounter{pstartLold}
\renewcommand{\thepstartL}{{\bfseries\@arabic\c@pstartL}. }
\newcounter{pstartR}
-\newcounter{pstartRold}
\renewcommand{\thepstartR}{{\bfseries\@arabic\c@pstartR}. }
\newcommandx*{\pstartL}[1][1]{%
@@ -2503,6 +2555,9 @@
\let\@oldnobreak\@nobreakfalse%
\fi%
\@nobreaktrue%
+ \ifluatex%
+ \xdef\l@luatextextdir@L{\the\luatextextdir}%
+ \fi%
\ifnumbering \else%
\led@err@PstartNotNumbered%
\beginnumbering%
@@ -2513,10 +2568,9 @@
\fi%
% \end{macrocode}
% If this is the first \cs{pstart} in a numbered section, clear any inserts
-% and set \cs{ifpst@rtedL} to FALSE. Save the pstartL counter.
+% and set \cs{ifpst@rtedL} to FALSE.
% \begin{macrocode}
\ifpst@rtedL\else%
- \setcounter{pstartLold}{\value{pstartL}}%
\list@clear{\inserts@list}%
\global\let\next@insert=\empty%
\global\pst@rtedLtrue%
@@ -2562,6 +2616,9 @@
\let\@oldnobreak\@nobreakfalse%
\fi%
\@nobreaktrue%
+ \ifluatex%
+ \xdef\l@luatextextdir@R{\the\luatextextdir}%
+ \fi%
\ifnumberingR \else%
\led@err@PstartNotNumbered%
\beginnumberingR%
@@ -2571,7 +2628,6 @@
\pendR%
\fi%
\ifpst@rtedR\else%
- \setcounter{pstartRold}{\value{pstartR}}%
\list@clear{\inserts@listR}%
\global\let\next@insertR=\empty%
\global\pst@rtedRtrue%
@@ -2634,6 +2690,7 @@
\endgroup%
\ignorespaces%
\@oldnobreak%
+ \dump@pstartL@pc%
\ifnumberpstart%
\addtocounter{pstartL}{1}%
\fi
@@ -2667,9 +2724,10 @@
\endgroup%
\ignorespaces%
\@oldnobreak%
+ \dump@pstartR@pc%
\ifnumberpstart%
\addtocounter{pstartR}{1}%
- \fi%
+ \fi%
\parledgroup@beforenotes@save{R}%
\ifstrempty{#1}%
{\csgdef{after@pendR@\the\l@dnumpstartsR}{\at@every@pend}}%
@@ -2751,6 +2809,7 @@
% some common code}
% \begin{macrocode}
\newcommand*{\do@lineL}{%
+ \letcs{\ifnumberpstart}{numberpstart@L\the\l@dpscL}%
\advance\countLline \@ne
\ifvbox\namebox{l@dLcolrawbox\the\l@dpscL}%
{\vbadness=10000
@@ -2785,20 +2844,29 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\print@eledsectionL}
-% \cs{print@lineL} is for lines without a sectioning command.
+% \begin{macro}{\print@lineL}
+% \cs{print@lineL} is for lines without a sectioning command. See \Lpack{eledmac} definition of \cs{print@line} for handbook.
+% \changes{v1.17.1}{2015/02/23}{Compatibility with \LuaLaTeX RTL languages.}
% \begin{macrocode}
\def\print@lineL{%
\affixpstart@numL%
\l@dld@ta %space kept for backward compatibility
\add@inserts\affixside@note%
\l@dlsn@te %space kept for backward compatibility
- {\ledllfill\hb@xt@ \wd\one@line{\do@insidelineLhook\inserthangingsymbolL\new@lineL\l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta%
+ {\ledllfill\hb@xt@ \wd\one@line{%
+ \do@insidelineLhook%
+ \ifluatex%
+ \luatextextdir\l@luatextextdir@L%
+ \fi%
+ \new@lineL%
+ \inserthangingsymbolL%
+ \l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta%
\l@drsn@te}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\print@eledsectionL}
+% \changes{v1.17.1}{2015/02/23}{Compatibility with \LuaLaTeX RTL languages.}
% \cs{print@eledsectionL} is for line with macro code.
% \begin{macrocode}
\def\print@eledsectionL{%%
@@ -2808,7 +2876,13 @@
\numdef{\temp@}{\l@dpscL-1}%
\xifinlist{\temp@}{\eled@sections@@}{\@nobreaktrue}{\@nobreakfalse}%
\@eled@sectioningtrue%
- \csuse{eled@sectioning@\the\l@dpscL}%
+ \bgroup%
+ \ifluatex%
+ \luatextextdir\l@luatextextdir@L%
+ \luatexpardir\l@luatextextdir@L%
+ \fi%
+ \csuse{eled@sectioning@\the\l@dpscL}%
+ \egroup%
\@eled@sectioningfalse%
\global\csundef{eled@sectioning@\the\l@dpscL}%
\if@RTL%
@@ -2866,6 +2940,7 @@
% \changes{v1.8.1}{2014/08/07}{Fix a bug with critical notes a the begining of a page, added by v1.8.0 (?).}
% \begin{macrocode}
\newcommand*{\do@lineR}{%
+ \letcs{\ifnumberpstart}{numberpstart@R\the\l@dpscR}%
\ledRcol@true%
\advance\countRline \@ne
\ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}%
@@ -2906,12 +2981,20 @@
%
% \begin{macro}{\print@lineR}{}
% \begin{macro}{\print@eledsectionR}{}
+% \changes{v1.17.1}{2015/02/23}{Compatibility with \LuaLaTeX RTL languages.}
\def\print@lineR{%
\affixpstart@numR%
\l@dld@ta %space kept for backward compatibility
\add@insertsR\affixside@noteR%
\l@dlsn@te %space kept for backward compatibility
-\correcthangingR\ledllfill\hb@xt@ \wd\one@lineR{\do@insidelineRhook\inserthangingsymbolR\new@lineR\l@dunhbox@line{\one@lineR}}\ledrlfill\l@drd@ta%
+ \correcthangingR\ledllfill\hb@xt@ \wd\one@lineR{%
+ \do@insidelineRhook%
+ \new@lineR%
+ \inserthangingsymbolR%
+ \ifluatex%
+ \luatextextdir\l@luatextextdir@R%
+ \fi%
+ \l@dunhbox@line{\one@lineR}}\ledrlfill\l@drd@ta%
\l@drsn@te
}
@@ -2923,7 +3006,13 @@
\numdef{\temp@}{\l@dpscR-1}%
\xifinlist{\temp@}{\eled@sectionsR@@}{\@nobreaktrue}{\@nobreakfalse}%
\@eled@sectioningtrue%
- \csuse{eled@sectioning@\the\l@dpscR R}%
+ \bgroup%
+ \ifluatex%
+ \luatextextdir\l@luatextextdir@R%
+ \luatexpardir\l@luatextextdir@R%
+ \fi%
+ \csuse{eled@sectioning@\the\l@dpscR R}%
+ \egroup%
\@eled@sectioningfalse%
\global\csundef{eled@sectioning@\the\l@dpscR R}%
\if@RTL%
@@ -3481,49 +3570,9 @@
%
%
% \begin{macro}{\edlabel}
-% The \cs{edlabel} command first writes a \cs{@lab} macro to
-% the \cs{linenum@out} file. It then checks to see that the
-% \cs{labelref@list} actually has something in it (if not, it
-% creates a dummy entry), and pops the next value for the current
-% label, storing it in \cs{label@refs}. Finally it defines the
-% label to be \cs{empty} so that any future check will turn up
-% the fact that it has been used.
-% \changes{v1.10.0}{2015/01/12}{Prevent some bugs with cross-referencing when using \cs{autopar} in parallel texts.}
-% \begin{macrocode}
-\renewcommand*{\edlabel}[1]{%
- \ifl@dpairing\ifautopar%
- \strut%
- \fi\fi%
- \@bsphack%
- \ifledRcol
- \write\linenum@outR{\string\@lab}%
- \ifx\labelref@listR\empty
- \xdef\label@refs{\zz@@@}%
- \else
- \gl@p\labelref@listR\to\label@refs
- \fi
- \ifvmode
- \advancelabel@refs
- \fi
- \protected@write\@auxout{}%
- {\string\l@dmake@labelsR\space\thepage|\label@refs|\the\c@pstartR|{#1}}%
- \else
- \write\linenum@out{\string\@lab}%
- \ifx\labelref@list\empty
- \xdef\label@refs{\zz@@@}%
- \else
- \gl@p\labelref@list\to\label@refs
- \fi
- \ifvmode
- \advancelabel@refs
- \fi
- \protected@write\@auxout{}%
- {\string\l@dmake@labels\space\thepage|\label@refs|\the\c@pstart|{#1}}%
- \fi
- \@esphack}
-
-
-% \end{macrocode}
+% Since version 1.18.0, this command is defined only one time in eledmac, including features for eledpar.
+% \changes{v1.12.0}{2015/02/23}{\cs{edlabel} is now defined only one time for both eledmac and eledpar}
+% \changes{v1.12.0}{2015/02/23}{\cs{edlabel} and \cs{edindex} works now with hyperref when using \Lpack{eledpar}.}
% \end{macro}
%
% \begin{macro}{\l@dmake@labelsR}
@@ -4215,11 +4264,11 @@
% Right texts being typeset in matching columns. There should
% be equal numbers of chunks in the left and right texts.
%
+% \changes{v1.12.0}{2015/02/23}{Add \cs{l@dprintingcolumnstrue}}
% \begin{macrocode}
\newcommand*{\Columns}{%
+ \l@dprintingcolumnstrue%
\eledsection@correcting@skip=-\baselineskip% Correction for sections' titles
- \setcounter{pstartL}{\value{pstartLold}}
- \setcounter{pstartR}{\value{pstartRold}}
\ifnum\l@dnumpstartsL=\l@dnumpstartsR\else
\led@err@BadLeftRightPstarts{\the\l@dnumpstartsL}{\the\l@dnumpstartsR}%
\fi
@@ -4245,9 +4294,12 @@
% \end{macrocode}
% Increment \cs{l@dpscL} and \cs{l@dpscR} which here count
% the numbers of left and right chunks.
+% Also restore the value of the public pstart counters.
% \begin{macrocode}
\global\advance\l@dpscL \@ne
\global\advance\l@dpscR \@ne
+ \restore@pstartL@pc%
+ \restore@pstartR@pc%
% \end{macrocode}
% Check if there is text yet to be processed in at least one of
% the two current chunks, and also whether the left and right languages
@@ -4317,8 +4369,6 @@
\write\linenum@outR{\string\@set[1]}
\resetprevline@
\fi
- \addtocounter{pstartL}{1}
- \addtocounter{pstartR}{1}
\repeat
% \end{macrocode}
% Having output all chunks, make sure all notes have been output,
@@ -4333,6 +4383,7 @@
\global\l@dpscR=\z@
\global\l@dnumpstartsL=\z@
\global\l@dnumpstartsR=\z@
+ \l@dprintingcolumnsfalse%
\ignorespaces
\global\instanzaLfalse
\global\instanzaRfalse}
@@ -4589,11 +4640,11 @@
% Right texts being typeset on matching facing pages. There should
% be equal numbers of chunks in the left and right texts.
%
+% \changes{v1.12.0}{2015/02/23}{Add \cs{l@dprintingpagestrue}}
% \begin{macrocode}
\newcommand*{\Pages}{%
+ \l@dprintingpagestrue%
\eledsection@correcting@skip=-2\baselineskip% line correcting for section titles.
- \setcounter{pstartL}{\value{pstartLold}}
- \setcounter{pstartR}{\value{pstartRold}}
\parledgroup@notespacing@set@correction
\typeout{}
\typeout{*************************** PAGES ***************************}
@@ -4657,9 +4708,12 @@
\if@pstarts
% \end{macrocode}
% Increment the chunk counts to get the first pair.
+% Restore also the value of public pstart counters.
% \begin{macrocode}
\global\advance\l@dpscL \@ne
\global\advance\l@dpscR \@ne
+ \restore@pstartL@pc%
+ \restore@pstartR@pc%
% \end{macrocode}
% We haven't processed any lines from these chunks yet, so zero the
% respective line counts.
@@ -4744,7 +4798,7 @@
% Now do the same for the right text.
% \changes{v0.3}{2005/02/10}{Added \cs{ledstrutR} to \cs{Pages}}
% \begin{macrocode}
- \checkpageR
+ \checkpageR%
\l@duselanguage{\theledlanguageR}%
{ \loop\ifl@dsamepage%
\initnumbering@sectcountR
@@ -4816,6 +4870,7 @@
\global\l@dnumpstartsR=\z@
\global\instanzaLfalse
\global\instanzaRfalse
+ \l@dprintingpagesfalse%
\ignorespaces}
% \end{macrocode}
@@ -5184,29 +5239,30 @@
% \end{macrocode}
% \changes{v0.11}{2012/06/11}{Pstart number can be printed in side}
% There are still unprocessed boxes. Recalculate the maximum number of
-% lines needed, and move onto the next box (by incrementing \cs{l@dpscL}). If needed, restart the line numbering. Increment the pstartL counter.
+% lines needed, and move onto the next box (by incrementing \cs{l@dpscL}). If needed, restart the line numbering.
% \begin{macrocode}
\writtenlinesLfalse
\ifbypstart@
- \ifnum\value{pstartL}<\value{pstartLold}
- \else
- \global\line@num=0
- \resetprevline@
- \fi
+ \global\line@num=0%
+ \resetprevline@%
\fi
% Add the content of the optional argument of the previous \cs{pend}.
% \begin{macrocode}
\csuse{after@pendL@\the\l@dpscL}%
\global\csundef{after@pendL@\the\l@dpscL}%
% \end{macrocode}
+% Check the number of lines
% \begin{macrocode}
- \addtocounter{pstartL}{1}
- \global\pstartnumtrue
\l@dcalc@maxoftwo{\the\usenamecount{l@dmaxlinesinpar\the\l@dpscL}}%
{\the\@donetotallinesL}%
{\usenamecount{l@dmaxlinesinpar\the\l@dpscL}}%
\global\@donetotallinesL \z@
+% \end{macrocode}
+% Go to the next pstart
+% \begin{macrocode}
\global\advance\l@dpscL \@ne
+ \global\pstartnumtrue%
+ \restore@pstartL@pc%
% \end{macrocode}
% Add notes of parallel ledgroup.
% \begin{macrocode}
@@ -5240,21 +5296,18 @@
\ifnum\l@dnumpstartsR>\l@dpscR
\writtenlinesRfalse
\ifbypstart@R
- \ifnum\value{pstartR}<\value{pstartRold}
- \else
- \global\line@numR=0
- \resetprevline@
- \fi
+ \global\line@numR=0%
+ \resetprevline@%
\fi
\csuse{after@pendR@\the\l@dpscR}%
\global\csundef{after@pendR@\the\l@dpscR}%
- \addtocounter{pstartR}{1}
- \global\pstartnumRtrue
\l@dcalc@maxoftwo{\the\usenamecount{l@dmaxlinesinpar\the\l@dpscR}}%
{\the\@donetotallinesR}%
{\usenamecount{l@dmaxlinesinpar\the\l@dpscR}}%
\global\@donetotallinesR \z@
\global\advance\l@dpscR \@ne
+ \global\pstartnumRtrue%
+ \restore@pstartR@pc%
\parledgroup@notes@endR
\parledgroup@correction@notespacing@final{R}
\else