aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ekdosis.dtx66
1 files changed, 29 insertions, 37 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index a3095ce..39cc3a7 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -820,11 +820,11 @@ function ekdosis.newwitness(id,
820 OrigDate) 820 OrigDate)
821 if xmlidfound(id) 821 if xmlidfound(id)
822 then 822 then
823 tex.print([[\unexpanded{\PackageWarning{ekdosis}{"]] 823 tex.print("\\unexpanded{\\PackageWarning{ekdosis}{\""
824 ..id.. 824 ..id..
825 [[" already exists as a xml:id. ]] 825 "\" already exists as a xml:id. "
826 .. 826 ..
827 [[Please pick another id.}}]]) 827 "Please pick another id.}}")
828 else 828 else
829 table.insert(xmlids, {xmlid = id}) 829 table.insert(xmlids, {xmlid = id})
830 table.sort(xmlids, function(a ,b) return(#a.xmlid > #b.xmlid) end) 830 table.sort(xmlids, function(a ,b) return(#a.xmlid > #b.xmlid) end)
@@ -851,11 +851,11 @@ end
851function ekdosis.newhand(id, witid, siglum, description) 851function ekdosis.newhand(id, witid, siglum, description)
852 if xmlidfound(id) or not xmlidfound(witid) 852 if xmlidfound(id) or not xmlidfound(witid)
853 then 853 then
854 tex.print([[\unexpanded{\PackageWarning{ekdosis}{"]] 854 tex.print("\\unexpanded{\\PackageWarning{ekdosis}{\""
855 ..id.. 855 ..id..
856 [[" already exists as a xml:id. ]] 856 "\" already exists as a xml:id. "
857 .. 857 ..
858 [[Please pick another id.}}]]) 858 "Please pick another id.}}")
859 else 859 else
860 table.insert(xmlids, {xmlid = id}) 860 table.insert(xmlids, {xmlid = id})
861 table.sort(xmlids, function(a ,b) return(#a.xmlid > #b.xmlid) end) 861 table.sort(xmlids, function(a ,b) return(#a.xmlid > #b.xmlid) end)
@@ -877,11 +877,11 @@ end
877function ekdosis.newshorthand(id, rend, xmlids) 877function ekdosis.newshorthand(id, rend, xmlids)
878 if isintable(shorthands, id) 878 if isintable(shorthands, id)
879 then 879 then
880 tex.print([[\unexpanded{\PackageWarning{ekdosis}{"]] 880 tex.print("\\unexpanded{\\PackageWarning{ekdosis}{\""
881 ..id.. 881 ..id..
882 [[" already exists as a shorthand. ]] 882 "\" already exists as a shorthand. "
883 .. 883 ..
884 [[Please pick another shorthand.}}]]) 884 "Please pick another shorthand.}}")
885 else 885 else
886 table.insert(shorthands, { a = id, b = rend, c = xmlids }) 886 table.insert(shorthands, { a = id, b = rend, c = xmlids })
887 table.sort(shorthands, function(a ,b) return(#a.a > #b.a) end) 887 table.sort(shorthands, function(a ,b) return(#a.a > #b.a) end)
@@ -901,11 +901,11 @@ end
901function ekdosis.newscholar(id, siglum) 901function ekdosis.newscholar(id, siglum)
902 if xmlidfound(id) 902 if xmlidfound(id)
903 then 903 then
904 tex.print([[\unexpanded{\PackageWarning{ekdosis}{"]] 904 tex.print("\\unexpanded{\\PackageWarning{ekdosis}{\""
905 ..id.. 905 ..id..
906 [[" already exists as a xml:id. ]] 906 "\" already exists as a xml:id. "
907 .. 907 ..
908 [[Please pick another id.}}]]) 908 "Please pick another id.}}")
909 else 909 else
910 table.insert(xmlids, {xmlid = id}) 910 table.insert(xmlids, {xmlid = id})
911 table.sort(xmlids, function(a ,b) return(#a.xmlid > #b.xmlid) end) 911 table.sort(xmlids, function(a ,b) return(#a.xmlid > #b.xmlid) end)
@@ -981,11 +981,11 @@ local close_p = {
981function ekdosis.newcmdtotag(cmd, tag, attr) 981function ekdosis.newcmdtotag(cmd, tag, attr)
982 if isintable(cmdtotags, cmd) 982 if isintable(cmdtotags, cmd)
983 then 983 then
984 tex.print([[\unexpanded{\PackageWarning{ekdosis}{"]] --`' 984 tex.print("\\unexpanded{\\PackageWarning{ekdosis}{\""
985 ..cmd.. 985 ..cmd..
986 [[" already exists as a known command to be processed to TEI. ]] 986 "\" already exists as a known command to be processed to TEI. "
987 .. 987 ..
988 [[Please pick another command.}}]]) 988 "Please pick another command.}}")
989 else 989 else
990 table.insert(cmdtotags, {a = cmd, b = tag, c = " "..attr}) 990 table.insert(cmdtotags, {a = cmd, b = tag, c = " "..attr})
991 table.sort(cmdtotags, function(a ,b) return(#a.a > #b.a) end) 991 table.sort(cmdtotags, function(a ,b) return(#a.a > #b.a) end)
@@ -996,11 +996,11 @@ end
996function ekdosis.newenvtotag(env, tag, attr, closep) 996function ekdosis.newenvtotag(env, tag, attr, closep)
997 if isintable(envtotags, env) 997 if isintable(envtotags, env)
998 then 998 then
999 tex.print([[\unexpanded{\PackageWarning{ekdosis}{"]] 999 tex.print("\\unexpanded{\\PackageWarning{ekdosis}{\""
1000 ..cmd.. 1000 ..cmd..
1001 [[" already exists as a known environment to be processed to TEI. ]] 1001 "\" already exists as a known environment to be processed to TEI. "
1002 .. 1002 ..
1003 [[Please pick another environment name.}}]]) 1003 "Please pick another environment name.}}")
1004 else 1004 else
1005 table.insert(envtotags, {a = env, b = tag, c = " "..attr}) 1005 table.insert(envtotags, {a = env, b = tag, c = " "..attr})
1006 table.sort(envtotags, function(a ,b) return(#a.a > #b.a) end) 1006 table.sort(envtotags, function(a ,b) return(#a.a > #b.a) end)
@@ -1367,21 +1367,14 @@ end
1367-- handle multiple layers in apparatuses 1367-- handle multiple layers in apparatuses
1368-- 1368--
1369local apparatuses = {} 1369local apparatuses = {}
1370function ekdosis.newapparatus(teitype, cmd) 1370function ekdosis.newapparatus(teitype)
1371 if cmd ~= "app" or "note" 1371 if isintable(apparatuses, teitype)
1372 then 1372 then
1373 tex.print([[\unexpanded{\PackageWarning{ekdosis}{"]] 1373 tex.print("\\unexpanded{\\PackageWarning{ekdosis}{\""
1374 ..cmd.. 1374 ..teitype..
1375 [[" must be either 'app' or 'note'.}}]]) 1375 "\" already exists.}}")
1376 else 1376 else
1377 if isintable(apparatuses, teitype) 1377 table.insert(apparatuses, { a = teitype })
1378 then
1379 tex.print([[\unexpanded{\PackageWarning{ekdosis}{"]]
1380 ..teitype..
1381 [[" already exists.}}]])
1382 else
1383 table.insert(apparatuses, { a = teitype, b = cmd })
1384 end
1385 end 1378 end
1386 return true 1379 return true
1387end 1380end
@@ -1405,7 +1398,6 @@ function ekdosis.appin(str, teitype)
1405 return true 1398 return true
1406end 1399end
1407 1400
1408--[[
1409function ekdosis.appin_out(str, nl) 1401function ekdosis.appin_out(str, nl)
1410 local f = io.open(tex.jobname.."_tmp.ekd", "a+") 1402 local f = io.open(tex.jobname.."_tmp.ekd", "a+")
1411 if nl == "yes" then 1403 if nl == "yes" then
@@ -1416,7 +1408,7 @@ function ekdosis.appin_out(str, nl)
1416 f:close() 1408 f:close()
1417 return true 1409 return true
1418end 1410end
1419--]] 1411
1420 1412
1421function ekdosis.appout() 1413function ekdosis.appout()
1422 local file = io.open(tex.jobname..".ekd", "r") 1414 local file = io.open(tex.jobname..".ekd", "r")