texlive[47359] Master/texmf-dist: reledmac (7apr18)

commits+karl at tug.org commits+karl at tug.org
Sat Apr 7 22:58:44 CEST 2018


Revision: 47359
          http://tug.org/svn/texlive?view=revision&revision=47359
Author:   karl
Date:     2018-04-07 22:58:43 +0200 (Sat, 07 Apr 2018)
Log Message:
-----------
reledmac (7apr18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/reledmac/doc-more/page-typesetting-columns.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalendotes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-glossaries.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-linespacing.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-manuscript-apparatus.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-notes-width.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-reledmac-right-to-left.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_default.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nosync.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_shifted.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_inside-outside-columns.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/migration.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf
    trunk/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf
    trunk/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
    trunk/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
    trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
    trunk/Master/texmf-dist/tex/latex/reledmac/reledpar.sty

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/doc-more/page-typesetting-columns.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalendotes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-criticalnotes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-sidenotes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-tabular.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses-doublenumbering.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/1-verses.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-cross_referencing.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-footnote_spacing.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-glossaries.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-indexing.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-lemma_disambigution.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-line_numbers_in_header.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-linespacing.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-manuscript-apparatus.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-notes-width.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-one_series_per_pstart.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-performances.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-reledmac-right-to-left.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/2-titles_not_in_line_numbering.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_columns_different_languages.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_mwe.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_default.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nomax.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_nosync.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/3-reledpar_sync_setting_shifted.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_alignment.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_inside-outside-columns.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_one_series_per_pstart.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_long_notes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/examples/4-reledpar_verse_text_between.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/migration.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/reledmac.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/reledmac/reledpar.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/reledmac/reledmac.dtx	2018-04-07 20:58:18 UTC (rev 47358)
+++ trunk/Master/texmf-dist/source/latex/reledmac/reledmac.dtx	2018-04-07 20:58:43 UTC (rev 47359)
@@ -505,6 +505,7 @@
 % \changes{v2.26.5}{2018/01/18}{Fix bug when using \protect\cs{eledsection} with the \protect\option{continuousnumberingwithcolumns} of \protect\parpackage}
 % \changes{v2.26.5}{2018/01/28}{Fix bug with \protect\option{continuousnumberingwithcolumns}}
 % \changes{v2.26.6}{2018/02/28}{Fix bug with \protect\cs{lineation} by page and nexted \protect\cs{edtext} between two pages (added in v.~2.24.0)}
+% \changes{v2.26.7}{2018/04/07}{Fix page number in footnote and endnotes when using \protect\option{sameparallelpagenumber} option of \protect\parpackage and typesetting critical text in single mode after critical text in double page mode}
 %      Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
 % has version number \fileversion, last revised \filedate.}}
 %
@@ -4183,12 +4184,15 @@
 %    \begin{macrocode}
 %<*code>
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2018/02/28 v2.26.6 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2018/04/07 v2.26.7 typesetting critical editions]%
 %    \end{macrocode}
 %
 % \subsection{Package options}
 % \changes{v0.4.0}{2004/02/29}{Added final/draft options}
 % \changes{v1.13.0}{2014/09/16}{Added widthliketwocolumns option}
+% \begin{macro}{\ifparledgroup}
+% \begin{macro}{\ifsameparallelpagenumber}
+% \begin{macro}{\ifprevpgnotnumbered}
 % \begin{macro}{\ifledfinal}
 % \begin{macro}{\ifnocritical@}
 % \begin{macro}{\if at noeled@sec}
@@ -4198,7 +4202,6 @@
 % \begin{macro}{\ifparapparatus@}
 % \begin{macro}{\ifnoquotation@}
 % \begin{macro}{\iflednopbinverse}
-% \begin{macro}{\ifparledgroup}
 % \begin{macro}{\ifwidthliketwocolumns}
 % \begin{macro}{\ifxindy@}
 % \begin{macro}{\ifxindyhyperref@}
@@ -4209,13 +4212,14 @@
 %    \begin{macrocode}
 \RequirePackage{xkeyval}
 %    \end{macrocode}
-% The \verb+parledgroup+ option is for \parpackage.
-% However, it has consequence on \macpackage\ internal command.
-% So we need to define the boolean now.
+%\subsubsection{Options of \parpackage}
+% Here, we define some booleans specific to \parpackage\  options, but which have consequences on \macpackage\ internal commands.
 %    \begin{macrocode}
 \newif\ifparledgroup
+\newif\ifsameparallelpagenumber%
+\newif\ifprevpgnotnumbered%%
 %    \end{macrocode}
-% And now, the options of \macpackage.
+%\subsubsection{Options of \macpackage}
 %    \begin{macrocode}
 \DeclareOptionX{series}[A,B,C,D,E]{\xdef\default at series{#1}}
 \ExecuteOptionsX{series}%
@@ -4314,6 +4318,8 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
+% \end{macro}
 % \subsection{Loading packages}
 % Loading package \protect\package{xargs} to declare commands with optional arguments. 
 % Loading package \package{xparse} to declare fully expandable commands with optional argument. Ideally, we should use only \package{xparse} and not \package{xargs}. For historical reasons, we use both.
@@ -7126,8 +7132,21 @@
 % \end{macro}
 % \end{macro}
 % \begin{macro}{\new at line}
+% \begin{macro}{\l at the@c at page}
 % The \protect\cs{new at line} macro sends the \protect\cs{@nl} command to the line-list
 % file, to mark the start of a new text line, and its page number.
+% \label{new at line@pagecounting}
+% It writes the two forms of the page number:
+% \begin{itemize}
+%  \item Raw form (\cs{the}\cs{c at page}, which can be used to make numeric test.
+%  \item Formatted form (for example, in Roman).
+% \end{itemize}
+% Actually, only the first form is effectivly used by \cs{@nl}.
+% If we use the \cs{sameparallelpagenumber} option of \parpackage, we must write not the real page number (i.e. \verb+page+ counter, defined in standard \LaTeX) but the printed page number (i.e \verb+par at page+ counter, defined only on \macpackage).
+% \begin{itemize}
+%   \item For the raw form, we use \cs{the}\cs{c at page@page} macro, because the \verb+{par at page}+ couter is increased at each page.
+%   \item For the formatted version, \cs{thepage} is patched through \cs{par at patch@thepage}. So we have nothing to change.
+% \end{itemize}
 % \changes{v0.6.0}{2004/11/16}{Extended \protect\cs{new at line} to output page numbers}
 %    \begin{macrocode}
 \newcommand*{\new at line}{%
@@ -7134,30 +7153,45 @@
   \IfStrEq{\led at pb@setting}{after}%
     {\xifinlist{\the\absline at num}{\l at prev@nopb}%
       {\xifinlist{\the\absline at num}{\normal at page@break}%
-        {\numgdef{\@next at page}{\c at page+\@ne}%
+        {\numgdef{\@next at page}{\c at par@page+\@ne}%
         \write\linenum at out{\string\@nl[\@next at page][\@next at page]}%
       }%
-      {\write\linenum at out{\string\@nl[\the\c at page][\thepage]}}%
+      {\write\linenum at out{\string\@nl[\the\@c at par@page][\thepage]}}%
     }%
-    {\write\linenum at out{\string\@nl[\the\c at page][\thepage]}}}%
+    {\write\linenum at out{\string\@nl[\the\c at par@page][\thepage]}}}%
   {}%
   \IfStrEq{\led at pb@setting}{before}%
     {\numdef{\next at absline}{\the\absline at num+\@ne}%
     \xifinlist{\next at absline}{\l at prev@nopb}%
       {\xifinlist{\the\absline at num}{\normal at page@break}%
-        {\numgdef{\nc at page}{\c at page+\@ne}%
+        {\numgdef{\nc at page}{\c at par@page+\@ne}%
         \write\linenum at out{\string\@nl[\nc at page][\nc at page]}%
         }%
-        {\write\linenum at out{\string\@nl[\the\c at page][\thepage]}}%
+        {\write\linenum at out{\string\@nl[\the\@c at par@page][\thepage]}}%
       }%
-      {\write\linenum at out{\string\@nl[\the\c at page][\thepage]}}%
+      {\write\linenum at out{\string\@nl[\the\c at par@page][\thepage]}}%
     }%
     {}%
-  \IfStrEqCase{\led at pb@setting}{{before}{\relax}{after}{\relax}}[\write\linenum at out{\string\@nl[\the\c at page][\thepage]}]%
+  \IfStrEqCase{\led at pb@setting}%
+    {%
+    {before}{\relax}%
+    {after}{\relax}%
+  }[%
+    \write\linenum at out{\string\@nl[\the\c at par@page][\thepage]}%
+  ]%
 }
 
+\newcommand{\l at the@c at page}{%
+  \ifboolexpr{%
+    bool{sameparallelpagenumber}%
+    or bool{prevpgnotnumbered}%
+  }%
+  {\the\c at par@page}%
+  {\the\c at page}%
+}%
 %    \end{macrocode}
 % \end{macro}
+% \end{macro}
 % \begin{macro}{\if at noneed@Footnote}
 % \protect\cs{if at noneed@Footnote} is a boolean to check if we have to print a error message when a \protect\cs{edtext} is called without any critical notes.
 %
@@ -15403,7 +15437,105 @@
 % \end{macro}
 % \end{macro}
 %
+% \section{Page numbering in parallel typsetting}
+% The \parpackage\  package has  two options which change the way the page numbering works.
+% We need to implement these options on \macpackage and not on \parpackage because they have some consequences on the \macpackage auxiliaries files (numbered file see~\reff{new at line@pagecounting}).
+% The \verb+sameparallelpagenumber+ option  allows the same page number on both left and right side
+% The \verb+prevpgnotnumbered+ option allows an empty (not numbered) right-side page before \cs{Pages}.
 %
+%
+% We cannot implement these two options by changing the value of the \verb|page| counter, since its value is used by many \LaTeX\  features to determine whether a page is left (even-numbered) or right (odd-numbered).
+% Consequently, we have to do it by patching \cs{thepage}, in order to use the value of the \verb+par at page+ counter instead of value of \verb+page+ counter.
+% 
+% This counter will be increased in a patched version of the \LaTeX's \protect\cs{@outputpage} macro, as is the \verb+page+ counter in this macro. However, this increase will take account of the options.
+%
+
+%
+
+% \begin{macro}{\par at patch@thepage}
+% \begin{macro}{\par at patch@pagenumbering}
+% \cs{par at patch@thepage} patches \cs{thepage} in order to use the value of \verb+par at page+ counter and not the value of \verb+page+.  
+% It must be called after any redefinition of \cs{thepage}. 
+% That is why we insert it at the end of the \LaTeX\ macro \cs{pagenumbering}, which is called by some \cs{xxxmatter} commands. 
+% In cases when we are using the \ltxclass{memoir} class, we insert it at the end of  \cs{@mempnum}.
+% When using \cs{pagenumbering}, we also need to restart \verb+par at page+ counter. Consequently, we have wrapped \cs{par at patch@thepage} and counter restart in \cs{par at patch@pagenumbering}
+% We also call \cs{par at patch@thepage} at the beginning of the document.
+%    \begin{macrocode}
+
+\newcommand{\par at patch@thepage}{%
+  \ifboolexpr{%
+    bool{sameparallelpagenumber}%
+    or bool{prevpgnotnumbered}%
+  }%
+  {%
+    \patchcmd{\thepage}%
+      {page}{par at page}%
+      {}%
+      {\led at error@fail at patch@thepage}%
+  }{}%
+}%
+
+\newcommand{\par at patch@pagenumbering}{%
+  \ifboolexpr{%
+    bool{sameparallelpagenumber}%
+    or bool{prevpgnotnumbered}%
+    }%
+    {%
+    \setcounter{par at page}{1}%
+    }%
+    {}%
+  \par at patch@thepage%
+}%
+
+\ifl at dmemoir%
+  \apptocmd{\@mempnum}%
+    {\par at patch@pagenumbering}%
+    {}%%
+    {\led at error@fail at patch@@mempnum}%
+
+\else%
+  \apptocmd{\pagenumbering}%
+    {\par at patch@pagenumbering}%
+    {}%
+    {\led at error@fail at patch@pagenumbering}%
+\fi%
+
+\AtBeginDocument{\par at patch@thepage}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\@outputpage}
+% As its name says, \cs{@outputpage} is a \LaTeX's macro called in the output routine. It is this macro which increases the \verb+page+ counter. 
+% We patch it in order to increase, conditionally, the \verb+par at page+ counter.
+%    \begin{macrocode}
+\AtBeginDocument{%
+  \apptocmd{\@outputpage}{%
+    \ifsameparallelpagenumber%
+      \ifl at dprintingpages%
+        \ifodd\c at page\else%
+          \stepcounter{par at page}%
+        \fi%
+      \else%
+        \stepcounter{par at page}%
+      \fi%
+    \else%
+      \stepcounter{par at page}%
+    \fi%
+    }%
+    {}%
+    {\led at error@fail at patch@@outputpage}%
+}%
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\thepar at page}
+% The  \verb+par at page+ counter.
+%    \begin{macrocode}
+\newcounter{par at page}%
+\setcounter{par at page}{1}%
+%    \end{macrocode}
+% \end{macro} 
+%
 % \section{Cross referencing}
 % \label{xref}\relax
 %

Modified: trunk/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/reledmac/reledpar.dtx	2018-04-07 20:58:18 UTC (rev 47358)
+++ trunk/Master/texmf-dist/source/latex/reledmac/reledpar.dtx	2018-04-07 20:58:43 UTC (rev 47359)
@@ -329,6 +329,7 @@
 % \changes{v2.21.4}{2018/01/18}{Fix bug with using \protect\cs{eledsection} and related when alternate normal typesetting and parallel typesetting}
 % \changes{v2.21.5}{2018/02/28}{Compatibility with reledmac v.~2.26.6}
 % \changes{v2.21.6}{2018/04/06}{Fix page number in footnote and endnotes when using \protect\option{sameparallelpagenumber} option}
+% \changes{v2.21.7}{2018/04/07}{Compatibility with \protect\macpackage 2.26.7}
 % ^^A PW added following as the definitions are at some unknown elsewhere
 %
 % \newcommand{\egstart}{%
@@ -1374,7 +1375,7 @@
 %    \begin{macrocode}
 %<*code>
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2018/04/06 v2.21.6 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2018/04/07 v2.21.7 reledmac extension for parallel texts]%
 
 %    \end{macrocode}
 % \subsection{Package's requirement}
@@ -1473,17 +1474,12 @@
 \DeclareOptionX{continuousnumberingwithcolumns}{\continuousnumberingwithcolumnstrue}%
 %    \end{macrocode}
 % \end{macro}
-% \begin{macro}{\ifsameparallelpagenumber}
-% \begin{macro}{\ifprevpgnotnumbered}
-% Options related to page numbering
+% Options related to page numbering.
+% The boolean are defined in \macpackage.
 %    \begin{macrocode}
-\newif\ifsameparallelpagenumber
-\newif\ifprevpgnotnumbered
 \DeclareOptionX{sameparallelpagenumber}{\sameparallelpagenumbertrue}
 \DeclareOptionX{prevpgnotnumbered}{\prevpgnotnumberedtrue}
 %    \end{macrocode}
-% \end{macro}
-% \end{macro}
 % \begin{macro}{\prevpgstyle}
 % We store on \protect\cs{prevpgstyle} the argument of the option \verb+prevpgstyle+. 
 %    \begin{macrocode}
@@ -2994,12 +2990,7 @@
 % line-list file, to mark the start of a new text line.
 %    \begin{macrocode}
 \newcommand*{\new at lineL}{%
-  \ifboolexpr{%
-    bool{sameparallelpagenumber}%
-    or bool{prevpgnotnumbered}%
-  }%
-  {\write\linenum at out{\string\@nl[\the\c at par@page][\thepar at page]}}%
-  {\write\linenum at out{\string\@nl[\the\c at page][\thepage]}}%
+  \write\linenum at out{\string\@nl[\the\c at par@page][\thepage]}%
 }%
 %    \end{macrocode}
 % \end{macro}
@@ -3008,12 +2999,7 @@
 % line-list file, to mark the start of a new text line.
 %    \begin{macrocode}
 \newcommand*{\new at lineR}{%
-  \ifboolexpr{%
-    bool{sameparallelpagenumber}%
-    or bool{prevpgnotnumbered}%
-  }%
-  {\write\linenum at outR{\string\@nl[\the\c at par@page][\thepar at page]}}%
-  {\write\linenum at outR{\string\@nl[\the\c at page][\thepage]}}%
+  \write\linenum at outR{\string\@nl[\the\c at par@page][\thepar at page]}%
 }%
 %    \end{macrocode}
 % \end{macro}
@@ -7300,104 +7286,7 @@
 % \end{macro}
 % \end{macro}
 %
-% \section{Page numbering}
-% \subsection{Global options}
-% The \verb+sameparallelpagenumber+ option  allows the same page number on both left and right side
-% The \verb+prevpgnotnumbered+ option allows an empty (not numbered) right-side page before \cs{Pages}.
-%
-%
-% We cannot implement these two options by changing the value of the \verb|page| counter, since its value is used by many \LaTeX features to determine whether a page is left (even-numbered) or right (odd-numbered).
-% Consequently, we have to do it by patching \cs{thepage}, in order to use the value of the \verb+par at page+ counter instead of value of \verb+page+ counter.
-% 
-% This counter will be increased in a patched version of the \LaTeX's \protect\cs{@outputpage} macro, as is the \verb+page+ counter in this macro. However, this increase will take account of the options.
-%
-
-%
-
-% \begin{macro}{\par at patch@thepage}
-% \begin{macro}{\par at patch@pagenumbering}
-% \cs{par at patch@thepage} patches \cs{thepage} in order to use the value of \verb+par at page+ counter and not the value of \verb+par at page+.  
-% It must be called after any redefinition of \cs{thepage}. 
-% That is why we insert it at the end of the \LaTeX\ macro \cs{pagenumbering}, which is called by some \cs{xxxmatter} commands. 
-% In cases when we are using the \ltxclass{memoir} class, we insert it at the end of  \cs{@mempnum}.
-% When using \cs{pagenumbering}, we also need to restart \verb+par at page+ counter. Consequently, we have wrapped \cs{par at patch@thepage} and counter restart in \cs{par at patch@pagenumbering}
-% We also call \cs{par at patch@thepage} it at the beginning of the document.
-%    \begin{macrocode}
-
-\newcommand{\par at patch@thepage}{%
-  \ifboolexpr{%
-    bool{sameparallelpagenumber}%
-    or bool{prevpgnotnumbered}%
-  }%
-  {%
-    \patchcmd{\thepage}%
-      {page}{par at page}%
-      {}%
-      {\led at error@fail at patch@thepage}%
-  }{}%
-}%
-
-\newcommand{\par at patch@pagenumbering}{%
-  \ifboolexpr{%
-    bool{sameparallelpagenumber}%
-    or bool{prevpgnotnumbered}%
-    }%
-    {%
-    \setcounter{par at page}{1}%
-    }%
-    {}%
-  \par at patch@thepage%
-}%
-
-\ifl at dmemoir%
-  \apptocmd{\@mempnum}%
-    {\par at patch@pagenumbering}%
-    {}%%
-    {\led at error@fail at patch@@mempnum}%
-
-\else%
-  \apptocmd{\pagenumbering}%
-    {\par at patch@pagenumbering}%
-    {}%
-    {\led at error@fail at patch@pagenumbering}%
-\fi%
-
-\AtBeginDocument{\par at patch@thepage}%
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\@outputpage}
-% As its name says, \cs{@outputpage} is a \LaTeX's macro called in the output routine. It is this macro which increases the \verb+page+ counter.. 
-% We patch it in order to increase, conditionally, the \verb+par at page+ counter.
-%    \begin{macrocode}
-\AtBeginDocument{%
-  \apptocmd{\@outputpage}{%
-    \ifsameparallelpagenumber%
-      \ifl at dprintingpages%
-        \ifodd\c at page\else%
-          \stepcounter{par at page}%
-        \fi%
-      \else%
-        \stepcounter{par at page}%
-      \fi%
-    \else%
-      \stepcounter{par at page}%
-    \fi%
-    }%
-    {}%
-    {\led at error@fail at patch@@outputpage}%
-}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\thepar at page}
-% And now, initialize \verb+par at page+ counter.
-%    \begin{macrocode}
-\newcounter{par at page}%
-\setcounter{par at page}{1}%
-%    \end{macrocode}
-% \end{macro} 
-% \subsection{mainmatter option of \cs{Pages}}
+% \section{The \option{mainmatter} option of \cs{Pages}}
 % The optional argument of \cs{Pages} could be equal to \verb+mainmatter+.
 % In this case the boolean \cs{ifPages at mainmatter} is set to true, and some special things are done in \cs{Pages at mainmatter}, called by \cs{cleartol at devenpage}.
 % \begin{macro}{\ifPages at mainmatter}

Modified: trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty	2018-04-07 20:58:18 UTC (rev 47358)
+++ trunk/Master/texmf-dist/tex/latex/reledmac/reledmac.sty	2018-04-07 20:58:43 UTC (rev 47359)
@@ -35,9 +35,11 @@
 %%
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2018/02/28 v2.26.6 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2018/04/07 v2.26.7 typesetting critical editions]%
 \RequirePackage{xkeyval}
 \newif\ifparledgroup
+\newif\ifsameparallelpagenumber%
+\newif\ifprevpgnotnumbered%%
 \DeclareOptionX{series}[A,B,C,D,E]{\xdef\default at series{#1}}
 \ExecuteOptionsX{series}%
 
@@ -1328,28 +1330,42 @@
   \IfStrEq{\led at pb@setting}{after}%
     {\xifinlist{\the\absline at num}{\l at prev@nopb}%
       {\xifinlist{\the\absline at num}{\normal at page@break}%
-        {\numgdef{\@next at page}{\c at page+\@ne}%
+        {\numgdef{\@next at page}{\c at par@page+\@ne}%
         \write\linenum at out{\string\@nl[\@next at page][\@next at page]}%
       }%
-      {\write\linenum at out{\string\@nl[\the\c at page][\thepage]}}%
+      {\write\linenum at out{\string\@nl[\the\@c at par@page][\thepage]}}%
     }%
-    {\write\linenum at out{\string\@nl[\the\c at page][\thepage]}}}%
+    {\write\linenum at out{\string\@nl[\the\c at par@page][\thepage]}}}%
   {}%
   \IfStrEq{\led at pb@setting}{before}%
     {\numdef{\next at absline}{\the\absline at num+\@ne}%
     \xifinlist{\next at absline}{\l at prev@nopb}%
       {\xifinlist{\the\absline at num}{\normal at page@break}%
-        {\numgdef{\nc at page}{\c at page+\@ne}%
+        {\numgdef{\nc at page}{\c at par@page+\@ne}%
         \write\linenum at out{\string\@nl[\nc at page][\nc at page]}%
         }%
-        {\write\linenum at out{\string\@nl[\the\c at page][\thepage]}}%
+        {\write\linenum at out{\string\@nl[\the\@c at par@page][\thepage]}}%
       }%
-      {\write\linenum at out{\string\@nl[\the\c at page][\thepage]}}%
+      {\write\linenum at out{\string\@nl[\the\c at par@page][\thepage]}}%
     }%
     {}%
-  \IfStrEqCase{\led at pb@setting}{{before}{\relax}{after}{\relax}}[\write\linenum at out{\string\@nl[\the\c at page][\thepage]}]%
+  \IfStrEqCase{\led at pb@setting}%
+    {%
+    {before}{\relax}%
+    {after}{\relax}%
+  }[%
+    \write\linenum at out{\string\@nl[\the\c at par@page][\thepage]}%
+  ]%
 }
 
+\newcommand{\l at the@c at page}{%
+  \ifboolexpr{%
+    bool{sameparallelpagenumber}%
+    or bool{prevpgnotnumbered}%
+  }%
+  {\the\c at par@page}%
+  {\the\c at page}%
+}%
 \newif\if at noneed@Footnote%
 
 \newcommand*{\flag at start}{%
@@ -5818,6 +5834,67 @@
 
 }
 
+
+
+
+\newcommand{\par at patch@thepage}{%
+  \ifboolexpr{%
+    bool{sameparallelpagenumber}%
+    or bool{prevpgnotnumbered}%
+  }%
+  {%
+    \patchcmd{\thepage}%
+      {page}{par at page}%
+      {}%
+      {\led at error@fail at patch@thepage}%
+  }{}%
+}%
+
+\newcommand{\par at patch@pagenumbering}{%
+  \ifboolexpr{%
+    bool{sameparallelpagenumber}%
+    or bool{prevpgnotnumbered}%
+    }%
+    {%
+    \setcounter{par at page}{1}%
+    }%
+    {}%
+  \par at patch@thepage%
+}%
+
+\ifl at dmemoir%
+  \apptocmd{\@mempnum}%
+    {\par at patch@pagenumbering}%
+    {}%%
+    {\led at error@fail at patch@@mempnum}%
+
+\else%
+  \apptocmd{\pagenumbering}%
+    {\par at patch@pagenumbering}%
+    {}%
+    {\led at error@fail at patch@pagenumbering}%
+\fi%
+
+\AtBeginDocument{\par at patch@thepage}%
+\AtBeginDocument{%
+  \apptocmd{\@outputpage}{%
+    \ifsameparallelpagenumber%
+      \ifl at dprintingpages%
+        \ifodd\c at page\else%
+          \stepcounter{par at page}%
+        \fi%
+      \else%
+        \stepcounter{par at page}%
+      \fi%
+    \else%
+      \stepcounter{par at page}%
+    \fi%
+    }%
+    {}%
+    {\led at error@fail at patch@@outputpage}%
+}%
+\newcounter{par at page}%
+\setcounter{par at page}{1}%
 \list at create{\labelref at list}
 \newcommand*{\zz@@@}{000|000|000}% Set three counters to zero in one go
 \newcommand*{\zz@@@@}{000|000|000|000}% Set four counters to zero in one go

Modified: trunk/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/reledmac/reledpar.sty	2018-04-07 20:58:18 UTC (rev 47358)
+++ trunk/Master/texmf-dist/tex/latex/reledmac/reledpar.sty	2018-04-07 20:58:43 UTC (rev 47359)
@@ -28,7 +28,7 @@
 
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2018/04/06 v2.21.6 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2018/04/07 v2.21.7 reledmac extension for parallel texts]%
 
 \RequirePackage{xspace}%
 \RequirePackage{xkeyval}
@@ -67,8 +67,6 @@
 \DeclareOptionX{parledgroup}{\parledgrouptrue}
 \DeclareOptionX{widthliketwocolumns}{\widthliketwocolumnstrue}%
 \DeclareOptionX{continuousnumberingwithcolumns}{\continuousnumberingwithcolumnstrue}%
-\newif\ifsameparallelpagenumber
-\newif\ifprevpgnotnumbered
 \DeclareOptionX{sameparallelpagenumber}{\sameparallelpagenumbertrue}
 \DeclareOptionX{prevpgnotnumbered}{\prevpgnotnumberedtrue}
 \DeclareOptionX{prevpgstyle}{\gdef\prevpgstyle{#1}}%
@@ -770,20 +768,10 @@
 }%
 
 \newcommand*{\new at lineL}{%
-  \ifboolexpr{%
-    bool{sameparallelpagenumber}%
-    or bool{prevpgnotnumbered}%
-  }%
-  {\write\linenum at out{\string\@nl[\the\c at par@page][\thepar at page]}}%
-  {\write\linenum at out{\string\@nl[\the\c at page][\thepage]}}%
+  \write\linenum at out{\string\@nl[\the\c at par@page][\thepage]}%
 }%
 \newcommand*{\new at lineR}{%
-  \ifboolexpr{%
-    bool{sameparallelpagenumber}%
-    or bool{prevpgnotnumbered}%
-  }%
-  {\write\linenum at outR{\string\@nl[\the\c at par@page][\thepar at page]}}%
-  {\write\linenum at outR{\string\@nl[\the\c at page][\thepage]}}%
+  \write\linenum at outR{\string\@nl[\the\c at par@page][\thepar at page]}%
 }%
 
 \newcommand{\newseries at par}[1]{%
@@ -3283,67 +3271,6 @@
     \fi
   \fi}
 
-
-
-
-\newcommand{\par at patch@thepage}{%
-  \ifboolexpr{%
-    bool{sameparallelpagenumber}%
-    or bool{prevpgnotnumbered}%
-  }%
-  {%
-    \patchcmd{\thepage}%
-      {page}{par at page}%
-      {}%
-      {\led at error@fail at patch@thepage}%
-  }{}%
-}%
-
-\newcommand{\par at patch@pagenumbering}{%
-  \ifboolexpr{%
-    bool{sameparallelpagenumber}%
-    or bool{prevpgnotnumbered}%
-    }%
-    {%
-    \setcounter{par at page}{1}%
-    }%
-    {}%
-  \par at patch@thepage%
-}%
-
-\ifl at dmemoir%
-  \apptocmd{\@mempnum}%
-    {\par at patch@pagenumbering}%
-    {}%%
-    {\led at error@fail at patch@@mempnum}%
-
-\else%
-  \apptocmd{\pagenumbering}%
-    {\par at patch@pagenumbering}%
-    {}%
-    {\led at error@fail at patch@pagenumbering}%
-\fi%
-
-\AtBeginDocument{\par at patch@thepage}%
-\AtBeginDocument{%
-  \apptocmd{\@outputpage}{%
-    \ifsameparallelpagenumber%
-      \ifl at dprintingpages%
-        \ifodd\c at page\else%
-          \stepcounter{par at page}%
-        \fi%
-      \else%
-        \stepcounter{par at page}%
-      \fi%
-    \else%
-      \stepcounter{par at page}%
-    \fi%
-    }%
-    {}%
-    {\led at error@fail at patch@@outputpage}%
-}
-\newcounter{par at page}%
-\setcounter{par at page}{1}%
 \newif\ifPages at mainmatter
 \newcommand{\Pages at mainmatter}{%
     \ifPages at mainmatter%



More information about the tex-live-commits mailing list