diff options
author | Robert Alessi <alessi@robertalessi.net> | 2022-10-27 16:41:35 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2022-10-27 16:41:35 +0200 |
commit | e7d0200bbbd6f291fc2a4a2e60c148fdbfb4ebf9 (patch) | |
tree | ac91db42ad82c96790b47d607cee8eaaa45048f7 | |
parent | 856da110aece412376c5aa3e146a3925c5df6a3d (diff) | |
download | ekdosis-e7d0200bbbd6f291fc2a4a2e60c148fdbfb4ebf9.tar.gz |
included maxlines in ekdverse environment
-rw-r--r-- | ekdosis.dtx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx index 3212acb..aa85fc2 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx | |||
@@ -11157,6 +11157,19 @@ Sample text with a \textcolor{red}{word} in red. | |||
11157 | % \env{ekdverse} is defined:--- | 11157 | % \env{ekdverse} is defined:--- |
11158 | % \begin{macrocode} | 11158 | % \begin{macrocode} |
11159 | \if@pkg@poetry@verse | 11159 | \if@pkg@poetry@verse |
11160 | \AddToHook{cmd/@vscentercr/before}{% | ||
11161 | \ifdefined\maxlines@value | ||
11162 | \stepcounter{ekd@lnperpage}% | ||
11163 | \ifnum\value{ekd@locallnperpage} = 1 | ||
11164 | \ifnumcomp{\theekd@lnperpage}{=}{% | ||
11165 | \luadirect{tex.sprint(ekdosis.getlocalmaxlines())}}{% | ||
11166 | \setcounter{ekd@locallnperpage}{0}% | ||
11167 | \setcounter{ekd@lnperpage}{0}\pagebreak}{}% | ||
11168 | \else | ||
11169 | \ifnumcomp{\theekd@lnperpage}{=}{\maxlines@value}{% | ||
11170 | \setcounter{ekd@lnperpage}{0}\pagebreak}{}% | ||
11171 | \fi | ||
11172 | \fi} | ||
11160 | \patchcmd{\start@vsline}{% | 11173 | \patchcmd{\start@vsline}{% |
11161 | \ifaltindent}{% | 11174 | \ifaltindent}{% |
11162 | \ifekd@pagevlineation\test@vpnum\fi | 11175 | \ifekd@pagevlineation\test@vpnum\fi |