aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ekdosis.dtx42
1 files changed, 17 insertions, 25 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index e7d3660..ac4ae66 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -147,9 +147,9 @@ Running "make install" installs the files in the local TeX tree.
147\usepackage{hyperxmp} 147\usepackage{hyperxmp}
148\usepackage{uri} 148\usepackage{uri}
149\usepackage[numbered]{hypdoc} 149\usepackage[numbered]{hypdoc}
150\hypersetup{unicode=true, colorlinks, allcolors=cinnamon, 150\hypersetup{unicode=true, colorlinks, allcolors=cinnamon, keeppdfinfo,
151 linktocpage=true, pdfauthor={Robert Alessi}, pdftitle={The 151 linktocpage=true, pdfauthor={Robert Alessi}, pdftitle={The ekdosis
152 ekdosis package}, pdfcontactemail={alessi@robertalessi.net}, 152 package}, pdfcontactemail={alessi@robertalessi.net},
153 pdfcontacturl={http://www.robertalessi.net/ekdosis}, 153 pdfcontacturl={http://www.robertalessi.net/ekdosis},
154 pdfcopyright={Copyright (C) 2018 Robert Alessi 154 pdfcopyright={Copyright (C) 2018 Robert Alessi
155 <alessi@robertalessi.net>. This document is licensed under the 155 <alessi@robertalessi.net>. This document is licensed under the
@@ -1083,6 +1083,7 @@ Running "make install" installs the files in the local TeX tree.
1083 store texts = \texts@value, 1083 store texts = \texts@value,
1084 store apparatus = \apparatus@value, 1084 store apparatus = \apparatus@value,
1085 bool paired = \ifekd@paired, 1085 bool paired = \ifekd@paired,
1086 bool pagelineation = \ifekd@pagelineation,
1086 initial tcols = 2, 1087 initial tcols = 2,
1087 initial lcols = 1, 1088 initial lcols = 1,
1088 initial texts = edition;translation, 1089 initial texts = edition;translation,
@@ -1094,6 +1095,10 @@ Running "make install" installs the files in the local TeX tree.
1094\NewDocumentCommand{\ekd@storecol}{m}{% 1095\NewDocumentCommand{\ekd@storecol}{m}{%
1095 \luadirect{ekdosis.storecurcol(\luastring{\thecolumn})}% 1096 \luadirect{ekdosis.storecurcol(\luastring{\thecolumn})}%
1096} 1097}
1098\patchcmd{\pcol@nextpage}{%
1099 \endgroup}{%
1100 \ifekd@pagelineation\resetlinenumber\fi
1101 \endgroup}{}{}
1097\NewDocumentEnvironment{alignment}{O{}} 1102\NewDocumentEnvironment{alignment}{O{}}
1098{% 1103{%
1099 \ekvset{align}{#1}% 1104 \ekvset{align}{#1}%
@@ -1104,6 +1109,7 @@ Running "make install" installs the files in the local TeX tree.
1104 \luadirect{ekdosis.mkenvdata( 1109 \luadirect{ekdosis.mkenvdata(
1105 \luastring{\apparatus@value}, "apparatus" 1110 \luastring{\apparatus@value}, "apparatus"
1106 )} 1111 )}
1112 \setrunninglinenumbers
1107 \luadirect{tex.sprint(ekdosis.mkenv())} 1113 \luadirect{tex.sprint(ekdosis.mkenv())}
1108 \ifekd@paired 1114 \ifekd@paired
1109 \begin{paracol}[\lcols@num]{\tcols@num} 1115 \begin{paracol}[\lcols@num]{\tcols@num}
@@ -2204,34 +2210,20 @@ function ekdosis.appin_out(str, nl)
2204 return true 2210 return true
2205end 2211end
2206 2212
2213local curcol_curabspg = {}
2214
2207function ekdosis.testapparatus() 2215function ekdosis.testapparatus()
2208 if curcol ~= "x" 2216 if curcol ~= "x"
2209 then 2217 then
2210 if prevcol == nil or curcol ~= prevcol 2218 if isfound(curcol_curabspg, curcol.."-"..cur_abs_pg)
2211 then 2219 then
2212 prevcol = curcol 2220 return "\\boolfalse{do@app}"
2213 if next(apparatuses) ~= nil then
2214 reset_bagunits()
2215 end
2216 return "\\booltrue{do@app}"
2217 else 2221 else
2218 -- return "\\boolfalse{do@app}" 2222 table.insert(curcol_curabspg, curcol.."-"..cur_abs_pg)
2219 if tonumber(pg_ii) < tonumber(pg_i) 2223 if next(apparatuses) ~= nil then
2220 or tonumber(pg_ii) < tonumber(cur_abs_pg) then 2224 reset_bagunits()
2221 pg_i = cur_abs_pg
2222 if next(apparatuses) ~= nil then
2223 reset_bagunits()
2224 end
2225 return "\\booltrue{do@app}"
2226 elseif tonumber(pg_ii) == tonumber(pg_i) then
2227 return "\\boolfalse{do@app}"
2228 elseif tonumber(pg_ii) > tonumber(pg_i) then
2229 pg_i = cur_abs_pg
2230 if next(apparatuses) ~= nil then
2231 reset_bagunits()
2232 end
2233 return "\\booltrue{do@app}"
2234 end 2225 end
2226 return "\\booltrue{do@app}"
2235 end 2227 end
2236 else 2228 else
2237 if tonumber(pg_ii) < tonumber(pg_i) 2229 if tonumber(pg_ii) < tonumber(pg_i)