summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/reledmac/reledmac.sty')
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledmac.sty93
1 files changed, 85 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
index 1e6b2346737..fa11aae4eab 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
@@ -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@series{#1}}
\ExecuteOptionsX{series}%
@@ -1328,28 +1330,42 @@
\IfStrEq{\led@pb@setting}{after}%
{\xifinlist{\the\absline@num}{\l@prev@nopb}%
{\xifinlist{\the\absline@num}{\normal@page@break}%
- {\numgdef{\@next@page}{\c@page+\@ne}%
+ {\numgdef{\@next@page}{\c@par@page+\@ne}%
\write\linenum@out{\string\@nl[\@next@page][\@next@page]}%
}%
- {\write\linenum@out{\string\@nl[\the\c@page][\thepage]}}%
+ {\write\linenum@out{\string\@nl[\the\@c@par@page][\thepage]}}%
}%
- {\write\linenum@out{\string\@nl[\the\c@page][\thepage]}}}%
+ {\write\linenum@out{\string\@nl[\the\c@par@page][\thepage]}}}%
{}%
\IfStrEq{\led@pb@setting}{before}%
{\numdef{\next@absline}{\the\absline@num+\@ne}%
\xifinlist{\next@absline}{\l@prev@nopb}%
{\xifinlist{\the\absline@num}{\normal@page@break}%
- {\numgdef{\nc@page}{\c@page+\@ne}%
+ {\numgdef{\nc@page}{\c@par@page+\@ne}%
\write\linenum@out{\string\@nl[\nc@page][\nc@page]}%
}%
- {\write\linenum@out{\string\@nl[\the\c@page][\thepage]}}%
+ {\write\linenum@out{\string\@nl[\the\@c@par@page][\thepage]}}%
}%
- {\write\linenum@out{\string\@nl[\the\c@page][\thepage]}}%
+ {\write\linenum@out{\string\@nl[\the\c@par@page][\thepage]}}%
}%
{}%
- \IfStrEqCase{\led@pb@setting}{{before}{\relax}{after}{\relax}}[\write\linenum@out{\string\@nl[\the\c@page][\thepage]}]%
+ \IfStrEqCase{\led@pb@setting}%
+ {%
+ {before}{\relax}%
+ {after}{\relax}%
+ }[%
+ \write\linenum@out{\string\@nl[\the\c@par@page][\thepage]}%
+ ]%
}
+\newcommand{\l@the@c@page}{%
+ \ifboolexpr{%
+ bool{sameparallelpagenumber}%
+ or bool{prevpgnotnumbered}%
+ }%
+ {\the\c@par@page}%
+ {\the\c@page}%
+}%
\newif\if@noneed@Footnote%
\newcommand*{\flag@start}{%
@@ -5818,6 +5834,67 @@
}
+
+
+
+\newcommand{\par@patch@thepage}{%
+ \ifboolexpr{%
+ bool{sameparallelpagenumber}%
+ or bool{prevpgnotnumbered}%
+ }%
+ {%
+ \patchcmd{\thepage}%
+ {page}{par@page}%
+ {}%
+ {\led@error@fail@patch@thepage}%
+ }{}%
+}%
+
+\newcommand{\par@patch@pagenumbering}{%
+ \ifboolexpr{%
+ bool{sameparallelpagenumber}%
+ or bool{prevpgnotnumbered}%
+ }%
+ {%
+ \setcounter{par@page}{1}%
+ }%
+ {}%
+ \par@patch@thepage%
+}%
+
+\ifl@dmemoir%
+ \apptocmd{\@mempnum}%
+ {\par@patch@pagenumbering}%
+ {}%%
+ {\led@error@fail@patch@@mempnum}%
+
+\else%
+ \apptocmd{\pagenumbering}%
+ {\par@patch@pagenumbering}%
+ {}%
+ {\led@error@fail@patch@pagenumbering}%
+\fi%
+
+\AtBeginDocument{\par@patch@thepage}%
+\AtBeginDocument{%
+ \apptocmd{\@outputpage}{%
+ \ifsameparallelpagenumber%
+ \ifl@dprintingpages%
+ \ifodd\c@page\else%
+ \stepcounter{par@page}%
+ \fi%
+ \else%
+ \stepcounter{par@page}%
+ \fi%
+ \else%
+ \stepcounter{par@page}%
+ \fi%
+ }%
+ {}%
+ {\led@error@fail@patch@@outputpage}%
+}%
+\newcounter{par@page}%
+\setcounter{par@page}{1}%
\list@create{\labelref@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