summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ledmac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-07-12 21:41:28 +0000
committerKarl Berry <karl@freefriends.org>2012-07-12 21:41:28 +0000
commite3c6e657f396096f4406658bd2917dd46b7aa9f5 (patch)
tree0b1e7fa2fd386946837ebb17bc3a2f1e5eda3940 /Master/texmf-dist/tex/latex/ledmac
parent9f5608ba2efae21382aa973dc6095686c97b6c0e (diff)
ledmac (21jun12)
git-svn-id: svn://tug.org/texlive/trunk@27016 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ledmac')
-rw-r--r--Master/texmf-dist/tex/latex/ledmac/ledmac.sty151
-rw-r--r--Master/texmf-dist/tex/latex/ledmac/ledpar.sty171
2 files changed, 254 insertions, 68 deletions
diff --git a/Master/texmf-dist/tex/latex/ledmac/ledmac.sty b/Master/texmf-dist/tex/latex/ledmac/ledmac.sty
index 3a9c19cc5fb..a303b951ab0 100644
--- a/Master/texmf-dist/tex/latex/ledmac/ledmac.sty
+++ b/Master/texmf-dist/tex/latex/ledmac/ledmac.sty
@@ -23,7 +23,7 @@
%% This work consists of the files listed in the README file.
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ledmac}[2012/04/04 v0.14 LaTeX port of EDMAC]
+\ProvidesPackage{ledmac}[2012/06/21 v0.16 LaTeX port of EDMAC]
\newif\ifledfinal
\DeclareOption{final}{\ledfinaltrue}
@@ -145,6 +145,7 @@
\line@list@stuff{\jobname.\extensionchars\the\section@num}%
\l@dend@stuff
\setcounter{pstart}{1}
+ \firstpstarttrue
}
\newcommand*{\initnumbering@reg}{%
\global\pst@rtedLfalse
@@ -195,6 +196,7 @@
\fi}
\newif\ifbypage@
+\newif\ifbypstart@
\newcommand*{\lineation}[1]{{%
\ifnumbering
\led@err@LineationInNumbered
@@ -202,16 +204,23 @@
\def\@tempa{#1}\def\@tempb{page}%
\ifx\@tempa\@tempb
\global\bypage@true
+ \global\bypstart@false
\else
- \def\@tempb{section}%
+ \def\@tempb{pstart}%
\ifx\@tempa\@tempb
\global\bypage@false
+ \global\bypstart@true
\else
- \led@warn@BadLineation
+ \def@tempb{section}
+ \ifx\@tempa\@tempb
+ \global\bypage@false
+ \global\bypstart@false
+ \else
+ \led@warn@BadLineation
+ \fi
\fi
\fi
\fi}}
-
\newcount\line@margin
\newcommand*{\linenummargin}[1]{{%
\l@dgetline@margin{#1}%
@@ -697,6 +706,8 @@
\fi
\flag@end}
+\newif\ifnumberline
+\numberlinetrue
\newcommand*{\set@line}{%
\ifx\line@list\empty
\global\noteschanged@true
@@ -736,9 +747,16 @@
\newcounter{pstart}
\renewcommand{\thepstart}{{\bfseries\@arabic\c@pstart}. }
\newif\ifnumberpstart
+\newif\iffirstpstart
+\firstpstarttrue
\numberpstartfalse
\newcommand*{\pstart}{
-\managehangingsymbol
+\ifbypstart@\iffirstpstart
+ \firstpstartfalse
+ \else
+ \setline{0}
+ \fi
+\fi
\if@nobreak
\let\@oldnobreak\@nobreaktrue
\else
@@ -756,7 +774,7 @@
\list@clear{\inserts@list}%
\global\let\next@insert=\empty
\begingroup\normal@pars
- \global\setbox\raw@text=\vbox\bgroup\ifautopar\else\ifnumberpstart\ifinstanza\else\thepstart\fi\fi\fi
+ \global\setbox\raw@text=\vbox\bgroup\ifautopar\else\ifnumberpstart\ifinstanza\else\ifsidepstartnum\else\thepstart\fi\fi\fi\fi
\numberedpar@true}
\newcommand*{\pend}{\ifnumbering \else
\led@err@PendNotNumbered
@@ -764,9 +782,6 @@
\ifnumberedpar@ \else
\led@err@PendNoPstart
\fi
-\ifnumberpstart
-\addtocounter{pstart}{1}
-\fi
\l@dzeropenalties
\endgraf\global\num@lines=\prevgraf\egroup
\global\par@line=0
@@ -776,6 +791,10 @@
\flush@notes
\endgroup
\ignorespaces
+ \ifnumberpstart
+\addtocounter{pstart}{1}
+\pstartnumtrue
+\fi
\@oldnobreak}
\newcommand*{\l@dzeropenalties}{%
@@ -815,11 +834,13 @@
\unvbox\one@line \global\setbox\one@line=\lastbox
\getline@num
\affixline@num
- \hb@xt@ \linewidth{\l@dld@ta\add@inserts\affixside@note
+ \affixpstart@num
+ \hb@xt@ \linewidth{\inserthangingsymbol\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
- }}
+ }}%
+ \prevline@num=\line@num%
\add@penalties}
\newcommand*{\do@linehook}{}
@@ -837,9 +858,12 @@
\newcommand*{\ledrlfill}{}
\newcommand*{\getline@num}{%
- \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
@@ -849,8 +873,9 @@
\global\advance\line@num \@ne
\global\subline@num \z@
\fi
- \fi}
-
+ \fi
+ \fi
+ }
\newcount\ballast@count
\newcounter{ballast}
\setcounter{ballast}{0}
@@ -925,6 +950,7 @@
\fi}
\newcommand*{\affixline@num}{%
+\ifnumberline
\ifl@dskipnumber
\global\l@dskipnumberfalse
\else
@@ -984,7 +1010,9 @@
%% #1%
\fi
\f@x@l@cks
-\fi}
+\fi
+\fi
+}
\newcommand*{\ch@cksub@l@ck}{%
\ifcase\sub@lock
@@ -1032,6 +1060,45 @@
\newcommand{\pageparbreak}{\pend\newpage\pstart\noindent}
+
+\newif\ifsidepstartnum
+\newcommand*{\affixpstart@num}{%
+ \ifsidepstartnum
+ \if@twocolumn
+ \if@firstcolumn
+ \gdef\l@dld@ta{\llap{{\leftpstartnum}}}%
+ \else
+ \gdef\l@drd@ta{\rlap{{\rightpstartnum}}}%
+ \fi
+ \else
+ \@l@dtempcntb=\line@margin
+ \ifnum\@l@dtempcntb>\@ne
+ \advance\@l@dtempcntb \page@num
+ \fi
+ \ifodd\@l@dtempcntb
+ \gdef\l@drd@ta{\rlap{{\rightpstartnum}}}%
+ \else
+ \gdef\l@dld@ta{\llap{{\leftpstartnum}}}%
+ \fi
+ \fi
+ \fi
+
+}
+
+\newif\ifpstartnum
+\pstartnumtrue
+\newcommand*{\leftpstartnum}{
+ \ifpstartnum\thepstart
+ \kern\linenumsep\fi
+ \global\pstartnumfalse
+}
+\newcommand*{\rightpstartnum}{
+ \ifpstartnum
+ \kern\linenumsep
+ \thepstart
+ \fi
+ \global\pstartnumfalse
+}
\list@create{\inserts@list}
\newcommand*{\add@inserts}{%
\global\let\add@inserts@next=\relax
@@ -1274,6 +1341,17 @@
\fi
\fi}
\def\printlines#1|#2|#3|#4|#5|#6|#7|{\begingroup
+ \ifbypstart@%
+ \ifl@dpairing%
+ \ifledRcol%
+ \thepstartR%
+ \else%
+ \thepstartL%
+ \fi%
+ \else%
+ \thepstart%
+ \fi%
+ \fi%
\setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%
\ifl@d@pnum #1\fullstop\fi
\ifledplinenum \linenumrep{#2}\else \symplinenum\fi
@@ -1393,6 +1471,7 @@
\interparanoteglue{1em plus.4em minus.4em}
\newcommand*{\parafootfmt}[3]{%
+ \insertparafootftmsep%
\ledsetnormalparstuff
{\notenumfont\printlines#1|}\enspace
{\select@lemmafont#1|#2}\rbracket\enskip
@@ -1425,6 +1504,14 @@
\newcommand*{\removehboxes}{\setbox0=\lastbox
\ifhbox0{\removehboxes}\unhbox0 \fi}
+\newcommand{\parafootftmsep}{}
+\newcount\prevpage@num
+\newcommand{\insertparafootftmsep}{%
+ \ifnum\prevpage@num=\page@num%
+ \parafootftmsep%
+ \fi%
+ \global\prevpage@num=\page@num%
+}
\newcount\@k \newdimen\@h
\newcommand*{\rigidbalance}[3]{\setbox0=\box#1 \@k=#2 \@h=#3
\@@line{\splittopskip=\@h \vbadness=\@M \hfilneg
@@ -1920,9 +2007,9 @@
\newcommand*{\ledlsnotefontsetup}{\raggedleft\footnotesize}
\newcommand*{\ledrsnotefontsetup}{\raggedright\footnotesize}
-\newcommand*{\ledleftnote}[1]{\setcounter{hboxmodulo}{-1}\edtext{}{\l@dlsnote{#1}}}
-\newcommand*{\ledrightnote}[1]{\setcounter{hboxmodulo}{-1}\edtext{}{\l@drsnote{#1}}}
-\newcommand*{\ledsidenote}[1]{\setcounter{hboxmodulo}{-1}\edtext{}{\l@dcsnote{#1}}}
+\newcommand*{\ledleftnote}[1]{\edtext{}{\l@dlsnote{#1}}}
+\newcommand*{\ledrightnote}[1]{\edtext{}{\l@drsnote{#1}}}
+\newcommand*{\ledsidenote}[1]{\edtext{}{\l@dcsnote{#1}}}
\newif\ifrightnoteup
\rightnoteuptrue
@@ -2304,6 +2391,7 @@
\penalty0}}
\newcommand*{\parafootfmtX}[2]{%
+ \insertparafootftmsep
\ledsetnormalparstuff
{\notenumfont\@nameuse{footfootmark#1}\strut%\enspace
#2\penalty-10}}
@@ -2595,33 +2683,10 @@
}
\newcommand*{\hangingsymbol}{}
-\newcounter{hbox}
-\newcounter{hboxmodulo}
-\newif\ifhangingsymbol
-\hangingsymbolfalse
\newif\ifinstanza
\instanzafalse
-\newcommand{\managehangingsymbol}{\ifinstanza%
- \setcounter{hbox}{0}%
- \setcounter{hboxmodulo}{0}%
- \everyhbox{%
-\ifnum \value{hbox}>2%
- \addtocounter{hboxmodulo}{1}%
- \ifnum \value{hboxmodulo}=2
- \ifhangingsymbol%
- \hangingsymbol%
- \hangingsymbolfalse%
- \else%
- \hangingsymboltrue%
- \fi%
- \setcounter{hboxmodulo}{0}%
- \fi%
-\else%
-\addtocounter{hbox}{1}%
-\fi%
-}
-\fi}
-
+\newcount\prevline@num
+\newcommand{\inserthangingsymbol}{\ifinstanza\ifnum\line@num=\prevline@num\hfill\hangingsymbol\fi\fi}
\newcommand*{\ampersand}{\char`\&}
\chardef\body=\catcode`\@
diff --git a/Master/texmf-dist/tex/latex/ledmac/ledpar.sty b/Master/texmf-dist/tex/latex/ledmac/ledpar.sty
index 4b93ec2e423..07645da57fe 100644
--- a/Master/texmf-dist/tex/latex/ledmac/ledpar.sty
+++ b/Master/texmf-dist/tex/latex/ledmac/ledpar.sty
@@ -24,7 +24,7 @@
%%
\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]
\newif\ifshiftedverses
\shiftedversesfalse
@@ -143,25 +143,35 @@
\line@list@stuffR{\jobname.\extensionchars\the\section@numR R}%
\l@dend@stuff}
+%% \changes{v0.11}{2012/06/11}{Lineation can be by pstart (like in ledmac 0.15).}
\newif\ifbypage@R
+\newif\ifbypstart@R
\bypage@Rfalse
+ \bypstart@Rfalse
\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}}
-
\newcount\line@marginR
\renewcommand*{\linenummargin}[1]{{%
\l@dgetline@margin{#1}%
@@ -774,8 +784,10 @@
\newcount\par@lineR
\newcounter{pstartL}
+\newcounter{pstartLold}
\renewcommand{\thepstartL}{{\bfseries\@arabic\c@pstartL}. }
\newcounter{pstartR}
+\newcounter{pstartRold}
\renewcommand{\thepstartR}{{\bfseries\@arabic\c@pstartR}. }
\newcommand*{\pstartL}{
@@ -794,6 +806,7 @@
\pend
\fi
\ifpst@rtedL\else
+ \setcounter{pstartLold}{\value{pstartL}}%
\list@clear{\inserts@list}%
\global\let\next@insert=\empty
\global\pst@rtedLtrue
@@ -804,7 +817,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}
\newcommand*{\pstartR}{
@@ -823,6 +836,7 @@
\pendR
\fi
\ifpst@rtedR\else
+ \setcounter{pstartRold}{\value{pstartR}}%
\list@clear{\inserts@listR}%
\global\let\next@insertR=\empty
\global\pst@rtedRtrue
@@ -833,7 +847,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}
\newcommand*{\pendL}{\ifnumbering \else
@@ -883,7 +897,6 @@
\newcount\@donetotallinesR
\newcommand*{\do@lineL}{%
-\ifinstanzaL\manageparhangingsymbol\fi
\advance\countLline \@ne
\ifvbox\namebox{l@dLcolrawbox\the\l@dpscL}%
{\vbadness=10000
@@ -896,14 +909,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
@@ -916,7 +931,6 @@
\newcommand*{\do@lineRhook}{}
\newcommand*{\do@lineR}{%
-\ifinstanzaR\manageparhangingsymbol\fi
\advance\countRline \@ne
\ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}%
{\vbadness=10000
@@ -929,14 +943,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
@@ -946,24 +962,31 @@
\fi}
\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\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
@@ -971,10 +994,11 @@
\else
\ifnum\@lock<\tw@
\global\advance\line@num \@ne
- \addtocounter{hbox}{10}%
\global\subline@num \z@
\fi
- \fi}
+ \fi
+\fi
+}
\newcommand*{\do@ballastR}{\global\ballast@count=\z@
\begingroup
@@ -1108,6 +1132,7 @@
\fi}
\newcommand*{\affixline@numR}{%
+\ifnumberline
\ifl@dskipnumber
\global\l@dskipnumberfalse
\else
@@ -1149,8 +1174,74 @@
\fi
\fi
\f@x@l@cksR
+\fi
\fi}
+\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
+}
\list@create{\inserts@listR}
\newcommand*{\add@insertsR}{%
\global\let\add@inserts@nextR=\relax
@@ -1501,14 +1592,14 @@
\fi\ignorespaces}
+\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}
+\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}}}
+\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}
\chardef\next=\catcode`\&
\catcode`\&=\active
@@ -1659,6 +1750,8 @@
\gdef\theledlanguageR{\xpg@main@language}%
}}
\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
@@ -1672,6 +1765,8 @@
\global\l@dpscR=\z@
\check@pstarts
\loop\if@pstarts
+ \global\pstartnumtrue
+ \global\pstartnumRtrue
\global\advance\l@dpscL \@ne
\global\advance\l@dpscR \@ne
\checkraw@text
@@ -1696,6 +1791,14 @@
\@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
\flush@notes
\flush@notesR
@@ -1754,6 +1857,8 @@
\newcount\l@dminpagelines
\newcommand*{\Pages}{%
+ \setcounter{pstartL}{\value{pstartLold}}
+ \setcounter{pstartR}{\value{pstartRold}}
\typeout{}
\typeout{*************************** PAGES ***************************}
\ifnum\l@dnumpstartsL=\l@dnumpstartsR\else
@@ -1800,14 +1905,15 @@
\l@duselanguage{\theledlanguageL}%
%%% \begingroup
{ \loop\ifl@dsamepage
+
\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}%
\fi
+
\get@nextboxL
\checkpageL
\repeat
@@ -1824,7 +1930,6 @@
\do@lineR
\advance\numpagelinesR \@ne
\ifshiftedverses
-\addtocounter{hbox}{-1}
\ifdim\ht\l@drightbox>0pt\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}\fi%
\else
\hb@xt@ \hsize{\ledstrutR\unhbox\l@drightbox}%
@@ -1989,6 +2094,14 @@
\fi
\ifnum\l@dnumpstartsL>\l@dpscL
\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}}%
@@ -2009,6 +2122,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}}%