summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/reledmac/reledpar.dtx')
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledpar.dtx86
1 files changed, 76 insertions, 10 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
index 2d2e6e92a80..62f9ec33255 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
@@ -267,6 +267,9 @@
% \changes{v2.6.3}{2015/12/13}{Fix spurious dot when using \protect\cs{linenummargin} on right side (introduced in v2.5.0).}
% \changes{v2.7.0}{2016/01/15}{\protect\macpackage cross-referencing can take advantage of \protect\package{xr} package.}
% \changes{v2.7.1}{2016/03/06}{Fix bug added in \protect\reledmac~2.8.2, when typesetting parallel text just after a sectionning command}
+% \changes{v2.8.0}{2016/03/23}{{Allow to make continuing line numbering between normal text and parallel text, using \protect\cs{pausenumbering} and \protect\cs{resumenumbering} and the \protect\option{continuousnumberingwithcolumns} option.}}
+% \changes{v2.8.0}{2016/03/23}{Fix bug when the right line number style is not the same to the left line number style}
+% \changes{v2.8.0}{2016/03/23}{Add \protect\cs{linenumberLevenifblanktrue} and \protect\cs{linenumberRevenifblank} commands}
% ^^A PW added following as the definitions are at some unknown elsewhere
%
% \newcommand{\egstart}{%
@@ -535,13 +538,18 @@
% \subsubsection{Mixing two columns and one column texts}
% \DescribeMacro{\widthliketwocolumns}
% If you want to mix two-column with single-column text, you can align horizontally single-column text to two-column text with \protect\cs{widthliketwocolumnstrue}. To reset this feature, use \protect\cs{widthliketwocolumnsfalse}.
-% You can also call \protect\cs{widthliketwocolumns} as a global option when loading \macpackage or \parpackage.
+% You can also use \option{widthliketwocolumns} as a global option when loading \macpackage or \parpackage.
%
% \DescribeMacro{\Xnoteswidthliketwocolumns}
% \DescribeMacro{\notesXwidthliketwocolumns}
% In most cases, you should use \protect\cs{widthliketwocolumns} in combination with \protect\cs{Xnoteswidthliketwocolumns} and \protect\cs{notesXwidthliketwocolumns} to align the critical/familiar footnotes with the two colums.
% See \macpackage's handbook for more details.
+%
+% If you want to have continuous line numbers between columns and not column, use the \option{continuousnumberingwithcolumns} option when loading \macpackage or \parpackage.
+% You will need to use \cs{pausenumbering}\ldots\cs{resumenumbering} instead of \cs{endnumbering}\ldots{endnumbering} (see \reff{reledmac-pause}).
+%
+%
% \section{Facing pages}\label{pages}
% \subsection{Basic usage}
% \DescribeEnv{pages}
@@ -871,9 +879,6 @@
% When inserted into a numbered line the macro \protect\cs{hidenumbering} causes
% the number for that particular line to be hidden; namely, no line number will print.
% Note that if you use it in \protect\cs{stanza}, you must call it at the beginning of the verse.
-% \subsection{Line numbering scheme}
-% Within these environments you can designate the line numbering scheme(s)
-% to be used.
% \subsection{Lineation system}
% \DescribeMacro{\firstlinenum}
% \DescribeMacro{\linenumincrement}
@@ -930,7 +935,13 @@
% This may be useful for parallel columns but for parallel pages it might
% be more appropriate to redefine it using \protect\cs{setRlineflag}\marg{flag}.
% Use \verb?\setRlineflag{}? to empty it.
-%
+%
+% \DescribeMacro{\linenumberLevenifblanktrue}
+% \DescribeMacro{\linenumberRevenifblanktrue}
+% By default, when a blank line is printed on one side for the need of synchronism with the other side, no line number is printed.
+% However, you can decide to print them also for blank lines.
+% Use \cs{linenumberLevenifblanktrue} to enable it on the left side, and \cs{linenumberRevenifblanktrue} to enable it on right side.
+%
% \subsection{Chunks}
% \DescribeMacro{\pstart}
% \DescribeMacro{\pend}
@@ -1159,7 +1170,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2016/03/06 v2.7.1 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2016/03/23 v2.8.0 reledmac extension for parallel texts]%
% \end{macrocode}
% \subsection{Package's requirement}
@@ -1232,10 +1243,11 @@
\DeclareOptionX{parledgroup}{\parledgrouptrue}
% \end{macrocode}
% \begin{macro}{\ifwidthliketwocolumns}
-% The \verb|widthliketwocolumns| option can be called either on \macpackage or \parpackage.
+% The \verb|widthliketwocolumns| and \verb+continuousnumberingwithcolumns+ options can be called either on \macpackage or \parpackage.
% \changes{v1.9.0}{2014/09/16}{Added widthliketwocolumns option}
% \begin{macrocode}
\DeclareOptionX{widthliketwocolumns}{\widthliketwocolumnstrue}%
+\DeclareOptionX{continuousnumberingwithcolumns}{\continuousnumberingwithcolumnstrue}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ifsameparallelpagenumber}
@@ -1476,6 +1488,7 @@
\global\sublines@false
\global\let\next@page@numR\relax
\global\let\sub@change\relax
+ \set@continuousnumberingforR%
\message{Section \the\section@numR R }%
\line@list@stuffR{\jobname.\extensionchars\the\section@numR R}%
\l@dend@stuff
@@ -1595,6 +1608,7 @@
\l@dend@stuff
\begingroup%
\initnumbering@sectcountR%
+ \set@continuousnumberingforR%
\else
\led@err@numberingShouldHaveStarted
\endnumberingR
@@ -1691,6 +1705,21 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\set@continuousnumberingforR}
+% \cs{set@continuousnumberingforR} set the right line numbers at a \cs{beginnumberingR} or a \cs{resumenumberingR} in order to have continuous numbering with not parallel text.
+% \begin{macrocode}
+\newcommand{\set@continuousnumberingforR}{%
+ \ifcontinuousnumberingwithcolumns%
+ \ifnum\line@numR<\line@num%
+ \expandafter\setlinenum\expandafter{\the\line@num}%
+ \fi%
+ \ifnum\last@page@num>\last@page@numR%
+ \global\last@page@numR=\last@page@num%
+ \fi%
+ \fi%
+}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\lineation*}
% \changes{v1.8.2}{2014/08/15}{Add \protect\cs{lineation*}}
% \protect\cs{lineation*} change the lineation system for both sides.
@@ -1903,6 +1932,15 @@
% \end{macro}
% \end{macro}
% \subsection{Print marginal line number}
+% \begin{macro}{\iflinenumberLevenifblank}
+% \begin{macro}{\iflinenumberRevenifblank}
+% \cs{iflinenumberLevenifblank} and \cs{iflinenumberRevenifblank} can be switchen to TRUE if we want to print the line number even if the line is blank.
+% \begin{macrocode}
+\newif\iflinenumberLevenifblank
+\newif\iflinenumberRevenifblank
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\leftlinenumR}
% \begin{macro}{\rightlinenumR}
% \begin{macro}{\l@dlinenumR}
@@ -3363,7 +3401,19 @@
\global\advance\@donereallinesL\@ne%
\global\advance\@donetotallinesL\@ne%
\else%
- \setbox\l@dleftbox \hb@xt@ \Lcolwidth{\hspace*{\Lcolwidth}}%
+ \iflinenumberLevenifblank
+ \new@lineL%
+ \l@demptyd@ta%
+ \getline@numL%
+ \affixline@num%
+ \setbox\l@dleftbox \hb@xt@ \Lcolwidth{%
+ \l@dld@ta %space kept for backward compatibility
+ \hspace*{\Lcolwidth}%
+ \ledrlfill\l@drd@ta%
+ }%
+ \else%
+ \setbox\l@dleftbox \hb@xt@ \Lcolwidth{\hspace*{\Lcolwidth}}%
+ \fi%
\global\advance\@donetotallinesL\@ne%
\fi%
}%
@@ -3471,6 +3521,8 @@
% \changes{v1.8.1}{2014/08/07}{Fix a bug with critical notes a the begining of a page, added by v1.8.0 (?).}
% \begin{macrocode}
\newcommand*{\do@lineR}{%
+ \let\linenumrepL\linenumrep%
+ \let\sublinenumrepL\sublinenumrep%
\let\linenumrep\linenumrepR%
\let\sublinenumrep\sublinenumrepR%
\letcs{\ifnumberpstart}{numberpstart@R\the\l@dpscR}%
@@ -3508,10 +3560,24 @@
\global\advance\@donereallinesR\@ne%
\global\advance\@donetotallinesR\@ne%
\else%
- \setbox\l@drightbox \hb@xt@ \Rcolwidth{\hspace*{\Rcolwidth}}%
+ \iflinenumberRevenifblank%
+ \new@lineR
+ \l@demptyd@ta%
+ \getline@numR%
+ \setbox\l@drightbox \hb@xt@ \Rcolwidth{%
+ \affixline@numR%
+ \l@dld@ta %space kept for backward compatibility
+ \hspace*{\Rcolwidth}%
+ \ledrlfill\l@drd@ta%
+ }%
+ \else%
+ \setbox\l@drightbox \hb@xt@ \Rcolwidth{\hspace*{\Rcolwidth}}%
+ \fi%
\global\advance\@donetotallinesR\@ne%
\fi%
\ledRcol@false%
+ \let\linenumrep\linenumrepL%
+ \let\sublinenumrep\sublinenumrepL%
}
@@ -6304,7 +6370,7 @@
% \begin{macro}{\par@patch@pagenumbering}
% \cs{par@patch@thepage} patches \cs{thepage} in order to use the value of \verb+par@page+ counter and not the value of \verb+par@page+.
% It must be called after any redefinition of \cs{thepage}.
-% That why we insert it at the end of the \LaTeX macro \cs{pagenumbering}, which is called by some \cs{xxxmatter} commands.
+% That why we insert it at the end of the \LaTeX\ macro \cs{pagenumbering}, which is called by some \cs{xxxmatter} commands.
% In the case of \ltxclass{memoir} class using, we insert it at the end of \cs{@mempnum}.
% When using \cs{pagenumbering}, we also need to restart \verb+par@page+ counter. Consequently, we have wrapped \cs{par@patch@thepage} and counter restart in \cs{par@patch@pagenumbering}
% We also call \cs{par@patch@thepage} it at the beginning of the document.