diff options
author | Hans Hagen <pragma@wxs.nl> | 2010-05-24 13:05:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2010-05-24 13:05:00 +0200 |
commit | e08195a7149edffddb4b69b480676fad336a7613 (patch) | |
tree | fd8b871b50b1a1404610e2dc5d118bfdf4cc1a68 /tex/context/base/char-ini.lua | |
parent | 882238ac1ea6d9563ea4e1add879f82ee8e6d9d0 (diff) | |
download | context-e08195a7149edffddb4b69b480676fad336a7613.tar.gz |
stable 2010.05.24 13:05
Diffstat (limited to 'tex/context/base/char-ini.lua')
-rw-r--r-- | tex/context/base/char-ini.lua | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tex/context/base/char-ini.lua b/tex/context/base/char-ini.lua index 9393feee7..5c4a40bad 100644 --- a/tex/context/base/char-ini.lua +++ b/tex/context/base/char-ini.lua @@ -422,6 +422,7 @@ function characters.define(tobelettered, tobeactivated) -- catcodetables end end elseif is_command[category] then + -- this might change: contextcommand ipv contextname -- texprint(format("{\\catcode %s=13\\unexpanded\\gdef %s{\\%s}}",u,utfchar(u),contextname)) texsprint("{\\catcode",u,"=13\\unexpanded\\gdef ",utfchar(u),"{\\"..contextname,"}}") -- no texprint activated[#activated+1] = "\\c"..u.."\\a" @@ -650,3 +651,48 @@ function characters.upper(str) end return concat(new) end + +-- -- some day we might go this route, but it does not really save that much +-- -- so not now (we can generate a lot using mtx-unicode that operates on the +-- -- database) +-- +-- -- category cjkwd direction linebreak +-- +-- -- adobename comment contextcommand contextname description fallback lccode +-- -- mathclass mathfiller mathname mathspec mathstretch mathsymbol mirror +-- -- range shcode specials uccode uccodes unicodeslot +-- +-- local data = { +-- ['one']={ +-- common = { +-- category="cc", +-- direction="bn", +-- linebreak="cm", +-- }, +-- vector = { +-- [0x0000] = { +-- description="NULL", +-- group='one', +-- unicodeslot=0x0000, +-- }, +-- { +-- description="START OF HEADING", +-- group='one', +-- unicodeslot=0x0001, +-- }, +-- } +-- } +-- } +-- +-- local chardata, groupdata = { }, { } +-- +-- for group, gdata in next, data do +-- local common, vector = { __index = gdata.common }, gdata.vector +-- for character, cdata in next, vector do +-- chardata[character] = cdata +-- setmetatable(cdata,common) +-- end +-- groupdata[group] = gdata +-- end + +--~ characters.data, characters.groups = chardata, groupdata |