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.dtx269
1 files changed, 218 insertions, 51 deletions
diff --git a/Master/texmf-dist/source/latex/ledmac/ledpar.dtx b/Master/texmf-dist/source/latex/ledmac/ledpar.dtx
index 4e02ab0fb9f..bae3e9fb942 100644
--- a/Master/texmf-dist/source/latex/ledmac/ledpar.dtx
+++ b/Master/texmf-dist/source/latex/ledmac/ledpar.dtx
@@ -3,7 +3,7 @@
% ledpar.dtx
% Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
% Maintainer:Maïeul Rouquette maieul at maieul dot net
-% Copyright 2004, 2005 Peter R. Wilson
+% Copyright 2004, 2005 Peter R. Wilson / 2011-.. Maïeul Rouquette
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -50,7 +50,7 @@
%
% \fi
%
-% \CheckSum{4564}
+% \CheckSum{4813}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -132,6 +132,7 @@
% \def\fileversion{v0.9.2}\def\filedate{2011/11/08}
% \def\fileversion{v0.9.3}\def\filedate{2011/11/18}
% \def\fileversion{v0.10}\def\filedate{2012/04/04}
+% \def\fileversion{v0.11}\def\filedate{2012/06/11}
% \changes{v0.1}{2004/12/10}{First public release}
% \changes{v0.2}{2005/01/01}{Fix babel problems}
% \changes{v0.3}{2005/03/24}{Reorganize for ledarab}
@@ -146,9 +147,9 @@
% \changes{v0.9}{2011/10/01}{Possibilty to number the pstart with the commands \cs{numberpstarttrue}.}
% \changes{v0.9.1}{2011/10/02}{The numbering of the pstarts restarts on each \cs{beginnumbering}.}
% \changes{v0.9.2}{2011/11/08}{Debug : with \cs{Columns}, the hanging indentation now runs on the left columns and the hanging symbol is shown only when \cs{stanza} is used.}
-% \changes{v0.9.3}{2011/11/18}{\cs{thepstartL} and \cs{thepstartR} use now \cs{bfseries} and not \cs{bf}, which is deprecated and make conflicts with memoir class.}
-% \changes{v0.10}{2011/04/04}{\cs{edlabel} which start a paragraph are now put in the right place.}
-% \changes{v0.10}{2011/04/04}{\cs{edlabel} on the right side are now correctly indicated.}
+% \changes{v0.9.3}{2011/11/18}{\cs{thepstartL} and \cs{thepstartR} use now \cs{bfseries} and not \cs{bf}, which is deprecated and makes conflicts with memoir class.}
+% \changes{v0.10}{2011/04/04}{\cs{edlabel} commands which start a paragraph are now put in the right place.}
+% \changes{v0.10}{2011/04/04}{\cs{edlabel} commands on the right side are now correctly indicated.}
% \hyphenation{man-u-script man-u-scripts}
%
% \newcommand{\Lpack}[1]{\textsf{#1}}
@@ -358,6 +359,7 @@
% is invisible. For a visible rule between the columns you could try: \\
% \verb?\setlength{\columnrulewidth}{0.4pt}? \\
% You can also modify \cs{columnseparator} if you want more control.
+% When you use \cs{stanza}, the visible rule may shift when a verse has a hanging indent. To prevent shifting, use \cs{setstanzaindents} outside the \verb|Leftside| or \verb|Rightside| environment.
%
%
% \section{Facing pages}\label{pages}
@@ -704,7 +706,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ledpar}[2012/04/04 v0.10 ledmac extension for parallel texts]
+\ProvidesPackage{ledpar}[2012/06/11 v0.11 ledmac extension for parallel texts]
% \end{macrocode}
% With the option `shiftedverses' a long verse one the left side (or in the right side) don't make a blank on the corresponding verse, but the blank is put on the bottom of the page. Consequently, the verses on the parallel pages are shifted, but the shifted stop at every end of pages.
@@ -962,49 +964,66 @@
% \label{lineation}\relax
%
% \subsection{Choosing the system of lineation}
-%
+%% \changes{v0.11}{2012/06/11}{Lineation can be by pstart (like in ledmac 0.15).}
% Sometimes you want line numbers that start at $1$ at the top of each
-% page; other times you want line numbers that start at $1$ at the start
+% page; sometimes you want line numbers that start at $1$ at each \cs{pstart}; other times you want line numbers that start at $1$ at the start
% of each section and increase regardless of page breaks.
% \Ledpar{} lets you choose different schemes for the left and right texts.
%
+% \begin{macro}{\ifbypstart@R}
+% \begin{macro}{\bypstart@Rtrue}
+% \begin{macro}{\bypstart@Rfalse}
% \begin{macro}{\ifbypage@R}
% \begin{macro}{\bypage@Rtrue}
% \begin{macro}{\bypage@Rfalse}
-% The \cs{ifbypage@R} flag specifies the current lineation
-% system for right texts: \verb"false" for line-of-section, \verb"true"
-% for line-of-page.
+% The \cs{ifbypage@R} and \cs{ifbypstart@R} flag specifie the current lineation
+% system: \begin{itemize}
+% \item line-of-page : \verb|bypstart@R = false| and \verb|bypage@R = true|.
+% \item line-of-pstart : \verb|bypstart@R = true| and \verb|bypage@R = false|.
+% \end{itemize}
% \Ledpar{} will use the line-of-section system unless instructed otherwise.
% \begin{macrocode}
\newif\ifbypage@R
+\newif\ifbypstart@R
\bypage@Rfalse
+ \bypstart@Rfalse
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\lineationR}
% \cs{lineationR}\marg{word} is the macro used to select the
% lineation system for right texts.
-% Its argument is a string: either \texttt{page} or \texttt{section}.
+% Its argument is a string: either \texttt{page}, \texttt{pstart} or \texttt{section}.
% \begin{macrocode}
\newcommand*{\lineationR}[1]{{%
- \ifnumberingR
+ \ifnumbering
\led@err@LineationInNumbered
\else
\def\@tempa{#1}\def\@tempb{page}%
\ifx\@tempa\@tempb
\global\bypage@Rtrue
+ \global\bypstart@Rfalse
\else
- \def\@tempb{section}%
+ \def\@tempb{pstart}%
\ifx\@tempa\@tempb
\global\bypage@Rfalse
+ \global\bypstart@Rtrue
\else
- \led@warn@BadLineation
+ \def@tempb{section}
+ \ifx\@tempa\@tempb
+ \global\bypage@Rfalse
+ \global\bypstart@Rfalse
+ \else
+ \led@warn@BadLineation
+ \fi
\fi
\fi
\fi}}
-
% \end{macrocode}
% \end{macro}
%
@@ -2266,13 +2285,15 @@
% them to survive past the end of the paragraph.
%
% We have to have specific left and right \cs{pstart} when parallel processing;
-% among other things because of potential changes in the linewidth.
+% among other things because of potential changes in the linewidth. The \verb|old| counters are used to have the good reset of the pstart counters at the begining of the \cs{Pages} command.
%
% \begin{macrocode}
\newcounter{pstartL}
+\newcounter{pstartLold}
\renewcommand{\thepstartL}{{\bfseries\@arabic\c@pstartL}. }
\newcounter{pstartR}
+\newcounter{pstartRold}
\renewcommand{\thepstartR}{{\bfseries\@arabic\c@pstartR}. }
\newcommand*{\pstartL}{
@@ -2292,9 +2313,10 @@
\fi
% \end{macrocode}
% If this is the first \cs{pstart} in a numbered section, clear any inserts
-% and set \cs{ifpst@rtedL} to FALSE.
+% and set \cs{ifpst@rtedL} to FALSE. Save the pstartL counter.
% \begin{macrocode}
\ifpst@rtedL\else
+ \setcounter{pstartLold}{\value{pstartL}}%
\list@clear{\inserts@list}%
\global\let\next@insert=\empty
\global\pst@rtedLtrue
@@ -2310,7 +2332,7 @@
\led@err@TooManyPstarts
\global\l@dnumpstartsL=\l@dc@maxchunks
\fi
- \global\setnamebox{l@dLcolrawbox\the\l@dnumpstartsL}=\vbox\bgroup\ifautopar\else\ifnumberpstart\thepstartL\fi\fi%
+ \global\setnamebox{l@dLcolrawbox\the\l@dnumpstartsL}=\vbox\bgroup\ifautopar\else\ifnumberpstart\ifsidepstartnum\else\thepstartL\fi\fi\fi%
\hsize=\Lcolwidth
\numberedpar@true}
% \end{macrocode}
@@ -2332,6 +2354,7 @@
\pendR
\fi
\ifpst@rtedR\else
+ \setcounter{pstartRold}{\value{pstartR}}%
\list@clear{\inserts@listR}%
\global\let\next@insertR=\empty
\global\pst@rtedRtrue
@@ -2342,7 +2365,7 @@
\led@err@TooManyPstarts
\global\l@dnumpstartsR=\l@dc@maxchunks
\fi
- \global\setnamebox{l@dRcolrawbox\the\l@dnumpstartsR}=\vbox\bgroup\ifautopar\else\ifnumberpstart\thepstartR\fi\fi%
+ \global\setnamebox{l@dRcolrawbox\the\l@dnumpstartsR}=\vbox\bgroup\ifautopar\else\ifnumberpstart\ifsidepstartnum\else\thepstartR\fi\fi\fi%
\hsize=\Rcolwidth
\numberedpar@true}
% \end{macrocode}
@@ -2461,6 +2484,7 @@
% \end{macro}
%
%
+% \changes{v0.11}{2012/06/11}{Change \cs{do@lineL} and \cs{do@lineR} to allow line numbering by pstart(like in ledmac 0.15).}
% \begin{macro}{\do@lineL}
% The \cs{do@lineL} macro is called to
% do all the processing for a single line of left text.
@@ -2469,7 +2493,6 @@
% some common code}
% \begin{macrocode}
\newcommand*{\do@lineL}{%
-\ifinstanzaL\manageparhangingsymbol\fi
\advance\countLline \@ne
\ifvbox\namebox{l@dLcolrawbox\the\l@dpscL}%
{\vbadness=10000
@@ -2482,14 +2505,16 @@
\getline@numL
\setbox\l@dleftbox
\hb@xt@ \Lcolwidth{%
+ \affixpstart@numL
\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%
+ {\ledllfill\hb@xt@ \wd\one@line{\inserthangingsymbolL\new@line\l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta%
\l@drsn@te
}}%
+ \prevline@num=\line@num%
\add@penaltiesL
\global\advance\@donereallinesL\@ne
\global\advance\@donetotallinesL\@ne
@@ -2520,7 +2545,6 @@
% \changes{v0.3}{2005/02/10}{Changed \cs{do@lineR} similarly to \cs{do@lineL}}
% \begin{macrocode}
\newcommand*{\do@lineR}{%
-\ifinstanzaR\manageparhangingsymbol\fi
\advance\countRline \@ne
\ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}%
{\vbadness=10000
@@ -2533,14 +2557,16 @@
\getline@numR
\setbox\l@drightbox
\hb@xt@ \Rcolwidth{%
+ \affixpstart@numR
\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%
+ {\correcthangingR\ledllfill\hb@xt@ \wd\one@lineR{\inserthangingsymbolR\new@lineR\l@dunhbox@line{\one@lineR}}\ledrlfill\l@drd@ta%
\l@drsn@te
}}%
+ \prevline@numR=\line@numR%
\add@penaltiesR
\global\advance\@donereallinesR\@ne
\global\advance\@donetotallinesR\@ne
@@ -2562,24 +2588,31 @@
% send to the vertical list.
% \begin{macrocode}
\newcommand*{\getline@numR}{%
+\ifnumberline
\global\advance\absline@numR \@ne
+\fi
\do@actionsR
\do@ballastR
+\ifnumberline
\ifsublines@
\ifnum\sub@lockR<\tw@
\global\advance\subline@numR \@ne
\fi
\else
\ifnum\@lockR<\tw@
- \addtocounter{hbox}{10}%
- \global\advance\line@numR \@ne
+ \global\advance\line@numR \@ne
\global\subline@numR \z@
\fi
- \fi}
+ \fi
+\fi
+}
\newcommand*{\getline@numL}{%
- \global\advance\absline@num \@ne
+\ifnumberline
+ \global\advance\absline@num \@ne
+\fi
\do@actions
\do@ballast
+\ifnumberline
\ifsublines@
\ifnum\sub@lock<\tw@
\global\advance\subline@num \@ne
@@ -2587,10 +2620,11 @@
\else
\ifnum\@lock<\tw@
\global\advance\line@num \@ne
- \addtocounter{hbox}{10}%
\global\subline@num \z@
\fi
- \fi}
+ \fi
+\fi
+}
% \end{macrocode}
@@ -2705,6 +2739,7 @@
% \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}
+% \changes{v0.11}{2012/06/11}{Changed \cs{affixline@numR} to allow to disable line numbering (like in ledmac 0.15).}
% \begin{macrocode}
\providecommand*{\l@dcalcnum}[3]{%
@@ -2768,6 +2803,7 @@
\newcommand*{\affixline@numR}{%
+\ifnumberline
\ifl@dskipnumber
\global\l@dskipnumberfalse
\else
@@ -2809,15 +2845,102 @@
\fi
\fi
\f@x@l@cksR
+\fi
\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \subsection{Pstart number printing in side}
+% The printing of the pstart number is like in ledmac, with two differences :
+%\begin{itemize}
+%\item Some commands have versions suffixed by R or L.
+%\item The \cs{affixpstart@num} and \cs{affixpstart@numR} commands are called in the \cs{Pages} command. Consequently, the \verb|pstartL| and \verb|pstartR| counters must be reset at the begining of this command.
+%\end{itemize}
+% \begin{macro}{\affixpstart@numL}
+% \begin{macro}{\affixpstart@numR}
+% \begin{macro}{\leftpstartnumR}
+% \begin{macro}{\rightpstartnumR}
+% \begin{macro}{\leftpstartnumL}
+% \begin{macro}{\rightpstartnumL}
+% \begin{macro}{\ifpstartnumR}
+% \begin{macrocode}
+
+\newcommand*{\affixpstart@numL}{%
+\ifsidepstartnum
+\if@twocolumn
+ \if@firstcolumn
+ \gdef\l@dld@ta{\llap{{\leftpstartnumL}}}%
+ \else
+ \gdef\l@drd@ta{\rlap{{\rightpstartnumL}}}%
+ \fi
+ \else
+ \@l@dtempcntb=\line@margin
+ \ifnum\@l@dtempcntb>\@ne
+ \advance\@l@dtempcntb \page@num
+ \fi
+ \ifodd\@l@dtempcntb
+ \gdef\l@drd@ta{\rlap{{\rightpstartnumL}}}%
+ \else
+ \gdef\l@dld@ta{\llap{{\leftpstartnumL}}}%
+ \fi
+ \fi
+\fi
+}
+\newcommand*{\affixpstart@numR}{%
+\ifsidepstartnum
+\if@twocolumn
+ \if@firstcolumn
+ \gdef\l@dld@ta{\llap{{\leftpstartnumR}}}%
+ \else
+ \gdef\l@drd@ta{\rlap{{\rightpstartnumR}}}%
+ \fi
+ \else
+ \@l@dtempcntb=\line@marginR
+ \ifnum\@l@dtempcntb>\@ne
+ \advance\@l@dtempcntb \page@numR
+ \fi
+ \ifodd\@l@dtempcntb
+ \gdef\l@drd@ta{\rlap{{\rightpstartnumR}}}%
+ \else
+ \gdef\l@dld@ta{\llap{{\leftpstartnumR}}}%
+ \fi
+ \fi
+\fi
+}
+\newcommand*{\leftpstartnumL}{
+\ifpstartnum
+\thepstartL
+\kern\linenumsep\global\pstartnumfalse\fi
+}
+\newcommand*{\rightpstartnumL}{
+\ifpstartnum\kern\linenumsep
+\thepstartL
+\global\pstartnumfalse\fi
+}
+\newif\ifpstartnumR
+\pstartnumRtrue
+\newcommand*{\leftpstartnumR}{
+\ifpstartnumR
+\thepstartR
+\kern\linenumsep\global\pstartnumRfalse\fi
+}
+\newcommand*{\rightpstartnumR}{
+\ifpstartnumR\kern\linenumsep
+\thepstartR
+\global\pstartnumRfalse\fi
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
-%
+% \end{macro}
+% \end{macro}
% \subsection{Add insertions to the vertical list}
%
% \begin{macro}{\inserts@listR}
@@ -3450,19 +3573,32 @@
%
% \section{Verse}
-%
-%
-% The \cmd{\manageparhangingsymbol} command is made to insert the hanging symbol (like in the french typography).
-%\begin{macrocode}
+%\changes{v0.11}{2012/06/11}{New management of hangingsymbol insertion, preventing undesirable insertions.}
+% Like in ledmac, the insertion of hangingsymbol is base on a control of the change of line's numbers. But we need different macros for left and right sides.
+% \begin{macro}{\prevline@numR}
+% \begin{macro}{\inserthangingsymbolL}
+% \begin{macro}{\inserthangingsymbolR}
+% \begin{macrocode}
+\newcount\prevline@numR
+\newcommand{\inserthangingsymbolL}{\ifinstanzaL\ifnum\line@num=\prevline@num\hfill\hangingsymbol\fi\fi}
+\newcommand{\inserthangingsymbolR}{\ifinstanzaR\ifnum\line@numR=\prevline@numR\hfill\hangingsymbol\fi\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%\changes{v0.11}{2012/06/11}{Prevent shift of column separator when a verse is hanged}
+% When a verse is hanged, the column separator is shifted. To prevent it, the \cs{do@lineL} and \cs{do@lineR} commands call \cs{correcthangingL} and \cs{correcthangingR} commands. These commands insert horizontal skip which length is equal to the hang indent.
+% \begin{macro}{\correcthangingL}
+% \begin{macro}{\correcthangingR}
+% \begin{macrocode}
+\newcommand{\correcthangingL}{\ifl@dpaging\else\ifinstanzaL\ifnum\line@num=\prevline@num\hskip \@ifundefined{sza@0@}{0}{\expandafter%
+ \noexpand\csname sza@0@\endcsname}\stanzaindentbase\fi\fi\fi}
-\newcommand{\manageparhangingsymbol}{%
- \setcounter{hbox}{0}%
- \everyhbox{%
- \ifnum \value{hbox}=-2%
- \hangingsymbol%
- \fi%
- \addtocounter{hbox}{-1}}}
-%\end{macrocode}
+\newcommand{\correcthangingR}{\ifl@dpaging\else\ifinstanzaR\ifnum\line@numR=\prevline@numR\hskip \@ifundefined{sza@0@}{0}{\expandafter%
+ \noexpand\csname sza@0@\endcsname}\stanzaindentbase\fi\fi\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% Before we can define the main stanza macros we need to be able to save
% and reset
% the category code for \&. To save the current value we use
@@ -3842,6 +3978,8 @@
%
% \begin{macrocode}
\newcommand*{\Columns}{%
+ \setcounter{pstartL}{\value{pstartLold}}
+ \setcounter{pstartR}{\value{pstartRold}}
\ifnum\l@dnumpstartsL=\l@dnumpstartsR\else
\led@err@BadLeftRightPstarts{\the\l@dnumpstartsL}{\the\l@dnumpstartsR}%
\fi
@@ -3861,7 +3999,9 @@
% two by two (left and right pairs).
% \begin{macrocode}
\check@pstarts
- \loop\if@pstarts
+ \loop\if@pstarts
+ \global\pstartnumtrue
+ \global\pstartnumRtrue
% \end{macrocode}
% Increment \cs{l@dpscL} and \cs{l@dpscR} which here count
% the numbers of left and right chunks.
@@ -3900,11 +4040,20 @@
\repeat}
% \end{macrocode}
% Having completed a pair of chunks, write the number of lines
-% in each chunk to the respective section files.
+% in each chunk to the respective section files. Increment pstart counters and reset line numbering if it's by pstart.
+% \changes{v0.11}{2012/06/11}{Line numbering by pstart.}
% \begin{macrocode}
\@writelinesinparL
\@writelinesinparR
\check@pstarts
+ \ifbypstart@
+ \write\linenum@out{\string\@set[1]}
+ \fi
+ \ifbypstart@R
+ \write\linenum@outR{\string\@set[1]}
+ \fi
+ \addtocounter{pstartL}{1}
+ \addtocounter{pstartR}{1}
\repeat
% \end{macrocode}
% Having output all chunks, make sure all notes have been output,
@@ -4042,6 +4191,8 @@
%
% \begin{macrocode}
\newcommand*{\Pages}{%
+ \setcounter{pstartL}{\value{pstartLold}}
+ \setcounter{pstartR}{\value{pstartRold}}
\typeout{}
\typeout{*************************** PAGES ***************************}
\ifnum\l@dnumpstartsL=\l@dnumpstartsR\else
@@ -4132,6 +4283,7 @@
\l@duselanguage{\theledlanguageL}%
%%% \begingroup
{ \loop\ifl@dsamepage
+
% \end{macrocode}
% Process the next (left) text line, adding it to the page.
% \changes{v0.3}{2005/02/10}{Added \cs{ledstrutL} to \cs{Pages}}
@@ -4139,7 +4291,6 @@
\do@lineL
\advance\numpagelinesL \@ne
\ifshiftedverses
- \addtocounter{hbox}{-1}
\ifdim\ht\l@dleftbox>0pt\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}\fi%
\else
\hb@xt@ \hsize{\ledstrutL\unhbox\l@dleftbox}%
@@ -4148,6 +4299,7 @@
% Perhaps we have to move to the next (left) box. Check if we have got all
% we can onto the page. If not, repeat for the next line.
% \begin{macrocode}
+
\get@nextboxL
\checkpageL
\repeat
@@ -4159,8 +4311,6 @@
% impossibly large number.
% \begin{macrocode}
\ifl@dpagefull
-% \end{macrocode}
-% \begin{macrocode}
\@writelinesonpageL{\the\numpagelinesL}%
\else
\@writelinesonpageL{1000}%
@@ -4180,8 +4330,7 @@
{ \loop\ifl@dsamepage
\do@lineR
\advance\numpagelinesR \@ne
- \ifshiftedverses
- \addtocounter{hbox}{-1}
+ \ifshiftedverses
\ifdim\ht\l@drightbox>0pt\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}\fi%
\else
\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}%
@@ -4490,6 +4639,7 @@
%
% \begin{macro}{\get@nextboxL}
% \begin{macro}{\get@nextboxR}
+% \changes{v0.11}{2012/06/11}{Change \cs{get@nextboxL} and \cs{get@nextboxR} to allow to disable line numbering (like in ledmac 0.15).}
% If the current box is not empty (i.e., still contains some lines)
% nothing is done. Otherwise if and only if a synchronisation point is
% reached the next box is started.
@@ -4521,10 +4671,19 @@
\fi
\ifnum\l@dnumpstartsL>\l@dpscL
% \end{macrocode}
+% \changes{v0.11}{2012/06/11}{Pstart number can be printed in side}
% There are still unprocessed boxes. Recalculate the maximum number of
-% lines needed, and move onto the next box (by incrementing \cs{l@dpscL}).
+% lines needed, and move onto the next box (by incrementing \cs{l@dpscL}). If needed, restart the line numbering. Increment the pstartL counter.
% \begin{macrocode}
\writtenlinesLfalse
+ \ifbypstart@
+ \ifnum\value{pstartL}<\value{pstartLold}
+ \else
+ \setline{0}
+ \fi
+ \fi
+ \addtocounter{pstartL}{1}
+ \global\pstartnumtrue
\l@dcalc@maxoftwo{\the\usenamecount{l@dmaxlinesinpar\the\l@dpscL}}%
{\the\@donetotallinesL}%
{\usenamecount{l@dmaxlinesinpar\the\l@dpscL}}%
@@ -4548,6 +4707,14 @@
\fi
\ifnum\l@dnumpstartsR>\l@dpscR
\writtenlinesRfalse
+ \ifbypstart@R
+ \ifnum\value{pstartR}<\value{pstartRold}
+ \else
+ \write\linenum@outR{\string\@set[0]}
+ \fi
+ \fi
+ \addtocounter{pstartR}{1}
+ \global\pstartnumRtrue
\l@dcalc@maxoftwo{\the\usenamecount{l@dmaxlinesinpar\the\l@dpscR}}%
{\the\@donetotallinesR}%
{\usenamecount{l@dmaxlinesinpar\the\l@dpscR}}%