summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/char-tex.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-04-11 10:29:07 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-04-11 10:29:07 +0200
commit57a61e4673116076f5bbff7600e6dad376af9173 (patch)
tree8261af49f1576dcfea0f152300d22e1a64ae907f /tex/context/base/mkiv/char-tex.lua
parent274c32699e7826f7590248f91aa1bfbf5b07c8ee (diff)
downloadcontext-57a61e4673116076f5bbff7600e6dad376af9173.tar.gz
2016-04-10 23:57:00
Diffstat (limited to 'tex/context/base/mkiv/char-tex.lua')
-rw-r--r--tex/context/base/mkiv/char-tex.lua45
1 files changed, 44 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/char-tex.lua b/tex/context/base/mkiv/char-tex.lua
index df7433409..562f9c8b8 100644
--- a/tex/context/base/mkiv/char-tex.lua
+++ b/tex/context/base/mkiv/char-tex.lua
@@ -280,7 +280,7 @@ local commandmapping = allocate {
["l"] = "ł", ["L"] = "Ł",
["o"] = "ø", ["O"] = "Ø",
["oe"] = "œ", ["OE"] = "Œ",
- ["sz"] = "ß", ["SZ"] = "SZ", ["ss"] = "ß", ["SS"] = "ß",
+ ["sz"] = "ß", ["SZ"] = "SZ", ["ss"] = "ß", ["SS"] = "ß", -- uppercase: ẞ
}
texcharacters.commandmapping = commandmapping
@@ -777,3 +777,46 @@ end
implement { name = "setlettercatcodes", scope = "private", actions = characters.setlettercatcodes, arguments = "integer" }
implement { name = "setactivecatcodes", scope = "private", actions = characters.setactivecatcodes, arguments = "integer" }
--------- { name = "setcharactercodes", scope = "private", actions = characters.setcodes }
+
+-- experiment (some can move to char-ini.lua)
+
+local function overload(c,u,code,codes)
+ local c = tonumber(c)
+ if not c then
+ return
+ end
+ local u = utilities.parsers.settings_to_array(u)
+ local n = #u
+ if n == 0 then
+ return
+ end
+ local t = nil
+ if n == 1 then
+ t = u[1]
+ else
+ t = { }
+ for i=1,n do
+ t[#t+1] = tonumber(u[i])
+ end
+ end
+ if t then
+ data[c][code] = t
+ characters[codes][c] = nil
+ end
+end
+
+interfaces.implement {
+ name = "overloaduppercase",
+ arguments = { "string", "string" },
+ actions = function(c,u)
+ overload(c,u,"uccode","uccodes")
+ end
+}
+
+interfaces.implement {
+ name = "overloadlowercase",
+ arguments = { "string", "string" },
+ actions = function(c,u)
+ overload(c,u,"lccode","lccodes")
+ end
+}