diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/math-map.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/math-map.lua | 77 |
1 files changed, 45 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/context/base/math-map.lua b/Master/texmf-dist/tex/context/base/math-map.lua index a0d7457d199..8d301ac3336 100644 --- a/Master/texmf-dist/tex/context/base/math-map.lua +++ b/Master/texmf-dist/tex/context/base/math-map.lua @@ -21,6 +21,8 @@ if not modules then modules = { } end modules ['math-map'] = { -- todo: alphabets namespace -- maybe: script/scriptscript dynamic, +-- superscripped primes get unscripted ! + -- to be looked into once the fonts are ready (will become font -- goodie): -- @@ -36,11 +38,15 @@ local merged = table.merged local extract = bit32.extract local allocate = utilities.storage.allocate -local texattribute = tex.attribute + local otffeatures = fonts.constructors.newfeatures("otf") local registerotffeature = otffeatures.register + local setmetatableindex = table.setmetatableindex +local texgetattribute = tex.getattribute +local texsetattribute = tex.setattribute + local trace_greek = false trackers.register("math.greek", function(v) trace_greek = v end) local report_remapping = logs.reporter("mathematics","remapping") @@ -54,30 +60,30 @@ local mathematics = mathematics -- it otherwise. mathematics.gaps = { - [0x1D455] = 0x0210E, -- H - [0x1D49D] = 0x0212C, -- script B - [0x1D4A0] = 0x02130, -- script E - [0x1D4A1] = 0x02131, -- script F - [0x1D4A3] = 0x0210B, -- script H - [0x1D4A4] = 0x02110, -- script I - [0x1D4A7] = 0x02112, -- script L - [0x1D4A8] = 0x02133, -- script M - [0x1D4AD] = 0x0211B, -- script R - [0x1D4BA] = 0x0212F, -- script e - [0x1D4BC] = 0x0210A, -- script g - [0x1D4C4] = 0x02134, -- script o - [0x1D506] = 0x0212D, -- fraktur C - [0x1D50B] = 0x0210C, -- fraktur H - [0x1D50C] = 0x02111, -- fraktur I - [0x1D515] = 0x0211C, -- fraktur R - [0x1D51D] = 0x02128, -- fraktur Z - [0x1D53A] = 0x02102, -- bb C - [0x1D53F] = 0x0210D, -- bb H - [0x1D545] = 0x02115, -- bb N - [0x1D547] = 0x02119, -- bb P - [0x1D548] = 0x0211A, -- bb Q - [0x1D549] = 0x0211D, -- bb R - [0x1D551] = 0x02124, -- bb Z + [0x1D455] = 0x0210E, -- ℎ h + [0x1D49D] = 0x0212C, -- ℬ script B + [0x1D4A0] = 0x02130, -- ℰ script E + [0x1D4A1] = 0x02131, -- ℱ script F + [0x1D4A3] = 0x0210B, -- ℋ script H + [0x1D4A4] = 0x02110, -- ℐ script I + [0x1D4A7] = 0x02112, -- ℒ script L + [0x1D4A8] = 0x02133, -- ℳ script M + [0x1D4AD] = 0x0211B, -- ℛ script R + [0x1D4BA] = 0x0212F, -- ℯ script e + [0x1D4BC] = 0x0210A, -- ℊ script g + [0x1D4C4] = 0x02134, -- ℴ script o + [0x1D506] = 0x0212D, -- ℭ fraktur C + [0x1D50B] = 0x0210C, -- ℌ fraktur H + [0x1D50C] = 0x02111, -- ℑ fraktur I + [0x1D515] = 0x0211C, -- ℜ fraktur R + [0x1D51D] = 0x02128, -- ℨ fraktur Z + [0x1D53A] = 0x02102, -- ℂ bb C + [0x1D53F] = 0x0210D, -- ℍ bb H + [0x1D545] = 0x02115, -- ℕ bb N + [0x1D547] = 0x02119, -- ℙ bb P + [0x1D548] = 0x0211A, -- ℚ bb Q + [0x1D549] = 0x0211D, -- ℝ bb R + [0x1D551] = 0x02124, -- ℤ bb Z } local function fillinmathgaps(tfmdata,key,value) @@ -132,6 +138,7 @@ local regular_tf = { }, symbols = { [0x2202]=0x2202, [0x2207]=0x2207, + [0x0027]=0x2032, -- prime }, } @@ -164,6 +171,7 @@ local regular_it = { }, symbols = { [0x2202]=0x1D715, [0x2207]=0x1D6FB, + [0x0027]=0x2032, -- prime }, } @@ -189,6 +197,7 @@ local regular_bf= { }, symbols = { [0x2202]=0x1D6DB, [0x2207]=0x1D6C1, + [0x0027]=0x2032, -- prime }, } @@ -214,6 +223,7 @@ local regular_bi = { }, symbols = { [0x2202]=0x1D74F, [0x2207]=0x1D735, + [0x0027]=0x2032, -- prime }, } @@ -264,6 +274,7 @@ local sansserif_bf = { }, symbols = { [0x2202]=0x1D789, [0x2207]=0x1D76F, + [0x0027]=0x2032, -- prime }, } @@ -289,6 +300,7 @@ local sansserif_bi = { }, symbols = { [0x2202]=0x1D7C3, [0x2207]=0x1D7A9, + [0x0027]=0x2032, -- prime }, } @@ -333,7 +345,8 @@ local blackboard_tf = { [0x0393]=0x0213E, [0x03A0]=0x0213F, }, symbols = { -- sum - [0x2211]=0x02140, + [0x2211]=0x02140, + [0x0027]=0x2032, -- prime }, } @@ -524,7 +537,7 @@ function mathematics.getboth(alphabet,style) end function mathematics.getstyle(style) - local r = mathremap[texattribute[mathalphabet]] + local r = mathremap[texgetattribute(mathalphabet)] local alphabet = r and r.alphabet or "regular" local data = alphabets[alphabet][style] return data and data.attribute @@ -533,22 +546,22 @@ end function mathematics.syncboth(alphabet,style) local data = alphabet and alphabets[alphabet] or regular data = style and data[style] or data.tf - texattribute[mathalphabet] = data and data.attribute or texattribute[mathalphabet] + texsetattribute(mathalphabet,data and data.attribute or texattribute[mathalphabet]) end function mathematics.syncstyle(style) - local r = mathremap[texattribute[mathalphabet]] + local r = mathremap[texgetattribute(mathalphabet)] local alphabet = r and r.alphabet or "regular" local data = alphabets[alphabet][style] - texattribute[mathalphabet] = data and data.attribute or texattribute[mathalphabet] + texsetattribute(mathalphabet,data and data.attribute or texattribute[mathalphabet]) end function mathematics.syncname(alphabet) -- local r = mathremap[mathalphabet] - local r = mathremap[texattribute[mathalphabet]] + local r = mathremap[texgetattribute(mathalphabet)] local style = r and r.style or "tf" local data = alphabets[alphabet][style] - texattribute[mathalphabet] = data and data.attribute or texattribute[mathalphabet] + texsetattribute(mathalphabet,data and data.attribute or texattribute[mathalphabet]) end local islcgreek = regular_tf.lcgreek |