From e47486aa0ab12efcf9bea871902e37e12ddb48f2 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Mon, 22 Apr 2019 19:54:23 +0200 Subject: insert detailsDesc before and use it as information item in the conspectus siglorum --- ekdosis.dtx | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'ekdosis.dtx') diff --git a/ekdosis.dtx b/ekdosis.dtx index 0840527..00862b8 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -388,8 +388,9 @@ idno={}, msName={}, origDate={}][3]{% |\luastringN|{\commandkey{msName}}, |\luastringN|{\commandkey{origDate}})} } -\NewDocumentCommand{\DeclareNewWitness}{m m O{} +O{}}{% - \declare@new@witness[#3]{#1}{#2}{#4} +\NewDocumentCommand{\DeclareNewWitness}{m m m o}{% + \IfNoValueTF{#4}{\declare@new@witness{#1}{#2}{#3}} + {\declare@new@witness[#4]{#1}{#2}{#3}} } \@onlypreamble\DeclareNewWitness \NewDocumentCommand{\DeclareNewHand}{m m m +O{}}{ @@ -723,13 +724,13 @@ function ekdosis.newwitness(id, table.sort(idsRend, function(a ,b) return(#a.xmlid > #b.xmlid) end) table.insert(listWit, {xmlid = id, abbr = siglum, + detailsDesc = description, msIdentifier = { settlement = Settlement, repository = Repository, idno = Idno, - msName = MsName - }, - detailsDesc = description}) + msName = MsName} + }) local indexwit = getindex(id, listWit) if OrigDate ~= "" then listWit[indexwit].history = {} @@ -844,8 +845,8 @@ local cmdtotags = { {a="textsc", b="hi", c=" rend=\"smallcaps\""}, {a="textsf", b="hi", c=" rend=\"sf\""}, {a="arbup", b="hi", c=" rend=\"sup\""}, - {a="txarb", b="foreign", c=" xml:lang=\"arb\""}, - {a="arb", b="foreign", c=" xml:lang=\"arb-Latn\" type=\"arabtex\""} + {a="txarb", b="s", c=" xml:lang=\"arb\""}, + {a="arb", b="s", c=" xml:lang=\"arb-Latn\" type=\"transliterated\" subtype=\"arabtex\""} } function ekdosis.newcmdtotag(cmd, tag, attr) @@ -955,6 +956,7 @@ function ekdosis.openteistream() for i = 1,#listWit do f:write('", "\n") f:write('', ekdosis.textotei(listWit[i].abbr), "", "\n") + f:write(ekdosis.textotei(listWit[i].detailsDesc), "\n") f:write("", "\n") if listWit[i].msIdentifier.settlement == "" and listWit[i].msIdentifier.repository == "" @@ -1007,9 +1009,9 @@ function ekdosis.openteistream() f:write("", "\n") f:write("", "\n") end - if listWit[i].detailsDesc == "" then else - f:write("

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

", "\n") - end + -- if listWit[i].detailsDesc == "" then else + -- f:write("

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

", "\n") + -- end f:write("
", "\n") f:write("
", "\n") end @@ -1073,15 +1075,16 @@ end function ekdosis.basic_cs(msid) local indexwit = getindex(msid, listWit) siglum = listWit[indexwit].abbr - if listWit[indexwit].detailsDesc == "" - then - name = listWit[indexwit].msIdentifier.msName - else - name = listWit[indexwit].msIdentifier.msName - .."\\thinspace\\newline\\bgroup\\footnotesize{}".. - listWit[indexwit].detailsDesc - .."\\egroup{}" - end + -- if listWit[indexwit].detailsDesc == "" + -- then + -- name = listWit[indexwit].msIdentifier.msName + -- else + -- name = listWit[indexwit].msIdentifier.msName + -- .."\\thinspace\\newline\\bgroup\\footnotesize{}".. + -- listWit[indexwit].detailsDesc + -- .."\\egroup{}" + -- end + name = listWit[indexwit].detailsDesc if listWit[indexwit].history ~= nil and listWit[indexwit].history.origin ~= nil -- cgit v1.2.3