From 04c2290b7aab466cbcfbfdf4fb660f8aa0121883 Mon Sep 17 00:00:00 2001
From: Robert Alessi
") - str = string.gsub(str, "%<", "<") - str = string.gsub(str, "%>", ">") - str = lem_rdg_totei(str) +local function textotei(str) for i = 1,#cmdtotags do str = string.gsub(str, "(\\"..cmdtotags[i].a..")%s?%*?(%b{})", "%1[]%2") @@ -806,7 +808,7 @@ function ekdosis.textotei(str) braces = string.sub(braces, 2, -2) return string.format("\"%s\"", braces) end) - body = ekdosis.textotei(body) + body = textotei(body) -- return string.format("<"..cmdtotags[i].b..cmdtotags[i].c.." %s>%s"..cmdtotags[i].b..">", arg, body) return string.format("<"..cmdtotags[i].b..cmdtotags[i].c..">%s"..cmdtotags[i].b..">", body) end) @@ -814,19 +816,27 @@ function ekdosis.textotei(str) str = string.gsub(str, "\\(%a+)%s?%*?(%b[])(%b{})", function(cmd, opt, body) body = string.sub(body, 2, -2) - body = ekdosis.textotei(body) + body = textotei(body) return string.format("<%s>%s%s>", cmd, body, cmd) end) str = string.gsub(str, "\\(%a+)%s?%*?(%b{})", function(cmd, body) body = string.sub(body, 2, -2) - body = ekdosis.textotei(body) + body = textotei(body) return string.format("<%s>%s%s>", cmd, body, cmd) end) str = string.gsub(str, "(%s)(%>)", "%2") return str end +function ekdosis.textotei(str) + str = xml_entities(str) + str = string.gsub(str, "%s?\\par%s?", "
\n") + str = lem_rdg_totei(str) + str = textotei(str) + return str +end + local teifilename = tex.jobname.."-tei" function ekdosis.setteifilename(str) -- cgit v1.2.3