From ddaa143a6cfa1ace2d12be9ceaaf524658edabb8 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Fri, 13 Mar 2020 10:55:23 +0100 Subject: added paired pages and column synchronization --- ekdosis.dtx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ekdosis.dtx b/ekdosis.dtx index 83b3ec0..8555005 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -1073,6 +1073,7 @@ Running "make install" installs the files in the local TeX tree. store lcols = \lcols@num, store texts = \texts@value, store apparatus = \apparatus@value, + bool paired = \ifekd@paired, initial tcols = 2, initial lcols = 1, initial texts = edition;translation, @@ -1088,7 +1089,11 @@ Running "make install" installs the files in the local TeX tree. \luadirect{ekdosis.mkenvdata( \luastring{\apparatus@value}, "apparatus")} \luadirect{tex.sprint(ekdosis.mkenv())} + \ifekd@paired + \begin{paracol}[\lcols@num]{\tcols@num} + \else \begin{paracol}[\lcols@num]*{\tcols@num} + \fi } {\luadirect{ekdosis.flushenvdata()} \end{paracol}} @@ -1971,12 +1976,22 @@ function ekdosis.mkenv() .. "}{}{\\begin{nthcolumn}{" .. aligned_texts[i].column .."}\\begin{ekdosis}}{\\end{ekdosis}\\end{nthcolumn}}") + table.insert(environments, "\\NewDocumentEnvironment{" + .. aligned_texts[i].text + .. "*}{O{}}{\\begin{nthcolumn*}{" + .. aligned_texts[i].column + .."}\\begin{ekdosis}}{\\end{ekdosis}\\end{nthcolumn*}}") 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*}}") end end str = table.concat(environments) -- cgit v1.2.3