summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-11-19 22:41:35 +0000
committerKarl Berry <karl@freefriends.org>2015-11-19 22:41:35 +0000
commit8bc177aa284756939eeec5497c1799fbfae775ae (patch)
tree96ceb4277b4a1bd972fb505b7773656d9134c182 /Master/texmf-dist/source
parent2f872d852a052b88a4c3c7e3442b63c3185d3770 (diff)
reledmac (19nov15)
git-svn-id: svn://tug.org/texlive/trunk@38896 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledmac.dtx226
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledpar.dtx54
2 files changed, 189 insertions, 91 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
index f2cb5c1a1a3..0c405ebefbf 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
@@ -347,8 +347,8 @@
% \changes{v2.4.0}{2015/10/19}{Fix bug of \protect\cs{parindentX} and \protect\cs{Xparindent} with two columns and three columns notes.}
% \changes{v2.4.0}{2015/10/19}{Fix spurious space when using optional argument of \protect{stanza} (introduced in v2.3.0).}
% \changes{v2.4.1}{2015/10/26}{Fix bug with \protect\cs{appref} and \protect\cs{apprefwithpage} (introduced in v2.4.0).}
-% \changes{v2.4.1}{2015/10/26}{Fix bug with tabular environments when using \protect\package{babel} or \protect\package{polyglossia} language which override \LaTeX\ \protect\cs{roman} command, like Greek.}
-% \changes{v2.4.1}{2015/10/26}{Fix bug with tabular environments when using \protect\package{babel} or \protect\package{polyglossia} language which override \LaTeX\ \protect\cs{roman} command, like greek language.}
+% \changes{v2.4.1}{2015/10/26}{Fix bug with tabular environments when using \protect\package{babel} or \protect\package{polyglossia} languages that override \LaTeX\ \protect\cs{roman} command, like Greek.}
+% \changes{v2.4.1}{2015/10/26}{Fix bug with tabular environments when using \protect\package{babel} or \protect\package{polyglossia} languages that override \LaTeX\ \protect\cs{roman} command, like Greek language.}
% \changes{v2.5.0}{2015/11/13}{Compatibility with new hook and tools of \protect\reledpar~2.6.0.}
% \changes{v2.5.0}{2015/11/13}{\protect\cs{lemma} can be used even when the \protect\option{nocritical} is enabled.}
% \changes{v2.5.0}{2015/11/13}{New hooks to customize page and line number appearance in endnotes.}
@@ -358,8 +358,11 @@
% \changes{v2.5.0}{2015/11/13}{\protect\cs{apprefwithpage} and \protect\cs{appref} print double quotation mark when the label was not defined.}
% \changes{v2.5.0}{2015/11/13}{\protect\cs{apprefwithpage} and \protect\cs{appref} work with right side crossref.}
% \changes{v2.5.0}{2015/11/13}{\protect\cs{edlabel} works now in \protect\cs{Xfootnote}.}
-% \changes{v2.5.0}{2015/11/13}{Log contains `There were undefined references` when using false references in \protect\cs{edlineref} or \protect{edpageref}.}
+% \changes{v2.5.0}{2015/11/13}{Log now states `There were undefined references` when using wrong references in \protect\cs{edlineref} or \protect{edpageref}.}
% \changes{v2.5.0}{2015/11/13}{Fix spurious vertical space in \protect\env{astanza} environment (\reledpar)}
+% \changes{v2.6.0}{2015/11/20}{Adds compatibility with \protect\option{innnote} and \protect\option{notenumber} options of \protect\package{indextools} package.}
+% \changes{v2.6.0}{2015/11/20}{Fix bug with footnote counter in \protect\env{ledgroup} (added in v2.5.0).}
+% \changes{v2.6.0}{2015/11/20}{Fix bug, introduced in v2.5.0, with footnote numbering in parallel typesetting when using \protect\package{perpage} package.}
%
%
% \title{\Macpackage \\
@@ -2418,11 +2421,11 @@
% auxiliary file will not have been updated yet.)
%
% \subsection{Cross-referencing to a critical note}
-% If you when to refer to a word which is a lemma word, the \cs{edlabel} command should be in the first argument of \cs{edtext} command.
+% If you want to refer to a word which is a lemma word, the \cs{edlabel} command should be in the first argument of \cs{edtext} command.
%
% If you want to refer to the content of a a \cs{Xfootnote}, the line and subline number printed will be the start line.
%
-% If you want to refers to the start and end lines, you should use \cs{appref} and related tools (\reff{appref}).
+% If you want to refer to starting and ending lines, you should use \cs{appref} and related tools (\reff{appref}).
% \subsection{Cross-referencing which return a number in any case}
% Where \verb+#1+ stands for the reference.
% \DescribeMacro{\xpageref}
@@ -2520,7 +2523,7 @@
% \DescribeMacro{\SErefonlypage}
% \cs{SErefonlypage} will make a cross-reference printed only with page number.
%
-% \subsubsection{References to lines commented in the apparatus}\label{appref}
+% \subsubsection{References to lines that are commented on in the apparatus}\label{appref}
% \changes{v1.21.0}{2015/03/09}{Add \protect\cs{applabel} and related}
% You may want to make a cross-reference to a passage that is referred to by \protect\cs{edtext}.
% \Macpackage provides specific tools for this scenario.
@@ -2693,17 +2696,17 @@
% \item Load \macpackage.
% \item Declare the index with the macro \cs{makeindex} of \package{imakeidx} and \package{indextools}.
% \end{enumerate}
-% \subsection{Refer to a critical notes}
+% \subsection{Referring to critical notes}
% If you want to refer to a word inside an
-% \protect\cs{edtext}\marg{lemma}\marg{app} command, the \protect\cs{edindex} should be defined inside
+% \protect\cs{edtext}\marg{lemma}\marg{app} command, \protect\cs{edindex} should be defined inside
% the first argument, e.g.,
% \begin{verbatim}
% The \edtext{creature\edlabel{elephant} was quite
% unafraid}{\Afootnote{Of the mouse, that is.}}
% \end{verbatim}
%
-% If you add the \protect\cs{edindex} inside some \protect\cs{Xfootnote} command,
-% it will refer to that note, and a suffix \emph{n} will be added to the reference.
+% If you add \protect\cs{edindex} inside some \protect\cs{Xfootnote} command,
+% it will refer to that note, and a suffix \emph{n} will be appended to the reference.
% You can redefine this suffix by redefining the command \protect\cs{ledinnotemark}.
% Its actual definition is:
% \begin{verbatim}
@@ -3389,7 +3392,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2015/11/13 v2.5.0 typeset critical edition]%
+\ProvidesPackage{reledmac}[2015/11/20 v2.6.0 typeset critical edition]%
% \end{macrocode}
%
% \subsection{Package options}
@@ -3964,26 +3967,13 @@
% \end{macro}
% \end{macro}
% \subsection{Prepare \parpackage}
-% \begin{macro}{\ifnumberingR}
% \begin{macro}{\ifl@dpairing}
% \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}
-% \begin{macro}{\pst@rtedLtrue}
-% \begin{macro}{\pst@rtedLfalse}
% \begin{macro}{\l@dnumpstartsL}
-% \begin{macro}{\ifledRcol}
-% \begin{macro}{\ifledRcol@}
-% \begin{macro}{\ifXnote@}
+
% In preparation for the \parpackage package, these are related to
% the `right' text of parallel texts (when \protect\cs{ifl@dpairing} is TRUE).
% They are explained in the \protect\package{eledpar}
@@ -4002,11 +3992,22 @@
\newif\ifpst@rtedL
\newcount\l@dnumpstartsL
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\ifledRcol}
+% \begin{macro}{\ifledRcol@}
% \protect\cs{ifledRcol} is set to true in the \verb+Rightside+ environnement. It must be not confused with \protect\cs{ifledRcol@} which is set to true when a right line is processed, in \protect\cs{Pages} or \protect\cs{Columns}.
% \begin{macrocode}
\newif\ifledRcol
\newif\ifledRcol@
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\ifnumberingR}
% The \protect\cs{ifnumberingR} flag is
% set to \verb"true" if we're within a right text numbered section.
% \begin{macrocode}
@@ -4017,25 +4018,17 @@
\newif\ifXnote@%
% \end{macrocode}
% \end{macro}
+% \subsection{Booleans provided by other optional packages which are required in any case}
+% \begin{macro}{\ifindtl@innote}
+% \begin{macro}{\ifindtl@notenumber}
+% The \cs{ifindtl@innote} and \cs{ifindtl@notenumber} are required even if \package{indextools} is not used.
+% \begin{macrocode}
+\providebool{indtl@innote}%
+\providebool{indtl@notenumber}%
+% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
+
%
%\section{Sectioning commands}
%
@@ -9687,8 +9680,8 @@
% \begin{macro}{\l@dparsedendpage}
% \begin{macro}{\l@dparsedendline}
% \begin{macro}{\l@dparsedendsub}
-% \changes{v2.5.0}{2015/11/13}{\protect\cs{l@dparsefootspec} deleted, not use anymore since \protect\eledmac release!}
-% \protect\cs{l@dp@rsefootspec} parses lines specification and defines macros holding the numeric values.
+% \changes{v2.5.0}{2015/11/13}{\protect\cs{l@dparsefootspec} deleted, for it is not anymore used since \protect\eledmac release!}
+% \protect\cs{l@dp@rsefootspec} parses lines specification and defines macros which hold the numeric values.
% Just a reminder of the arguments: \\
% \verb?\printlines #1 | #2 | #3 | #4 | #5 | #6 | #7?\\
% \verb?\printlines start-page | line | subline | end-page | line | subline | font?flag
@@ -10054,12 +10047,15 @@
%
% \begin{macro}{\l@dbfnote}
% \begin{macro}{\vl@dbfnote}
+% \begin{macro}{\vl@dbfnote}
% \begin{macro}{\footnote}
+% \begin{macro}{\get@fnmark}
+% \begin{macro}{\get@thisfootnote}
% \protect\cs{l@dbfnote} adds the footnote to the insert list, and
% \protect\cs{vl@dbfnote} calls the original \protect\cs{@footnotetext}.
% \changes{v0.6.0}{2004/11/23}{Changed \protect\cs{l@dbfnote} and \protect\cs{vl@dbfnote} as
% originals could give incorrect markers in the footnotes}
-% We also patch \cs{footnote} in order to get the correct footnote numbers when typesetting parallel texts.
+% We also patch \cs{footnote} in order to get the correct footnote numbers when typesetting parallel texts. This is moved into a \cs{get@fnmark} command.
% \changes{v1.4.1}{2012/11/16}{Compatibility of standard footnotes with \eledmac when these footnotes contain any commands.}
% \begin{macrocode}
@@ -10068,7 +10064,9 @@
{\stepcounter\@mpfn}%
{%
\ifl@dpairing%
- \global\advance\footnote@reading by \@ne%
+ \global\advance\footnote@reading by \@ne%
+ \get@thisfootnote%
+ \get@fnmark{\thisfootnote}%
\ifcsdef{footnotereading\the\footnote@reading=typeset}%
{\setcounter{\@mpfn}{\csuse{footnotereading\the\footnote@reading=typeset}}}%
{\setcounter{\@mpfn}{\footnote@reading}}%
@@ -10078,13 +10076,18 @@
}%
{}
{}
-\newcommand{\l@dbfnote}[1]{%
- \ifnumberedpar@
+
+\newcommand{\get@thisfootnote}{%
\ifl@dpairing
\protected@xdef\thisfootnote{\the\footnote@reading}%
\else%
\protected@xdef\thisfootnote{\thefootnote}%
\fi%
+}%
+
+\newcommand{\l@dbfnote}[1]{%
+ \ifnumberedpar@%
+ \get@thisfootnote%
\gdef\@tag{#1\relax}%
\ifledRcol%
\xright@appenditem{\noexpand\vl@dbfnote{{\expandonce\@tag}}{\thisfootnote}}%
@@ -10097,25 +10100,32 @@
\fi
\fi\ignorespaces}
-\newcommand{\vl@dbfnote}[2]{%
+\newcommand{\get@fnmark}[1]{%
\ifboolexpr{bool{l@dprintingpages} or bool{l@dprintingcolumns}}%
{%
- \global\advance\footnote@typeset by \@ne%
- \setcounter{footnote}{\footnote@typeset}%
+ \stepcounter{footnote@typeset}%
+ \setcounter{footnote}{\c@footnote@typeset}%
\immediate\write\@mainaux{%
- \global\csdef{footnotereading#2=typeset}{\the\footnote@typeset}%
+ \global\csdef{footnotereading#1=typeset}{\the\c@footnote@typeset}%
}%
- \def\@thefnmark{\the\footnote@typeset}%
+ \def\@thefnmark{\thefootnote}%
}%
{%
- \@namedef{@thefnmark}{#2}%
+ \@namedef{@thefnmark}{#1}%
}%
- \@footnotetext{#1}%
- }%
+}%
+
+\newcommand{\vl@dbfnote}[2]{%
+ \get@fnmark{#2}%
+ \@footnotetext{#1}%
+}%
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsection{Footnote formats}
%
@@ -10213,6 +10223,8 @@
% The minipage version.
% \begin{macrocode}
\newcommand*{\mpnormalvfootnoteX}[2]{%
+ \get@thisfootnoteX{#1}%
+ \get@fnmarkX{#1}{\thisfootnote}%
\global\setbox\@nameuse{mpfootins#1}\vbox{%
\unvbox\@nameuse{mpfootins#1}
\noindent\csuse{bhooknoteX@#1}%
@@ -10342,11 +10354,7 @@
\newcommand{\normalbfnoteX}[2]{%
\ifnumberedpar@
- \ifl@dpairing
- \protected@xdef\thisfootnote{\the\csname footnote#1@reading\endcsname}%
- \else%
- \protected@xdef\thisfootnote{\csuse{thefootnote#1}}%
- \fi%
+ \get@thisfootnoteX{#1}%
\ifledRcol%
\ifluatex
\footnotelang@lua[R]%
@@ -10373,31 +10381,50 @@
% \end{macrocode}
% \end{macro}
%
-%
+% \begin{macro}{\get@thisfootnoteX}
+% The macro \cs{get@thisfootnote} command just saves the footnote number in the \cs{thisfootnote} macro, depending on the use of pairing environments.
+% \begin{macrocode}
+\newcommand{\get@thisfootnoteX}[1]{%
+ \ifl@dpairing%
+ \protected@xdef\thisfootnote{\the\csname footnote#1@reading\endcsname}%
+ \else%
+ \protected@xdef\thisfootnote{\csuse{thefootnote#1}}%
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\vbfnoteX}
% This command calls the correct footnote-inserting commands.
-% It also gets the correct footnote number when typesetting parallel texts.
+%
% \begin{macrocode}
\newcommand{\vbfnoteX}[3]{%
+ \get@fnmarkX{#1}{#3}%
+ \@nameuse{regvfootnote#1}{#1}{#2}%
+}%
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\get@fnmarkX}
+% This command gets the correct footnote number when typesetting parallel texts.
+% \begin{macrocode}
+\newcommand{\get@fnmarkX}[2]{%
\ifboolexpr{bool{l@dprintingpages} or bool{l@dprintingcolumns}}%
{%
- \global\expandafter\advance\csname footnote#1@typeset\endcsname by \@ne%
- \setcounter{footnote#1}{\csuse{footnote#1@typeset}}%
+ \stepcounter{footnote#1@typeset}%
+ \setcounter{footnote#1}{\value{footnote#1@typeset}}%
\@namedef{@thefnmark#1}{\csuse{thefootnote#1}}%
\immediate\write\@mainaux{%
- \global\csdef{footnote#1reading#3=typeset}{\the\csname footnote#1@typeset\endcsname}%
+ \global\csdef{footnote#1reading#2=typeset}{\the\csname c@footnote#1@typeset\endcsname}%
}%
}%
{%
- \@namedef{@thefnmark#1}{#3}%
+ \@namedef{@thefnmark#1}{#2}%
}%
- \@nameuse{regvfootnote#1}{#1}{#2}%
}
-
+%
% \end{macrocode}
% \end{macro}
-%
-%
% \begin{macro}{\vnumfootnoteX}
% \changes{v0.7.0}{2005/02/18}{Removed extraneous space from \protect\cs{vnumfootnoteX}}
% \begin{macrocode}
@@ -10769,7 +10796,7 @@
% \protect\cs{para@vfootnoteX}\marg{series}\marg{text}
% \begin{macrocode}
\newcommand*{\para@vfootnoteX}[2]{%
- \insert\csname footins#1\endcsname
+ \insert\csname footins#1\endcsname%
\bgroup
\csuse{notefontsizeX@#1}
\footsplitskips
@@ -10784,6 +10811,8 @@
\penalty0
\egroup}
\newcommand*{\mppara@vfootnoteX}[2]{%
+ \get@thisfootnoteX{#1}%
+ \get@fnmarkX{#1}{\thisfootnote}%
\global\setbox\@nameuse{mpfootins#1}\vbox{%
\unvbox\@nameuse{mpfootins#1}
\csuse{notefontsizeX@#1}
@@ -11707,6 +11736,15 @@
{\footnotelang@poly[R]}%
\footnoteoptions@{R}{##1}{true}%
\xright@appenditem{%
+ \ifbool{indtl@innote}%
+ {\unexpanded{\let\index\nindex}}%
+ {}%
+ \ifbool{indtl@notenumber}%
+ {\unexpanded{\let\index\nindex}}%There is no note number… so
+ {}%
+ \ifbool{indtl@notenumber}%
+ {\unexpanded{\let\index\orig@@index}}%
+ {}%
\noexpand\Xnote@true%
\noexpand\prepare@preXnotes{#1}%
\noexpand\prepare@edindex@fornote{\l@d@nums}%
@@ -11715,6 +11753,9 @@
\noexpand\csuse{v#1footnote}{#1}%
{{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}%
\noexpand\Xnote@false%
+ \ifbool{indtl@innote}%
+ {\unexpanded{\let\index\orig@@index}}%
+ {}%
}\to\inserts@listR
\footnoteoptions@{R}{##1}{false}%
\global\advance\insert@countR \@ne%
@@ -11727,6 +11768,12 @@
{\footnotelang@poly}%
\footnoteoptions@{L}{##1}{true}%
\xright@appenditem{%
+ \ifbool{indtl@innote}%
+ {\unexpanded{\let\index\nindex}}%
+ {}%
+ \ifbool{indtl@notenumber}%
+ {\unexpanded{\let\index\nindex}}%There is no note number… so
+ {}%
\noexpand\Xnote@true%
\noexpand\prepare@preXnotes{#1}%
\noexpand\prepare@edindex@fornote{\l@d@nums}%
@@ -11737,6 +11784,12 @@
\noexpand\csuse{v#1footnote}{#1}%
{{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}%
\noexpand\Xnote@false%
+ \ifbool{indtl@innote}%
+ {\unexpanded{\let\index\orig@@index}}%
+ {}%
+ \ifbool{indtl@notenumber}%
+ {\unexpanded{\let\index\orig@@index}}%
+ {}%
}\to\inserts@list
\global\advance\insert@count \@ne%
\footnoteoptions@{L}{##1}{false}%
@@ -11828,7 +11881,25 @@
\xdef\footnote@luatextextdir{\the\textdir}%
\xdef\footnote@luatexpardir{\the\pardir}%
\fi%
+ \ifbool{indtl@innote}%
+ {\let\index\nindex}%
+ {}%
+ \ifbool{indtl@notenumber}%
+ {%
+ \renewcommand{\index}[2][]{%
+ \orig@@index[####1]{%
+ ####2|innotenumber{\csuse{thefootnote#1}}%
+ }%
+ }%
+ }%
+ {}%
\csuse{vfootnote#1}{#1}{\expandonce\content}\m@mmf@prepare%
+ \ifbool{indtl@innote}%
+ {\let\index\orig@@index}%
+ {}%
+ \ifbool{indtl@notenumber}%
+ {\let\index\orig@@index}%
+ {}%
\endgroup%
}
% \end{macrocode}
@@ -13802,8 +13873,9 @@
% \changes{v0.4.0}{2004/02/29}{Added \protect\cs{l@dfeetbeginmini}, \protect\cs{l@dfeetendmini}
% and all their supporting code}
% \begin{macrocode}
+\newif\if@ledgroup%
\ifnoledgroup@\else%
-\newcommand*{\l@dfeetbeginmini}{\l@dedbeginmini\l@dfambeginmini}
+\newcommand*{\l@dfeetbeginmini}{\@ledgrouptrue\l@dedbeginmini\l@dfambeginmini}
\newcommand*{\l@dfeetendmini}{%
\IfStrEq{critical-familiar}{\@mpfnpos}%
{\l@dedendmini\l@dfamendmini}%
@@ -13956,6 +14028,7 @@
% of unboxed, fixed width minipage.
% \changes{v0.4.0}{2004/02/29}{Added ledgroup environment}
% \begin{macrocode}
+
\newenvironment{ledgroup}{%
\resetprevpage@num%
\def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@%
@@ -13968,8 +14041,13 @@
\l@dunboxmpfoot
\fi
\l@dfeetendmini%
+ \@ledgroupfalse%
}
+\apptocmd{\endledgroup}{%
+ \l@dprintingpagesfalse%
+ \l@dprintingcolumnsfalse%
+}{}{}
% \end{macrocode}
% \end{environment}
%
@@ -13988,8 +14066,6 @@
% Set the various text measures.
% \begin{macrocode}
\hsize #2\relax
-%% \textwidth #2\relax
-%% \columnwidth #2\relax
% \end{macrocode}
% Initialize fills for centering.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
index d1f7f51622f..94e2b43c3e5 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
@@ -256,10 +256,11 @@
% \changes{v2.6.0}{2015/11/13}{\protect\cs{Xlineflag} and \protect\cs{Xendlineflag} added}
% \changes{v2.6.0}{2015/11/13}{Fix bug with footnote numbering when using the same series of familiar footnotes on both sides.}
% \changes{v2.6.0}{2015/11/13}{Error message when calling \protect\cs{Pages} or \protect\cs{Columns} without previous \protect\env{pages} or \protect\env{pairs} environnment.}
-% \changes{v2.6.0}{2015/11/13}{Fix compatibility with \protect\package{babel} (broken in v.2.0.0.}
+% \changes{v2.6.0}{2015/11/13}{Fix compatibility with \protect\package{babel} (broken in v.2.0.0).}
% \changes{v2.6.0}{2015/11/13}{No error messages about ends of left / right page when using the \protect\cs{syntaxonly} command of the \protect\package{syntonly} package.}
% \hyphenation{man-u-script man-u-scripts}
-% \changes{v2.6.0}{2015/11/13}{Fix bug with right side title number when using title commands before \protect\env{pages} or \protect\env{columns} environment.}
+% \changes{v2.6.0}{2015/11/13}{Fix bug with right side title number when using title commands before \protect\env{pages} or \protect\env{columns} environments.}
+% \changes{v2.6.1}{2015/11/20}{Fix bug, introduced in v2.6.0, with footnote numbering when using \protect\package{perpage} package.}
%
%
% ^^A PW added following as the definitions are at some unknown elsewhere
@@ -728,6 +729,23 @@
% For example if you have two left pages and two right pages, with one note by page, you will obtain the following numbering at the first run: 1 (left page), 3 (right page), 2 (left page), 4 (right page). But at the next run, you will obtain: 1 (left page), 2 (right page), 3 (left page), 4 (right page).
%
% If you use parallel columns, during the second of run of typesetting the footnote numbering will not run down the columns. Instead, it will read both column lines completely across the page, and number footnotes from left to right.
+% \subsubsection{Using \protect\package{perpage} package}\label{perpage}
+%
+% It follows from what has been said in the preceding paragraph that if you use the \cs{MakePerPage} command of the \cs{perpage} package for footnotes called in parallel typesetting, you must append to the counter the suffix \verb+@typeset+.
+%
+% So do not set:
+% \begin{verbatim}
+% \MakePerPage{footnote}
+% \MakePerPage{footnoteA}
+% \MakePerPage{footnoteB}
+% \end{verbatim}
+% But set:
+% \begin{verbatim}
+% \MakePerPage{footnote@typeset}
+% \MakePerPage{footnoteA@typeset}
+% \MakePerPage{footnoteB@typeset}
+% \end{verbatim}
+
% \subsubsection{Notes for one side only}
% \DescribeMacro{\Xonlyside}
% \DescribeMacro{\onlysideX}
@@ -1135,7 +1153,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2015/11/13 v2.6.0 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2015/11/20 v2.6.1 reledmac extension for parallel texts]%
% \end{macrocode}
% \subsection{Package's requirement}
@@ -1512,8 +1530,8 @@
% \begin{macro}{\save@section@number}
% \begin{macro}{\set@sectcountR}
% \changes{v1.2.1}{2012/11/01}{For the right section, the counter is defined only once.}
-% We do not want the numbering of the right-side section commands to be continuous with the numbering of the left side,
-% however, we want they be continous with the numbering of contents typesette before the \env{pages} or \env{columns} env.
+% We do not want the right side section commands to be numbered after the left side ones,
+% instead we want them numbered after which is typeset before the \env{pages} or \env{columns} environments.
% we switch the \LaTeX\ counter in \protect\cs{numberingR}.
%
% \begin{macrocode}
@@ -2606,8 +2624,8 @@
% Every note, in parallel typesetting, has three associated counters.
% \begin{enumerate}
% \item A \LaTeX\ counter \verb+footnoteX+. This the only one manipulated by user, and the only one finally printed.
-% \item A \TeX\ counter \verb+footnoteX@reading+. Its value is increased when reading the \cs{footnoteX} command in the side environments. It is used to get the correct footnote number from the \verb+.aux+ file to typeset in the main text.
-% \item A \TeX\ counter \verb+footnoteX@typeset. Its value is increased when inserting footnotes. Its value is directly used in the footnote, and is stored in the \verb+aux+ files to be used on the next run for the main text.
+% \item A \TeX\ counter \verb+footnoteX@reading+. Its value is incremented when reading the \cs{footnoteX} command in left or right side environments. It is used to get the correct footnote number from the \verb+.aux+ file to be typeset in the main text.
+% \item A \LaTeX\ counter \verb+footnoteX@typeset. Its value is increased when inserting footnotes. Its value is directly used in the footnote, and is stored in the \verb+aux+ files to be used on the next run for the main text.
% \end{enumerate}
%
%
@@ -2615,7 +2633,7 @@
% So here, we only defined the new counters.
% \begin{macrocode}
\expandafter\newcount\csname footnote#1@reading\endcsname%
- \expandafter\newcount\csname footnote#1@typeset\endcsname%
+ \newcounter{footnote#1@typeset}%
% \end{macrocode}
%
% \subsubsection{Familiar footnotes without marks}
@@ -2699,10 +2717,10 @@
}
\newcommand{\get@familiarfootnote@number}{%
\unless\ifnofamiliar@%
- \def\do##1{\global\expandafter\csname footnote##1@typeset\endcsname=\csuse{saved@footnote##1}}%
+ \def\do##1{\setcounter{footnote##1@typeset}{\csuse{saved@footnote##1}}}%
\dolistloop{\@series}%
\fi%
- \global\footnote@typeset=\saved@footnote%
+ \setcounter{footnote@typeset}{\saved@footnote}%
}
% \end{macrocode}
% \end{macro}
@@ -2737,10 +2755,10 @@
% As users can use classical footnotes of \LaTeX\ (\cs{footnote})
% in parallel texts, we must integrate the same tools to get correct number as for \macpackage' footnotes (\reff{familiarfootnotenumber}).
% \begin{macro}{\footnote@reading}
-% \begin{macro}{\footnote@typset}
+% \begin{macro}{\footnote@typeset}
% \begin{macrocode}
\newcount\footnote@reading%
-\newcount\footnote@typeset%
+\newcounter{footnote@typeset}%
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -4903,7 +4921,7 @@
\expandafter\ifvoid\csname l@dRcolrawbox1\endcsname%
\led@err@Columns@WithoutEnv%
\else%
- \l@dprintingcolumnstrue%
+ \global\l@dprintingcolumnstrue%
\eledsection@correcting@skip=-\baselineskip% Correction for sections' titles
\ifnum\l@dnumpstartsL=\l@dnumpstartsR\else
\led@err@BadLeftRightPstarts{\the\l@dnumpstartsL}{\the\l@dnumpstartsR}%
@@ -5026,7 +5044,9 @@
\global\l@dpscR=\z@
\global\l@dnumpstartsL=\z@
\global\l@dnumpstartsR=\z@
- \l@dprintingcolumnsfalse%
+ \if@ledgroup\else%
+ \global\l@dprintingcolumnsfalse%
+ \fi
\ignorespaces
\global\instanzaLfalse%
\global\instanzaRfalse%
@@ -5362,7 +5382,7 @@
% Get onto an empty even (left) page, then initialise counters, etc.
% \begin{macrocode}
\cleartol@devenpage%
- \l@dprintingpagestrue%
+ \global\l@dprintingpagestrue%
\begingroup%
% \end{macrocode}
% As \protect\cs{Pages} must be called outside of the pages environment, we have to redefine the \protect\cs{Lcolwidth} and \protect\cs{Rcolwidth} lengths, to prevent false overfull hboxes.
@@ -5646,7 +5666,9 @@
\global\l@dnumpstartsR=\z@%
\global\instanzaLfalse%
\global\instanzaRfalse%
- \l@dprintingpagesfalse%
+ \if@ledgroup\else%
+ \global\l@dprintingpagesfalse%
+ \fi%
\finish@Pages@notes%Needed to prevent final notes overlap line number
\ignorespaces\fi}