summaryrefslogtreecommitdiff
path: root/tex/context/base/toks-ini.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2010-05-19 16:24:00 +0200
committerHans Hagen <pragma@wxs.nl>2010-05-19 16:24:00 +0200
commit663cdcff77510b4cf9f165a7c8aa147f8ad2a50a (patch)
treeaa38316838dcda4a112c6114bd183269c8002757 /tex/context/base/toks-ini.lua
parentcf10a29d938a8fd2ad81f8034b53ee7409990169 (diff)
downloadcontext-663cdcff77510b4cf9f165a7c8aa147f8ad2a50a.tar.gz
beta 2010.05.19 16:24
Diffstat (limited to 'tex/context/base/toks-ini.lua')
-rw-r--r--tex/context/base/toks-ini.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/tex/context/base/toks-ini.lua b/tex/context/base/toks-ini.lua
index 46dfa4eff..ec60402d8 100644
--- a/tex/context/base/toks-ini.lua
+++ b/tex/context/base/toks-ini.lua
@@ -142,7 +142,7 @@ commands.other = token.command_id("other_char")
function collectors.default_words(t,str)
t[#t+1] = tokens.bgroup
t[#t+1] = token.create("red")
- for k,v in ipairs(str) do
+ for i=1,#str do
t[#t+1] = tokens.other('*')
end
t[#t+1] = tokens.egroup
@@ -151,7 +151,9 @@ end
function collectors.with_words(tag,handle)
local t, w = { }, { }
handle = handle or collectors.default_words
- for _,v in ipairs(collectors.data[tag]) do
+ local tagdata = collectors.data[tag]
+ for k=1,#tagdata do
+ local v = tagdata[k]
if v[1] == commands.letter then
w[#w+1] = v[2]
else
@@ -201,7 +203,7 @@ collectors.show_methods.a = function(data) -- no need to store the table, just p
texsprint(ctxcatcodes, "\\starttabulate[|T|Tr|cT|Tr|T|]")
texsprint(ctxcatcodes, format(template,"cmd","chr","","id","name"))
texsprint(ctxcatcodes, "\\HL")
- for _,v in pairs(data) do
+ for _,v in next, data do
local cmd, chr, id, cs, sym = v[1], v[2], v[3], "", ""
local name = gsub(token.command_name(v) or "","_","\\_")
if id > 0 then
@@ -231,7 +233,7 @@ collectors.show_methods.b_c = function(data,swap) -- no need to store the table,
end
texsprint(ctxcatcodes, format(template,"cmd","chr","name"))
texsprint(ctxcatcodes, "\\HL")
- for _,v in pairs(data) do
+ for _,v in next, data do
local cmd, chr, id, cs, sym = v[1], v[2], v[3], "", ""
local name = gsub(token.command_name(v) or "","_","\\_")
if id > 0 then