summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/reledmac/reledmac.dtx')
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledmac.dtx138
1 files changed, 90 insertions, 48 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
index f92506cd050..de88625b0c0 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
@@ -295,7 +295,7 @@
% \changes{v1.23.0}{2015/05/18}{Compatibility between nofamiliar/nocriticals option and minipage/ledgroup.}
% \changes{v1.23.0}{2015/05/18}{Fix error of \protect\cs{iftrue} not closed.}
% \changes{v1.23.0}{2015/05/18}{Allow use of \protect\cs{sameword} with inputenc managing of UTF-8.}
-% \changes{v1.23.0}{2015/05/18}{Error message when using \protect\cs{beginnumbering}…\protect\cs{endnumbering} without \protect\cs{pstart}.}
+% \changes{v1.23.0}{2015/05/18}{Error message when using \protect\cs{beginnumbering}\ …\ \protect\cs{endnumbering} without \protect\cs{pstart}.}
% \changes{v1.23.0}{2015/05/18}{New tools to ensure the line-list file uses the right version of commands when upgrading the eledmac version.}
% \changes{v1.23.0}{2015/05/18}{Fix a bug with \protect\cs{skipnumbering} called immediately after a \protect\cs{pstart}.}
% \changes{v1.23.0}{2015/05/18}{Fix spurious space with \protect\cs{skipnumbering} (bug added on v1.21.0).}
@@ -449,8 +449,8 @@
% \changes{v2.16.5}{2016/10/20}{Fix potential spurious spaces in endnotes.}
% \changes{v2.16.6}{2016/11/14}{Take into account \protect\cs{linenumberstyle} when using \protect\cs{edlineref}.}
% \changes{v2.16.6}{2016/11/14}{Fix a bug with the line number style in \protect\cs{doennotes} when referring to right side line in parallel typesetting.}
-% \changes{v2.16.7}{2016/12/12}{Fix a bug with \protect\cs{numberpstarttrue} when using multiple \protect\cs{beginnumbering}…\protect\cs{endnumbering}.}
-% \changes{v2.16.7}{2016/12/12}{Fix a bug with \protect\cs{msdata} when using multiple \protect\cs{beginnumbering}…\protect\cs{endnumbering}.}
+% \changes{v2.16.7}{2016/12/12}{Fix a bug with \protect\cs{numberpstarttrue} when using multiple \protect\cs{beginnumbering}\ …\ \protect\cs{endnumbering}.}
+% \changes{v2.16.7}{2016/12/12}{Fix a bug with \protect\cs{msdata} when using multiple \protect\cs{beginnumbering}\ …\ \protect\cs{endnumbering}.}
% \changes{v2.16.8}{2016/12/16}{Fix a bug with \protect\cs{edindex} in footnotes in parallel typesetting.}
% \changes{v2.17.0}{2016/12/23}{Add \protect\cs{edglsadd} command.}
% \changes{v2.17.0}{2016/12/23}{Add \protect\cs{setmsdataposition} setting.}
@@ -488,6 +488,7 @@
% \changes{v2.24.0}{2017/08/17}{Fix a bug with \protect\cs{edlabel} at the beginning of a \protect\cs{pstart}.}
% \changes{v2.24.0}{2017/08/17}{Add \protect\cs{swnoexpands} macro to avoid problems with not fully expandable macro inside \protect\cs{sameword}.}
% \changes{v2.24.0}{2017/08/17}{Fix spurious space with \protect\cs{labelpstarttrue}}
+% \changes{v2.24.1}{2017/08/31}{Compatibility with \protect\parpackage 2.20.2}
% Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
% has version number \fileversion, last revised \filedate.}}
%
@@ -1828,7 +1829,7 @@
% […]
% amet\stopmsdata{} \msdata{ABCD}sic transit […]
% \end{verbatim}
-% Which means that the part of text containing \enquote{Lorem ipsum dolor … amet} is witnessed by manuscripts A, B and C, while the part of text starting by \enquote{sic transit} is witnessed by manuscripts A, B, C and D.
+% Which means that the part of text containing \enquote{Lorem ipsum dolor […] amet} is witnessed by manuscripts A, B and C, while the part of text starting by \enquote{sic transit} is witnessed by manuscripts A, B, C and D.
%
% \cs{stopmsdata} is also automatically inserted by \cs{msdata}.
%
@@ -4060,7 +4061,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2017/08/17 v2.24.0 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2017/08/31 v2.24.1 typesetting critical editions]%
% \end{macrocode}
%
% \subsection{Package options}
@@ -4322,7 +4323,7 @@
% \begin{macro}{\led@err@edtextoutsidepstart}
% \begin{macrocode}
\newcommand*{\led@err@edtextoutsidepstart}{%
- \reledmac@error{\string\edtext\space outside numbered paragraph (\pstart…\pend)}{\@ehc}}%
+ \reledmac@error{\string\edtext\space outside numbered paragraph (\pstart\space …\space\pend)}{\@ehc}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\led@mess@NotesChanged}
@@ -4420,7 +4421,7 @@
\newcommand*{\led@err@PstartNotNumbered}{%
\reledmac@error{\string\pstart\space must be used within a
numbered section %
- (\string\beginnumbering…\string\endnumbering)}{\@ehc}}%
+ (\string\beginnumbering\space …\space\string\endnumbering)}{\@ehc}}%
\newcommand*{\led@err@PstartInPstart}{%
\reledmac@error{\string\pstart\space encountered while another
\string\pstart\space was in effect}{\@ehc}}
@@ -4568,7 +4569,7 @@
% \begin{macro}{\led@err@toendnotes@outsidenumbering}
% \begin{macrocode}
\newcommand{\led@err@toendnotes@outsidenumbering}{%
- \reledmac@error{\string\toendnotes\space and related commands must be called inside a numbered texte (\string\beginnumbering…\string\endnumbering)}{\@ehc}%
+ \reledmac@error{\string\toendnotes\space and related commands must be called inside a numbered texte (\string\beginnumbering\space …\space\string\endnumbering)}{\@ehc}%
}%
% \end{macrocode}
% \end{macro}
@@ -4639,7 +4640,7 @@
% \begin{macro}{\led@warn@edinde@outsidenumbering}
% \begin{macrocode}
\newcommand{\led@warn@edinde@outsidenumbering}{%
- \reledmac@warning{\string\edindex\space called outside of \string\beginnumbering…\string\endnumbering. \MessageBreak Automatically switched to \string\index.}%
+ \reledmac@warning{\string\edindex\space called outside of \string\beginnumbering\space …\space \string\endnumbering. \MessageBreak Automatically switched to \string\index.}%
}%
% \end{macrocode}
% \end{macro}
@@ -4739,7 +4740,7 @@
% In preparation for the \parpackage package, these are related to
% the `right' text of parallel texts (when \protect\cs{ifl@dpairing} is TRUE).
-% They are explained in the \protect\package{eledpar}
+% They are explained in the \protect\parpackage
% manual.
% \changes{v0.7.0}{2005/02/24}{Added \protect\cs{l@dnumpstartsL}, \protect\cs{ifl@dpairing}
% and \protect\cs{ifpst@rted} for/from eledpar}
@@ -4776,6 +4777,12 @@
% \begin{macrocode}
\newif\ifnumberingR
% \end{macrocode}
+% \begin{macro}{\ifafterendnumberingR}
+% The \cs{ifafterendnumberingR} boolean is set to TRUE at \cs{endnumberingR} and to FALSE at next \cs{beginnumberingR} or real \cs{beginnumbering} (not \cs{resumenumbering}). It is mainly used for the \option{continuousnumberingwithcolumns}, to avoid incrementing right column line counters after a \cs{endnumberingR}.
+% \begin{macrocode}
+\newif\ifafterendnumberingR%
+% \end{macrocode}
+% \end{macro}
% The \cs{ifXnote@} macro is set to true when we are typesetting a critical footnote.
% \begin{macrocode}
\newif\ifXnote@%
@@ -4876,10 +4883,22 @@
\endnumbering
\fi
\global\numberingtrue
+ \global\afterendnumberingRfalse%
\global\advance\section@num \@ne
\initnumbering@reg
\message{Section \the\section@num }%
\line@list@stuff{\jobname.\extensionchars\the\section@num}%
+ \ifcontinuousnumberingwithcolumns%
+ \unless\ifafterendnumberingR%
+ \unless\ifl@dpairing%
+ \ledRcoltrue%
+ \global\advance\section@numR \@ne%
+ \message{Section \the\section@numR R (continuoousnumbering)}%
+ \line@list@stuffR{\jobname.\extensionchars\the\section@numR R}%
+ \ledRcolfalse%
+ \fi%
+ \fi%
+ \fi%
\l@dend@stuff
\setcounter{pstart}{1}
\ifl@dpairing
@@ -5028,6 +5047,17 @@
\led@mess@SectionContinued{\the\section@num}%
\set@continuousnumberingforL%
\line@list@stuff{\jobname.\extensionchars\the\section@num}%
+ \ifcontinuousnumberingwithcolumns%
+ \unless\ifafterendnumberingR%
+ \unless\ifl@dpairing%
+ \ledRcoltrue%
+ \global\advance\section@numR \@ne%
+ \message{Section \the\section@numR R (continuoousnumbering)}%
+ \line@list@stuffR{\jobname.\extensionchars\the\section@numR R}%
+ \ledRcolfalse%
+ \fi%
+ \fi%
+ \fi%
\l@dend@stuff
\ifl@dpairing\else%
\begingroup%
@@ -5050,20 +5080,10 @@
% \end{macro}
% \end{macro}
% \begin{macro}{\set@continuousnumberingforL}
-% \cs{set@continuousnumberingforl} sets the left line numbers and pstart counters at a \cs{beginnumbering} or a \cs{resumenumbering} in order to have continuous numbering with single column text.
+% \cs{set@continuousnumberingforl} sets pstart counters at a \cs{beginnumbering} or a \cs{resumenumbering} in order to have continuous numbering with single column text.
% \begin{macrocode}
\newcommand{\set@continuousnumberingforL}{%
\ifcontinuousnumberingwithcolumns%
- \ifdefined\line@numR%
- \ifnum\line@numR>\line@num%
- \global\appto\next@line@list@stuff{%
- \expandafter\setlinenum\expandafter{\the\line@numR}%
- }%
- \fi%
- \ifnum\last@page@numR>\last@page@num%
- \global\last@page@num=\last@page@numR%
- \fi%
- \fi%
\ifl@dpairing%
\unless\ifl@dpaging%
\global\c@pstartL=\c@pstart%
@@ -6198,7 +6218,16 @@
\csnumgdef{@lastline@forpageR@\the\page@numR}{\the\line@numR}%
\ifbypage@R
\ifx\l@dchset@num\relax%Not resetting if preceded by a \setlinenum
- \line@numR \z@ \subline@numR \z@%
+ \ifboolexpr{%
+ bool{resumenumberingR@start}%
+ and test {\ifnumequal{\last@page@numR}{-10000}}%
+ }%
+ {}%
+ {%
+ \line@numR \z@%
+ \subline@numR \z@%
+ \global\csdef{reset@lineR\the\numexpr\absline@numR+1\relax @\the\section@numR}{}%
+ }%
\fi%
\fi
\global\page@numR=#1%
@@ -6213,6 +6242,7 @@
\ifbypage@
\ifx\l@dchset@num\relax%Not resetting if preceded by a \setlinenum
\line@num \z@ \subline@num \z@%
+ \global\csdef{reset@line\the\numexpr\absline@num+1\relax @\the\section@num}{}%
\fi%
\fi
\global\page@num=#1%
@@ -6853,6 +6883,11 @@
{\global\toggletrue{notfirstrun@#1}}%
{\global\togglefalse{notfirstrun@#1}}%
% \end{macrocode}
+% A internal hook (not used yet).
+% \begin{macrocode}
+ \next@line@list@stuff%
+ \global\let\next@line@list@stuff\relax%
+% \end{macrocode}
% Use the commands of the previous section to interpret the
% line-list file from the last run.
% \begin{macrocode}
@@ -6891,8 +6926,6 @@
\write\linenum@out{\string\@par@sync@option{\@par@this@sync@option}}%
\fi%
\fi%
- \next@line@list@stuff%
- \global\let\next@line@list@stuff\relax%
}%
% \end{macrocode}
@@ -8329,7 +8362,7 @@
}%
% \end{macrocode}
% Restore standard \enquote{nobreak} and \enquote{autopar} settings.
-% Normally, \cs{if@nobreak} is true only immediately after a sectioning command (see latex.ltx file). As a \cs{pstart}…\cs{pend} structure can't contain any sectioning command, we set \cs{if@nobreak} to false.
+% Normally, \cs{if@nobreak} is true only immediately after a sectioning command (see latex.ltx file). As a \cs{pstart}\ …\ \cs{pend} structure can't contain any sectioning command, we set \cs{if@nobreak} to false.
% \begin{macrocode}
\@nobreakfalse%
\ifautopar%
@@ -8567,29 +8600,41 @@
% \end{macrocode}
% Boxes the line, writes information about new line in the numbered file.
% \begin{macrocode}
- {\ledllfill\hb@xt@ \wd\one@line{\new@line%
+ {\ledllfill\hb@xt@ \wd\one@line{%
+ \new@line%
% \end{macrocode}
-% If we use \LuaLaTeX\, then restore the direction.
+% If we use the \option{continuousnumberingwithcolumns}, we increase right line number.
% \begin{macrocode}
- \ifluatex%
- \textdir\l@luatextextdir@L%
+ \ifcontinuousnumberingwithcolumns%
+ \unless\ifafterendnumberingR%
+ \new@lineR%
+ \xappto\next@line@list@stuffR{%
+ \unexpanded{\global\line@numR=}\the\line@num%
+ }%
+ \fi%
\fi%
% \end{macrocode}
+% If we use \LuaLaTeX\, then restore the direction.
+% \begin{macrocode}
+ \ifluatex%
+ \textdir\l@luatextextdir@L%
+ \fi%
+% \end{macrocode}
% Insert, if needed, the hanging symbol.
% \begin{macrocode}
- \inserthangingsymbol%
+ \inserthangingsymbol%
% \end{macrocode}
% And so, print the line.
% \begin{macrocode}
- \l@dunhbox@line{\one@line}}%
+ \l@dunhbox@line{\one@line}}%
% \end{macrocode}
% Right line number
% \begin{macrocode}
- \ledrlfill\l@drd@ta%
+ \ledrlfill\l@drd@ta%
% \end{macrocode}
% Print right notes.
% \begin{macrocode}
- \l@drsn@te
+ \l@drsn@te%
}}%
% \end{macrocode}
% And reinsert penalties (for page breaking)...
@@ -8836,21 +8881,18 @@
\global\resumenumbering@startfalse%
\fi%
\fi%
- \unless\ifresumenumbering@start%
- \global\@firstlineofpagetrue%
- \fi%
- \ifbypage@
- \ifcsdef{l@dchset@num@\the\absline@num}%
- {%
- \global\csundef{l@dchset@num@\the\absline@num}%
- }%
- {%
- \unless\ifresumenumbering@start%
- \global\line@num=\z@ \global\subline@num=\z@%
- \resetprevline@%
- \fi%
- }%
- \fi
+ \ifboolexpr{%
+ bool{resumenumbering@start}%
+ and test {\ifdimgreater{\pagedepth}{\z@}}%
+ }%
+ {}%
+ {\global\@firstlineofpagetrue}%
+ \ifcsdef{reset@line\the\absline@num @\the\section@num}%
+ {%
+ \global\line@num=\z@ \global\subline@num=\z@%
+ \resetprevline@%
+ }%
+ {}%
\global\resumenumbering@startfalse%
\add@msdata@firstlineofpage%
% \end{macrocode}