summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-imp-math.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/font-imp-math.lua')
-rw-r--r--tex/context/base/mkiv/font-imp-math.lua74
1 files changed, 29 insertions, 45 deletions
diff --git a/tex/context/base/mkiv/font-imp-math.lua b/tex/context/base/mkiv/font-imp-math.lua
index c0185ca34..624f39f02 100644
--- a/tex/context/base/mkiv/font-imp-math.lua
+++ b/tex/context/base/mkiv/font-imp-math.lua
@@ -16,57 +16,41 @@ local registerotffeature = fonts.handlers.otf.features.register
local setmetatableindex = table.setmetatableindex
--- requested for latex but not supported unless really needed in context:
+-- local splitter = lpeg.splitat(",",tonumber)
+-- local lpegmatch = lpeg.match
--
--- registerotffeature {
--- name = "ignoremathconstants",
--- description = "ignore math constants table",
--- initializers = {
--- base = function(tfmdata,value)
--- if value then
--- tfmdata.mathparameters = nil
+-- local function initialize(tfmdata,value)
+-- local mathparameters = tfmdata.mathparameters
+-- if mathparameters then
+-- local sup, sub
+-- if type(value) == "string" then
+-- sup, sub = lpegmatch(splitter,value)
+-- if not sup then
+-- sub, sup = 0, 0
+-- elseif not sub then
+-- sub, sup = sup, 0
-- end
+-- elseif type(value) == "number" then
+-- sup, sub = 0, value
+-- end
+-- if sup then
+-- mathparameters.NoLimitSupFactor = sup
-- end
+-- if sub then
+-- mathparameters.NoLimitSubFactor = sub
+-- end
+-- end
+-- end
+--
+-- registerotffeature {
+-- name = "mathnolimitsmode",
+-- description = "influence nolimits placement",
+-- initializers = {
+-- base = initialize,
+-- node = initialize,
-- }
-- }
--- tfmdata.properties.mathnolimitsmode = tonumber(value) or 0
-
-local splitter = lpeg.splitat(",",tonumber)
-local lpegmatch = lpeg.match
-
-local function initialize(tfmdata,value)
- local mathparameters = tfmdata.mathparameters
- if mathparameters then
- local sup, sub
- if type(value) == "string" then
- sup, sub = lpegmatch(splitter,value)
- if not sup then
- sub, sup = 0, 0
- elseif not sub then
- sub, sup = sup, 0
- end
- elseif type(value) == "number" then
- sup, sub = 0, value
- end
- if sup then
- mathparameters.NoLimitSupFactor = sup
- end
- if sub then
- mathparameters.NoLimitSubFactor = sub
- end
- end
-end
-
-registerotffeature {
- name = "mathnolimitsmode",
- description = "influence nolimits placement",
- initializers = {
- base = initialize,
- node = initialize,
- }
-}
-
local function initialize(tfmdata,value)
tfmdata.properties.nostackmath = value and true
end