From 6ef534628809195e81acd7250eb340a36ffed11e Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Mon, 8 Apr 2019 14:15:50 +0200 Subject: \DeclareNewHand only added the last hand. fixed --- ekdosis.dtx | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'ekdosis.dtx') diff --git a/ekdosis.dtx b/ekdosis.dtx index af96445..2f37a27 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -705,7 +705,13 @@ function ekdosis.newhand(id, witid, siglum, description) table.insert(idsRend, {xmlid = id, head = siglum}) table.sort(idsRend, function(a ,b) return(#a.xmlid > #b.xmlid) end) local indexwit = getindex(witid, listWit) - listWit[indexwit].handDesc = {xmlid = id, head = siglum, detailsDesc = description} + -- listWit[indexwit].handDesc = {xmlid = id, head = siglum, detailsDesc = description} + if listWit[indexwit].handDesc == nil + then + listWit[indexwit].handDesc = {} + else + end + table.insert(listWit[indexwit].handDesc, {xmlid = id, head = siglum, detailsDesc = description}) end return true end @@ -855,12 +861,17 @@ function ekdosis.openteistream() end if listWit[i].handDesc ~= nil then f:write("", "\n") - f:write("", "\n") - f:write("", ekdosis.textotei(listWit[i].handDesc.head), "", "\n") - if listWit[i].handDesc.detailsDesc == "" then else - f:write("

", ekdosis.textotei(listWit[i].handDesc.detailsDesc), "

", "\n") + local j = 1 + while listWit[i].handDesc[j] + do + f:write("", "\n") + f:write("", ekdosis.textotei(listWit[i].handDesc[j].head), "", "\n") + if listWit[i].handDesc[j].detailsDesc == "" then else + f:write("

", ekdosis.textotei(listWit[i].handDesc[j].detailsDesc), "

", "\n") + end + j = j + 1 + f:write("
", "\n") end - f:write("
", "\n") f:write("
", "\n") else end if listWit[i].history ~= nil then -- cgit v1.2.3