diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2010-05-24 14:05:02 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2010-05-24 14:05:02 +0000 |
commit | 57ea7dad48fbf2541c04e434c31bde655ada3ac4 (patch) | |
tree | 1f8b43bc7cb92939271e1f5bec610710be69097f /Master/texmf-dist/tex/context/base/toks-ini.lua | |
parent | 6ee41e1f1822657f7f23231ec56c0272de3855e3 (diff) |
here is context 2010.05.24 13:05
git-svn-id: svn://tug.org/texlive/trunk@18445 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/toks-ini.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/toks-ini.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/context/base/toks-ini.lua b/Master/texmf-dist/tex/context/base/toks-ini.lua index 1313b04a238..ec60402d857 100644 --- a/Master/texmf-dist/tex/context/base/toks-ini.lua +++ b/Master/texmf-dist/tex/context/base/toks-ini.lua @@ -56,7 +56,7 @@ collectors.data = collectors.data or { } function tex.printlist(data) callbacks.push('token_filter', function () - callbacks.pop('token_filter') + callbacks.pop('token_filter') -- tricky but the nil assignment helps return data end) end @@ -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 |