From 89adab7e4e05bad0f08f9977b4a13c3673e45019 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Fri, 27 Mar 2020 16:21:07 +0100 Subject: cleanup, no more pg_i/pg_ii --- ekdosis.dtx | 68 +++++++++---------------------------------------------------- 1 file changed, 10 insertions(+), 58 deletions(-) (limited to 'ekdosis.dtx') diff --git a/ekdosis.dtx b/ekdosis.dtx index 80b4a81..9d5583f 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -638,9 +638,6 @@ Running "make install" installs the files in the local TeX tree. \luadirect{ekdosis.storeabspg( \luastring{\zref@extract{ekd:\theekd@lab}{abspage}})}% \ifekd@state\add@apparatus\fi% - % \luadirect{% - % ekdosis.storeabspg(\luastring{\zref@extract{ekd:\theekd@lab}{abspage}}, - % "pg_ii")}% \luadirect{tex.sprint(ekdosis.removesp(\luastringN{#2}))}% \ekd@isinappfalse} \def\current@ref@arg#1#2{{%\textdir TLT% @@ -930,9 +927,6 @@ Running "make install" installs the files in the local TeX tree. \luadirect{ekdosis.storeabspg( \luastring{\zref@extract{ekd:\theekd@lab}{abspage}})}% \ifekd@state\add@apparatus\fi% - % \luadirect{% - % ekdosis.storeabspg(\luastring{\zref@extract{ekd:\theekd@lab}{abspage}}, - % "pg_ii")}% \ifekd@mapps% \ifnum% \luadirect{tex.sprint(ekdosis.get_bagunits(\luastringO{\ekdan@type}))} @@ -1053,9 +1047,6 @@ Running "make install" installs the files in the local TeX tree. \NewDocumentCommand{\EkdosisStart}{}{% \stepcounter{ekd@lab}% \zlabel{ekd:\theekd@lab}% - % \luadirect{% - % ekdosis.storeabspg(\luastring{\zref@extract{ekd:\theekd@lab}{abspage}}, - % "pg_i")}% } \NewDocumentCommand{\EkdosisOn}{}{% \ekd@statetrue} @@ -1916,8 +1907,6 @@ function ekdosis.closestream() return true end -local pg_i = 0 -local pg_ii = 0 local cur_abs_pg = 0 function ekdosis.update_abspg(n) @@ -1925,28 +1914,11 @@ function ekdosis.update_abspg(n) return true end -function ekdosis.get_abs_page() - return "i:" .. pg_i .. ", ii:" .. pg_ii .. ", abs:" .. cur_abs_pg -end - -function ekdosis.storeabspg(n, pg) - if pg == "pg_i" then - pg_i = n - elseif pg == "pg_ii" then - pg_ii = n - end +function ekdosis.storeabspg(n) cur_abs_pg = n return true end -ekdosis.getabspg = function(pg) --not used - if pg == "pg_i" then - return pg_i - elseif pg == "pg_ii" then - return pg_ii - end -end - -- Build environments to be aligned -- local aligned_texts = {} @@ -2213,36 +2185,16 @@ end local curcol_curabspg = {} function ekdosis.testapparatus() - -- if curcol ~= "x" - -- then - if isfound(curcol_curabspg, curcol.."-"..cur_abs_pg) - then - return "\\boolfalse{do@app}" - else - table.insert(curcol_curabspg, curcol.."-"..cur_abs_pg) - if next(apparatuses) ~= nil then - reset_bagunits() - end - return "\\booltrue{do@app}" + if isfound(curcol_curabspg, curcol.."-"..cur_abs_pg) + then + return "\\boolfalse{do@app}" + else + table.insert(curcol_curabspg, curcol.."-"..cur_abs_pg) + if next(apparatuses) ~= nil then + reset_bagunits() end - -- else - -- if tonumber(pg_ii) < tonumber(pg_i) - -- or tonumber(pg_ii) < tonumber(cur_abs_pg) then - -- pg_i = cur_abs_pg - -- if next(apparatuses) ~= nil then - -- reset_bagunits() - -- end - -- return "\\booltrue{do@app}" - -- elseif tonumber(pg_ii) == tonumber(pg_i) then - -- return "\\boolfalse{do@app}" - -- elseif tonumber(pg_ii) > tonumber(pg_i) then - -- pg_i = cur_abs_pg - -- if next(apparatuses) ~= nil then - -- reset_bagunits() - -- end - -- return "\\booltrue{do@app}" - -- end - -- end + return "\\booltrue{do@app}" + end end local lnlabs = {} -- cgit v1.2.3