From a43a2ad77e27e64a6c82689d6d9025f15cdbccba Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Tue, 31 Mar 2020 15:14:27 +0200 Subject: use \switchcolumn instead of environments --- ekdosis.dtx | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/ekdosis.dtx b/ekdosis.dtx index cf5fc4b..2627afe 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -1981,29 +1981,31 @@ function ekdosis.mkenv() do if isfound(texts_w_apparatus, aligned_texts[i].text) then - table.insert(environments, "\\NewDocumentEnvironment{" - .. aligned_texts[i].text - .. "}{}{\\begin{nthcolumn}{" - .. aligned_texts[i].column - .."}\\csname ekd@storecol\\endcsname{\\thecolumn}" - .."\\begin{ekdosis}}{\\end{ekdosis}\\end{nthcolumn}}") - table.insert(environments, "\\NewDocumentEnvironment{" - .. aligned_texts[i].text - .. "*}{O{}}{\\begin{nthcolumn*}{" - .. aligned_texts[i].column - .."}\\csname ekd@storecol\\endcsname{\\thecolumn}" - .."\\begin{ekdosis}}{\\end{ekdosis}\\end{nthcolumn*}}") + table.insert(environments, "\\NewDocumentEnvironment{".. aligned_texts[i].text.."}{}" + .."{\\switchcolumn[".. aligned_texts[i].column.."]" + .."\n" + .."\\begin{ekdosis}" + .."\n" + .."\\csname ekd@storecol\\endcsname{\\thecolumn}" + .."\n" + .."}{\\end{ekdosis}}") + table.insert(environments, "\\NewDocumentEnvironment{".. aligned_texts[i].text.."*}{}" + .."{\\switchcolumn[".. aligned_texts[i].column.."]*" + .."\n" + .."\\begin{ekdosis}" + .."\n" + .."\\csname ekd@storecol\\endcsname{\\thecolumn}" + .."\n" + .."}{\\end{ekdosis}}") else - table.insert(environments, "\\NewDocumentEnvironment{" - .. aligned_texts[i].text - .. "}{}{\\begin{nthcolumn}{" - .. aligned_texts[i].column - .."}}{\\end{nthcolumn}}") - table.insert(environments, "\\NewDocumentEnvironment{" - .. aligned_texts[i].text - .. "*}{O{}}{\\begin{nthcolumn*}{" - .. aligned_texts[i].column - .."}}{\\end{nthcolumn*}}") + table.insert(environments, "\\NewDocumentEnvironment{".. aligned_texts[i].text.."}{}" + .."{\\switchcolumn[".. aligned_texts[i].column.."]" + .."\n" + .."}{}") + table.insert(environments, "\\NewDocumentEnvironment{".. aligned_texts[i].text.."*}{}" + .."{\\switchcolumn["..aligned_texts[i].column.."]*" + .."\n" + .."}{}") end end str = table.concat(environments) -- cgit v1.2.3