diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-09-09 09:34:06 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-09-09 09:34:06 +0200 |
commit | bfc2e20d0dfa0dfaf04b0c2c81aed20638f21c91 (patch) | |
tree | fd7f740995f6d2f8169116b0cf6444081f96c6f7 /tex/context/base/mkiv/font-ext.lua | |
parent | e2902f3463b940beaefaf51ada0b9c37966491b6 (diff) | |
download | context-bfc2e20d0dfa0dfaf04b0c2c81aed20638f21c91.tar.gz |
2016-09-09 08:26:00
Diffstat (limited to 'tex/context/base/mkiv/font-ext.lua')
-rw-r--r-- | tex/context/base/mkiv/font-ext.lua | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/font-ext.lua b/tex/context/base/mkiv/font-ext.lua index 4af279590..e57c4e56c 100644 --- a/tex/context/base/mkiv/font-ext.lua +++ b/tex/context/base/mkiv/font-ext.lua @@ -1162,10 +1162,47 @@ implement { -- name = "ignoremathconstants", -- description = "ignore math constants table", -- initializers = { --- base = function(tfmdata,key,value) +-- base = function(tfmdata,value) -- if value then -- tfmdata.mathparameters = nil -- end -- end -- } -- } + +-- tfmdata.properties.mathnolimitsmode = tonumber(value) or 0 + +do + + 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 + mathparameters.NoLimitSupFactor = sup + mathparameters.NoLimitSubFactor = sub + end + end + + registerotffeature { + name = "mathnolimitsmode", + description = "influence nolimits placement", + initializers = { + base = initialize, + node = initialize, + } + } + +end |