From c2966e2771806280acae359474ea9ce7799776bb Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 17 Sep 2020 21:20:04 +0000 Subject: reledmac (17sep20) git-svn-id: svn://tug.org/texlive/trunk@56367 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/reledmac/reledmac.sty | 37 ++++++++++++++++++----- Master/texmf-dist/tex/latex/reledmac/reledpar.sty | 4 +-- 2 files changed, 30 insertions(+), 11 deletions(-) (limited to 'Master/texmf-dist/tex/latex/reledmac') diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty index ae2a67ba432..7f57d55875e 100644 --- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty +++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty @@ -35,7 +35,7 @@ %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledmac}[2020/08/19 v2.34.3 typesetting critical editions]% +\ProvidesPackage{reledmac}[2020/09/16 v2.34.4 typesetting critical editions]% \RequirePackage{xkeyval} \newif\ifparledgroup \newif\ifsameparallelpagenumber% @@ -335,6 +335,12 @@ \newcommand{\led@error@fail@patch@makeindex}{% \reledmac@error{Failed to patch the \string\makeindex\space command}{\@ehc}% }% +\newcommand{\led@error@fail@patch@setcounter}{% + \reledmac@error{Failed to patch the \string\setcounter\space command}{\@ehc}% +}% +\newcommand{\led@error@fail@patch@addtocounter}{% + \reledmac@error{Failed to patch the \string\addtocounter\space command}{\@ehc}% +}% \newcommand{\led@warn@edinde@outsidenumbering}{% \reledmac@warning{\string\edindex\space called outside of \string\beginnumbering\space ...\space \string\endnumbering. \MessageBreak Automatically switched to \string\index.}% }% @@ -962,9 +968,9 @@ \fi% \fi \page@numR=#1% - \this@section@page@numR=#1% + \global\this@section@page@numR=#1% \last@page@numR=#1% - \this@section@last@page@numR=#1% + \global\this@section@last@page@numR=#1% \def\next@page@numR{#1}% \gdef\this@section@next@page@numR{#1}% \fi @@ -1330,7 +1336,7 @@ \newwrite\linenum@out \newif\iffirst@linenum@out@ \first@linenum@out@true -\newcommand{\this@line@list@version}{7}% +\newcommand{\this@line@list@version}{8}% \let\next@line@list@stuff\relax% \newcommand*{\line@list@stuff}[1]{% \global\newtoggle{notfirstrun@#1}% @@ -1361,7 +1367,6 @@ }% \newcommand*{\new@line}{% - \set@this@c@page% \ifnumberline% \IfStrEq{\led@pb@setting}{after}% {\xifinlist{\the\absline@num}{\l@prev@nopb}% @@ -4586,11 +4591,15 @@ {\csuse{parafootsepX@#1}}% {}% \global\csname prevpage#1@num\endcsname=\page@num% - \else% - \ifnumequal{\csuse{prevpage#1@num}}{\c@page}% + \else%We can't use directly the page counter, see https://tex.stackexchange.com/a/239457/7712 + \global\expandafter\advance\csname footnote#1@parafootsepX\endcsname by 1% + \edef\@tmpa{parafootsepX@#1@\the\csname footnote#1@parafootsepX\endcsname}% + \expandafter\edlabel\expandafter{\@tmpa}% + \edef\@tmpb{\expandafter\xpageref\expandafter{\@tmpa}}% + \IfStrEq{\csuse{prevpage#1@num}}{\@tmpb}% {\csuse{parafootsepX@#1}}% {}% - \global\csname prevpage#1@num\endcsname=\c@page% + \global\cslet{prevpage#1@num}{\@tmpb}% \fi% \fi% } @@ -5510,6 +5519,7 @@ \expandafter\newcount\csname footnote#1@reading\endcsname% \expandafter\newcount\csname prevpage#1@num\endcsname% \expandafter\newcount\csname prevpage#1@numR\endcsname% + \expandafter\newcount\csname footnote#1@parafootsepX\endcsname%For the case we use \parafootsepX outside of numbered section \expandafter\gappto\expandafter\no@expands\expandafter{\expandafter\let\csname footnote#1\endcsname\@gobble}% \expandafter\newcommand\csname footnote#1mark\endcsname[1][]{% \begingroup% @@ -6243,6 +6253,7 @@ \AtBeginDocument{\par@patch@thepage}% \AtBeginDocument{% + \set@this@c@page% \apptocmd{\@outputpage}{% \ifsameparallelpagenumber% \ifl@dprintingpages% @@ -6259,6 +6270,16 @@ {}% {\led@error@fail@patch@@outputpage}% }% +\apptocmd{\setcounter}{% + \IfStrEq{#1}{page}{\set@this@c@page}{}% + }% + {}% + {\led@error@fail@patch@setcounter}% +\apptocmd{\addtocounter}{% + \IfStrEq{#1}{page}{\set@this@c@page}{}% + }% + {}% + {\led@error@fail@patch@addtocounter}% \newcounter{par@page}% \setcounter{par@page}{1}% \list@create{\labelref@list} diff --git a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty index 25ae14d2533..5adccabeb1c 100644 --- a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty +++ b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty @@ -28,7 +28,7 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledpar}[2020/08/19 v2.24.1 reledmac extension for parallel texts]% +\ProvidesPackage{reledpar}[2020/09/16 v2.24.2 reledmac extension for parallel texts]% \RequirePackage{xspace}% \RequirePackage{xkeyval} @@ -783,13 +783,11 @@ }% \newcommand*{\new@lineL}{% - \set@this@c@page% \ifnumberline% \write\linenum@out{\string\@nl[\the\@this@c@page][\thepage]}% \fi% }% \newcommand*{\new@lineR}{% - \set@this@c@page% \ifnumberline% \write\linenum@outR{\string\@nl[\the\@this@c@page][\thepage]}% \fi% -- cgit v1.2.3