From 801ff06c2ec92b4759f3492f919197803da4f0b8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 17 Jul 2017 21:28:44 +0000 Subject: reledmac (17jul17) git-svn-id: svn://tug.org/texlive/trunk@44833 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/reledmac/reledmac.dtx | 30 ++++-- .../texmf-dist/source/latex/reledmac/reledpar.dtx | 101 ++++++++++++--------- 2 files changed, 80 insertions(+), 51 deletions(-) (limited to 'Master/texmf-dist/source/latex/reledmac') diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx index a267f41969b..feab9ddca38 100644 --- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx +++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx @@ -481,6 +481,7 @@ % \changes{v2.22.0}{2017/06/08}{Add \protect\cs{txtbeforenotesonlyonceX} and \protect\cs{Xtxtbeforenotesonlyonce} hooks.} % \changes{v2.22.1}{2017/07/07}{Compatibility with new version of \protect\reledpar.} % \changes{v2.22.1}{2017/07/07}{Fix bug with some commands inside \protect\cs{sameword}.} +% \changes{v2.22.2}{2017/07/17}{Do not print footnotes at the first run.} % Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename) % has version number \fileversion, last revised \filedate.}} % @@ -6774,8 +6775,11 @@ % \begin{macrocode} \newcommand*{\line@list@stuff}[1]{% % \end{macrocode} -% -% First, use the commands of the previous section to interpret the +% First, define a toggle set to true when we are not in the first run. + \global\newtoggle{notfirstrun@#1}% +% \begin{macrocode} +% \end{macrocode} +% Use the commands of the previous section to interpret the % line-list file from the last run. % \begin{macrocode} \read@linelist{#1}% @@ -6788,13 +6792,13 @@ % \protect\cs{line@list@stuff}} % \changes{v0.7.0}{2005/02/25}{Deleted \protect\cs{page@start} from \protect\cs{line@list@stuff}} % \changes{v1.15.1}{2015/01/16}{Revert modification of 1.5.2 which makes bug with numbering. Leave vertical mode to solve spurious space before minipage.} - % \begin{macrocode} \iffirst@linenum@out@ \immediate\closeout\linenum@out% \global\first@linenum@out@false% \immediate\openout\linenum@out=\l@auxdir#1\relax% \immediate\write\linenum@out{\string\line@list@version{\this@line@list@version}}% + \immediate\write\linenum@out{\string\global\string\toggletrue{notfirstrun@#1}}% \ifl@dpaging% \immediate\write\linenum@out{\string\@par@sync@option{\@par@this@sync@option}}% \fi% @@ -6810,6 +6814,7 @@ \closeout\linenum@out% \openout\linenum@out=\l@auxdir#1\relax% \write\linenum@out{\string\line@list@version{\this@line@list@version}}% + \protected@write\linenum@out{}{\string\global\string\toggletrue{notfirstrun@#1}}% \ifl@dpaging% \write\linenum@out{\string\@par@sync@option{\@par@this@sync@option}}% \fi% @@ -9305,14 +9310,21 @@ % of the paragraph. We can hope that is not % too far from the proper location, to which they will move on the next % run. +% First the first run, we don't flush the notes, +% as that means all the notes will be added at the end of numbered section, +% and so, very far of the expected position % \begin{macrocode} \newcommand*{\flush@notes}{% - \@xloop - \ifx\inserts@list\empty \else - \gl@p\inserts@list\to\@insert - \@insert - \global\let\@insert=\undefined - \repeat} + \iftoggle{notfirstrun@\jobname.\extensionchars\the\section@num}{% + \@xloop% + \ifx\inserts@list\empty \else% + \gl@p\inserts@list\to\@insert% + \@insert% + \global\let\@insert=\undefined% + \repeat% + }{}% +}% + % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx index a930b94ef78..fb8284ee46e 100644 --- a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx +++ b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx @@ -307,6 +307,8 @@ % \changes{v2.19.0}{2017/06/08}{Compatibility with v2.22.0 of \protect\reledmac.} % \changes{v2.19.1}{2017/06/15}{Fix bug with \protect\cs{edtext} in sectioning command with shiftedpstarts mode.} % \changes{v2.19.2}{2017/07/07}{\protect\option{continuousnumberingwithcolumns} works also for pstart number.} +% \changes{v2.19.3}{2017/07/17}{Fix a bug with \protect\option{nopbinverse} when using consecutive \protect\cs{Pages}.} +% \changes{v2.19.3}{2017/07/17}{Do not print footnotes at the first run.} % ^^A PW added following as the definitions are at some unknown elsewhere % % \newcommand{\egstart}{% @@ -2804,12 +2806,14 @@ % \changes{v1.10.1}{2015/01/16}{Revert modification of 1.4.2, which makes bugs with numbering. Leave vertical mode to solve spurious space before minipage.} % \begin{macrocode} \newcommand*{\line@list@stuffR}[1]{% + \global\newtoggle{notfirstrun@#1}% \read@linelist{#1}% \iffirst@linenum@out@R \immediate\closeout\linenum@outR \global\first@linenum@out@Rfalse \immediate\openout\linenum@outR=\l@auxdir#1% \immediate\write\linenum@outR{\string\line@list@version{\this@line@list@version}}% + \immediate\write\linenum@outR{\string\global\string\toggletrue{notfirstrun@#1}}% \ifl@dpaging% \immediate\write\linenum@outR{\string\@par@sync@option{\@par@this@sync@option}}% \fi% @@ -2819,6 +2823,7 @@ \fi% \closeout\linenum@outR% \openout\linenum@outR=\l@auxdir#1% + \protected@write\linenum@outR{}{\string\global\string\toggletrue{notfirstrun@#1}}% \fi} % \end{macrocode} @@ -4581,12 +4586,16 @@ % and sent on to the vertical list. % \begin{macrocode} \newcommand*{\flush@notesR}{% - \@xloop - \ifx\inserts@listR\empty \else - \gl@p\inserts@listR\to\@insertR - \@insertR - \global\let\@insertR=\undefined - \repeat} + \iftoggle{notfirstrun@\jobname.\extensionchars\the\section@numR R}{% + \@xloop% + \ifx\inserts@listR\empty \else% + \gl@p\inserts@listR\to\@insertR% + \@insertR% + \global\let\@insertR=\undefined% + \repeat% + }{}% +}% + % \end{macrocode} % \end{macro} @@ -5715,16 +5724,16 @@ \IfStrEq{\led@pb@setting}{before}{ \numdef{\next@absline}{\the\absline@num+1}% \numdef{\next@abslineR}{\the\absline@numR+1}% - \xifinlistcs{\next@absline}{l@prev@pb}{\@pbtrue}{}% - \xifinlistcs{\next@abslineR}{l@prev@pbR}{\@pbtrue}{} - \xifinlistcs{\next@absline}{l@prev@nopb}{\@nopbtrue}{}% - \xifinlistcs{\next@abslineR}{l@prev@nopbR}{\@nopbtrue}{} + \xifinlist{\next@absline}{\l@prev@pb}{\@pbtrue}{}% + \xifinlist{\next@abslineR}{\l@prev@pbR}{\@pbtrue}{} + \xifinlist{\next@absline}{\l@prev@nopb}{\@nopbtrue}{}% + \xifinlist{\next@abslineR}{\l@prev@nopbR}{\@nopbtrue}{} }{} \IfStrEq{\led@pb@setting}{after}{ - \xifinlistcs{\the\absline@num}{l@prev@pb}{\@pbtrue}{}% - \xifinlistcs{\the\absline@numR}{l@prev@pbR}{\@pbtrue}{} - \xifinlistcs{\the\absline@num}{l@prev@nopb}{\@nopbtrue}{}% - \xifinlistcs{\the\absline@numR}{l@prev@nopbR}{\@nopbtrue}{} + \xifinlist{\the\absline@num}{\l@prev@pb}{\@pbtrue}{}% + \xifinlist{\the\absline@numR}{\l@prev@pbR}{\@pbtrue}{} + \xifinlist{\the\absline@num}{\l@prev@nopb}{\@nopbtrue}{}% + \xifinlist{\the\absline@numR}{\l@prev@nopbR}{\@nopbtrue}{} }{} \if@nopb\nopagebreak[4]\enlargethispage{\baselineskip}\fi \if@pb\pagebreak[4]\fi @@ -6639,25 +6648,25 @@ % \begin{macrocode} \newcommand{\checkpbL}{ \IfStrEq{\led@pb@setting}{after}{ - \xifinlistcs{\the\absline@num}{l@prev@pb}{\l@dpagefulltrue\l@dsamepagefalse}{} - \xifinlistcs{\the\absline@num}{l@prev@nopb}{\l@dpagefullfalse\l@dsamepagetrue}{} + \xifinlist{\the\absline@num}{\l@prev@pb}{\l@dpagefulltrue\l@dsamepagefalse}{} + \xifinlist{\the\absline@num}{\l@prev@nopb}{\l@dpagefullfalse\l@dsamepagetrue}{} }{} \IfStrEq{\led@pb@setting}{before}{ \numdef{\next@absline}{\the\absline@num+1} - \xifinlistcs{\next@absline}{l@prev@pb}{\l@dpagefulltrue\l@dsamepagefalse}{} - \xifinlistcs{\next@absline}{l@prev@nopb}{\l@dpagefullfalse\l@dsamepagetrue}{} + \xifinlist{\next@absline}{\l@prev@pb}{\l@dpagefulltrue\l@dsamepagefalse}{} + \xifinlist{\next@absline}{\l@prev@nopb}{\l@dpagefullfalse\l@dsamepagetrue}{} }{} } \newcommand{\checkpbR}{ \IfStrEq{\led@pb@setting}{after}{ - \xifinlistcs{\the\absline@numR}{l@prev@pbR}{\l@dpagefulltrue\l@dsamepagefalse}{} - \xifinlistcs{\the\absline@numR}{l@prev@nopbR}{\l@dpagefullfalse\l@dsamepagetrue}{} + \xifinlist{\the\absline@numR}{\l@prev@pbR}{\l@dpagefulltrue\l@dsamepagefalse}{} + \xifinlist{\the\absline@numR}{\l@prev@nopbR}{\l@dpagefullfalse\l@dsamepagetrue}{} }{} \IfStrEq{\led@pb@setting}{before}{ \numdef{\next@abslineR}{\the\absline@numR+1} - \xifinlistcs{\next@abslineR}{l@prev@pbR}{\l@dpagefulltrue\l@dsamepagefalse}{} - \xifinlistcs{\next@abslineR}{l@prev@nopbR}{\l@dpagefullfalse\l@dsamepagetrue}{} + \xifinlist{\next@abslineR}{\l@prev@pbR}{\l@dpagefulltrue\l@dsamepagefalse}{} + \xifinlist{\next@abslineR}{\l@prev@nopbR}{\l@dpagefullfalse\l@dsamepagetrue}{} }{} } % \end{macrocode} @@ -6668,27 +6677,35 @@ % \protect\cs{checkverseL} and \protect\cs{checkverseR} are called after each line is printed. % They prevent page break inside line of verse. % \begin{macrocode} -\newcommand{\checkverseL}{ -\ifinstanzaL - \iflednopbinverse - \ifinserthangingsymbol - \numgdef{\prev@abslineverse}{\the\absline@num-1} - \IfStrEq{\led@pb@setting}{after}{\lednopbnum{\prev@abslineverse}}{} - \IfStrEq{\led@pb@setting}{before}{\ifnum\numpagelinesL<3\ledpbnum{\prev@abslineverse}\fi}{} - \fi - \fi -\fi +\newcommand{\checkverseL}{% +\ifinstanzaL% + \iflednopbinverse% + \ifinserthangingsymbol% + \numgdef{\prev@abslineverse}{\the\absline@num-1}% + \IfStrEq{\led@pb@setting}{after}{\lednopbnum{\prev@abslineverse}}{}% + \IfStrEq{\led@pb@setting}{before}{% + \ifnum\numpagelinesL<3% + \ledpbnum{\prev@abslineverse}% + \fi% + }{}% + \fi% + \fi% +\fi% } -\newcommand{\checkverseR}{ -\ifinstanzaR - \iflednopbinverse - \ifinserthangingsymbolR - \numgdef{\prev@abslineverse}{\the\absline@numR-1} - \IfStrEq{\led@pb@setting}{after}{\lednopbnumR{\prev@abslineverse}}{} - \IfStrEq{\led@pb@setting}{before}{\ifnum\numpagelinesR<3\ledpbnumR{\prev@abslineverse}\fi}{} - \fi - \fi -\fi +\newcommand{\checkverseR}{% +\ifinstanzaR% + \iflednopbinverse% + \ifinserthangingsymbolR% + \numgdef{\prev@abslineverse}{\the\absline@numR-1}% + \IfStrEq{\led@pb@setting}{after}{\lednopbnumR{\prev@abslineverse}}{}% + \IfStrEq{\led@pb@setting}{before}{% + \ifnum\numpagelinesR<3% + \ledpbnumR{\prev@abslineverse}% + \fi% + }{}% + \fi% + \fi% +\fi% } % \end{macrocode} % \end{macro} -- cgit v1.2.3