From 81602daa5b060ad82cea5da0a1c4da86eccfd7c0 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Mon, 30 Aug 2021 10:25:08 +0200 Subject: new \\+ verse command --- ekdosis.dtx | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/ekdosis.dtx b/ekdosis.dtx index d0d07cb..ca73f75 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -61,7 +61,7 @@ along with this program. If not, see %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{ekdosis} %<*package> - [2021/08/29 v1.4-dev Typesetting TEI xml-compliant critical editions] + [2021/08/30 v1.4-dev Typesetting TEI xml-compliant critical editions] % %<*driver> \begin{filecontents}[noheader,overwrite]{bibdata.xml} @@ -4142,13 +4142,16 @@ argument of the % \item |\\*| does the same as |\\| except that it prohibits a page % break after the line. % \item |\\>| is for line breaks within a verse line. +% \item |\\+| \newfeature[v1.4] does the same as |\\>| but without +% indenting the subsequent line which further complies to any already +% defined indent pattern. % \end{enumerate} % % All of these commands can take a dimension as optional argument, -% like so: |\\[30pt]|, |\\![30pt]|, |\\*[30pt]| or |\\>[30pt]|. If -% |\\|, |\\!| or |\\*| be used, a vertical space of the dimension -% specified is added between lines, whereas |\\>[...]| adds an -% horizontal space after the line break. +% like so: |\\[30pt]|, |\\![30pt]|, |\\*[30pt]|, |\\>[30pt]| or +% |\\+[30pt]|. If |\\|, |\\!|, |\\*| or |\\+| be used, a vertical +% space of the dimension specified is added between lines, whereas +% |\\>[...]| adds an horizontal space after the line break. % % \DescribeMacro{\vin} \phts\label{ref:verse-vin}\cs{vin} indents a % verse line by a length which is by default \unit[1.5]{em}. This @@ -8291,7 +8294,7 @@ Sample text with a \textcolor{red}{word} in red. % \end{macrocode} % \end{macro} % \begin{macro}{\SetSubseparator} -% \changes{v1.4}{2021/08/29}{New command for subseparators} +% \changes{v1.4}{2021/08/30}{New command for subseparators} % \cs{SetSubseparator}\marg{sub-separator} allows to change the % \enquote{subseparator} between variant readings. By default, % no subseparator is set:--- @@ -9849,6 +9852,35 @@ Sample text with a \textcolor{red}{word} in red. } % \end{macrocode} % \end{macro} +% \begin{macro}{\\+} +% \changes{v1.4}{2021/08/30}{New macro for poetry} +% |\\+| comes in addition to the verse commands that are provided by +% the \pkg{verse} package. |\\+| causes a linebreak within a verse +% line. In contrast to |\\>|, the subsequent line is not indented and +% complies to any already defined indent pattern. \cs{@vscentercr} +% must be redefined accordingly. +% \begin{macrocode} +\ifboolexpr{bool {@pkg@poetry@verse} or bool {ekd@memoir@loaded}} + {\newcommand{\@vsifplus}[1]{\@ifnextchar +{\@firstoftwo{#1}}} + \renewcommand{\@vscentercr}{% + \ifhmode \unskip\else \@nolnerr\fi + \@vsifgt{\verselinebreak}{% + \@vsifplus{\stepcounter{vslineno}% + \par\@ifstar{\nobreak\@vsxcentercr}{% + \@vsifbang{\@ifnextchar[ {\@vsicentercr}{}}{\@vsxcentercr}% + }% + }{% + \@vstypelinenum + \incr@vsline% + \par\@ifstar{\nobreak\@vsxcentercr}{% + \@vsifbang{\@ifnextchar[ {\@vsicentercr}{}}{\@vsxcentercr}% + }% + }% + }% + } + }{} +% \end{macrocode} +% \end{macro} % A small patch is applied to the \pkg{verse} package, then % \env{ekdverse} is defined:--- % \begin{macrocode} -- cgit v1.2.3