From 58fdd08bfa8baada5b565e1afd974e926888b06a Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Sun, 12 May 2019 11:59:12 +0200
Subject: each hand should go into one single <handDesc> element with an
 additional attribute to record the total number of hands

---
 ekdosis.dtx | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index dc5d439..1d46f1d 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -793,7 +793,7 @@ function ekdosis.newhand(id, witid, siglum, description)
       else
       end
       table.insert(listWit[indexwit].handDesc,
-		   {xmlid = id, abbr = siglum, handNote = description})
+		   {xmlid = id, abbr = siglum, detailsDesc = description})
    end
    return true
 end
@@ -872,9 +872,9 @@ end
 -- begin totei functions
 
 local cmdtotags = {
-   {a="footnote", b="note", c=" place=\"bottom\""},
    {a="textsuperscript", b="hi", c=" rend=\"sup\""},
    {a="textsubscript", b="hi", c=" rend=\"sub\""},
+   {a="footnote", b="note", c=" place=\"bottom\""},
    {a="textbf", b="hi", c=" rend=\"bold\""},
    {a="textit", b="hi", c=" rend=\"italic\""},
    {a="textsc", b="hi", c=" rend=\"smallcaps\""},
@@ -1118,24 +1118,24 @@ function ekdosis.openteistream()
       end
       if listWit[i].handDesc ~= nil then
 	 f:write("<physDesc>", "\n")
+	 f:write("<handDesc hands=\"", #listWit[i].handDesc, "\">", "\n")
 	 local j = 1
 	 while listWit[i].handDesc[j]
 	 do
-	    f:write("<handDesc xml:id=\"", listWit[i].handDesc[j].xmlid, "\">", "\n")
 	    -- f:write('<p><abbr type="siglum">', textotei(listWit[i].handDesc[j].abbr), "</abbr></p>", "\n")
-	    if listWit[i].handDesc[j].handNote == ""
-	    then
-	       f:write('<handNote><abbr type="siglum">', textotei(listWit[i].handDesc[j].abbr), "</abbr></handNote>", "\n")
-	    else
-	       f:write("<handNote>", "\n")
+	    -- if listWit[i].handDesc[j].handNote == ""
+	    -- then
+	    --    f:write('<handNote><abbr type="siglum">', textotei(listWit[i].handDesc[j].abbr), "</abbr></handNote>", "\n")
+	    -- else
+	       f:write("<handNote xml:id=\"", listWit[i].handDesc[j].xmlid, "\">", "\n")
 	       f:write('<abbr type="siglum">', textotei(listWit[i].handDesc[j].abbr), "</abbr>", "\n")
-	       f:write("<p>", textotei(listWit[i].handDesc[j].handNote), "</p>", "\n")
+	       f:write("<p>", textotei(listWit[i].handDesc[j].detailsDesc), "</p>", "\n")
 	       f:write("</handNote>", "\n")
 	       -- f:write("<handNote>\n<p>", textotei(listWit[i].handDesc[j].handNote), "</p>\n</handNote>", "\n")
-	    end
+	    -- end
 	    j = j + 1
-	    f:write("</handDesc>", "\n")
 	 end
+	 f:write("</handDesc>", "\n")
 	 f:write("</physDesc>", "\n")
       else end
       if listWit[i].history ~= nil then
-- 
cgit v1.2.3

