diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-09-19 12:37:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-09-19 12:37:00 +0200 |
commit | 0db4b524a2206b4b5d9498bfd10d00638541e30a (patch) | |
tree | 3a61c1965861091190226566466de4c219e91261 /tex/context/base | |
parent | e5cc3bef1e068851dd40872872f74e72c1737280 (diff) | |
download | context-0db4b524a2206b4b5d9498bfd10d00638541e30a.tar.gz |
beta 2011.09.19 12:37
Diffstat (limited to 'tex/context/base')
-rw-r--r-- | tex/context/base/char-cjk.lua | 18 | ||||
-rw-r--r-- | tex/context/base/char-ini.lua | 26 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4088 -> 4093 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 106395 -> 106215 bytes | |||
-rw-r--r-- | tex/context/base/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/luat-ini.mkiv | 4 | ||||
-rw-r--r-- | tex/context/base/mult-prm.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/sort-lan.lua | 3 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 23925 -> 23920 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 162352 -> 162402 bytes | |||
-rw-r--r-- | tex/context/base/strc-flt.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/syst-aux.mkiv | 1 |
15 files changed, 45 insertions, 19 deletions
diff --git a/tex/context/base/char-cjk.lua b/tex/context/base/char-cjk.lua index 067371c64..b077f4a3e 100644 --- a/tex/context/base/char-cjk.lua +++ b/tex/context/base/char-cjk.lua @@ -247,7 +247,7 @@ local hangul_syllable_basetable = { local hangul_syllable_metatable = { __index = function(t,k) local u = t.unicodeslot - if k == "fscode" then + if k == "fscode" or k == "leadconsonant" then return leadconsonant(u) elseif k == "decomposed" then return { decomposed(u) } @@ -261,6 +261,22 @@ local hangul_syllable_metatable = { end } +function characters.remap_hangul_syllabe(t) + local tt = type(t) + if tt == "number" then + return remapped[t] or t + elseif tt == "table" then + local r = { } + for i=1,#t do + local ti = t[i] + r[i] = remapped[ti] or ti + end + return r + else + return t + end +end + local hangul_syllable_extender = function(k,v) local t = { unicodeslot = k, diff --git a/tex/context/base/char-ini.lua b/tex/context/base/char-ini.lua index 6d17a7507..244b8d2a7 100644 --- a/tex/context/base/char-ini.lua +++ b/tex/context/base/char-ini.lua @@ -109,11 +109,11 @@ setmetatableindex(data, function(t,k) if tk == "string" then k = lpegmatch(pattern,k) or utfbyte(k) if k then - local tk = rawget(t,k) - if tk then - return tk + local v = rawget(t,k) + if v then + return v else - -- goes to ranges + tk = "number" -- fall through to range end else return private @@ -125,10 +125,10 @@ setmetatableindex(data, function(t,k) if k >= rr.first and k <= rr.last then local extender = rr.extender if extender then - v = extender(k,v) + local v = extender(k,v) + t[k] = v + return v end - t[k] = v - return v end end end @@ -743,11 +743,21 @@ setmetatableindex(shchars, function(t,u) if u then local c = data[u] c = c and c setmetatableindex(fschars, function(t,u) if u then local c = data[u] c = c and c.fscode c = c and utfstring(c) or (type(u) == "number" and utfchar(u)) or u t[u] = c return c end end) local decomposed = allocate() characters.decomposed = decomposed -- lazy table +local specials = allocate() characters.specials = specials -- lazy table setmetatableindex(decomposed, function(t,u) -- either a table or false if u then local c = data[u] - local s = c and c.decomposed or false + local s = c and c.decomposed or false -- could fall back to specials + t[u] = s + return s + end +end) + +setmetatableindex(specials, function(t,u) -- either a table or false + if u then + local c = data[u] + local s = c and c.specials or false t[u] = s return s end diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 95ada7443..1c8b636f1 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.09.18 22:35} +\newcontextversion{2011.09.19 12:37} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 45c97a2ed..13f668a54 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.09.18 22:35} +\newcontextversion{2011.09.19 12:37} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex f81c97e37..766e4e5db 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex df771f0c4..057f1f014 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 00e384030..e9886ee4f 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.09.18 22:35} +\edef\contextversion{2011.09.19 12:37} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 35e92543f..688343542 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.09.18 22:35} +\edef\contextversion{2011.09.19 12:37} %D For those who want to use this: diff --git a/tex/context/base/luat-ini.mkiv b/tex/context/base/luat-ini.mkiv index 774762ee7..dfee302ca 100644 --- a/tex/context/base/luat-ini.mkiv +++ b/tex/context/base/luat-ini.mkiv @@ -44,8 +44,8 @@ \long\def\dodostartluacode#1\stopluacode {\normalexpanded{\endgroup\noexpand\directlua\zerocount{#1}}} -\unexpanded\def\startlua {\dostartlua } % tex catcodes -\unexpanded\def\startluacode{\dostartluacode} % lua catcodes +\unexpanded\def\startlua {\dostartlua } \let\stoplua \relax % tex catcodes +\unexpanded\def\startluacode{\dostartluacode} \let\stopluacode\relax % lua catcodes %D Some delayed definitions: diff --git a/tex/context/base/mult-prm.mkiv b/tex/context/base/mult-prm.mkiv index b965c7f05..7e5bc1edd 100644 --- a/tex/context/base/mult-prm.mkiv +++ b/tex/context/base/mult-prm.mkiv @@ -54,7 +54,7 @@ xetex = table.sorted( table.merged( missing.xetex , { } ) ), } - table.remove(primitives.tex,1) -- get rid of \- + -- table.remove(primitives.tex,1) -- get rid of \- io.savedata("mult-prm.lua",table.serialize(primitives,true,{ reduce = true, inline = false })) diff --git a/tex/context/base/sort-lan.lua b/tex/context/base/sort-lan.lua index e7556c1de..351c73e45 100644 --- a/tex/context/base/sort-lan.lua +++ b/tex/context/base/sort-lan.lua @@ -863,8 +863,7 @@ definitions["et"] = { local fschars = characters.fschars local function firstofsplit(first) - local fs = fschars[first] or first - -- print(string.format("%04x %04x",utfbyte(first),utfbyte(fs))) + local fs = fschars[first] or first -- leadconsonant return fs, fs -- entry, tag end diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 2acd1ac05..11af3c52f 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 0bd966ab6..b5d01bcb5 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/strc-flt.mkiv b/tex/context/base/strc-flt.mkiv index 7511a2a79..50a893c67 100644 --- a/tex/context/base/strc-flt.mkiv +++ b/tex/context/base/strc-flt.mkiv @@ -127,7 +127,7 @@ \presetstructurecountersetup\setupcaption\sharedstructurecounterparameter \appendtoks - \let\currenfloat\currentcaption + \let\currentfloat\currentfloatcaption \dostructurecountersetup\currentfloat\floatcaptionparameter \docheckstructurecountersetup\currentfloat \to \everysetupfloatcaption diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv index 63718babd..3ef9acaaa 100644 --- a/tex/context/base/syst-aux.mkiv +++ b/tex/context/base/syst-aux.mkiv @@ -141,6 +141,7 @@ \let\@NX \noexpand \let\@EA \expandafter +\def\@EAEA {\expandafter\expandafter} % can often be avoided \let\@EAEAEA \doubleexpandafter \let\@EAEAEAEAEAEA\tripleexpandafter |