diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/reledmac/reledmac.sty | 7 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/reledmac/reledpar.sty | 97 |
2 files changed, 73 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty index 8e879a1b9cf..15056105b40 100644 --- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty +++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty @@ -40,7 +40,7 @@ %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledmac}[2015/07/19 v2.0.0 typesset critical edition]% +\ProvidesPackage{reledmac}[2015/07/27 v2.0.1 typesset critical edition]% \RequirePackage{xkeyval} \newif\ifparledgroup \DeclareOptionX{series}[A,B,C,D,E]{\xdef\default@series{#1}} @@ -1474,6 +1474,7 @@ {\p@pstart\thepstart} \fi% \l@dzeropenalties% + \ignorespaces%because not automatically ignored if an optional argument is used (classical TeX behavior for space after commands) } \newcommandx*{\pend}[1][1]{\ifnumbering \else% \led@err@PendNotNumbered% @@ -6235,12 +6236,12 @@ \unless\ifnofamiliar@ \let\notesXwidthliketwocolumns\noteswidthliketwocolumnsX \fi - \newcommandx[2][1,usedefault]{\parafootsep}{% + \newcommandx{\parafootsep}[2][1,usedefault]{% \Xparafootsep[#1]{#2}% \parafootsepX[#1]{#2} }% - \newcommandx[2][1,usedefault]{\afternote}{% + \newcommandx{\afternote}[2][1,usedefault]{% \Xafternote[#1]{#2}% \afternoteX[#1]{#2}% }% diff --git a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty index c117a68534c..48b3141179c 100644 --- a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty +++ b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty @@ -28,16 +28,20 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledpar}[2015/07/19 v2.0.0 reledmac extension for parallel texts]% +\ProvidesPackage{reledpar}[2015/07/27 v2.1.0 reledmac extension for parallel texts]% \RequirePackage{xspace}% +\RequirePackage{xkeyval} \newif\ifshiftedpstarts -\DeclareOption{shiftedpstarts}{\shiftedpstartstrue} -\DeclareOption{parledgroup}{\parledgrouptrue} -\DeclareOption{widthliketwocolumns}{\widthliketwocolumnstrue}% -\newif\ifsameparallelpagenumber% -\DeclareOption{sameparallelpagenumber}{\sameparallelpagenumbertrue}% -\ProcessOptions% +\DeclareOptionX{shiftedpstarts}{\shiftedpstartstrue} +\DeclareOptionX{parledgroup}{\parledgrouptrue} +\DeclareOptionX{widthliketwocolumns}{\widthliketwocolumnstrue}% +\newif\ifsameparallelpagenumber +\newif\ifprevpgnotnumbered +\DeclareOptionX{sameparallelpagenumber}{\sameparallelpagenumbertrue} +\DeclareOptionX{prevpgnotnumbered}{\prevpgnotnumberedtrue} +\DeclareOptionX{prevpgstyle}{\gdef\prevpgstyle{#1}}% +\ProcessOptionsX% \newdimen\Lcolwidth \Lcolwidth=0.45\textwidth \newdimen\Rcolwidth @@ -67,6 +71,9 @@ \newcommand{\led@error@fail@patch@pagenumbering}{% \reledpar@error{Fail to patch \string\pagenumbering\space command.}{\@ehc}% }% +\newcommand{\led@error@fail@patch@@mempnum}{% + \reledpar@error{Fail to patch \string\@mempnum\space command.}{\@ehc}% +}% \newcommand{\led@error@fail@patch@@outputpage}{% \reledpar@error{Fail to patch \string\@outputpage\space command.}{\@ehc}% }% @@ -659,6 +666,7 @@ {\csgdef{before@pstartL@\the\l@dnumpstartsL}{\at@every@pstart}}% {\csgdef{before@pstartL@\the\l@dnumpstartsL}{\noindent#1}}% \at@every@pstart@call% + \ignorespaces% } \newcommandx*{\pstartR}[1][1]{% \if@nobreak% @@ -708,6 +716,7 @@ {\csgdef{before@pstartR@\the\l@dnumpstartsR}{\at@every@pstart}}% {\csgdef{before@pstartR@\the\l@dnumpstartsR}{\noindent#1}}% \at@every@pstart@call% + \ignorespaces% } \newcommandx*{\pendL}[1][1]{% \ifnumbering \else% @@ -936,10 +945,10 @@ \@eled@sectioningfalse% \global\csundef{eled@sectioning@\the\l@dpscR R}% \if@RTL% - \hspace{-\paperwidth}% + \hspace{-3\paperwidth}% {\hbox{\l@dunhbox@line{\one@lineR}} \new@lineR}% \else% - \hspace{\paperwidth}% + \hspace{3\paperwidth}% {\new@lineR \hbox{\l@dunhbox@line{\one@lineR}}}% \fi% \vskip\eledsection@correcting@skip @@ -1959,15 +1968,16 @@ {}% \advance\numpagelinesL \@ne% \ifshiftedpstarts% - \ifdim\ht\l@dleftbox>0pt\hb@xt@% - \hsize{\ledstrutL\unhbox\l@dleftbox}% + \ifdim\ht\l@dleftbox>0pt% + \parledgroup@correction@notespacing{L}% + \hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}% \else% \dimen0=\pagetotal% \advance\dimen0 by \baselineskip% \global\pagetotal=\dimen0% \fi% \else% - \parledgroup@correction@notespacing{L} + \parledgroup@correction@notespacing{L}% \hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}% \fi% \get@nextboxL% @@ -2001,8 +2011,9 @@ {}% \advance\numpagelinesR \@ne% \ifshiftedpstarts% - \ifdim\ht\l@drightbox>0pt\hb@xt@% - \hsize{\ledstrutR\unhbox\l@drightbox}% + \ifdim\ht\l@drightbox>0pt% + \parledgroup@correction@notespacing{R}% + \hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}% \else% \dimen0=\pagetotal% \advance\dimen0 by \baselineskip% @@ -2078,12 +2089,19 @@ \providecommand{\cleartoevenpage}[1][\@empty]{% \clearpage \ifodd\c@page\hbox{}#1\clearpage\fi} + \newcommand*{\cleartol@devenpage}{% \ifdim\pagetotal<\topskip% on an empty page \else \clearpage \fi - \ifodd\c@page\hbox{}\clearpage\fi% + \ifodd\c@page% + \ifprevpgnotnumbered% + \addtocounter{par@page}{-1}% + \ifdef{\prevpgstyle}{\thispagestyle{\prevpgstyle}}{}% + \fi% + \hbox{}\clearpage% + \fi% }% \newcommand*{\clearl@dleftpage}{% \ifdim\pagetotal=0pt\hbox{}\fi% @@ -2329,40 +2347,63 @@ \newcommand{\par@patch@thepage}{% - \ifsameparallelpagenumber% + \ifboolexpr{% + bool{sameparallelpagenumber}% + or bool{prevpgnotnumbered}% + }% + {% \patchcmd{\thepage}% - {page}{sameparallelpage@number}% + {page}{par@page}% {}% {\led@error@fail@patch@thepage}% - \fi% + }{}% }% -\apptocmd{\pagenumbering}{% + +\newcommand{\par@patch@pagenumbering}{% + \ifboolexpr{% + bool{sameparallelpagenumber}% + or bool{prevpgnotnumbered}% + }% + {% + \setcounter{par@page}{1}% + }% + {}% \par@patch@thepage% - }% - {}% - {\led@error@fail@patch@pagenumbering}% +}% -\AtBeginDocument{\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{sameparallelpage@number}% + \stepcounter{par@page}% \fi% \else% - \stepcounter{sameparallelpage@number}% + \stepcounter{par@page}% \fi% \else% - \stepcounter{sameparallelpage@number}% + \stepcounter{par@page}% \fi% }% {}% {\led@error@fail@patch@@outputpage}% } -\newcounter{sameparallelpage@number}% -\setcounter{sameparallelpage@number}{1}% +\newcounter{par@page}% +\setcounter{par@page}{1}% \pretocmd{\chapter}{% \ifl@dprintingpages% \vbox{}% |