diff options
author | Robert Alessi <alessi@robertalessi.net> | 2021-08-30 10:25:08 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2021-08-30 11:41:04 +0200 |
commit | 81602daa5b060ad82cea5da0a1c4da86eccfd7c0 (patch) | |
tree | 1cabbdee2fa589c624c4ad636ce21de793996883 | |
parent | 80583c1f0ae2ce56203b5389e00a5a29585aa650 (diff) | |
download | ekdosis-81602daa5b060ad82cea5da0a1c4da86eccfd7c0.tar.gz |
new \\+ verse command
-rw-r--r-- | ekdosis.dtx | 44 |
1 files 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 | |||
61 | %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] | 61 | %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] |
62 | %<package>\ProvidesPackage{ekdosis} | 62 | %<package>\ProvidesPackage{ekdosis} |
63 | %<*package> | 63 | %<*package> |
64 | [2021/08/29 v1.4-dev Typesetting TEI xml-compliant critical editions] | 64 | [2021/08/30 v1.4-dev Typesetting TEI xml-compliant critical editions] |
65 | %</package> | 65 | %</package> |
66 | %<*driver> | 66 | %<*driver> |
67 | \begin{filecontents}[noheader,overwrite]{bibdata.xml} | 67 | \begin{filecontents}[noheader,overwrite]{bibdata.xml} |
@@ -4142,13 +4142,16 @@ argument of the | |||
4142 | % \item |\\*| does the same as |\\| except that it prohibits a page | 4142 | % \item |\\*| does the same as |\\| except that it prohibits a page |
4143 | % break after the line. | 4143 | % break after the line. |
4144 | % \item |\\>| is for line breaks within a verse line. | 4144 | % \item |\\>| is for line breaks within a verse line. |
4145 | % \item |\\+| \newfeature[v1.4] does the same as |\\>| but without | ||
4146 | % indenting the subsequent line which further complies to any already | ||
4147 | % defined indent pattern. | ||
4145 | % \end{enumerate} | 4148 | % \end{enumerate} |
4146 | % | 4149 | % |
4147 | % All of these commands can take a dimension as optional argument, | 4150 | % All of these commands can take a dimension as optional argument, |
4148 | % like so: |\\[30pt]|, |\\![30pt]|, |\\*[30pt]| or |\\>[30pt]|. If | 4151 | % like so: |\\[30pt]|, |\\![30pt]|, |\\*[30pt]|, |\\>[30pt]| or |
4149 | % |\\|, |\\!| or |\\*| be used, a vertical space of the dimension | 4152 | % |\\+[30pt]|. If |\\|, |\\!|, |\\*| or |\\+| be used, a vertical |
4150 | % specified is added between lines, whereas |\\>[...]| adds an | 4153 | % space of the dimension specified is added between lines, whereas |
4151 | % horizontal space after the line break. | 4154 | % |\\>[...]| adds an horizontal space after the line break. |
4152 | % | 4155 | % |
4153 | % \DescribeMacro{\vin} \phts\label{ref:verse-vin}\cs{vin} indents a | 4156 | % \DescribeMacro{\vin} \phts\label{ref:verse-vin}\cs{vin} indents a |
4154 | % verse line by a length which is by default \unit[1.5]{em}. This | 4157 | % 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. | |||
8291 | % \end{macrocode} | 8294 | % \end{macrocode} |
8292 | % \end{macro} | 8295 | % \end{macro} |
8293 | % \begin{macro}{\SetSubseparator} | 8296 | % \begin{macro}{\SetSubseparator} |
8294 | % \changes{v1.4}{2021/08/29}{New command for subseparators} | 8297 | % \changes{v1.4}{2021/08/30}{New command for subseparators} |
8295 | % \cs{SetSubseparator}\marg{sub-separator} allows to change the | 8298 | % \cs{SetSubseparator}\marg{sub-separator} allows to change the |
8296 | % \enquote{subseparator} between variant readings. By default, | 8299 | % \enquote{subseparator} between variant readings. By default, |
8297 | % no subseparator is set:--- | 8300 | % no subseparator is set:--- |
@@ -9849,6 +9852,35 @@ Sample text with a \textcolor{red}{word} in red. | |||
9849 | } | 9852 | } |
9850 | % \end{macrocode} | 9853 | % \end{macrocode} |
9851 | % \end{macro} | 9854 | % \end{macro} |
9855 | % \begin{macro}{\\+} | ||
9856 | % \changes{v1.4}{2021/08/30}{New macro for poetry} | ||
9857 | % |\\+| comes in addition to the verse commands that are provided by | ||
9858 | % the \pkg{verse} package. |\\+| causes a linebreak within a verse | ||
9859 | % line. In contrast to |\\>|, the subsequent line is not indented and | ||
9860 | % complies to any already defined indent pattern. \cs{@vscentercr} | ||
9861 | % must be redefined accordingly. | ||
9862 | % \begin{macrocode} | ||
9863 | \ifboolexpr{bool {@pkg@poetry@verse} or bool {ekd@memoir@loaded}} | ||
9864 | {\newcommand{\@vsifplus}[1]{\@ifnextchar +{\@firstoftwo{#1}}} | ||
9865 | \renewcommand{\@vscentercr}{% | ||
9866 | \ifhmode \unskip\else \@nolnerr\fi | ||
9867 | \@vsifgt{\verselinebreak}{% | ||
9868 | \@vsifplus{\stepcounter{vslineno}% | ||
9869 | \par\@ifstar{\nobreak\@vsxcentercr}{% | ||
9870 | \@vsifbang{\@ifnextchar[ {\@vsicentercr}{}}{\@vsxcentercr}% | ||
9871 | }% | ||
9872 | }{% | ||
9873 | \@vstypelinenum | ||
9874 | \incr@vsline% | ||
9875 | \par\@ifstar{\nobreak\@vsxcentercr}{% | ||
9876 | \@vsifbang{\@ifnextchar[ {\@vsicentercr}{}}{\@vsxcentercr}% | ||
9877 | }% | ||
9878 | }% | ||
9879 | }% | ||
9880 | } | ||
9881 | }{} | ||
9882 | % \end{macrocode} | ||
9883 | % \end{macro} | ||
9852 | % A small patch is applied to the \pkg{verse} package, then | 9884 | % A small patch is applied to the \pkg{verse} package, then |
9853 | % \env{ekdverse} is defined:--- | 9885 | % \env{ekdverse} is defined:--- |
9854 | % \begin{macrocode} | 9886 | % \begin{macrocode} |