summaryrefslogtreecommitdiff
path: root/tex/context/base/char-ini.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-10-20 01:20:14 +0300
committerMarius <mariausol@gmail.com>2013-10-20 01:20:14 +0300
commit965214d981e6129b782c67adcaf3a81aedcb0bac (patch)
tree84f5945aae8efc9b6eb1898b873be5453cafe43d /tex/context/base/char-ini.lua
parente7d0d90a434e5452ff9e86c8abab5a4cac35e2f1 (diff)
downloadcontext-965214d981e6129b782c67adcaf3a81aedcb0bac.tar.gz
stable 2013.05.28 00:36
Diffstat (limited to 'tex/context/base/char-ini.lua')
-rw-r--r--tex/context/base/char-ini.lua66
1 files changed, 4 insertions, 62 deletions
diff --git a/tex/context/base/char-ini.lua b/tex/context/base/char-ini.lua
index a94aa6b5f..b75f5eda7 100644
--- a/tex/context/base/char-ini.lua
+++ b/tex/context/base/char-ini.lua
@@ -10,7 +10,7 @@ if not modules then modules = { } end modules ['char-ini'] = {
-- we can remove the tag range starting at 0xE0000 (special applications)
-local utfchar, utfbyte, utfvalues, ustring, utotable = utf.char, utf.byte, utf.values, utf.ustring, utf.totable
+local utfchar, utfbyte, utfvalues, ustring = utf.char, utf.byte, utf.values, utf.ustring
local concat, unpack, tohash = table.concat, table.unpack, table.tohash
local next, tonumber, type, rawget, rawset = next, tonumber, type, rawget, rawset
local format, lower, gsub, match, gmatch = string.format, string.lower, string.gsub, string.match, string.match, string.gmatch
@@ -167,7 +167,7 @@ local blocks = allocate {
["cjkradicalssupplement"] = { first = 0x02E80, last = 0x02EFF, otf="hang", description = "CJK Radicals Supplement" },
["cjkstrokes"] = { first = 0x031C0, last = 0x031EF, otf="hang", description = "CJK Strokes" },
["cjksymbolsandpunctuation"] = { first = 0x03000, last = 0x0303F, otf="hang", description = "CJK Symbols and Punctuation" },
- ["cjkunifiedideographs"] = { first = 0x04E00, last = 0x09FFF, otf="hang", description = "CJK Unified Ideographs", catcode = "letter" },
+ ["cjkunifiedideographs"] = { first = 0x04E00, last = 0x09FFF, otf="hang", description = "CJK Unified Ideographs" },
["cjkunifiedideographsextensiona"] = { first = 0x03400, last = 0x04DBF, otf="hang", description = "CJK Unified Ideographs Extension A" },
["cjkunifiedideographsextensionb"] = { first = 0x20000, last = 0x2A6DF, otf="hang", description = "CJK Unified Ideographs Extension B" },
["combiningdiacriticalmarks"] = { first = 0x00300, last = 0x0036F, description = "Combining Diacritical Marks" },
@@ -483,8 +483,6 @@ setmetatableindex(characters.is_letter, mt)
setmetatableindex(characters.is_command, mt)
setmetatableindex(characters.is_spacing, mt)
--- todo: also define callers for the above
-
-- linebreak: todo: hash
--
-- normative : BK CR LF CM SG GL CB SP ZW NL WJ JL JV JT H2 H3
@@ -559,36 +557,6 @@ setmetatableindex(characters.directions,function(t,k)
return v
end)
-characters.mirrors = { }
-
-setmetatableindex(characters.mirrors,function(t,k)
- local d = data[k]
- if d then
- local v = d.mirror
- if v then
- t[k] = v
- return v
- end
- end
- t[k] = false
- return v
-end)
-
-characters.textclasses = { }
-
-setmetatableindex(characters.textclasses,function(t,k)
- local d = data[k]
- if d then
- local v = d.textclass
- if v then
- t[k] = v
- return v
- end
- end
- t[k] = false
- return v
-end)
-
--[[ldx--
<p>Next comes a whole series of helper methods. These are (will be) part
of the official <l n='api'/>.</p>
@@ -948,19 +916,8 @@ end
local tracedchars = utilities.strings.tracers
tracedchars[0x00] = "[signal]"
-tracedchars[0x0A] = "[linefeed]"
-tracedchars[0x0B] = "[tab]"
-tracedchars[0x0C] = "[formfeed]"
-tracedchars[0x0D] = "[return]"
tracedchars[0x20] = "[space]"
-function characters.showstring(str)
- local list = utotable(str)
- for i=1,#list do
- report_defining("split % 3i : %C",i,list[i])
- end
-end
-
-- the following code will move to char-tex.lua
-- tex
@@ -1065,20 +1022,13 @@ function characters.define(tobelettered, tobeactivated) -- catcodetables
end
local range = chr.range
if range then
- for i=1,range.first,range.last do -- tricky as not all are letters
+ for i=1,range.first,range.last do
texsetcatcode(i,11)
end
end
end
texsetcatcode(0x200C,11) -- non-joiner
texsetcatcode(0x200D,11) -- joiner
- for k, v in next, blocks do
- if v.catcode == "letter" then
- for i=v.first,v.last do
- texsetcatcode(i,11)
- end
- end
- end
end
tex.catcodetable = saved
end
@@ -1180,15 +1130,6 @@ directives.register("characters.spaceafteruppercase",function(v)
end
end)
--- tex
-
-function commands.chardescription(slot)
- local d = data[slot]
- if d then
- context(d.description)
- end
-end
-
-- xml
characters.activeoffset = 0x10000 -- there will be remapped in that byte range
@@ -1214,3 +1155,4 @@ end
-- entities.amp = utfchar(characters.activeoffset + utfbyte("&"))
-- entities.gt = utfchar(characters.activeoffset + utfbyte(">"))
-- end
+