summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/ledmac/ledpar.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/ledmac/ledpar.dtx')
-rw-r--r--Master/texmf-dist/source/latex/ledmac/ledpar.dtx671
1 files changed, 354 insertions, 317 deletions
diff --git a/Master/texmf-dist/source/latex/ledmac/ledpar.dtx b/Master/texmf-dist/source/latex/ledmac/ledpar.dtx
index 0b12bf384d8..8b03e4eaa6e 100644
--- a/Master/texmf-dist/source/latex/ledmac/ledpar.dtx
+++ b/Master/texmf-dist/source/latex/ledmac/ledpar.dtx
@@ -50,7 +50,7 @@
%
% \fi
%
-% \CheckSum{4247}
+% \CheckSum{4361}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -122,6 +122,9 @@
% \def\fileversion{v0.3a} \def\filedate{2005/03/30}
% \def\fileversion{v0.3b} \def\filedate{2005/04/08}
% \def\fileversion{v0.3c} \def\filedate{2011/06/16}
+% \def\fileversion{v0.4} \def\filedate{2011/08/03}
+% \def\fileversion{v0.5} \def\filedate{2011/08/21}
+% \def\fileversion{v0.6} \def\filedate{2011/08/22}
%
% \changes{v0.1}{2004/12/10}{First public release}
% \changes{v0.2}{2005/01/01}{Fix babel problems}
@@ -129,7 +132,9 @@
% \changes{v0.3a}{2005/03/30}{Minor \cs{linenummargin} fix}
% \changes{v0.3b}{2005/04/08}{Improved parallel page balancing}
% \changes{v0.3c}{2011/06/16}{Compatibilty with Polyglossia}
-
+% \changes{v0.4}{2011/08/03}{No more ledparpatch. All patches are now in the main file.}
+% \changes{v0.5}{2011/08/21}{Corrections about \cs{section} and other titles in numbered sections}
+% \changes{v0.6}{2011/08/22}{Be able to us \cs{chapter} in parallel pages.}
% \hyphenation{man-u-script man-u-scripts}
%
% \newcommand{\Lpack}[1]{\textsf{#1}}
@@ -183,6 +188,8 @@
% editions. The \Ledpar{} package is an extension to \Ledmac{}
% which enables texts and their critical apparatus to be typeset in
% parallel, either in two columns or on pairs of facing pages.
+%
+% Please, for all bug's report, open a ticket on \url{https://github.com/maieul/ledmac/issues/}
% \end{abstract}
%
% \tableofcontents
@@ -679,7 +686,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ledpar}[2011/06/16 v0.3c ledmac extension for parallel texts]
+\ProvidesPackage{ledpar}[2011/08/22 v0.6 ledmac extension for parallel texts]
% \end{macrocode}
%
@@ -831,12 +838,11 @@
\global\advance\section@numR \@ne
\global\absline@numR \z@
\global\line@numR \z@
- \global\subline@numR \z@
- \global\@lock \z@
- \global\sub@lock \z@
+ \global\@lockR \z@
+ \global\sub@lockR \z@
\global\sublines@false
- \global\let\next@page@numR=\relax
- \global\let\sub@change=\relax
+ \global\let\next@page@numR\relax
+ \global\let\sub@change\relax
\message{Section \the\section@numR R }%
\line@list@stuffR{\jobname.\extensionchars\the\section@numR R}%
\l@dend@stuff}
@@ -1295,81 +1301,68 @@
%
% The macros with \verb"action" in their names contain all the code
% that modifies the action-code list.
-%
+% \begin{macro}{\@l@regR}
% \begin{macro}{\@l}
% \cs{@l} does everything related to the start of a
% new line of numbered text. Exactly what it does depends
% on whether right text is being processed.
%
% \begin{macrocode}
-\renewcommand{\@l}[2]{%
- \fix@page{#1}%
- \ifledRcol
- \ifx\l@dchset@num\relax \else
- \advance\absline@numR \@ne
- \set@line@action
- \let\l@dchset@num=\relax
- \advance\absline@numR \m@ne
- \advance\line@numR \m@ne% % do we need this??
- \fi
+\newcommand{\@l@regR}{%
+ \ifx\l@dchset@num\relax \else
\advance\absline@numR \@ne
-% \end{macrocode}
-% Increment the absolute line-number, and perform
-% deferred actions relating to page starts and sub-lines.
-% \begin{macrocode}
- \ifx\next@page@numR\relax \else
- \page@action
- \let\next@page@numR=\relax
- \fi
- \ifx\sub@change\relax \else
- \ifnum\sub@change>\z@
- \sublines@true
- \else
- \sublines@false
- \fi
- \sub@action
- \let\sub@change=\relax
+ \set@line@action
+ \let\l@dchset@num\relax
+ \advance\absline@numR \m@ne
+ \advance\line@numR \m@ne% % do we need this?
+ \fi
+ \advance\absline@numR \@ne
+ \ifx\next@page@numR\relax \else
+ \page@action
+ \let\next@page@numR\relax
+ \fi
+ \ifx\sub@change\relax \else
+ \ifnum\sub@change>\z@
+ \sublines@true
+ \else
+ \sublines@false
\fi
-% \end{macrocode}
-%
-% Fix the lock counters, if necessary. A value of $1$ is advanced to
-% $2$; $3$ advances to $0$; other values are unchanged.
-% \begin{macrocode}
- \ifcase\@lock
- \or
- \@lock \tw@
- \or \or
- \@lock \z@
- \fi
- \ifcase\sub@lock
- \or
- \sub@lock \tw@
- \or \or
- \sub@lock \z@
- \fi
-% \end{macrocode}
-%
-% Now advance the visible line number, unless it's been locked.
-% \begin{macrocode}
+ \sub@action
+ \let\sub@change\relax
+ \fi
+ \ifcase\@lockR
+ \or
+ \@lockR \tw@
+ \or\or
+ \@lockR \z@
+ \fi
+ \ifcase\sub@lockR
+ \or
+ \sub@lockR \tw@
+ \or\or
+ \sub@lockR \z@
+ \fi
\ifsublines@
- \ifnum\sub@lock<\tw@
+ \ifnum\sub@lockR<\tw@
\advance\subline@numR \@ne
\fi
\else
- \ifnum\@lock<\tw@
+ \ifnum\@lockR<\tw@
\advance\line@numR \@ne \subline@numR \z@
\fi
- \fi
+ \fi}
+
+\renewcommand*{\@l}[2]{%
+ \fix@page{#1}%
+ \ifledRcol
+ \@l@regR
\else
-% \end{macrocode}
-% And when we are not in right text
-% \begin{macrocode}
\@l@reg
\fi}
% \end{macrocode}
% \end{macro}
-%
+% \end{macro}
% \begin{macro}{\last@page@numR}
% \begin{macro}{\fix@page}
% We have to adjust \cs{fix@page} to handle parallel texts.
@@ -1564,102 +1557,91 @@
% \end{macro}
%
% \begin{macro}{\do@lockon}
+% \begin{macro}{\do@lockonR}
% \cs{lock@on}
% adds an entry to the action-code list to turn line number
% locking on. The current setting of the sub-lineation flag tells us
% whether this applies to line numbers or sub-line numbers.
% \begin{macrocode}
+\newcount\@lockR
+\newcount\sub@lockR
+
+\newcommand*{\do@lockonR}{%
+ \xright@appenditem{\the\absline@numR}\to\actionlines@listR
+ \ifsublines@
+ \xright@appenditem{-1005}\to\actions@listR
+ \ifnum\sub@lockR=\z@
+ \sub@lockR \@ne
+ \else
+ \ifnum\sub@lockR=\thr@@
+ \sub@lockR \@ne
+ \fi
+ \fi
+ \else
+ \xright@appenditem{-1003}\to\actions@listR
+ \ifnum\@lockR=\z@
+ \@lockR \@ne
+ \else
+ \ifnum\@lockR=\thr@@
+ \@lockR \@ne
+ \fi
+ \fi
+ \fi}
+
\renewcommand*{\do@lockon}{%
\ifx\next\lock@off
- \global\let\lock@off=\skip@lockoff
+ \global\let\lock@off=\skip@lockoff
\else
\ifledRcol
- \xright@appenditem{\the\absline@numR}\to\actionlines@listR
- \ifsublines@
- \xright@appenditem{-1005}\to\actions@listR
- \ifcase\sub@lock
- \sub@lock \@ne
- \else
- \sub@lock \z@
- \fi
- \else
- \xright@appenditem{-1003}\to\actions@listR
- \ifcase\@lock
- \@lock \@ne
- \else
- \@lock \z@
- \fi
- \fi
+ \do@lockonR
\else
- \xright@appenditem{\the\absline@num}\to\actionlines@list
- \ifsublines@
- \xright@appenditem{-1005}\to\actions@list
- \ifcase\sub@lock
- \sub@lock \@ne
- \else
- \sub@lock \z@
- \fi
- \else
- \xright@appenditem{-1003}\to\actions@list
- \ifcase\@lock
- \@lock \@ne
- \else
- \@lock \z@
- \fi
- \fi
- \fi
+ \do@lockonL
+ \fi
\fi}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\lock@off}
% \begin{macro}{\do@lockoff}
+% \begin{macro}{\do@lockoffR}
% \begin{macro}{\skip@lockoff}
% \cs{lock@off} adds an entry to the action-code list
% to turn line number locking off.
% \begin{macrocode}
-\renewcommand*{\do@lockoff}{%
- \ifledRcol
- \xright@appenditem{\the\absline@numR}\to\actionlines@listR
- \ifsublines@
- \xright@appenditem{-1006}\to\actions@listR
- \ifnum\sub@lock=\tw@
- \sub@lock \thr@@
- \else
- \sub@lock \z@
- \fi
+
+
+\newcommand{\do@lockoffR}{%
+ \xright@appenditem{\the\absline@numR}\to\actionlines@listR
+ \ifsublines@
+ \xright@appenditem{-1006}\to\actions@listR
+ \ifnum\sub@lockR=\tw@
+ \sub@lockR \thr@@
\else
- \xright@appenditem{-1004}\to\actions@listR
- \ifnum\@lock=\tw@
- \@lock \thr@@
- \else
- \@lock \z@
- \fi
+ \sub@lockR \z@
\fi
\else
- \xright@appenditem{\the\absline@num}\to\actionlines@list
- \ifsublines@
- \xright@appenditem{-1006}\to\actions@list
- \ifnum\sub@lock=\tw@
- \sub@lock \thr@@
- \else
- \sub@lock \z@
- \fi
+ \xright@appenditem{-1004}\to\actions@listR
+ \ifnum\@lockR=\tw@
+ \@lockR \thr@@
\else
- \xright@appenditem{-1004}\to\actions@list
- \ifnum\@lock=\tw@
- \@lock \thr@@
- \else
- \@lock \z@
- \fi
+ \@lockR \z@
\fi
\fi}
+
+\renewcommand*{\do@lockoff}{%
+ \ifledRcol
+ \do@lockoffR
+ \else
+ \do@lockoffL
+ \fi}
\global\let\lock@off=\do@lockoff
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\n@num}
% This macro implements the \cs{skipnumbering} command. It uses a new
@@ -2087,6 +2069,7 @@
%
% \begin{environment}{pairs}
% \begin{environment}{pages}
+% \begin{macro}{chapterinpages}
% The \verb?pairs? environment is for parallel columns and the \verb?pages?
% environment for parallel pages.
% \begin{macrocode}
@@ -2098,9 +2081,11 @@
}
% \end{macrocode}
% The \verb?pages? environment additionally sets the `column' widths to the
-% \cs{textwidth} (as known at the time the package is called).
+% \cs{textwidth} (as known at the time the package is called). As in this environnement there is two text in parallels in 2 pages, chapter have not to start in a left page. So the \cs{chapter} command is redefined to make no test about clearing page.
% \begin{macrocode}
\newenvironment{pages}{%
+ \let\oldchapter\chapter
+ \let\chapter\chapterinpages
\l@dpairingtrue
\l@dpagingtrue
\setlength{\Lcolwidth}{\textwidth}%
@@ -2108,9 +2093,15 @@
}{%
\l@dpairingfalse
\l@dpagingfalse
+ \let\chapter\oldchapter
}
+\newcommand{\chapterinpages}{\thispagestyle{plain}%
+ \global\@topnum\z@
+ \@afterindentfalse
+ \secdef\@chapter\@schapter}
% \end{macrocode}
+% \end{macro}
% \end{environment}
% \end{environment}
%
@@ -2238,7 +2229,14 @@
% among other things because of potential changes in the linewidth.
%
% \begin{macrocode}
-\newcommand*{\pstartL}{\ifnumbering \else
+\newcommand*{\pstartL}{
+\if@nobreak
+ \let\@oldnobreak\@nobreaktrue
+\else
+ \let\@oldnobreak\@nobreakfalse
+\fi
+ \@nobreaktrue
+ \ifnumbering \else
\led@err@PstartNotNumbered
\beginnumbering
\fi
@@ -2272,7 +2270,14 @@
% \end{macrocode}
%
% \begin{macrocode}
-\newcommand*{\pstartR}{\ifnumberingR \else
+\newcommand*{\pstartR}{
+\if@nobreak
+ \let\@oldnobreak\@nobreaktrue
+\else
+ \let\@oldnobreak\@nobreakfalse
+\fi
+ \@nobreaktrue
+ \ifnumberingR \else
\led@err@PstartNotNumbered
\beginnumberingR
\fi
@@ -2325,7 +2330,8 @@
% End the group that was begun in the \cs{pstart}.
% \begin{macrocode}
\endgroup
- \ignorespaces}
+ \ignorespaces
+ \@oldnobreak}
% \end{macrocode}
% \end{macro}
@@ -2344,7 +2350,8 @@
\endgraf\global\num@linesR=\prevgraf\egroup
\global\par@lineR=0
\endgroup
- \ignorespaces}
+ \ignorespaces
+ \@oldnobreak}
% \end{macrocode}
% \end{macro}
@@ -2410,78 +2417,33 @@
% \begin{macrocode}
\newcommand*{\do@lineL}{%
\advance\countLline \@ne
-% \end{macrocode}
-% If the current \cs{l@dLcolrawbox} box is not empty it contains
-% the remaining unprocessed lines of the chunk, so
-% pull one line off the top.
-% \cs{vbadness} must be cranked up to
-% suppress \verb"Underfull vbox" errors from
-% \cs{vsplit}; \cs{splittopskip} will be inserted at the top of
-% \cs{one@line}, so we zero it. (This skip will appear in the final
-% vertical list, just before every \cs{baselineskip}.)
-% \begin{macrocode}
\ifvbox\namebox{l@dLcolrawbox\the\l@dpscL}%
- {\vbadness=10000 \splittopskip=0pt
-% \end{macrocode}
-% Insert the \cs{do@lineLhook} and
-% null the \cs{...d@ta}, which may later hold line numbers, here.
-% They will get defined within \cs{affixline@num}. Similarly for
-% \cs{l@dcsnotetext} for the text of a sidenote.
-% \begin{macrocode}
- \do@lineLhook
- \l@demptyd@ta
-% \end{macrocode}
-%
-% \begin{macrocode}
- \global\setbox\one@line=\vsplit\namebox{l@dLcolrawbox\the\l@dpscL}
- to\baselineskip}%
-% \end{macrocode}
-%
-% \cs{one@line} comes out of \cs{vsplit} as a \verb"vbox";
-% we now convert it to an \verb"hbox".
-% \begin{macrocode}
- \unvbox\one@line \global\setbox\one@line=\lastbox
-% \end{macrocode}
-%
-% Calculate the line and page number for this line.
-% \begin{macrocode}
- \getline@num
-% \end{macrocode}
-% Now we'll put the line into a box of the apropriate width, with a line
-% number attached if necessary.
-% \begin{macrocode}
- \setbox\l@dleftbox
- \hb@xt@ \Lcolwidth{%
-% \end{macrocode}
-% Add line numbers, inserts, sidenotes, etc.
-% \begin{macrocode}
- \affixline@num
- \l@dld@ta
- \add@inserts
- \affixside@note
-% \end{macrocode}
-% Now stick everything into a set of boxes.
-% \begin{macrocode}
- \l@dlsn@te% left side note
- {\ledllfill\hb@xt@ \wd\one@line{\new@line\unhbox\one@line}\ledrlfill\l@drd@ta
- \l@drsn@te% right side note
+ {\vbadness=10000
+ \splittopskip=\z@
+ \do@lineLhook
+ \l@demptyd@ta
+ \global\setbox\one@line=\vsplit\namebox{l@dLcolrawbox\the\l@dpscL}
+ to\baselineskip}%
+ \unvbox\one@line \global\setbox\one@line=\lastbox
+ \getline@num
+ \setbox\l@dleftbox
+ \hb@xt@ \Lcolwidth{%
+ \affixline@num
+ \l@dld@ta
+ \add@inserts
+ \affixside@note
+ \l@dlsn@te
+ {\ledllfill\hb@xt@ \wd\one@line{\new@line\l@dunhbox@line{\one@line}}\ledrlfill\l@drd@ta%
+ \l@drsn@te
}}%
-% \end{macrocode}
-% Penalties get stripped off by this slicing process; the following
-% macro puts them back in as the last stepandthen we increment the
-% number of `real' (text),and total lines done.
-% \begin{macrocode}
- \add@penaltiesL
- \global\advance\@donereallinesL\@ne
- \global\advance\@donetotallinesL\@ne
-% \end{macrocode}
-% Otherwise, the curent \cs{l@dLcolrawbox} has been emptied, so just
-% generate an empty box and increment the total lines.
-% \begin{macrocode}
- \else
- \setbox\l@dleftbox \hb@xt@ \Lcolwidth{\hspace*{\Lcolwidth}}%
- \global\advance\@donetotallinesL\@ne
- \fi}
+ \add@penaltiesL
+ \global\advance\@donereallinesL\@ne
+ \global\advance\@donetotallinesL\@ne
+\else
+ \setbox\l@dleftbox \hb@xt@ \Lcolwidth{\hspace*{\Lcolwidth}}%
+ \global\advance\@donetotallinesL\@ne
+\fi}
+
% \end{macrocode}
% \end{macro}
@@ -2506,30 +2468,32 @@
\newcommand*{\do@lineR}{%
\advance\countRline \@ne
\ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}%
- {\vbadness=10000 \splittopskip=0pt
- \do@lineRhook
- \l@demptyd@ta
- \global\setbox\one@lineR=\vsplit\namebox{l@dRcolrawbox\the\l@dpscR}
- to\baselineskip}%
- \unvbox\one@lineR \global\setbox\one@lineR=\lastbox
- \getline@numR
- \setbox\l@drightbox
- \hb@xt@ \Rcolwidth{%
- \affixline@numR
- \l@dld@ta
- \add@insertsR
- \affixside@noteR
- \l@dlsn@te% left side note
- {\ledllfill\hb@xt@ \wd\one@lineR{\new@lineR\unhbox\one@lineR}\ledrlfill\l@drd@ta
- \l@drsn@te% right side note
+ {\vbadness=10000
+ \splittopskip=\z@
+ \do@lineRhook
+ \l@demptyd@ta
+ \global\setbox\one@lineR=\vsplit\namebox{l@dRcolrawbox\the\l@dpscR}
+ to\baselineskip}%
+ \unvbox\one@lineR \global\setbox\one@lineR=\lastbox
+ \getline@numR
+ \setbox\l@drightbox
+ \hb@xt@ \Rcolwidth{%
+ \affixline@numR
+ \l@dld@ta
+ \add@insertsR
+ \affixside@noteR
+ \l@dlsn@te
+ {\ledllfill\hb@xt@ \wd\one@lineR{\new@lineR\l@dunhbox@line{\one@lineR}}\ledrlfill\l@drd@ta%
+ \l@drsn@te
}}%
- \add@penaltiesR
- \global\advance\@donereallinesR \@ne
- \global\advance\@donetotallinesR \@ne
- \else
- \setbox\l@drightbox \hb@xt@ \Rcolwidth{\hspace*{\Rcolwidth}}
- \global\advance\@donetotallinesR \@ne
- \fi}
+ \add@penaltiesR
+ \global\advance\@donereallinesR\@ne
+ \global\advance\@donetotallinesR\@ne
+\else
+ \setbox\l@drightbox \hb@xt@ \Rcolwidth{\hspace*{\Rcolwidth}}
+ \global\advance\@donetotallinesR\@ne
+\fi}
+
% \end{macrocode}
% \end{macro}
@@ -2547,16 +2511,17 @@
\do@actionsR
\do@ballastR
\ifsublines@
- \ifnum\sub@lock<\tw@
- \global\advance\subline@numR \@ne
- \fi
+ \ifnum\sub@lockR<\tw@
+ \global\advance\subline@numR \@ne
+ \fi
\else
- \ifnum\@lock<\tw@
- \global\advance\line@numR \@ne
- \global\subline@numR=\z@
- \fi
+ \ifnum\@lockR<\tw@
+ \global\advance\line@numR \@ne
+ \global\subline@numR \z@
+ \fi
\fi}
+
% \end{macrocode}
% \end{macro}
%
@@ -2580,6 +2545,7 @@
%
%
% \begin{macro}{\do@actionsR}
+% \begin{macro}{\do@actions@fixedcodeR}
% \begin{macro}{\do@actions@nextR}
%
% The \cs{do@actionsR} macro
@@ -2590,36 +2556,65 @@
% \cs{do@actions@nextR} for this.
% \changes{v0.3}{2005/02/24}{Used \cs{do@actions@fixedcode} in \cs{do@actionsR}}
% \begin{macrocode}
+\newcommand*{\do@actions@fixedcodeR}{%
+ \ifcase\@l@dtempcnta%
+ \or% % 1001
+ \global\sublines@true
+ \or% % 1002
+ \global\sublines@false
+ \or% % 1003
+ \global\@lockR=\@ne
+ \or% % 1004
+ \ifnum\@lockR=\tw@
+ \global\@lockR=\thr@@
+ \else
+ \global\@lockR=\z@
+ \fi
+ \or% % 1005
+ \global\sub@lockR=\@ne
+ \or% % 1006
+ \ifnum\sub@lockR=\tw@
+ \global\sub@lockR=\thr@@
+ \else
+ \global\sub@lockR=\z@
+ \fi
+ \or% % 1007
+ \l@dskipnumbertrue
+ \else
+ \led@warn@BadAction
+ \fi}
+
+
\newcommand*{\do@actionsR}{%
\global\let\do@actions@nextR=\relax
\@l@dtempcntb=\absline@numR
\ifnum\@l@dtempcntb<\next@actionlineR\else
- \ifnum\next@actionR>-1001
- \global\page@numR=\next@actionR
- \ifbypage@R
- \global\line@numR=\z@ \global\subline@numR=\z@
- \fi
+ \ifnum\next@actionR>-1001\relax
+ \global\page@numR=\next@actionR
+ \ifbypage@R
+ \global\line@numR \z@ \global\subline@numR \z@
+ \fi
\else
- \ifnum\next@actionR<-4999
- \@l@dtempcnta=-\next@actionR
- \advance\@l@dtempcnta by -5001
- \ifsublines@
- \global\subline@numR=\@l@dtempcnta
- \else
- \global\line@numR=\@l@dtempcnta
- \fi
- \else
- \@l@dtempcnta=-\next@actionR
- \advance\@l@dtempcnta by -1000
- \do@actions@fixedcode
- \fi
+ \ifnum\next@actionR<-4999\relax % 9/05 added relax here
+ \@l@dtempcnta=-\next@actionR
+ \advance\@l@dtempcnta by -5001\relax
+ \ifsublines@
+ \global\subline@numR=\@l@dtempcnta
+ \else
+ \global\line@numR=\@l@dtempcnta
+ \fi
+ \else
+ \@l@dtempcnta=-\next@actionR
+ \advance\@l@dtempcnta by -1000\relax
+ \do@actions@fixedcodeR
+ \fi
\fi
\ifx\actionlines@listR\empty
- \gdef\next@actionlineR{1000000}%
+ \gdef\next@actionlineR{1000000}%
\else
- \gl@p\actionlines@listR\to\next@actionlineR
- \gl@p\actions@listR\to\next@actionR
- \global\let\do@actions@nextR=\do@actionsR
+ \gl@p\actionlines@listR\to\next@actionlineR
+ \gl@p\actions@listR\to\next@actionR
+ \global\let\do@actions@nextR=\do@actionsR
\fi
\fi
\do@actions@nextR}
@@ -2627,79 +2622,130 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{Line number printing}
%
-%
+% \begin{macro}{\l@dcalcnum}
+% \begin{macro}{\ch@cksub@l@ckR}
+% \begin{macro}{\ch@ck@l@ckR}
+% \begin{macro}{\f@x@l@cksR}
% \begin{macro}{\affixline@numR}
% \cs{affixline@numR} is the right text version of the
% \cs{affixline@num} macro.
% \changes{v0.3}{2005/02/24}{Changed \cs{affixline@numR} to match new ledmac}
% \begin{macrocode}
+
+\providecommand*{\l@dcalcnum}[3]{%
+ \ifnum #1 > #2\relax
+ \@l@dtempcnta = #1\relax
+ \advance\@l@dtempcnta by -#2\relax
+ \divide\@l@dtempcnta by #3\relax
+ \multiply\@l@dtempcnta by #3\relax
+ \advance\@l@dtempcnta by #2\relax
+ \else
+ \@l@dtempcnta=#2\relax
+ \fi}
+
+\newcommand*{\ch@cksub@l@ckR}{%
+ \ifcase\sub@lockR
+ \or
+ \ifnum\sublock@disp=\@ne
+ \@l@dtempcntb \z@ \@l@dtempcnta \@ne
+ \fi
+ \or
+ \ifnum\sublock@disp=\tw@
+ \else
+ \@l@dtempcntb \z@ \@l@dtempcnta \@ne
+ \fi
+ \or
+ \ifnum\sublock@disp=\z@
+ \@l@dtempcntb \z@ \@l@dtempcnta \@ne
+ \fi
+ \fi}
+
+\newcommand*{\ch@ck@l@ckR}{%
+ \ifcase\@lockR
+ \or
+ \ifnum\lock@disp=\@ne
+ \@l@dtempcntb \z@ \@l@dtempcnta \@ne
+ \fi
+ \or
+ \ifnum\lock@disp=\tw@
+ \else
+ \@l@dtempcntb \z@ \@l@dtempcnta \@ne
+ \fi
+ \or
+ \ifnum\lock@disp=\z@
+ \@l@dtempcntb \z@ \@l@dtempcnta \@ne
+ \fi
+ \fi}
+
+\newcommand*{\f@x@l@cksR}{%
+ \ifcase\@lockR
+ \or
+ \global\@lockR \tw@
+ \or \or
+ \global\@lockR \z@
+ \fi
+ \ifcase\sub@lockR
+ \or
+ \global\sub@lockR \tw@
+ \or \or
+ \global\sub@lockR \z@
+ \fi}
+
+
\newcommand*{\affixline@numR}{%
\ifl@dskipnumber
\global\l@dskipnumberfalse
\else
\ifsublines@
\@l@dtempcntb=\subline@numR
- \ifnum\subline@numR>\c@firstsublinenumR
- \@l@dtempcnta=\subline@numR
- \advance\@l@dtempcnta by-\c@firstsublinenumR
- \divide\@l@dtempcnta by\c@sublinenumincrementR
- \multiply\@l@dtempcnta by\c@sublinenumincrementR
- \advance\@l@dtempcnta by\c@firstsublinenumR
- \else
- \@l@dtempcnta=\c@firstsublinenumR
- \fi
- \ch@cksub@l@ck
+ \l@dcalcnum{\subline@numR}{\c@firstsublinenumR}{\c@sublinenumincrementR}%
+ \ch@cksub@lockR
\else
\@l@dtempcntb=\line@numR
\ifx\linenumberlist\empty
- \ifnum\line@numR>\c@firstlinenumR
- \@l@dtempcnta=\line@numR
- \advance\@l@dtempcnta by-\c@firstlinenumR
- \divide\@l@dtempcnta by\c@linenumincrementR
- \multiply\@l@dtempcnta by\c@linenumincrementR
- \advance\@l@dtempcnta by\c@firstlinenumR
- \else
- \@l@dtempcnta=\c@firstlinenumR
- \fi
+ \l@dcalcnum{\line@numR}{\c@firstlinenumR}{\c@linenumincrementR}%
\else
\@l@dtempcnta=\line@numR
\edef\rem@inder{,\linenumberlist,\number\line@numR,}%
\edef\sc@n@list{\def\noexpand\sc@n@list
####1,\number\@l@dtempcnta,####2|{\def\noexpand\rem@inder{####2}}}%
- \sc@n@list\expandafter\sc@n@list\rem@inder|%
- \ifx\rem@inder\empty\advance\@l@dtempcnta\@ne\fi
- \fi
- \ch@ck@l@ck
+ \sc@n@list\expandafter\sc@n@list\rem@inder|%
+ \ifx\rem@inder\empty\advance\@l@dtempcnta\@ne\fi
+ \fi
+ \ch@ck@l@ckR
\fi
\ifnum\@l@dtempcnta=\@l@dtempcntb
- \if@twocolumn
- \if@firstcolumn
- \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
- \else
- \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
- \fi
- \else
- \@l@dtempcntb=\line@marginR
- \ifnum\@l@dtempcntb>\@ne
- \advance\@l@dtempcntb by\page@numR
- \fi
- \ifodd\@l@dtempcntb
- \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
+ \if@twocolumn
+ \if@firstcolumn
+ \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
+ \else
+ \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
+ \fi
\else
- \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
+ \@l@dtempcntb=\line@marginR
+ \ifnum\@l@dtempcntb>\@ne
+ \advance\@l@dtempcntb by\page@numR
+ \fi
+ \ifodd\@l@dtempcntb
+ \gdef\l@drd@ta{\rlap{{\rightlinenumR}}}%
+ \else
+ \gdef\l@dld@ta{\llap{{\leftlinenumR}}}%
+ \fi
\fi
- \fi
- \else
-%% #1%
\fi
- \f@x@l@cks
+ \f@x@l@cksR
\fi}
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsection{Add insertions to the vertical list}
%
@@ -3197,11 +3243,11 @@
\renewcommand*{\l@dlsnote}[1]{%
\ifnumberedpar@
\ifledRcol
- \xright@appenditem{\noexpand\vl@dlsnote{{\l@d@nums}{\@tag}{#1}}}%
+ \xright@appenditem{\noexpand\vl@dlsnote{#1}}%
\to\inserts@listR
\global\advance\insert@countR \@ne
\else
- \xright@appenditem{\noexpand\vl@dlsnote{{\l@d@nums}{\@tag}{#1}}}%
+ \xright@appenditem{\noexpand\vl@dlsnote{#1}}%
\to\inserts@list
\global\advance\insert@count \@ne
\fi
@@ -3209,11 +3255,11 @@
\renewcommand*{\l@drsnote}[1]{%
\ifnumberedpar@
\ifledRcol
- \xright@appenditem{\noexpand\vl@drsnote{{\l@d@nums}{\@tag}{#1}}}%
+ \xright@appenditem{\noexpand\vl@drsnote{#1}}%
\to\inserts@listR
\global\advance\insert@countR \@ne
\else
- \xright@appenditem{\noexpand\vl@drsnote{{\l@d@nums}{\@tag}{#1}}}%
+ \xright@appenditem{\noexpand\vl@drsnote{#1}}%
\to\inserts@list
\global\advance\insert@count \@ne
\fi
@@ -3221,11 +3267,11 @@
\renewcommand*{\l@dcsnote}[1]{%
\ifnumberedpar@
\ifledRcol
- \xright@appenditem{\noexpand\vl@dcsnote{{\l@d@nums}{\@tag}{#1}}}%
+ \xright@appenditem{\noexpand\vl@dcsnote{#1}}%
\to\inserts@listR
\global\advance\insert@countR \@ne
\else
- \xright@appenditem{\noexpand\vl@dcsnote{{\l@d@nums}{\@tag}{#1}}}%
+ \xright@appenditem{\noexpand\vl@dcsnote{#1}}%
\to\inserts@list
\global\advance\insert@count \@ne
\fi
@@ -3244,23 +3290,19 @@
\ifx\@templ@d\l@dcsnotetext \else
\if@twocolumn
\if@firstcolumn
- \setl@dlp@rbox{}{}{\l@dcsnotetext}%
+ \setl@dlp@rbox{\l@dcsnotetext}%
\else
- \setl@drp@rbox{}{}{\l@dcsnotetext}%
+ \setl@drp@rbox{\l@dcsnotetext}%
\fi
\else
\@l@dtempcntb=\sidenote@marginR
\ifnum\@l@dtempcntb>\@ne
- \ifl@dpaging
- \advance\@l@dtempcntb by\@ne
- \else
- \advance\@l@dtempcntb by\page@num
- \fi
+ \advance\@l@dtempcntb by\page@num
\fi
\ifodd\@l@dtempcntb
- \setl@drp@rbox{}{}{\l@dcsnotetext}%
+ \setl@drp@rbox{\l@dcsnotetext}%
\else
- \setl@dlp@rbox{}{}{\l@dcsnotetext}%
+ \setl@dlp@rbox{\l@dcsnotetext}%
\fi
\fi
\fi}
@@ -4393,14 +4435,9 @@
%
% \section{The End}\label{end}
%
-% This is the end of the package code. But before we finish, enable
-% a patch file (if there is one) to be read.
-%
-% \begin{macrocode}
-\InputIfFileExists{ledparpatch.sty}
+
%</code>
-% \end{macrocode}
%
% \newpage
% \appendix