From 04f4af2def2c0dd166f769a58745a3e5a7890f98 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Sat, 6 Mar 2021 08:16:15 +0100
Subject: poetry: added continuousvnum

---
 ekdosis.dtx | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index 7ba163f..6f85753 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -3467,6 +3467,10 @@ argument of the
 % element (ll.~5--7). Otherwise, the \texttt{TEI} output would not be
 % valid.
 %
+% \section{Poetry}
+% \label{sec:poetry}
+% 
+%
 % \section{Lineation Settings}
 % \label{sec:lineation}
 % \danger \pkg{ekdosis} uses \pkg{lineno} internally for line
@@ -4246,13 +4250,13 @@ subtype="arabtex">'inna 'abI kAna mina
 % \newfeature[v1.2]\\
 % One way to avoid this inconvenience is to use \cs{ekdpb} instead of
 % the standard \cs{pagebreak} command provided by \LaTeX\ to insert
-% conditional page breaks. \cs{ekdpb} takes as mandatory argument an
-% integer that represents the line number where the page break should
-% take place. An optional argument allows to further specify the page
-% number where the page break should occur. The value that is expected
-% is the page number as it is printed\===e.g.\ an Arabic, Roman or
-% alphanumeric number. If the specified conditions are not met, then
-% the page break is not triggered.
+% conditional page breaks. \cs{ekdpb} takes as mandatory argument the
+% line number, as it is printed in the margin, where the page break
+% should take place. An optional argument allows to further specify
+% the page number where the page break should occur. The value that is
+% expected is the page number as it is printed\===e.g.\ an Arabic,
+% Roman or alphanumeric number. If the specified conditions are not
+% met, then the page break is not triggered.
 %
 % \paragraph{Using \texttt{maxentries}}
 % Another way\---should the edition text fall into the vicious circle
@@ -6855,6 +6859,7 @@ Sample text with a \textcolor{red}{word} in red.
   code vmodulonum = \if@pkg@verse\poemlines{#1}\fi,
   initial vmodulonum = 1,
   noval vmodulo = \if@pkg@verse\poemlines{5}\fi,
+  bool continuousvnum = \if@continuous@vnum,
   choice numbers = {elided = \ekd@elidednumberstrue,
     full = \ekd@elidednumbersfalse},
   unknown-choice numbers = \PackageError{ekdosis}{unknown
@@ -7868,6 +7873,7 @@ Sample text with a \textcolor{red}{word} in red.
 \verselinenumfont{\normalfont\footnotesize}
 \setcounter{poemline}{1}
 \NewDocumentEnvironment{ekdverse}{O{\linewidth}}{%
+  \if@continuous@vnum\setverselinenums{\thelinenumber}{0}\fi
   \nolinenumbers
   \let\linelabel\label
   \stepcounter{verse@envctr}%
@@ -7892,7 +7898,8 @@ Sample text with a \textcolor{red}{word} in red.
           \addtolength{\leftmargin}{\vindent}}%
   \item[]%
 }
-{\endlist}
+{\endlist
+\if@continuous@vnum\resetlinenumber[\thepoemline]\fi}
 \else
 \newlength{\ekdverseindentlength}
 \setlength{\ekdverseindentlength}{\parindent}
-- 
cgit v1.2.3

