aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2021-11-10 09:31:18 +0100
committerRobert Alessi <alessi@robertalessi.net>2021-11-10 09:31:18 +0100
commit35b751c33c56ff6cb3df176ce46f349c8c4a8043 (patch)
tree973384618e74acf27751c438e21bcb26e07620eb
parent079ca1921ccba0753f2c4c56b096e50672b9f503 (diff)
downloadekdosis-35b751c33c56ff6cb3df176ce46f349c8c4a8043.tar.gz
use ekd_abs_pg instead of cur_abs_pg in .ekd file
-rw-r--r--ekdosis.dtx38
1 files changed, 22 insertions, 16 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 9530825..751c1f3 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -811,7 +811,7 @@ along with this program. If not, see
811\usepackage{needspace} 811\usepackage{needspace}
812\NewDocumentCommand{\captof}{O{listing} m O{}}{% 812\NewDocumentCommand{\captof}{O{listing} m O{}}{%
813 \bgroup 813 \bgroup
814 \needspace{5\baselineskip}% 814 \nobreak
815 \vskip 1ex plus 2pt minus 2pt% 815 \vskip 1ex plus 2pt minus 2pt%
816 \captionof{#1}{#2}% 816 \captionof{#1}{#2}%
817 #3% 817 #3%
@@ -11757,6 +11757,7 @@ function ekdosis.closestream()
11757end 11757end
11758 11758
11759local cur_abs_pg = 0 11759local cur_abs_pg = 0
11760local ekd_abs_pg = 0
11760local pg_i = nil 11761local pg_i = nil
11761local pg_ii = nil 11762local pg_ii = nil
11762local prevcol = nil 11763local prevcol = nil
@@ -11770,13 +11771,18 @@ function ekdosis.update_abspg(n) -- not used
11770end 11771end
11771 11772
11772function ekdosis.storeabspg(n, pg) 11773function ekdosis.storeabspg(n, pg)
11774 if tonumber(n) > tonumber(cur_abs_pg)
11775 then
11776 ekd_abs_pg = ekd_abs_pg + 1
11777 end
11778 cur_abs_pg = n
11779 n = ekd_abs_pg
11773 if pg == "pg_i" then 11780 if pg == "pg_i" then
11774 pg_i = n 11781 pg_i = n
11775 elseif pg == "pg_ii" then 11782 elseif pg == "pg_ii" then
11776 pg_ii = n 11783 pg_ii = n
11777 table.insert(check_resetlineno, curcol.."-"..pg_ii) 11784 table.insert(check_resetlineno, curcol.."-"..pg_ii)
11778 end 11785 end
11779 cur_abs_pg = n
11780 return true 11786 return true
11781end 11787end
11782 11788
@@ -12135,8 +12141,8 @@ function ekdosis.appin(str, teitype)
12135 local f = io.open(tex.jobname.."_tmp.ekd", "a+") 12141 local f = io.open(tex.jobname.."_tmp.ekd", "a+")
12136 if next(apparatuses) == nil 12142 if next(apparatuses) == nil
12137 then 12143 then
12138 f:write("<", cur_abs_pg, cur_alignment, curcol, "-0>", str, "</", 12144 f:write("<", ekd_abs_pg, cur_alignment, curcol, "-0>", str, "</",
12139 cur_abs_pg, cur_alignment, curcol, "-0>\n") 12145 ekd_abs_pg, cur_alignment, curcol, "-0>\n")
12140 else 12146 else
12141 for i = 1,#apparatuses 12147 for i = 1,#apparatuses
12142 do 12148 do
@@ -12145,8 +12151,8 @@ function ekdosis.appin(str, teitype)
12145 break 12151 break
12146 end 12152 end
12147 end 12153 end
12148 f:write("<", cur_abs_pg, cur_alignment, curcol, "-", 12154 f:write("<", ekd_abs_pg, cur_alignment, curcol, "-",
12149 appno, ">", str, "</", cur_abs_pg, cur_alignment, curcol, "-", appno, ">\n") 12155 appno, ">", str, "</", ekd_abs_pg, cur_alignment, curcol, "-", appno, ">\n")
12150 end 12156 end
12151 f:close() 12157 f:close()
12152 return true 12158 return true
@@ -12164,10 +12170,10 @@ function ekdosis.appout()
12164 table.insert(output, "\\csname ekd@begin@apparatus\\endcsname\\ignorespaces") 12170 table.insert(output, "\\csname ekd@begin@apparatus\\endcsname\\ignorespaces")
12165-- table.insert(output, "\\noindent ") 12171-- table.insert(output, "\\noindent ")
12166 for i in string.gmatch(t, 12172 for i in string.gmatch(t,
12167 "<"..cur_abs_pg 12173 "<"..ekd_abs_pg
12168 ..cur_alignment_patt 12174 ..cur_alignment_patt
12169 ..curcol.."%-0>.-</" 12175 ..curcol.."%-0>.-</"
12170 ..cur_abs_pg 12176 ..ekd_abs_pg
12171 ..cur_alignment_patt 12177 ..cur_alignment_patt
12172 ..curcol.."%-0>") 12178 ..curcol.."%-0>")
12173 do 12179 do
@@ -12179,10 +12185,10 @@ function ekdosis.appout()
12179 local n = 1 12185 local n = 1
12180 while apparatuses[n] 12186 while apparatuses[n]
12181 do 12187 do
12182 if string.match(t, "<"..cur_abs_pg 12188 if string.match(t, "<"..ekd_abs_pg
12183 ..cur_alignment_patt 12189 ..cur_alignment_patt
12184 ..curcol.."%-"..n..">.-</" 12190 ..curcol.."%-"..n..">.-</"
12185 ..cur_abs_pg 12191 ..ekd_abs_pg
12186 ..cur_alignment_patt 12192 ..cur_alignment_patt
12187 ..curcol.."%-"..n..">") 12193 ..curcol.."%-"..n..">")
12188 then 12194 then
@@ -12250,10 +12256,10 @@ function ekdosis.appout()
12250 table.insert(output, "\\relax") 12256 table.insert(output, "\\relax")
12251 end 12257 end
12252 for i in string.gmatch(t, 12258 for i in string.gmatch(t,
12253 "<"..cur_abs_pg 12259 "<"..ekd_abs_pg
12254 ..cur_alignment_patt 12260 ..cur_alignment_patt
12255 ..curcol.."%-"..n..">.-</" 12261 ..curcol.."%-"..n..">.-</"
12256 ..cur_abs_pg 12262 ..ekd_abs_pg
12257 ..cur_alignment_patt 12263 ..cur_alignment_patt
12258 ..curcol.."%-"..n..">") 12264 ..curcol.."%-"..n..">")
12259 do 12265 do
@@ -12273,8 +12279,8 @@ function ekdosis.appout()
12273 end 12279 end
12274 f:close() 12280 f:close()
12275 str = table.concat(output) 12281 str = table.concat(output)
12276 str = string.gsub(str, "</"..cur_abs_pg..cur_alignment_patt..curcol.."%-[0-9]>", "") 12282 str = string.gsub(str, "</"..ekd_abs_pg..cur_alignment_patt..curcol.."%-[0-9]>", "")
12277 str = string.gsub(str, "<"..cur_abs_pg..cur_alignment_patt..curcol.."%-[0-9]>", " ") 12283 str = string.gsub(str, "<"..ekd_abs_pg..cur_alignment_patt..curcol.."%-[0-9]>", " ")
12278 return str 12284 return str
12279 else 12285 else
12280 end 12286 end
@@ -12294,7 +12300,7 @@ end
12294local curcol_curabspg = {} 12300local curcol_curabspg = {}
12295 12301
12296function ekdosis.testapparatus() 12302function ekdosis.testapparatus()
12297 if isfound(curcol_curabspg, curcol.."-"..cur_abs_pg) 12303 if isfound(curcol_curabspg, curcol.."-"..ekd_abs_pg)
12298 then 12304 then
12299 if newalignment 12305 if newalignment
12300 then 12306 then
@@ -12307,7 +12313,7 @@ function ekdosis.testapparatus()
12307 return "\\boolfalse{do@app}" 12313 return "\\boolfalse{do@app}"
12308 end 12314 end
12309 else 12315 else
12310 table.insert(curcol_curabspg, curcol.."-"..cur_abs_pg) 12316 table.insert(curcol_curabspg, curcol.."-"..ekd_abs_pg)
12311 if next(apparatuses) ~= nil then 12317 if next(apparatuses) ~= nil then
12312 reset_bagunits() 12318 reset_bagunits()
12313 end 12319 end