aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2021-03-15 09:52:25 +0100
committerRobert Alessi <alessi@robertalessi.net>2021-03-15 09:52:25 +0100
commit6efb1bccc1c98f55af0d2579dae22e643e80e1c1 (patch)
tree5b459800b1fb78599d1c1c5fbc3ebe782125b6bc
parent993a42f4327b64248980a92d8f06d1eb44866d1a (diff)
downloadekdosis-6efb1bccc1c98f55af0d2579dae22e643e80e1c1.tar.gz
versetotei(): move first gsubs(str) as arg(str)
-rw-r--r--ekdosis.dtx12
1 files changed, 8 insertions, 4 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index bd95000..bb02250 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -3673,7 +3673,7 @@ argument of the
3673 It is an ancient Mariner,\\ 3673 It is an ancient Mariner,\\
3674 And he stoppeth one of three.\\ 3674 And he stoppeth one of three.\\
3675 ‘By thy long grey beard and glittering eye,\\ 3675 ‘By thy long grey beard and glittering eye,\\
3676 Now wherefore stopp'st thou me?\\[\parskip] 3676 Now wherefore stopp'st thou me?\\[2ex]
3677 % 3677 %
3678 The Bridegroom's doors are opened wide,\\ 3678 The Bridegroom's doors are opened wide,\\
3679 And I am next of kin;\\ 3679 And I am next of kin;\\
@@ -3685,6 +3685,10 @@ argument of the
3685%</example> 3685%</example>
3686% \fi 3686% \fi
3687% 3687%
3688% As can be seen, stanzas are visually separated from one another by
3689% an additional vertical space of \unit[2]{ex} (l.~5), while the
3690% subsequent line is rendered inert.
3691%
3688% \begingroup 3692% \begingroup
3689% \setcolumnwidth{0.6\textwidth} 3693% \setcolumnwidth{0.6\textwidth}
3690% \setlength{\leftmargini}{0em} 3694% \setlength{\leftmargini}{0em}
@@ -9022,11 +9026,11 @@ end
9022 9026
9023-- better use lpeg: look into this later 9027-- better use lpeg: look into this later
9024local function versetotei(str) 9028local function versetotei(str)
9025 str = string.gsub(str, "\\begin%s?%{patverse%}", "")
9026 str = string.gsub(str, "\\end%s?%{patverse%}", "")
9027 str = string.gsub(str, "\\indentpattern%s?%b{}", "")
9028 str = string.gsub(str, "\\begin%s?%{ekdverse%}(%b[])(.-)\\end%s?%{ekdverse%}", function(opt, arg) 9029 str = string.gsub(str, "\\begin%s?%{ekdverse%}(%b[])(.-)\\end%s?%{ekdverse%}", function(opt, arg)
9029 arg = string.gsub(arg, "\\par%s?", "") 9030 arg = string.gsub(arg, "\\par%s?", "")
9031 arg = string.gsub(arg, "\\begin%s?%{patverse%}", "")
9032 arg = string.gsub(arg, "\\end%s?%{patverse%}", "")
9033 arg = string.gsub(arg, "\\indentpattern%s?%b{}", "")
9030 opt = string.sub(opt, 2, -2) 9034 opt = string.sub(opt, 2, -2)
9031 teitype = get_attr_value(opt, "type") 9035 teitype = get_attr_value(opt, "type")
9032 if teitype ~= "" then teitype = " type=\""..teitype.."\"" else end 9036 if teitype ~= "" then teitype = " type=\""..teitype.."\"" else end