summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/reledmac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-05-04 22:15:11 +0000
committerKarl Berry <karl@freefriends.org>2017-05-04 22:15:11 +0000
commit0d739ae3dc202302661cc0325561e1e745aea898 (patch)
tree7048783cc490ae1e34ca38c3c243003bebba7152 /Master/texmf-dist/tex/latex/reledmac
parent06ecc9f9415924da0dc43ceffdcf0e970c745ad9 (diff)
reledmac (4may17)
git-svn-id: svn://tug.org/texlive/trunk@44196 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/reledmac')
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledmac.sty146
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledpar.sty163
2 files changed, 253 insertions, 56 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
index 2ce474fae86..bcbc5f2f06f 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
@@ -35,7 +35,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2017/04/12 v2.19.0 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2017/05/04 v2.20.0 typesetting critical editions]%
\RequirePackage{xkeyval}
\newif\ifparledgroup
\DeclareOptionX{series}[A,B,C,D,E]{\xdef\default@series{#1}}
@@ -1649,12 +1649,27 @@
\newbox\one@line
\newcount\par@line
+\newcommand{\AtStartEveryPstart}[1]{%
+ \ifstrempty{#1}%
+ {\gdef\@at@start@every@pstart{}}%
+ {\gdef\@at@start@every@pstart{#1}}%
+}%
+\def\@at@start@every@pstart{}%
+
+\newif\ifat@every@pstart@star@%
\newcommand{\AtEveryPstart}[1]{%
\ifstrempty{#1}%
- {\xdef\at@every@pstart{}}%
+ {\gdef\at@every@pstart{}}%
{\gdef\at@every@pstart{\noindent#1}}%
+ \global\at@every@pstart@star@false%
}%
-\xdef\at@every@pstart{}%
+\WithSuffix\newcommand\AtEveryPstart*[1]{%
+ \ifstrempty{#1}%
+ {\gdef\at@every@pstart{}}%
+ {\gdef\at@every@pstart{#1}}%
+ \global\at@every@pstart@star@true%
+}%
+\def\at@every@pstart{}%
\newcounter{pstart}
\renewcommand{\thepstart}{{\bfseries\@arabic\c@pstart}. }
@@ -1662,9 +1677,17 @@
\numberpstartfalse
\newif\iflabelpstart
\labelpstartfalse
-\newcommandx*{\pstart}[1][1]{%
+\newcommandx*{\pstart}[2][1,2,usedefault]{%
\normal@pars%
- \ifstrempty{#1}{\at@every@pstart}{\noindent#1}%
+ \ifboolexpr{%
+ test {\ifstrempty{#1}}%
+ and test {\ifstrempty{#2}}%
+ }%
+ {\at@every@pstart}%
+ {%
+ \ifstrempty{#1}{}{\noindent#1}%
+ \ifstrempty{#2}{}{#2}%
+ }%
\ifautopar%
\autopar%
\fi%
@@ -1705,9 +1728,10 @@
{\p@pstart\thepstart}
\fi%
\l@dzeropenalties%
+ \@at@start@every@pstart%
\ignorespaces%because not automatically ignored if an optional argument is used (classical TeX behavior for space after commands)
}
-\newcommandx*{\pend}[1][1]{\ifnumbering \else%
+\newcommandx*{\pend}[2][1,2,usedefault]{\ifnumbering \else%
\led@err@PendNotNumbered%
\fi%
\global\l@dskipversenumberfalse%
@@ -1715,6 +1739,7 @@
\led@err@PendNoPstart%
\fi%
\l@dzeropenalties%
+ \@at@end@every@pend%
\endgraf\global\num@lines=\prevgraf\egroup%
\global\par@line=0%
\csnumdef{pstartline}{0}%
@@ -1738,20 +1763,42 @@
\fi%
\addtocounter{pstart}{1}%
\normal@pars%
- \ifstrempty{#1}{\at@every@pend}{\noindent#1}%
+ \ifboolexpr{%
+ test {\ifstrempty{#1}}%
+ and test {\ifstrempty{#2}}%
+ }%
+ {\at@every@pend}%
+ {%
+ \ifstrempty{#1}{}{\noindent#1}%
+ \ifstrempty{#2}{}{#2}%
+ }%
\@nobreakfalse%
\ifautopar%
\autopar%
\fi%
}
+\newif\ifat@every@pend@star@%
\newcommand{\AtEveryPend}[1]{%
\ifstrempty{#1}%
- {\xdef\at@every@pend{}}%
+ {\gdef\at@every@pend{}}%
{\gdef\at@every@pend{\noindent#1}}%
+ \global\at@every@pend@star@false%
+}%
+\WithSuffix\newcommand\AtEveryPend*[1]{%
+ \ifstrempty{#1}%
+ {\gdef\at@every@pend{}}%
+ {\gdef\at@every@pend{#1}}%
+ \global\at@every@pend@star@true%
}%
\xdef\at@every@pend{}%
+\newcommand{\AtEndEveryPend}[1]{%
+ \ifstrempty{#1}%
+ {\xdef\@at@end@every@pend{}}%
+ {\gdef\@at@end@every@pend{#1}}%
+}%
+\def\@at@end@every@pend{}%
\newcommand*{\l@dzeropenalties}{%
\brokenpenalty \z@ \clubpenalty \z@
\displaywidowpenalty \z@ \interlinepenalty \z@ \predisplaypenalty \z@
@@ -3389,6 +3436,7 @@
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalvfootnoteX}[2]{%
\csuse{beforeinsertingX@#1}%
\insert\@nameuse{footins#1}\bgroup
+ \reset@font%
\hsize=\expandafter\dimexpr\csuse{widthX@#1}\relax%
\noindent\csuse{bhooknoteX@#1}%
\csuse{notefontsizeX@#1}%
@@ -6686,7 +6734,7 @@
}%
}
-\newcommandx{\stanza@line}[1][1]{
+\newcommandx{\stanza@line}[2][1,2,usedefault]{%
\ifnum\value{stanzaindentsrepetition}=0
\ifcsdef{sza@\number\stanza@count @}%
{%
@@ -6703,7 +6751,8 @@
\led@err@StanzaIndentNotDefined%
}%
\fi
- \pstart[#1]\stanza@hang\ignorespaces}
+ \pstart[#1][#2]\stanza@hang\ignorespaces%
+}%
\xdef\stanza@hang{\noexpand\leavevmode\noexpand\startlock
\hangindent\expandafter
\noexpand\csname sza@0@\endcsname\stanzaindentbase
@@ -6711,7 +6760,7 @@
\def\sza@penalty{\count@\csname szp@\number\stanza@count @\endcsname
\ifnum\count@>\@M\advance\count@-\@M\penalty-\else
\penalty\fi\count@}
-\xdef\@startstanza[#1]{%
+\xdef\@startstanza[#1][#2]{%
\noexpand\instanzatrue\expandafter
\begingroup%
\catcode`\noexpand\&\active%
@@ -6726,45 +6775,74 @@
\noexpand\newverse[][]}%
\def\noexpand\&{\noexpand\@stopstanza}%
\noexpand\@advancestanzanumber%
- \noexpand\stanza@line[#1]%
+ \noexpand\stanza@line[#1][#2]%
\noexpand\@insertstanzanumber%
\let\par\relax\ignorespaces%No paragraph in verses
}
-\newcommandx{\stanza}[1][1,usedefault]{%
- \ifboolexpr{not test{\ifdefvoid{\at@every@stanza}} and test{\ifstrempty{#1}}}%
- {\@startstanza[\at@every@stanza]}%
- {\@startstanza[#1]}%
+\newcommandx{\stanza}[2][1,2,usedefault]{%
+ \ifboolexpr{%
+ not test{\ifdefvoid{\at@every@stanza}}%
+ and test{\ifstrempty{#1}}%
+ and test{\ifstrempty{#2}}}%
+ {\@startstanza[][\at@every@stanza]\at@start@every@stanza}%
+ {\@startstanza[#1][#2]\at@start@every@stanza}%
}%
-\newcommandx{\@stopstanza}[1][1,usedefault]{%
+\newcommandx{\@stopstanza}[2][1,2,usedefault]{%
\unskip%
\endlock%
- \ifboolexpr{not test{\ifdefvoid{\at@every@stop@stanza}} and test{\ifstrempty{#1}}}%
- {\pend[\at@every@stop@stanza]}%
- {\pend[#1]}%
+ \ifboolexpr{%
+ not test{\ifdefvoid{\at@every@stop@stanza}}%
+ and test{\ifstrempty{#1}}%
+ and test{\ifstrempty{#2}}}%
+ {\before@every@stop@stanza\pend[][\at@every@stop@stanza]}%
+ {\before@every@stop@stanza\pend[#1][#2]}%
\endgroup%
\instanzafalse%
}
\newcommand{\AtEveryStopStanza}[1]{%
\ifstrempty{#1}%
- {\xdef\at@every@stop@stanza{}}%
+ {\gdef\at@every@stop@stanza{}}%
+ {\gdef\at@every@stop@stanza{\noindent#1}}%
+}%
+\WithSuffix\newcommand\AtEveryStopStanza*[1]{%
+ \ifstrempty{#1}%
+ {\gdef\at@every@stop@stanza{}}%
{\gdef\at@every@stop@stanza{#1}}%
}%
\def\at@every@stop@stanza{}%
\newcommand{\AtEveryStanza}[1]{%
\ifstrempty{#1}%
- {\xdef\at@every@stanza{}}%
+ {\gdef\at@every@stanza{}}%
+ {\gdef\at@every@stanza{\noindent#1}}%
+}%
+\WithSuffix\newcommand\AtEveryStanza*[1]{%
+ \ifstrempty{#1}%
+ {\gdef\at@every@stanza{}}%
{\gdef\at@every@stanza{#1}}%
}%
-\def\at@every@stanza{}%
-\newcommandx*{\newverse}[2][1,2,usedefault]{%
+\newcommand{\AtStartEveryStanza}[1]{%
+ \ifstrempty{#1}%
+ {\gdef\at@start@every@stanza{}}%
+ {\gdef\at@start@every@stanza{#1}}%
+}%
+\def\at@start@every@stanza{}%
+
+\newcommand{\BeforeEveryStopStanza}[1]{%
+ \ifstrempty{#1}%
+ {\gdef\before@every@stop@stanza{}}%
+ {\gdef\before@every@stop@stanza{#1}}%
+}%
+\def\before@every@stop@stanza{}%
+
+\newcommandx*{\newverse}[4][1,2,3,4,usedefault]{%
\unskip%
- \endlock\pend[#1]\sza@penalty\global%
- \advance\stanza@count\@ne\stanza@line[#2]%
+ \endlock\pend[#1][#3]\sza@penalty\global%
+ \advance\stanza@count\@ne\stanza@line[#2][#4]%
}
\newcommand*{\flagstanza}[2][\stanzaindentbase]{%
@@ -8018,7 +8096,9 @@
\notbool{@noeled@sec}{%
\newwrite\eled@sectioning@out
\newcommand{\eledchapter}[2][]{%
+ \disable@familiarnotes%
#2%
+ \restore@familiarnotes%
\ifledRcol%
\immediate\write\eled@sectioningR@out{%
\string\eled@chapter{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{}{R}
@@ -8031,7 +8111,9 @@
}
\newcommand{\eledsection}[2][]{%
+ \disable@familiarnotes%
#2%
+ \restore@familiarnotes%
\ifledRcol%
\immediate\write\eled@sectioningR@out{%
\string\eled@section{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{}{R}
@@ -8044,7 +8126,9 @@
}
\newcommand{\eledsubsection}[2][]{%
+ \disable@familiarnotes%
#2%
+ \restore@familiarnotes%
\ifledRcol%
\immediate\write\eled@sectioningR@out{%
\string\eled@subsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{}{R}
@@ -8056,7 +8140,9 @@
\fi%
}
\newcommand{\eledsubsubsection}[2][]{%
+ \disable@familiarnotes%
#2%
+ \restore@familiarnotes%
\ifledRcol%
\immediate\write\eled@sectioningR@out{%
\string\eled@subsubsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{}{R}
@@ -8069,7 +8155,9 @@
}
\WithSuffix\newcommand\eledchapter*[2][]{%
+ \disable@familiarnotes%
#2%
+ \restore@familiarnotes%
\ifledRcol%
\immediate\write\eled@sectioningR@out{%
\string\eled@chapter{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{*}{R}
@@ -8082,7 +8170,9 @@
}
\WithSuffix\newcommand\eledsection*[2][]{%
+ \disable@familiarnotes%
#2%
+ \restore@familiarnotes%
\ifledRcol%
\immediate\write\eled@sectioningR@out{%
\string\eled@section{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{*}{R}
@@ -8095,7 +8185,9 @@
}
\WithSuffix\newcommand\eledsubsection*[2][]{%
+ \disable@familiarnotes%
#2%
+ \restore@familiarnotes%
\ifledRcol%
\immediate\write\eled@sectioningR@out{%
\string\eled@subsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{*}{R}
@@ -8108,7 +8200,9 @@
}
\WithSuffix\newcommand\eledsubsubsection*[2][]{%
+ \disable@familiarnotes%
#2%
+ \restore@familiarnotes%
\ifledRcol%
\immediate\write\eled@sectioningR@out{%
\string\eled@subsubsection{#1}{\unexpanded{#2}}{\the\l@dnumpstartsR}{*}{R}
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
index e1f0f7648f4..0e7091efa6a 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
@@ -29,7 +29,7 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2017/04/28 v2.17.4 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2017/05/04 v2.18.0 reledmac extension for parallel texts]%
\RequirePackage{xspace}%
\RequirePackage{xkeyval}
@@ -854,8 +854,8 @@
\let\pend\pendL
\let\memorydump\memorydumpL
\Leftsidehook
- \let\old@startstanza\@startstanza
- \def\@startstanza[##1]{\global\instanzaLtrue\old@startstanza[##1]}
+ \let\old@startstanza\@startstanza%
+ \def\@startstanza[##1][##2]{\global\instanzaLtrue\old@startstanza[##1][##2]}%
}{
\expandafter\ifvoid\csname l@dLcolrawbox1\endcsname%
\led@error@missing@numbering{Leftside}%
@@ -883,8 +883,8 @@
\let\lednopb\lednopbR
\let\lineation\lineationR
\Rightsidehook
- \let\old@startstanza\@startstanza
- \def\@startstanza[##1]{\global\instanzaRtrue\old@startstanza[##1]}
+ \let\old@startstanza\@startstanza%
+ \def\@startstanza[##1][##2]{\global\instanzaRtrue\old@startstanza[##1][##2]}%
}{%
\ledRcolfalse
\expandafter\ifvoid\csname l@dRcolrawbox1\endcsname%
@@ -902,7 +902,7 @@
\newcounter{pstartR}
\renewcommand{\thepstartR}{{\bfseries\@arabic\c@pstartR}. }
-\newcommandx*{\pstartL}[1][1]{%
+\newcommandx*{\pstartL}[2][1,2,usedefault]{%
\if@nobreak%
\let\@oldnobreak\@nobreaktrue%
\else%
@@ -943,17 +943,39 @@
\fi%
\fi%
\fi%
+ \@at@start@every@pstart%
\hsize=\Lcolwidth%
\numberedpar@true%
\iflabelpstart\protected@edef\@currentlabel%
{\p@pstartL\thepstartL}\fi%
- \ifstrempty{#1}%
- {\csgdef{before@pstartL@\the\l@dnumpstartsL}{\at@every@pstart}}%
- {\csgdef{before@pstartL@\the\l@dnumpstartsL}{\noindent#1}}%
+ \providetoggle{before@pstartL@\the\l@dnumpstartsL @par}%
+ \ifboolexpr{%
+ test {\ifstrempty{#1}}%
+ and test {\ifstrempty{#2}}%
+ }%
+ {%
+ \ifat@every@pstart@star@%
+ \global\togglefalse{before@pstartL@\the\l@dnumpstartsL @par}%
+ \else%
+ \global\toggletrue{before@pstartL@\the\l@dnumpstartsL @par}%
+ \fi%
+ \csgdef{before@pstartL@\the\l@dnumpstartsL}{\at@every@pstart}%
+ }%
+ {%
+ \ifstrempty{#1}{}{%
+ \global\toggletrue{before@pstartL@\the\l@dnumpstartsL @par}%
+ \csgdef{before@pstartL@\the\l@dnumpstartsL}{\noindent#1}%
+ }%
+ \ifstrempty{#2}{}%
+ {%
+ \csgdef{before@pstartL@\the\l@dnumpstartsL}{#2}%
+ \global\togglefalse{before@pstartL@\the\l@dnumpstartsL @par}%
+ }%
+ }%
\at@every@pstart@call%
\ignorespaces%
}
-\newcommandx*{\pstartR}[1][1]{%
+\newcommandx*{\pstartR}[2][1,2,usedefault]{%
\if@nobreak%
\let\@oldnobreak\@nobreaktrue%
\else%
@@ -993,23 +1015,46 @@
\fi%
\fi%
\fi%
+ \@at@start@every@pstart%
\hsize=\Rcolwidth%
\numberedpar@true%
\iflabelpstart\protected@edef\@currentlabel%
{\p@pstartR\thepstartR}\fi%
- \ifstrempty{#1}%
- {\csgdef{before@pstartR@\the\l@dnumpstartsR}{\at@every@pstart}}%
- {\csgdef{before@pstartR@\the\l@dnumpstartsR}{\noindent#1}}%
+ \providetoggle{before@pstartR@\the\l@dnumpstartsR @par}%
+ \ifboolexpr{%
+ test {\ifstrempty{#1}}%
+ and test {\ifstrempty{#2}}%
+ }%
+ {%
+ \ifat@every@pstart@star@%
+ \global\togglefalse{before@pstartR@\the\l@dnumpstartsR @par}%
+ \else%
+ \global\toggletrue{before@pstartR@\the\l@dnumpstartsR @par}%
+ \fi%
+ \csgdef{before@pstartR@\the\l@dnumpstartsR}{\at@every@pstart}%
+ }%
+ {%
+ \ifstrempty{#1}{}{%
+ \global\toggletrue{before@pstartR@\the\l@dnumpstartsR @par}%
+ \csgdef{before@pstartR@\the\l@dnumpstartsR}{\noindent#1}%
+ }%
+ \ifstrempty{#2}{}%
+ {%
+ \csgdef{before@pstartR@\the\l@dnumpstartsR}{#2}%
+ \global\togglefalse{before@pstartR@\the\l@dnumpstartsR @par}%
+ }%
+ }%
\at@every@pstart@call%
\ignorespaces%
}
-\newcommandx*{\pendL}[1][1]{%
+\newcommandx*{\pendL}[2][1,2,usedefault]{%
\ifnumbering \else%
\led@err@PendNotNumbered%
\fi%
\ifnumberedpar@ \else%
\led@err@PendNoPstart%
\fi%
+ \@at@end@every@pend%
\endgraf\global\num@lines=\prevgraf\egroup%
\global\par@line=0%
\endgroup%
@@ -1020,17 +1065,39 @@
\addtocounter{pstartL}{1}%
\fi
\parledgroup@beforenotes@save{L}%
- \ifstrempty{#1}%
- {\csgdef{after@pendL@\the\l@dnumpstartsL}{\at@every@pend}}%
- {\csgdef{after@pendL@\the\l@dnumpstartsL}{\noindent#1}}%
- }
-\newcommandx*{\pendR}[1][1]{%
+ \providetoggle{after@pendL@\the\l@dnumpstartsL @par}%
+ \ifboolexpr{%
+ test {\ifstrempty{#1}}%
+ and test {\ifstrempty{#2}}%
+ }%
+ {%
+ \ifat@every@pend@star@%
+ \global\togglefalse{after@pendL@\the\l@dnumpstartsL @par}%
+ \else%
+ \global\toggletrue{after@pendL@\the\l@dnumpstartsL @par}%
+ \fi%
+ \csgdef{after@pendL@\the\l@dnumpstartsL}{\at@every@pend}%
+ }%
+ {%
+ \ifstrempty{#1}{}{%
+ \global\toggletrue{after@pendL@\the\l@dnumpstartsL @par}%
+ \csgdef{after@pendL@\the\l@dnumpstartsL}{\noindent#1}%
+ }%
+ \ifstrempty{#2}{}%
+ {%
+ \csgdef{after@pendL@\the\l@dnumpstartsL}{#2}%
+ \global\togglefalse{after@pendL@\the\l@dnumpstartsL @par}%
+ }%
+ }%
+}%
+\newcommandx*{\pendR}[2][1,2,usedefault]{%
\ifnumberingR \else%
\led@err@PendNotNumbered%
\fi%
\ifnumberedpar@ \else%
\led@err@PendNoPstart%
\fi%
+ \@at@end@every@pend%
\endgraf\global\num@linesR=\prevgraf\egroup%
\global\par@lineR=0%
\endgroup%
@@ -1041,9 +1108,28 @@
\addtocounter{pstartR}{1}%
\fi%
\parledgroup@beforenotes@save{R}%
- \ifstrempty{#1}%
- {\csgdef{after@pendR@\the\l@dnumpstartsR}{\at@every@pend}}%
- {\csgdef{after@pendR@\the\l@dnumpstartsR}{\noindent#1}}%
+ \providetoggle{after@pendR@\the\l@dnumpstartsR @par}%
+ \ifboolexpr{%
+ test {\ifstrempty{#1}}%
+ and test {\ifstrempty{#2}}%
+ }%
+ {%
+ \ifat@every@pend@star@%
+ \global\togglefalse{after@pendR@\the\l@dnumpstartsR @par}%
+ \else%
+ \global\toggletrue{after@pendR@\the\l@dnumpstartsR @par}%
+ \fi%
+ \csgdef{after@pendR@\the\l@dnumpstartsR}{\at@every@pend}}%
+ {%
+ \ifstrempty{#1}{}{%
+ \csgdef{after@pendR@\the\l@dnumpstartsR}{\noindent#1}%
+ \global\toggletrue{after@pendR@\the\l@dnumpstartsR @par}%
+ }%
+ \ifstrempty{#2}{}{%
+ \csgdef{after@pendR@\the\l@dnumpstartsR}{#2}%
+ \global\togglefalse{after@pendR@\the\l@dnumpstartsR @par}%
+ }%
+ }%
}
\newcommand{\AtEveryPstartCall}[1]{\gdef\at@every@pstart@call{#1}}%
@@ -1899,7 +1985,7 @@
\chardef\next=\catcode`\&
\catcode`\&=\active
-\newenvironment{astanza}[1][]{%
+\newenvironment{astanza}[2][1,2,usedefault]{%
\catcode`\&\active
\global\stanza@count\@ne\stanza@modulo\@ne
\ifnum\usenamecount{sza@0@}=\z@
@@ -1917,18 +2003,25 @@
\global\advance\stanza@count\@ne
\@astanza@line}%
\def\&{\@stopastanza}%
- \ifboolexpr{not test{\ifdefvoid{\at@every@stanza}} and test{\ifstrempty{#1}}}%
- {\pstart[\at@every@stanza]}%
- {\pstart[#1]}%
+ \ifboolexpr{%
+ not test{\ifdefvoid{\at@every@stanza}}%
+ and test{\ifstrempty{#1}}%
+ and test{\ifstrempty{#2}}}%
+ {\pstart[][\at@every@stanza]\at@start@every@stanza}%
+ {\pstart[#1][#2]\at@start@every@stanza}%
\@astanza@line
\let\par\relax\ignorespaces%No paragraph in verses
}{}
-\newcommandx{\@stopastanza}[1][1,usedefault]{%
+\newcommandx{\@stopastanza}[2][1,2,usedefault]{%
\endlock\mbox{}%
- \ifboolexpr{not test{\ifdefvoid{\at@every@stop@stanza}} and test{\ifstrempty{#1}}}%
- {\pend[\at@every@stop@stanza]}%
- {\pend[#1]}%
+ \ifboolexpr{%
+ not test{\ifdefvoid{\at@every@stop@stanza}}%
+ and test{\ifstrempty{#1}}%
+ and test{\ifstrempty{#2}}%
+ }%
+ {\before@every@stop@stanza\pend[][\at@every@stop@stanza]}%
+ {\before@every@stop@stanza\pend[#1][#2]}%
}%
\newcommand*{\@astanza@line}{%
\ifnum\value{stanzaindentsrepetition}=0
@@ -2369,6 +2462,10 @@
and test {\ifdefempty{\at@every@pstart}}}%
{}%
{%
+ \ifboolexpr{not togl{before@pstartR@\the\l@dpscR @par} and not togl{before@pstartL@\the\l@dpscL @par}}{%
+ \csuse{before@pstartL@\the\l@dpscL}%
+ \csuse{before@pstartR@\the\l@dpscR}%
+ }{%
\hb@xt@ \hsize{%
\ifdefstring{\columns@position}{L}{}{\hfill }%
\par\parbox[t][][t]{\Lcolwidth}{%
@@ -2381,6 +2478,7 @@
}%
\ifdefstring{\columns@position}{R}{}{\hfill}%
}%
+ }%
}%
\global\csundef{before@pstartL@\the\l@dpscL}%
\global\csundef{before@pstartR@\the\l@dpscR}%
@@ -2392,6 +2490,10 @@
and test {\ifdefempty{\at@every@pend}}}%
{}%
{%
+ \ifboolexpr{not togl{after@pendR@\the\l@dpscR @par} and not togl{after@pendL@\the\l@dpscL @par}}{%
+ \csuse{after@pendL@\the\l@dpscL}%
+ \csuse{after@pendR@\the\l@dpscR}%
+ }{%
\hb@xt@ \hsize{%
\ifdefstring{\columns@position}{L}{}{\hfill }%
\parbox[t][][t]{\Lcolwidth}{%
@@ -2404,6 +2506,7 @@
}%
\ifdefstring{\columns@position}{R}{}{\hfill}%
}%
+ }%
}%
\global\csundef{after@pendL@\the\l@dpscL}%
\global\csundef{after@pendR@\the\l@dpscR}%