aboutsummaryrefslogtreecommitdiff
path: root/ekdosis.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'ekdosis.dtx')
-rw-r--r--ekdosis.dtx72
1 files changed, 38 insertions, 34 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 7bd73a0..e92738f 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -7661,51 +7661,55 @@ Sample text with a \textcolor{red}{word} in red.
7661} 7661}
7662% \end{macrocode} 7662% \end{macrocode}
7663% \end{macro} 7663% \end{macro}
7664% If \pkg{ekdosis} be loaded with the |verse| global option, the 7664% \begin{environment}{ekdverse}
7665% \env{verse} environment needs to be redefined so that lines of 7665% \env{ekdverse} provides an implementation of poetry lines. It is
7666% poetry are numbered continuously. Additionally, 7666% set to use either the \pkg{lineno} or the \pkg{verse} package
7667% \cs{verselinenumfont} is initially set to 7667% depending on the value that is passed to the global option
7668% \cs{normalfont}\cs{footnotesize}. 7668% |verse|:---
7669% \begin{macrocode} 7669% \begin{macrocode}
7670\if@pkg@verse 7670\if@pkg@verse
7671\verselinenumfont{\normalfont\footnotesize} 7671\verselinenumfont{\normalfont\footnotesize}
7672\setcounter{poemline}{1} 7672\setcounter{poemline}{1}
7673\renewenvironment{verse}[1][\linewidth]{% 7673\NewDocumentEnvironment{ekdverse}{O{\linewidth}}{%
7674 \nolinenumbers
7675 \let\linelabel\label
7674 \stepcounter{verse@envctr}% 7676 \stepcounter{verse@envctr}%
7675 \addtocounter{poemline}{-1}\refstepcounter{poemline}% 7677 \addtocounter{poemline}{-1}\refstepcounter{poemline}%
7676 \setcounter{vslineno}{1}% 7678 \setcounter{vslineno}{1}%
7677 \let\\=\@vscentercr 7679 \let\\=\@vscentercr
7678 \list{}{\itemsep \z@ 7680 \list{}{\itemsep \z@
7679 \itemindent -\vindent% 7681 \itemindent -\vindent%
7680 \listparindent\itemindent 7682 \listparindent\itemindent
7681 \parsep \stanzaskip 7683 \parsep \stanzaskip
7682 \ifdim #1 < \linewidth 7684 \setlength{\itemsep}{0pt}%
7683 \rightmargin \z@ 7685 \setlength{\topsep}{0pt}%
7684 \setlength{\leftmargin}{\linewidth}% 7686 \setlength{\partopsep}{0pt}%
7685 \addtolength{\leftmargin}{-#1}% 7687 \ifdim #1 < \linewidth
7686 \addtolength{\leftmargin}{-0.5\leftmargin}% 7688 \rightmargin \z@
7687 \else 7689 \setlength{\leftmargin}{\linewidth}%
7688 \rightmargin \leftmargin 7690 \addtolength{\leftmargin}{-#1}%
7689 \fi 7691 \addtolength{\leftmargin}{-0.5\leftmargin}%
7690 \addtolength{\leftmargin}{\vindent}}% 7692 \else
7691\item[]% 7693 \rightmargin \leftmargin
7692}{\endlist} 7694 \fi
7695 \addtolength{\leftmargin}{\vindent}}%
7696 \item[]%
7697}
7698{\endlist}
7699\else
7700\newlength{\ekdverseindentlength}
7701\setlength{\ekdverseindentlength}{\parindent}
7702\NewDocumentEnvironment{ekdverse}{O{\ekdverseindentlength}}{
7703 \begin{list}{}{%
7704 \setlength{\leftmargin}{#1}
7705 \setlength{\itemsep}{0pt}
7706 \setlength{\topsep}{0pt}
7707 \setlength{\partopsep}{0pt}
7708 }
7709 \item[]
7710 }{\end{list}}
7693\fi 7711\fi
7694% \end{macrocode} 7712% \end{macrocode}
7695% \begin{environment}{ekdverse}
7696% \env{ekdverse} provides an implementation of poetry lines. It is
7697% set to use either the \pkg{lineno} or the \pkg{verse} package
7698% depending on the value that is passed to the global option
7699% |verse|:---
7700% \begin{macrocode}
7701\NewDocumentEnvironment{ekdverse}{}{%
7702 \if@pkg@verse
7703 \nolinenumbers
7704 \let\linelabel\label
7705 \fi
7706 \begin{verse}}
7707 {\end{verse}}
7708% \end{macrocode}
7709% \end{environment} 7713% \end{environment}
7710% \begin{environment}{ekdpar} 7714% \begin{environment}{ekdpar}
7711% When |autopar| is set to |false| by means of \cs{SetTEIxmlExport}, 7715% When |autopar| is set to |false| by means of \cs{SetTEIxmlExport},