aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2020-05-23 11:04:39 +0200
committerRobert Alessi <alessi@robertalessi.net>2020-05-23 11:04:39 +0200
commit6923c53bbe2fa38e2ea5ae3873df0c9e993a9a7c (patch)
treed38380d708118c6a14ed0670d8bf1172b1583472
parent5ffcc3045fb94a413bbe2d32e85fd993d23307f4 (diff)
downloadekdosis-6923c53bbe2fa38e2ea5ae3873df0c9e993a9a7c.tar.gz
added type attribute to lem and rdg
-rw-r--r--ekdosis.dtx20
1 files changed, 13 insertions, 7 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 9c6a878..dcc4c9b 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -751,7 +751,7 @@ Running "make install" installs the files in the local TeX tree.
751 }\unexpanded\expandafter{\ekd@postrefnum}% 751 }\unexpanded\expandafter{\ekd@postrefnum}%
752 }% 752 }%
753\define@cmdkeys[ekd]{lemrdg}[ekdlr@]{wit, alt, pre, post, prewit, 753\define@cmdkeys[ekd]{lemrdg}[ekdlr@]{wit, alt, pre, post, prewit,
754 postwit} 754 postwit, type}
755\define@cmdkey[ekd]{lem}[ekdl@]{sep}{} 755\define@cmdkey[ekd]{lem}[ekdl@]{sep}{}
756\presetkeys[ekd]{lem}{sep=\ekdsep}{} 756\presetkeys[ekd]{lem}{sep=\ekdsep}{}
757\define@boolkeys[ekd]{lem}[ekdl@]{nolem, nosep}[true] 757\define@boolkeys[ekd]{lem}[ekdl@]{nolem, nosep}[true]
@@ -1482,7 +1482,7 @@ local cmdtotags = {
1482 {a="textsc", b="hi", c=" rend=\"smallcaps\""}, 1482 {a="textsc", b="hi", c=" rend=\"smallcaps\""},
1483 {a="textsf", b="hi", c=" rend=\"sf\""}, 1483 {a="textsf", b="hi", c=" rend=\"sf\""},
1484 {a="arbup", b="hi", c=" rend=\"sup\""}, 1484 {a="arbup", b="hi", c=" rend=\"sup\""},
1485 {a="txarb", b="s", c=" xml:lang=\"ar-arb\""}, 1485 {a="txarb", b="s", c=" xml:lang=\"arb\""},
1486 {a="arb", b="s", 1486 {a="arb", b="s",
1487 c=" xml:lang=\"ar-Latn\" type=\"transliterated\" subtype=\"arabtex\""} 1487 c=" xml:lang=\"ar-Latn\" type=\"transliterated\" subtype=\"arabtex\""}
1488} 1488}
@@ -1496,7 +1496,7 @@ local texpatttotags = {
1496local envtotags = { 1496local envtotags = {
1497 {a="ekdverse", b="lg", c=""}, 1497 {a="ekdverse", b="lg", c=""},
1498 {a="txarabtr", b="p", c=" xml:lang=\"ar-Latn\" type=\"transliterated\""}, 1498 {a="txarabtr", b="p", c=" xml:lang=\"ar-Latn\" type=\"transliterated\""},
1499 {a="txarab", b="p", c=" xml:lang=\"ar-arb\""}, 1499 {a="txarab", b="p", c=" xml:lang=\"arb\""},
1500 {a="center", b="p", c=" rend=\"centered\""}, 1500 {a="center", b="p", c=" rend=\"centered\""},
1501 {a="verse", b="lg", c=""}, 1501 {a="verse", b="lg", c=""},
1502 {a="arab", b="p", 1502 {a="arab", b="p",
@@ -1637,15 +1637,21 @@ local function lem_rdg_totei(str)
1637 function(bkslash, cmd, opt, arg) 1637 function(bkslash, cmd, opt, arg)
1638 opt = string.sub(opt, 2, -2) 1638 opt = string.sub(opt, 2, -2)
1639 arg = string.sub(arg, 2, -2) 1639 arg = string.sub(arg, 2, -2)
1640 opt = get_attr_value(opt, "wit") 1640 -- opt = get_attr_value(opt, "wit")
1641 --
1642 teiwit = get_attr_value(opt, "wit")
1643 if teiwit ~= "" then teiwit = " wit=\""..ekdosis.getsiglum(teiwit, "tei").."\"" else end
1644 teitype = get_attr_value(opt, "type")
1645 if teitype ~= "" then teitype = " type=\""..teitype.."\"" else end
1646 --
1641 if opt == "" 1647 if opt == ""
1642 then 1648 then
1643 return lem_rdg_totei(string.format("<%s>%s</%s>", 1649 return lem_rdg_totei(string.format("<%s>%s</%s>",
1644 cmd, arg, cmd)) 1650 cmd, arg, cmd))
1645 else 1651 else
1646 opt = ekdosis.getsiglum(opt, "tei") 1652 -- opt = ekdosis.getsiglum(opt, "tei")
1647 return lem_rdg_totei(string.format("<%s wit=\"%s\">%s</%s>", 1653 return lem_rdg_totei(string.format("<%s%s%s>%s</%s>",
1648 cmd, opt, arg, cmd)) 1654 cmd, teiwit, teitype, arg, cmd))
1649 end 1655 end
1650 end) 1656 end)
1651 str = gsub(str, spcenc^-0 * dblbkslash * lemrdg * spcenc^-1 * bcbraces * spcenc^-1, 1657 str = gsub(str, spcenc^-0 * dblbkslash * lemrdg * spcenc^-1 * bcbraces * spcenc^-1,