diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-02-23 21:40:04 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-02-23 21:40:04 +0100 |
commit | 23b5ef45e7939a00addff726d02d6c29243177af (patch) | |
tree | 9b9317684a63bc93fc181c16518293204224430c /tex | |
parent | cd404631d7079a9af603d173eb015f026731aa01 (diff) | |
download | context-23b5ef45e7939a00addff726d02d6c29243177af.tar.gz |
2023-02-23 21:26:00
Diffstat (limited to 'tex')
44 files changed, 1473 insertions, 1099 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 736e64033..5f1de5611 100644 --- a/tex/context/base/mkii/cont-new.mkii +++ b/tex/context/base/mkii/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2023.02.14 17:41} +\newcontextversion{2023.02.23 21:23} %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/mkii/context.mkii b/tex/context/base/mkii/context.mkii index 3337f07f0..6e61cb41f 100644 --- a/tex/context/base/mkii/context.mkii +++ b/tex/context/base/mkii/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2023.02.14 17:41} +\edef\contextversion{2023.02.23 21:23} %D For those who want to use this: diff --git a/tex/context/base/mkiv/back-pdp.lua b/tex/context/base/mkiv/back-pdp.lua index 857f13ef2..3de83bef1 100644 --- a/tex/context/base/mkiv/back-pdp.lua +++ b/tex/context/base/mkiv/back-pdp.lua @@ -22,6 +22,7 @@ local tokenscanners = tokens.scanners local scanword = tokenscanners.word local scankeyword = tokenscanners.keyword local scanstring = tokenscanners.string +local scantoks = tokenscanners.toks local scaninteger = tokenscanners.integer local scanwhd = tokenscanners.whd @@ -30,6 +31,7 @@ local report = logs.reporter("backend") local nodepool = nodes.pool local newliteral = nodepool.literal +local newlateliteral = nodepool.lateliteral local newsave = nodepool.save local newrestore = nodepool.restore local newsetmatrix = nodepool.setmatrix @@ -40,8 +42,24 @@ local variables = interfaces.variables -- literals +-- local function pdfliteral() +-- context(newliteral(scanword() or "origin",scanstring())) +-- end + +-- Who knows what will end up in e.g. tikz .. so we now do: + local function pdfliteral() - context(newliteral(scanword() or "origin",scanstring())) + local word = scanword() + local node + if word == "shipout" then + context(newlateliteral(scanword() or "origin",scantoks())) + else + context(newliteral(word or "origin",scanstring())) + end +end + +local function pdflateliteral() + context(newlateliteral(scanword() or "origin",scantoks())) end -- objects @@ -198,14 +216,15 @@ end -- mapfile mapline includechars catalog info names trailer local extensions = { - literal = pdfliteral, - obj = pdfobj, - refobj = pdfrefobj, - dest = pdfdest, - annot = pdfannot, - save = pdfsave, - restore = pdfrestore, - setmatrix = pdfsetmatrix, + literal = pdfliteral, + lateliteral = pdflateliteral, + obj = pdfobj, + refobj = pdfrefobj, + dest = pdfdest, + annot = pdfannot, + save = pdfsave, + restore = pdfrestore, + setmatrix = pdfsetmatrix, } local function pdfextension() @@ -276,12 +295,13 @@ implement { name = "pdfvariable", actions = pdfvariable } -- for the moment (tikz) -implement { name = "pdfliteral", actions = pdfliteral } -implement { name = "pdfobj", actions = pdfobj } -implement { name = "pdflastobj", actions = pdflastobj } -implement { name = "pdfrefobj", actions = pdfrefobj } ---------- { name = "pdfannot", actions = pdfannot } ---------- { name = "pdfdest", actions = pdfdest } ---------- { name = "pdfsave", actions = pdfsave } ---------- { name = "pdfrestore", actions = pdfrestore } ---------- { name = "pdfsetmatrix", actions = pdfsetmatrix } +implement { name = "pdfliteral", actions = pdfliteral } +implement { name = "pdflateliteral", actions = pdflateliteral } +implement { name = "pdfobj", actions = pdfobj } +implement { name = "pdflastobj", actions = pdflastobj } +implement { name = "pdfrefobj", actions = pdfrefobj } +--------- { name = "pdfannot", actions = pdfannot } +--------- { name = "pdfdest", actions = pdfdest } +--------- { name = "pdfsave", actions = pdfsave } +--------- { name = "pdfrestore", actions = pdfrestore } +--------- { name = "pdfsetmatrix", actions = pdfsetmatrix } diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index b525836df..0fe54e581 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2023.02.14 17:41} +\newcontextversion{2023.02.23 21:23} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index a5e343291..ea936fd95 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -49,7 +49,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2023.02.14 17:41} +\edef\contextversion{2023.02.23 21:23} %D Kind of special: diff --git a/tex/context/base/mkiv/lpdf-nod.lua b/tex/context/base/mkiv/lpdf-nod.lua index fcb2d1457..6702ed506 100644 --- a/tex/context/base/mkiv/lpdf-nod.lua +++ b/tex/context/base/mkiv/lpdf-nod.lua @@ -24,10 +24,11 @@ local register = nodepool.register local whatsit_code = nodecodes.whatsit -local savewhatsit_code = whatsitcodes.save -local restorewhatsit_code = whatsitcodes.restore -local setmatrixwhatsit_code = whatsitcodes.setmatrix -local literalwhatsit_code = whatsitcodes.literal +local savewhatsit_code = whatsitcodes.save +local restorewhatsit_code = whatsitcodes.restore +local setmatrixwhatsit_code = whatsitcodes.setmatrix +local literalwhatsit_code = whatsitcodes.literal +local lateliteralwhatsit_code = whatsitcodes.lateliteral local literalvalues = nodes.literalvalues local originliteral_code = literalvalues.origin @@ -66,6 +67,22 @@ function nodepool.literal(mode,str) end end +-- We only define this for testing as we don't need it: + +local lateliteralnode = register(new_node(whatsit_code, lateliteralwhatsit_code)) + +function nodepool.lateliteral(mode,str) + local t = copy_node(lateliteralnode) + if str then + setfield(t,"mode",literals[mode] and mode or pageliteral_code) + setdata(t,str) + else + setfield(t,"mode",pageliteral_code) + setdata(t,mode) + end + return t +end + local savenode = register(new_node(whatsit_code, savewhatsit_code)) local restorenode = register(new_node(whatsit_code, restorewhatsit_code)) local setmatrixnode = register(new_node(whatsit_code, setmatrixwhatsit_code)) diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua index 088bc698c..686fbfb7a 100644 --- a/tex/context/base/mkiv/mult-low.lua +++ b/tex/context/base/mkiv/mult-low.lua @@ -113,7 +113,7 @@ return { "checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode", "analyzescriptnucleuscharmathcontrolcode", "analyzescriptnucleuslistmathcontrolcode", "analyzescriptnucleusboxmathcontrolcode", "accenttopskewwithoffsetmathcontrolcode", "ignorekerndimensionsmathcontrolcode", "ignoreflataccentsmathcontrolcode", - "extendaccentsmathcontrolcode", + "extendaccentsmathcontrolcode", "extenddelimitersmathcontrolcode", -- "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noleftkerningglyphoptioncode", "noleftligaturingglyphoptioncode", "norightkerningglyphoptioncode", "norightligaturingglyphoptioncode", diff --git a/tex/context/base/mkiv/node-ini.lua b/tex/context/base/mkiv/node-ini.lua index 4c27357b7..ef7d4afed 100644 --- a/tex/context/base/mkiv/node-ini.lua +++ b/tex/context/base/mkiv/node-ini.lua @@ -201,6 +201,7 @@ end if not whatcodes.literal then whatcodes.literal = whatcodes.pdfliteral + whatcodes.lateliteral = whatcodes.pdflateliteral whatcodes.save = whatcodes.pdfsave whatcodes.restore = whatcodes.pdfrestore whatcodes.setmatrix = whatcodes.pdfsetmatrix diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex 70fe4d224..95229e3fe 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex 9540ac450..07a4610e0 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkxl/back-imp-pdp.lmt b/tex/context/base/mkxl/back-imp-pdp.lmt index 4c5d61b22..6b5a0edf9 100644 --- a/tex/context/base/mkxl/back-imp-pdp.lmt +++ b/tex/context/base/mkxl/back-imp-pdp.lmt @@ -6,8 +6,8 @@ if not modules then modules = { } end modules ['back-imp-pdp'] = { license = "see context related readme files" } --- This is temporary ... awaiting a better test .. basically we can --- always use this: pdf primitives. +-- We don't support late literals unless it's really needed by some third party +-- code. local context = context local lpdf = lpdf diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl index 667b2bc6d..45393d871 100644 --- a/tex/context/base/mkxl/cont-new.mkxl +++ b/tex/context/base/mkxl/cont-new.mkxl @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2023.02.14 17:41} +\newcontextversion{2023.02.23 21:23} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl index b0539ce74..f5d46c9db 100644 --- a/tex/context/base/mkxl/context.mkxl +++ b/tex/context/base/mkxl/context.mkxl @@ -29,7 +29,7 @@ %D {YYYY.MM.DD HH:MM} format. \immutable\edef\contextformat {\jobname} -\immutable\edef\contextversion{2023.02.14 17:41} +\immutable\edef\contextversion{2023.02.23 21:23} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error diff --git a/tex/context/base/mkxl/core-uti.lmt b/tex/context/base/mkxl/core-uti.lmt index 8ce0cca4a..48737d7f6 100644 --- a/tex/context/base/mkxl/core-uti.lmt +++ b/tex/context/base/mkxl/core-uti.lmt @@ -409,8 +409,33 @@ function job.loadother(filename,cache) end unpacked.job.packed = nil -- nicer in inspecting if cache then - cache[filename] = unpacked + othercache[filename] = unpacked end + -- + local lists = utilitydata.structures.lists.collected or { } + local sections = utilitydata.structures.sections.collected or { } + local pages = utilitydata.structures.pages .collected or { } + for i=1,#lists do + local entry = lists[i] + local references = entry.references + if references then + local section = references.section + local realpage = references.realpage + -- maybe entry.* instead: + references.sectiondata = section and sections[section] + references.pagedata = realpage and pages[realpage] + -- get rid of these, maybe even crash as these are bogus + -- references.internal = nil + -- references.realpage = nil + -- references.section = nil + references.x = nil + references.y = nil + end + end + -- + -- also do the references here + -- + structures.references.registerfromlist(lists,derived,pages,sections) end end statistics.stoptiming(loadedfiles) diff --git a/tex/context/base/mkxl/driv-shp.lmt b/tex/context/base/mkxl/driv-shp.lmt index 73e7085b2..09928f303 100644 --- a/tex/context/base/mkxl/driv-shp.lmt +++ b/tex/context/base/mkxl/driv-shp.lmt @@ -298,6 +298,7 @@ local flush_character do local csx = packet[3] local csy = packet[4] or csx pos_h = pos_h + flushchar(fnt,chr,csx,csy) +* sx elseif command == "slot" then local index = packet[2] local chr = packet[3] @@ -305,6 +306,7 @@ local flush_character do local csy = packet[5] or csx if index == 0 then pos_h = pos_h + flushchar(font,chr,csx,csy) +* sx else local okay = fonts and fonts[index] if okay then @@ -314,10 +316,12 @@ local flush_character do fnt = font end pos_h = pos_h + flushchar(fnt,chr,csx,csy) +* sx end else -- safeguard, we assume the font itself (often index 1) pos_h = pos_h + flushchar(font,chr,csx,csy) +* sx end end elseif command == "use" then @@ -394,6 +398,11 @@ local flush_character do pos_h = ph pos_v = pv end + elseif command == "stay" then + -- we can do a fast one if needed, it's more an experiment + push() + flushchar(font,packet[2],1,1) + pop() elseif command == "compose" then -- for now idem local ph = pos_h local pv = pos_v diff --git a/tex/context/base/mkxl/font-mat.mklx b/tex/context/base/mkxl/font-mat.mklx index 942c2fecd..76f6f87b9 100644 --- a/tex/context/base/mkxl/font-mat.mklx +++ b/tex/context/base/mkxl/font-mat.mklx @@ -555,4 +555,29 @@ \fi \to\everybodyfont +%D Something new, see type {type-imp-antykwa} for an example: + +% if we get more: + +% \installcorenamespace {fractionbar} +% \installcorenamespace {radicalbar} + +% \def\installfractionbar#1#2{\defcsname\??fractionbar#1\endcsname{#2}} +% \def\installradicalbar #1#2{\defcsname\??radicalbar #1\endcsname{#2}} + +% \def\fractionbarunicode{\ifcsname\??fractionbar\fontclass\endcsname\lastnamedcs\else\zerocount\fi} +% \def\radicalbarunicode {\ifcsname\??radicalbar \fontclass\endcsname\lastnamedcs\else\zerocount\fi} + +\mutable\lettonothing\currentmathfontclass + +\def\math_synchronize_setup + {\let\currentmathfontclass\fontclass + \fastsetup\fontclass} + +\appendtoks + \ifx\fontclass\currentmathfontclass\else + \math_synchronize_setup + \fi +\to \everymathematics + \protect \endinput diff --git a/tex/context/base/mkxl/font-vfc.lmt b/tex/context/base/mkxl/font-vfc.lmt index 479aa4ca0..6e9cd4013 100644 --- a/tex/context/base/mkxl/font-vfc.lmt +++ b/tex/context/base/mkxl/font-vfc.lmt @@ -82,6 +82,7 @@ end helpers.commands = utilities.storage.allocate { char = setmetatableindex(function(t,k) local v = { "char", k } t[k] = v return v end), + stay = setmetatableindex(function(t,k) local v = { "stay", k } t[k] = v return v end), right = setmetatableindex(function(t,k) local v = { "right", k } t[k] = v return v end), left = setmetatableindex(function(t,k) local v = { "left", k } t[k] = v return v end), down = setmetatableindex(function(t,k) local v = { "down", k } t[k] = v return v end), diff --git a/tex/context/base/mkxl/grph-epd.lmt b/tex/context/base/mkxl/grph-epd.lmt index 6f9e44f63..505599fff 100644 --- a/tex/context/base/mkxl/grph-epd.lmt +++ b/tex/context/base/mkxl/grph-epd.lmt @@ -36,6 +36,9 @@ local function mergegoodies(optionlist) if all or options[variables.layer] then codeinjections.mergeviewerlayers() end + if all or options[variables.media] then + codeinjections.mergerenditions() + end codeinjections.flushmergelayer() end diff --git a/tex/context/base/mkxl/lpdf-ano.lmt b/tex/context/base/mkxl/lpdf-ano.lmt index ed26b512e..55b145730 100644 --- a/tex/context/base/mkxl/lpdf-ano.lmt +++ b/tex/context/base/mkxl/lpdf-ano.lmt @@ -10,8 +10,16 @@ if not modules then modules = { } end modules ['lpdf-ano'] = { -- todo: /AA << WC << ... >> >> : WillClose actions etc --- internal references are indicated by a number (and turned into <autoprefix><number>) --- we only flush internal destinations that are referred +-- Internal references are indicated by a number (and turned into <autoprefix><number>) +-- we only flush internal destinations that are referred. + +-- In the end one can wonder if it was worth the effort to keep up with annotations. +-- Where acrobat at least supports most (can differ per version) other viewers +-- support partial. For instance sumatra (that I use for testing) can open an +-- external links but doesn't go to the page. So don't report issues before making +-- sure that it's not your browser that fails. One cannto complain about what comes +-- for free (browsers) but one should also not praise non commercial software to +-- much without looking critical at how it performs. local next, tostring, tonumber, rawget, type = next, tostring, tonumber, rawget, type local rep, format, find = string.rep, string.format, string.find diff --git a/tex/context/base/mkxl/lpdf-epa.lmt b/tex/context/base/mkxl/lpdf-epa.lmt index 750c008fb..26bb9f703 100644 --- a/tex/context/base/mkxl/lpdf-epa.lmt +++ b/tex/context/base/mkxl/lpdf-epa.lmt @@ -549,7 +549,7 @@ local function copyF(v,lock) -- todo: bxor 24 end -- Speed is not really an issue so we don't optimize this code too much. In the end (after --- testing we end up with less code that we started with. +-- testing) we ended up with less code that we started with. function codeinjections.mergecomments(specification) local specification, fullname, document = validdocument(specification) @@ -867,6 +867,33 @@ function codeinjections.mergefields(specification) end end +-- The crappy parts of pdf .. too unpredictable. + +function codeinjections.mergerenditions(specification) +-- local specification, fullname, document = validdocument(specification) +-- if not document then +-- return "" +-- end +-- local pagenumber = specification.page or 1 +-- local pagedata = document.pages[pagenumber] +-- local annotations = pagedata and pagedata.Annots +-- if annotations and #annotations > 0 then +-- local llx, lly, urx, ury, width, height, xscale, yscale = getmediasize(specification,pagedata,xscale,yscale) +-- initializelayer(height,width) +-- -- +-- for i=1,#annotations do +-- -- we keep the order +-- local annotation = annotations[i] +-- if annotation then +-- local subtype = annotation.Subtype +-- if subtype == "Screen" then +-- print("not done") +-- end +-- end +-- end +-- end +end + -- Beware, bookmarks can be in pdfdoc encoding or in unicode. However, in mkiv we -- write out the strings in unicode (hex). When we read them in, we check for a bom -- and convert to utf. diff --git a/tex/context/base/mkxl/math-act.lmt b/tex/context/base/mkxl/math-act.lmt index 19a43ce87..370415c81 100644 --- a/tex/context/base/mkxl/math-act.lmt +++ b/tex/context/base/mkxl/math-act.lmt @@ -1666,6 +1666,17 @@ do -- local addprivate = fonts.helpers.addprivate -- local newnextglyph = addprivate(target,formatters["M-N-%H"](nextglyph),newnextdata) + local nps = fonts.helpers.newprivateslot + + local umbracepiece = nps("um brace piece") -- will be created + local lmbracepiece = nps("lm brace piece") -- will be created + local cmbracepiece = nps("cm brace piece") -- will be created : center piece for brace builder hack + + local ulbracepiece = nps("ul brace piece") + local urbracepiece = nps("ur brace piece") + local llbracepiece = nps("ll brace piece") + local lrbracepiece = nps("lr brace piece") + local over = { factor = "over" } local under = { factor = "under" } @@ -2201,6 +2212,10 @@ do -- mirror -- smaller + local nps = fonts.helpers.newprivateslot + + local radicalbarextender = nps("radical bar extender") -- we reserve it here + local list = { 0x221A, } @@ -2627,7 +2642,7 @@ do width = 2*width - 1*advance, height = height, depth = depth, - callback = "devirtualize", +-- callback = "devirtualize", commands = { char, left, char }, } characters[triple] = { @@ -2635,7 +2650,7 @@ do width = 3*width - 2*advance, height = height, depth = depth, - callback = "devirtualize", +-- callback = "devirtualize", commands = { char, left, char, left, char }, } if trace_tweaking then @@ -2972,7 +2987,7 @@ do width = 2*width - 1*advance, height = height, depth = depth, - callback = "devirtualize", +-- callback = "devirtualize", commands = { charcommand[single], leftcommand[advance], @@ -2988,7 +3003,7 @@ do width = 3*width - 2*advance, height = height, depth = depth, - callback = "devirtualize", +-- callback = "devirtualize", commands = { charcommand[single], leftcommand[advance], diff --git a/tex/context/base/mkxl/math-ali.mkxl b/tex/context/base/mkxl/math-ali.mkxl index 20ea1d279..baaa4666a 100644 --- a/tex/context/base/mkxl/math-ali.mkxl +++ b/tex/context/base/mkxl/math-ali.mkxl @@ -739,10 +739,14 @@ {\c_math_eqalign_column\zerocount \rawprocesscommacommand[#1]\math_eqalign_set_columns_step} -\letcsname\??mathalignmentvariant\v!normal\endcsname\zerocount -\letcsname\??mathalignmentvariant\v!left \endcsname\plusone -\letcsname\??mathalignmentvariant\v!right \endcsname\plustwo -\letcsname\??mathalignmentvariant\v!middle\endcsname\plusthree +% can't we reuse these numbers ? + +\letcsname\??mathalignmentvariant\v!normal \endcsname\zerocount +\letcsname\??mathalignmentvariant\v!flushright\endcsname\plusone +\letcsname\??mathalignmentvariant\v!left \endcsname\plusone +\letcsname\??mathalignmentvariant\v!right \endcsname\plustwo +\letcsname\??mathalignmentvariant\v!flushleft \endcsname\plustwo +\letcsname\??mathalignmentvariant\v!middle \endcsname\plusthree %D \starttyping %D \placeformula[eqn0]\startformula \startalign[n=1] a\NR \stopalign \stopformula See \in[eqn0] @@ -2514,9 +2518,13 @@ \defcsname\??mathboxlocation\v!left \endcsname {\c_strc_math_number_location\plusone} +\defcsname\??mathboxlocation\v!flushright\endcsname + {\c_strc_math_number_location\plusone} \defcsname\??mathboxlocation\v!right\endcsname {\c_strc_math_number_location\plustwo} +\defcsname\??mathboxlocation\v!flushleft\endcsname + {\c_strc_math_number_location\plustwo} \defcsname\??mathboxlocation\v!atrightmargin\endcsname {\c_strc_math_number_location\plustwo diff --git a/tex/context/base/mkxl/math-frc.mkxl b/tex/context/base/mkxl/math-frc.mkxl index d11acac9b..47edc52c4 100644 --- a/tex/context/base/mkxl/math-frc.mkxl +++ b/tex/context/base/mkxl/math-frc.mkxl @@ -333,7 +333,7 @@ \s!vfactor \numexpr\mathfractionparameter\c!vfactor\relax \s!source \number\namedboxanchor{\mathfractionparameter\c!source}} -\installcorenamespace{mathalignsimple} +\installcorenamespace{mathalignsimple} % this should move to math-ali \defcsname\??mathalignsimple\v!right \endcsname#1{#1\hfill} \defcsname\??mathalignsimple\v!flushleft \endcsname#1{#1\hfill} diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl index c3bbb9587..c76d7313a 100644 --- a/tex/context/base/mkxl/math-ini.mkxl +++ b/tex/context/base/mkxl/math-ini.mkxl @@ -123,6 +123,7 @@ % +\ignorekerndimensionsmathcontrolcode % xits needs this (bad depth of fences) % +\ignoreflataccentsmathcontrolcode +\extendaccentsmathcontrolcode + +\extenddelimitersmathcontrolcode \relax % \mathpenaltiesmode\plusone diff --git a/tex/context/base/mkxl/math-noa.lmt b/tex/context/base/mkxl/math-noa.lmt index 1ee5c26e3..4a0cb5744 100644 --- a/tex/context/base/mkxl/math-noa.lmt +++ b/tex/context/base/mkxl/math-noa.lmt @@ -883,31 +883,47 @@ do setattr(pointer,a_mathsize,0) local delimiter = getdelimiter(pointer) if delimiter then - local chr, fnt, fam = getcharspec(delimiter) - if chr > 0 and fnt > 0 then - local data = fontdata[fnt] -local chardata = data.characters[chr] -local template = chardata.varianttemplate - local char = mathematics.big(data,template or chr,size,method) - local ht = getheight(pointer) - local dp = getdepth(pointer) - if template or ht == 1 or dp == 1 then -- 1 scaled point is a signal - local chardata = data.characters[char] - if template or ht == 1 then - setheight(pointer,chardata.height) + local oldchar, font, fam = getcharspec(delimiter) + if oldchar > 0 and font > 0 then + local ht = getheight(pointer) + local dp = getdepth(pointer) + local data = fontdata[font] + local characters = data.characters + local olddata = characters[oldchar] +-- local oldheight = olddata.height or 0 +-- local olddepth = olddata.depth or 0 + local template = olddata.varianttemplate + local newchar = mathematics.big(data,template or oldchar,size,method) + local newdata = characters[newchar] + local newheight = newdata.height or 0 + local newdepth = newdata.depth or 0 + if template then +-- local ratio = (newheight + newdepth) / (oldheight + olddepth) +-- setheight(pointer,ratio * oldheight) +-- setdepth(pointer,ratio * olddepth) + setheight(pointer,newheight) + setdepth(pointer,newdepth) + if not olddata.extensible then + -- check this on bonum and antykwa + setoptions(pointer,0) end - if template or dp == 1 then - setdepth(pointer,chardata.depth) + if trace_fences then +-- report_fences("replacing %C using method %a, size %a, template %C and ratio %.3f",newchar,method,size,template,ratio) + report_fences("replacing %C using method %a, size %a and template %C",newchar,method,size,template) + end + else + -- 1 scaled point is a signal, for now + if ht == 1 then + setheight(pointer,newheight) + end + if dp == 1 then + setdepth(pointer,newdepth) + end + setchar(delimiter,newchar) + if trace_fences then + report_fences("replacing %C by %C using method %a and size %a",oldchar,char,method,size) end end - if trace_fences then - report_fences("replacing %C by %C using method %a and size %a",chr,char,method,size) - end -if template then - setoptions(pointer,0) -else - setchar(delimiter,char) -end end end end diff --git a/tex/context/base/mkxl/math-rad.mklx b/tex/context/base/mkxl/math-rad.mklx index cb3cdb0a8..703481c08 100644 --- a/tex/context/base/mkxl/math-rad.mklx +++ b/tex/context/base/mkxl/math-rad.mklx @@ -189,14 +189,25 @@ % as struts are sort of predictable we can now fix all fonts in the lfg file. \protected\def\math_radical_common#degree% - {\Urooted + {\scratchcounter\ifcstok{\mathradicalparameter\c!rule}\v!symbol + \mathradicalparameter\c!top\relax + \else + \zerocount + \fi + \Urooted \s!height\dimexpr\mathradicalparameter\c!height\relax \s!depth \dimexpr\mathradicalparameter\c!depth\relax \s!source\numexpr\namedboxanchor{\mathradicalparameter\c!source}\relax \s!style \normalmathstyle + \ifzeronum\scratchcounter\else + top % \s!top + \fi \zerocount \mathradicalparameter\c!left \zerocount \mathradicalparameter\c!right - \relax + \ifzeronum\scratchcounter\else + \zerocount\scratchcounter + \fi + \relax {\mathstrut#degree}} \defcsname\??mathradicalalternative\v!default\endcsname % #body% @@ -365,6 +376,7 @@ \integerdef\delimitedleftanutityuc \privatecharactercode{delimited left annuity} \integerdef\delimitedrightanutityuc \privatecharactercode{delimited right annuity} +\integerdef\radicalbarextenderuc \privatecharactercode{radical bar extender} \definemathradical [rannuity] diff --git a/tex/context/base/mkxl/math-ttv.lmt b/tex/context/base/mkxl/math-ttv.lmt index e33a23478..3393ecc03 100644 --- a/tex/context/base/mkxl/math-ttv.lmt +++ b/tex/context/base/mkxl/math-ttv.lmt @@ -13,6 +13,48 @@ local setdigits = vfmath.setdigits local mathencodings = fonts.encodings.math +local nps = fonts.helpers.newprivateslot + +-- mathencodings["large-to-small-private"] = { +-- [0xFE07A] = 0x7A, -- bracehtipdownleft +-- [0xFE07B] = 0x7B, -- bracehtipdownright +-- [0xFE07C] = 0x7C, -- bracehtipupleft +-- [0xFE07D] = 0x7D, -- bracehtipupright +-- } + +mathencodings["large-to-small-private"] = { + [nps("ul brace piece")] = 0x7A, -- bracehtipdownleft + [nps("ur brace piece")] = 0x7B, -- bracehtipdownright + [nps("ll brace piece")] = 0x7C, -- bracehtipupleft + [nps("lr brace piece")] = 0x7D, -- bracehtipupright +} + +-- mathencodings["extensible-jmn-private"] = { +-- [0xFE080] = 200, -- minusjmn +-- [0xFE081] = 201, -- minusrightjmn +-- [0xFE082] = 202, -- minusleftjmn +-- [0xFE083] = 203, -- equaljmn +-- [0xFE084] = 204, -- equalrightjmn +-- [0xFE085] = 205, -- equalleftjmn +-- [0xFE086] = 206, -- arrowleftjmn +-- [0xFE087] = 207, -- arrowrightjmn +-- [0xFE088] = 208, -- arrowdblleftjmn +-- [0xFE089] = 209, -- arrowdblrightjmn +-- } + +-- mathencodings["extensible-jmn-private"] = { +-- [nps("rule middle piece")] = 200, -- minusjmn +-- [nps("rule right piece")] = 201, -- minusrightjmn +-- [nps("rule left piece")] = 202, -- minusleftjmn +-- [nps("double rule middle piece")] = 203, -- equaljmn +-- [nps("double rule right piece")] = 204, -- equalrightjmn +-- [nps("double rule left piece")] = 205, -- equalleftjmn +-- [nps("arrow left piece")] = 206, -- arrowleftjmn +-- [nps("arrow right piece")] = 207, -- arrowrightjmn +-- [nps("double arrow left piece")] = 208, -- arrowdblleftjmn +-- [nps("double arrow right piece")] = 209, -- arrowdblrightjmn +-- } + -- varphi is part of the alphabet, contrary to the other var*s' mathencodings["large-to-small"] = { @@ -59,14 +101,6 @@ mathencodings["large-to-small"] = { [0x02044] = 0x0E, -- / } -mathencodings["large-to-small-private"] = { - [0xFE07A] = 0x7A, -- bracehtipdownleft - [0xFE07B] = 0x7B, -- bracehtipdownright - [0xFE07C] = 0x7C, -- bracehtipupleft - [0xFE07D] = 0x7D, -- bracehtipupright - -} - -- Beware: these are (in cm/lm) below the baseline due to limitations -- in the tfm format but the engine (combined with the mathclass) takes -- care of it. If we need them in textmode, we should make them virtual @@ -111,17 +145,17 @@ mathencodings["tex-mr"] = { -- [0x002D8] = 0x15, -- [math]breve -- [0x000AF] = 0x16, -- [math]bar -- [0x00021] = 0x21, -- ! - [0x00028] = 0x28, -- ( - [0x00029] = 0x29, -- ) - [0x0002B] = 0x2B, -- + - [0x0002F] = 0x2F, -- / - [0x0003A] = 0x3A, -- : - [0x02236] = 0x3A, -- colon - [0x0003B] = 0x3B, -- ; - [0x0003C] = 0x3C, -- < - [0x0003D] = 0x3D, -- = - [0x0003E] = 0x3E, -- > - [0x0003F] = 0x3F, -- ? + [0x00028] = 0x28, -- ( + [0x00029] = 0x29, -- ) + [0x0002B] = 0x2B, -- + + [0x0002F] = 0x2F, -- / + [0x0003A] = 0x3A, -- : + [0x02236] = 0x3A, -- colon + [0x0003B] = 0x3B, -- ; + [0x0003C] = 0x3C, -- < + [0x0003D] = 0x3D, -- = + [0x0003E] = 0x3E, -- > + [0x0003F] = 0x3F, -- ? [0x00391] = 0x41, -- Alpha [0x00392] = 0x42, -- Beta [0x02145] = 0x44, @@ -136,8 +170,8 @@ mathencodings["tex-mr"] = { [0x003A4] = 0x54, -- Tau [0x003A7] = 0x58, -- Chi [0x00396] = 0x5A, -- Zeta - [0x0005B] = 0x5B, -- [ - [0x0005D] = 0x5D, -- ] + [0x0005B] = 0x5B, -- [ + [0x0005D] = 0x5D, -- ] -- [0x0005E] = 0x5E, -- [math]hat -- the text one [0x00302] = 0x5E, -- [math]hat -- the real math one -- [0x002D9] = 0x5F, -- [math]dot @@ -204,8 +238,10 @@ mathencodings["tex-mi"] = { [0x021BD] = 0x29, -- leftharpoondown [0x021C0] = 0x2A, -- rightharpoonup [0x021C1] = 0x2B, -- rightharpoondown - [0xFE322] = 0x2C, -- lhook (hook for combining arrows) - [0xFE323] = 0x2D, -- rhook (hook for combining arrows) +-- [0xFE322] = 0x2C, -- lhook (hook for combining arrows) +-- [0xFE323] = 0x2D, -- rhook (hook for combining arrows) + [nps("left hook piece")] = 0x2C, -- bracehtipdownleft + [nps("right hook piece")] = 0x2D, -- bracehtipdownleft [0x025B7] = 0x2E, -- triangleright : cf lmmath / BJ [0x025C1] = 0x2F, -- triangleleft : cf lmmath / BJ [0x022B3] = 0x2E, -- triangleright : cf lmmath this a cramped triangles / BJ / see * @@ -463,281 +499,11 @@ mathencodings["tex-sy"] = { [0x02662] = 0x7D, -- diamondsuit [0x02661] = 0x7E, -- heartsuit [0x02660] = 0x7F, -- spadesuit - [0xFE321] = 0x37, -- mapstochar - - [0xFE325] = 0x30, -- prime 0x02032 + -- [0xFE321] = 0x37, -- mapstochar + -- [0xFE325] = 0x30, -- prime 0x02032 + [nps("maps to piece")] = 0x37, -- mapstochar } --- -- The names in masm10.enc can be trusted best and are shown in the first --- -- column, while in the second column we show the tex/ams names. As usual --- -- it costs hours to figure out such a table. --- --- mathencodings["tex-ma"] = { --- [0x022A1] = 0x00, -- squaredot \boxdot --- [0x0229E] = 0x01, -- squareplus \boxplus --- [0x022A0] = 0x02, -- squaremultiply \boxtimes --- [0x025A1] = 0x03, -- square \square \Box --- [0x025A0] = 0x04, -- squaresolid \blacksquare --- [0x025AA] = 0x05, -- squaresmallsolid \centerdot --- [0x022C4] = 0x06, -- diamond \Diamond \lozenge --- [0x02666] = 0x07, -- diamondsolid \blacklozenge --- [0x021BB] = 0x08, -- clockwise \circlearrowright --- [0x021BA] = 0x09, -- anticlockwise \circlearrowleft --- [0x021CC] = 0x0A, -- harpoonleftright \rightleftharpoons --- [0x021CB] = 0x0B, -- harpoonrightleft \leftrightharpoons --- [0x0229F] = 0x0C, -- squareminus \boxminus --- [0x022A9] = 0x0D, -- forces \Vdash --- [0x022AA] = 0x0E, -- forcesbar \Vvdash --- [0x022A8] = 0x0F, -- satisfies \vDash --- [0x021A0] = 0x10, -- dblarrowheadright \twoheadrightarrow --- [0x0219E] = 0x11, -- dblarrowheadleft \twoheadleftarrow --- [0x021C7] = 0x12, -- dblarrowleft \leftleftarrows --- [0x021C9] = 0x13, -- dblarrowright \rightrightarrows --- [0x021C8] = 0x14, -- dblarrowup \upuparrows --- [0x021CA] = 0x15, -- dblarrowdwn \downdownarrows --- [0x021BE] = 0x16, -- harpoonupright \upharpoonright \restriction --- [0x021C2] = 0x17, -- harpoondownright \downharpoonright --- [0x021BF] = 0x18, -- harpoonupleft \upharpoonleft --- [0x021C3] = 0x19, -- harpoondownleft \downharpoonleft --- [0x021A3] = 0x1A, -- arrowtailright \rightarrowtail --- [0x021A2] = 0x1B, -- arrowtailleft \leftarrowtail --- [0x021C6] = 0x1C, -- arrowparrleftright \leftrightarrows --- -- [0x021C5] = 0x00, -- \updownarrows (missing in lm) --- [0x021C4] = 0x1D, -- arrowparrrightleft \rightleftarrows --- [0x021B0] = 0x1E, -- shiftleft \Lsh --- [0x021B1] = 0x1F, -- shiftright \Rsh --- [0x021DD] = 0x20, -- squiggleright \leadsto \rightsquigarrow --- [0x021AD] = 0x21, -- squiggleleftright \leftrightsquigarrow --- [0x021AB] = 0x22, -- curlyleft \looparrowleft --- [0x021AC] = 0x23, -- curlyright \looparrowright --- [0x02257] = 0x24, -- circleequal \circeq --- [0x0227F] = 0x25, -- followsorequal \succsim --- [0x02273] = 0x26, -- greaterorsimilar \gtrsim --- [0x02A86] = 0x27, -- greaterorapproxeql \gtrapprox --- [0x022B8] = 0x28, -- multimap \multimap --- [0x02234] = 0x29, -- therefore \therefore --- [0x02235] = 0x2A, -- because \because --- [0x02251] = 0x2B, -- equalsdots \Doteq \doteqdot --- [0x0225C] = 0x2C, -- defines \triangleq --- [0x0227E] = 0x2D, -- precedesorequal \precsim --- [0x02272] = 0x2E, -- lessorsimilar \lesssim --- [0x02A85] = 0x2F, -- lessorapproxeql \lessapprox --- [0x02A95] = 0x30, -- equalorless \eqslantless --- [0x02A96] = 0x31, -- equalorgreater \eqslantgtr --- [0x022DE] = 0x32, -- equalorprecedes \curlyeqprec --- [0x022DF] = 0x33, -- equalorfollows \curlyeqsucc --- [0x0227C] = 0x34, -- precedesorcurly \preccurlyeq --- [0x02266] = 0x35, -- lessdblequal \leqq --- [0x02A7D] = 0x36, -- lessorequalslant \leqslant --- [0x02276] = 0x37, -- lessorgreater \lessgtr --- [0x02035] = 0x38, -- primereverse \backprime --- -- [0x0] = 0x39, -- axisshort \dabar --- [0x02253] = 0x3A, -- equaldotrightleft \risingdotseq --- [0x02252] = 0x3B, -- equaldotleftright \fallingdotseq --- [0x0227D] = 0x3C, -- followsorcurly \succcurlyeq --- [0x02267] = 0x3D, -- greaterdblequal \geqq --- [0x02A7E] = 0x3E, -- greaterorequalslant \geqslant --- [0x02277] = 0x3F, -- greaterorless \gtrless --- [0x0228F] = 0x40, -- squareimage \sqsubset --- [0x02290] = 0x41, -- squareoriginal \sqsupset --- -- wrong: see ** --- -- [0x022B3] = 0x42, -- triangleright \rhd \vartriangleright --- -- [0x022B2] = 0x43, -- triangleleft \lhd \vartriangleleft --- -- cf lm --- [0x022B5] = 0x44, -- trianglerightequal \unrhd \trianglerighteq --- [0x022B4] = 0x45, -- triangleleftequal \unlhd \trianglelefteq --- -- --- [0x02605] = 0x46, -- star \bigstar --- [0x0226C] = 0x47, -- between \between --- [0x025BC] = 0x48, -- triangledownsld \blacktriangledown --- [0x025B6] = 0x49, -- trianglerightsld \blacktriangleright --- [0x025C0] = 0x4A, -- triangleleftsld \blacktriangleleft --- -- [0x0] = 0x4B, -- arrowaxisright --- -- [0x0] = 0x4C, -- arrowaxisleft --- [0x025B2] = 0x4D, -- triangle \triangleup \vartriangle --- [0x025B2] = 0x4E, -- trianglesolid \blacktriangle --- [0x025BD] = 0x4F, -- triangleinv \triangledown --- [0x02256] = 0x50, -- ringinequal \eqcirc --- [0x022DA] = 0x51, -- lessequalgreater \lesseqgtr --- [0x022DB] = 0x52, -- greaterlessequal \gtreqless --- [0x02A8B] = 0x53, -- lessdbleqlgreater \lesseqqgtr --- [0x02A8C] = 0x54, -- greaterdbleqlless \gtreqqless --- [0x000A5] = 0x55, -- Yen \yen --- [0x021DB] = 0x56, -- arrowtripleright \Rrightarrow --- [0x021DA] = 0x57, -- arrowtripleleft \Lleftarrow --- [0x02713] = 0x58, -- check \checkmark --- [0x022BB] = 0x59, -- orunderscore \veebar --- [0x022BC] = 0x5A, -- nand \barwedge --- [0x02306] = 0x5B, -- perpcorrespond \doublebarwedge --- [0x02220] = 0x5C, -- angle \angle --- [0x02221] = 0x5D, -- measuredangle \measuredangle --- [0x02222] = 0x5E, -- sphericalangle \sphericalangle --- -- [0x0] = 0x5F, -- proportional \varpropto --- -- [0x0] = 0x60, -- smile \smallsmile --- -- [0x0] = 0x61, -- frown \smallfrown --- [0x022D0] = 0x62, -- subsetdbl \Subset --- [0x022D1] = 0x63, -- supersetdbl \Supset --- [0x022D3] = 0x64, -- uniondbl \doublecup \Cup --- [0x022D2] = 0x65, -- intersectiondbl \doublecap \Cap --- [0x022CF] = 0x66, -- uprise \curlywedge --- [0x022CE] = 0x67, -- downfall \curlyvee --- [0x022CB] = 0x68, -- multiopenleft \leftthreetimes --- [0x022CC] = 0x69, -- multiopenright \rightthreetimes --- [0x02AC5] = 0x6A, -- subsetdblequal \subseteqq --- [0x02AC6] = 0x6B, -- supersetdblequal \supseteqq --- [0x0224F] = 0x6C, -- difference \bumpeq --- [0x0224E] = 0x6D, -- geomequivalent \Bumpeq --- [0x022D8] = 0x6E, -- muchless \lll \llless --- [0x022D9] = 0x6F, -- muchgreater \ggg \gggtr --- [0x0231C] = 0x70, -- rightanglenw \ulcorner --- [0x0231D] = 0x71, -- rightanglene \urcorner --- [0x024C7] = 0x72, -- circleR \circledR --- [0x024C8] = 0x73, -- circleS \circledS --- [0x022D4] = 0x74, -- fork \pitchfork --- [0x02214] = 0x75, -- dotplus \dotplus --- [0x0223D] = 0x76, -- revsimilar \backsim --- [0x022CD] = 0x77, -- revasymptequal \backsimeq -- AM: Check this! I mapped it to simeq. --- [0x0231E] = 0x78, -- rightanglesw \llcorner --- [0x0231F] = 0x79, -- rightanglese \lrcorner --- [0x02720] = 0x7A, -- maltesecross \maltese --- [0x02201] = 0x7B, -- complement \complement --- [0x022BA] = 0x7C, -- intercal \intercal --- [0x0229A] = 0x7D, -- circlering \circledcirc --- [0x0229B] = 0x7E, -- circleasterisk \circledast --- [0x0229D] = 0x7F, -- circleminus \circleddash --- } --- --- mathencodings["tex-mb"] = { --- -- [0x0] = 0x00, -- lessornotequal \lvertneqq --- -- [0x0] = 0x01, -- greaterornotequal \gvertneqq --- [0x02270] = 0x02, -- notlessequal \nleq --- [0x02271] = 0x03, -- notgreaterequal \ngeq --- [0x0226E] = 0x04, -- notless \nless --- [0x0226F] = 0x05, -- notgreater \ngtr --- [0x02280] = 0x06, -- notprecedes \nprec --- [0x02281] = 0x07, -- notfollows \nsucc --- [0x02268] = 0x08, -- lessornotdbleql \lneqq --- [0x02269] = 0x09, -- greaterornotdbleql \gneqq --- -- [0x0] = 0x0A, -- notlessorslnteql \nleqslant --- -- [0x0] = 0x0B, -- notgreaterorslnteql \ngeqslant --- [0x02A87] = 0x0C, -- lessnotequal \lneq --- [0x02A88] = 0x0D, -- greaternotequal \gneq --- -- [0x0] = 0x0E, -- notprecedesoreql \npreceq --- -- [0x0] = 0x0F, -- notfollowsoreql \nsucceq --- [0x022E8] = 0x10, -- precedeornoteqvlnt \precnsim --- [0x022E9] = 0x11, -- followornoteqvlnt \succnsim --- [0x022E6] = 0x12, -- lessornotsimilar \lnsim --- [0x022E7] = 0x13, -- greaterornotsimilar \gnsim --- -- [0x0] = 0x14, -- notlessdblequal \nleqq --- -- [0x0] = 0x15, -- notgreaterdblequal \ngeqq --- [0x02AB5] = 0x16, -- precedenotslnteql \precneqq --- [0x02AB6] = 0x17, -- follownotslnteql \succneqq --- [0x02AB9] = 0x18, -- precedenotdbleqv \precnapprox --- [0x02ABA] = 0x19, -- follownotdbleqv \succnapprox --- [0x02A89] = 0x1A, -- lessnotdblequal \lnapprox --- [0x02A8A] = 0x1B, -- greaternotdblequal \gnapprox --- [0x02241] = 0x1C, -- notsimilar \nsim --- [0x02247] = 0x1D, -- notapproxequal \ncong --- -- [0x0] = 0x1E, -- upslope \diagup --- -- [0x0] = 0x1F, -- downslope \diagdown --- -- [0x0] = 0x20, -- notsubsetoreql \varsubsetneq --- -- [0x0] = 0x21, -- notsupersetoreql \varsupsetneq --- -- [0x0] = 0x22, -- notsubsetordbleql \nsubseteqq --- -- [0x0] = 0x23, -- notsupersetordbleql \nsupseteqq --- [0x02ACB] = 0x24, -- subsetornotdbleql \subsetneqq --- [0x02ACC] = 0x25, -- supersetornotdbleql \supsetneqq --- -- [0x0] = 0x26, -- subsetornoteql \varsubsetneqq --- -- [0x0] = 0x27, -- supersetornoteql \varsupsetneqq --- [0x0228A] = 0x28, -- subsetnoteql \subsetneq --- [0x0228B] = 0x29, -- supersetnoteql \supsetneq --- [0x02288] = 0x2A, -- notsubseteql \nsubseteq --- [0x02289] = 0x2B, -- notsuperseteql \nsupseteq --- [0x02226] = 0x2C, -- notparallel \nparallel --- [0x02224] = 0x2D, -- notbar \nmid \ndivides --- -- [0x0] = 0x2E, -- notshortbar \nshortmid --- -- [0x0] = 0x2F, -- notshortparallel \nshortparallel --- [0x022AC] = 0x30, -- notturnstile \nvdash --- [0x022AE] = 0x31, -- notforces \nVdash --- [0x022AD] = 0x32, -- notsatisfies \nvDash --- [0x022AF] = 0x33, -- notforcesextra \nVDash --- [0x022ED] = 0x34, -- nottriangeqlright \ntrianglerighteq --- [0x022EC] = 0x35, -- nottriangeqlleft \ntrianglelefteq --- [0x022EA] = 0x36, -- nottriangleleft \ntriangleleft --- [0x022EB] = 0x37, -- nottriangleright \ntriangleright --- [0x0219A] = 0x38, -- notarrowleft \nleftarrow --- [0x0219B] = 0x39, -- notarrowright \nrightarrow --- [0x021CD] = 0x3A, -- notdblarrowleft \nLeftarrow --- [0x021CF] = 0x3B, -- notdblarrowright \nRightarrow --- [0x021CE] = 0x3C, -- notdblarrowboth \nLeftrightarrow --- [0x021AE] = 0x3D, -- notarrowboth \nleftrightarrow --- [0x022C7] = 0x3E, -- dividemultiply \divideontimes --- [0x02300] = 0x3F, -- diametersign \varnothing --- [0x02204] = 0x40, -- notexistential \nexists --- [0x1D538] = 0x41, -- A (blackboard A) --- [0x1D539] = 0x42, -- B --- [0x02102] = 0x43, -- C --- [0x1D53B] = 0x44, -- D --- [0x1D53C] = 0x45, -- E --- [0x1D53D] = 0x46, -- F --- [0x1D53E] = 0x47, -- G --- [0x0210D] = 0x48, -- H --- [0x1D540] = 0x49, -- I --- [0x1D541] = 0x4A, -- J --- [0x1D542] = 0x4B, -- K --- [0x1D543] = 0x4C, -- L --- [0x1D544] = 0x4D, -- M --- [0x02115] = 0x4E, -- N --- [0x1D546] = 0x4F, -- O --- [0x02119] = 0x50, -- P --- [0x0211A] = 0x51, -- Q --- [0x0211D] = 0x52, -- R --- [0x1D54A] = 0x53, -- S --- [0x1D54B] = 0x54, -- T --- [0x1D54C] = 0x55, -- U --- [0x1D54D] = 0x56, -- V --- [0x1D54E] = 0x57, -- W --- [0x1D54F] = 0x58, -- X --- [0x1D550] = 0x59, -- Y --- [0x02124] = 0x5A, -- Z (blackboard Z) --- [0x02132] = 0x60, -- finv \Finv --- [0x02141] = 0x61, -- fmir \Game --- -- [0x0] = 0x62, tildewide --- -- [0x0] = 0x63, tildewider --- -- [0x0] = 0x64, Finv --- -- [0x0] = 0x65, Gmir --- [0x02127] = 0x66, -- Omegainv \mho --- [0x000F0] = 0x67, -- eth \eth --- [0x02242] = 0x68, -- equalorsimilar \eqsim --- [0x02136] = 0x69, -- beth \beth --- [0x02137] = 0x6A, -- gimel \gimel --- [0x02138] = 0x6B, -- daleth \daleth --- [0x022D6] = 0x6C, -- lessdot \lessdot --- [0x022D7] = 0x6D, -- greaterdot \gtrdot --- [0x022C9] = 0x6E, -- multicloseleft \ltimes --- [0x022CA] = 0x6F, -- multicloseright \rtimes --- -- [0x0] = 0x70, -- barshort \shortmid --- -- [0x0] = 0x71, -- parallelshort \shortparallel --- -- [0x02216] = 0x72, -- integerdivide \smallsetminus (2216 already part of tex-sy --- -- [0x0] = 0x73, -- similar \thicksim --- -- [0x0] = 0x74, -- approxequal \thickapprox --- [0x0224A] = 0x75, -- approxorequal \approxeq --- [0x02AB8] = 0x76, -- followsorequal \succapprox --- [0x02AB7] = 0x77, -- precedesorequal \precapprox --- [0x021B6] = 0x78, -- archleftdown \curvearrowleft --- [0x021B7] = 0x79, -- archrightdown \curvearrowright --- [0x003DC] = 0x7A, -- Digamma \digamma --- [0x003F0] = 0x7B, -- kappa \varkappa --- [0x1D55C] = 0x7C, -- k \Bbbk (blackboard k) --- [0x0210F] = 0x7D, -- planckover2pi \hslash % 0x7D --- [0x00127] = 0x7E, -- planckover2pi1 \hbar % 0x7E --- [0x003F6] = 0x7F, -- epsiloninv \backepsilon --- } --- --- mathencodings["tex-mc"] = { --- -- this file has no tfm so it gets mapped in the private space --- [0xFE324] = "mapsfromchar", --- } - mathencodings["tex-fraktur"] = { -- [0x1D504] = 0x41, -- A (fraktur A) -- [0x1D505] = 0x42, -- B diff --git a/tex/context/base/mkxl/math-vfu.lmt b/tex/context/base/mkxl/math-vfu.lmt index bdd5de103..f3e0ea814 100644 --- a/tex/context/base/mkxl/math-vfu.lmt +++ b/tex/context/base/mkxl/math-vfu.lmt @@ -47,6 +47,7 @@ fonts.handlers.vf.math = vfmath local helpers = fonts.helpers local addprivate = helpers.addprivate +local hasprivate = helpers.hasprivate local vfcommands = helpers.commands local rightcommand = vfcommands.right @@ -56,511 +57,535 @@ local upcommand = vfcommands.up local push = vfcommands.push local pop = vfcommands.pop local slotcommand = vfcommands.slot +local staycommand = vfcommands.stay -local function brace(main,characters,id,size,unicode,first,rule,left,right,rule,last) - if not characters[unicode] then - local template = characters[first] - if template then - if not characters[rule] then - local width = template.width / 4 - local height = template.height - characters[rule] = { - height = 3*height, - depth = 2*height, - width = width, - commands = { push, { "rule", height, width }, pop }, +local nps = fonts.helpers.newprivateslot +local ps = fonts.helpers.privateslot + +do + + local function horibar(main,unicode,rule,left,right,normal) + local characters = main.characters + if not characters[unicode] then + local height = main.mathparameters.defaultrulethickness or 4*65536/10 + local f_rule = rule and formatters["M-HORIBAR-RULE-%H"](rule) + local p_rule = rule and hasprivate(main,f_rule) + if rule and left and right and normal then + local ldata = characters[left] + local mdata = characters[rule] + local rdata = characters[right] + local ndata = characters[normal] + local lwidth = ldata.width or 0 + local mwidth = mdata.width or 0 + local rwidth = rdata.width or 0 + local nwidth = ndata.width or 0 + local down = (mdata.height / 2) - height + -- + local f_left = right and formatters["M-HORIBAR-LEFT-%H"](right) + local f_right = right and formatters["M-HORIBAR-RIGHT-%H"](right) + local p_left = left and hasprivate(main,f_left) + local p_right = right and hasprivate(main,f_right) + -- + if not characters[p_rule] then + p_rule = addprivate(main,f_rule,{ + height = height, + width = mwidth, + width = .95*mwidth, + commands = { + push, + leftcommand[.025*mwidth], + downcommand[down], + slotcommand[0][rule], + pop, + }, + }) + end + if not characters[p_left] then + p_left = addprivate(main,f_left,{ + height = height, + width = lwidth, + width = .95*lwidth, + commands = { + push, + leftcommand[.025*lwidth], + downcommand[down], + slotcommand[0][left], + pop, + }, + }) + end + if not characters[p_right] then + p_right = addprivate(main,f_right,{ + height = height, + width = rwidth, + width = .95*rwidth, + commands = { + push, + leftcommand[.025*rwidth], + downcommand[down], + slotcommand[0][right], + pop, + }, + }) + end + characters[unicode] = { + keepvirtual = true, + partsorientation = "horizontal", + height = height, + width = nwidth, + commands = { + downcommand[down], + slotcommand[0][normal] + }, + parts = { + { glyph = p_left, ["end"] = 0.4*lwidth }, + { glyph = p_rule, extender = 1, ["start"] = mwidth, ["end"] = mwidth }, + { glyph = p_right, ["start"] = 0.6*rwidth }, + } } - end - characters[unicode] = { - keepvirtual = true, - partsorientation = "horizontal", - parts = { - { glyph = first }, - { glyph = rule, extender = 1 }, - { glyph = left }, - { glyph = right }, - { glyph = rule, extender = 1 }, - { glyph = last }, + else + local width = main.parameters.quad/4 or 4*65536 + if not characters[p_rule] then + p_rule = addprivate(main,f_rule,{ + height = height, + width = width, + commands = { push, { "rule", height, width }, pop }, + }) + end + characters[unicode] = { + keepvirtual = true, + partsorientation = "horizontal", + parts = { + { glyph = p_rule }, + { glyph = p_rule, extender = 1, ["start"] = width/2, ["end"] = width/2 }, + } } - } + end end end -end -local function horibar(main,characters,id,size,unicode,rule) - if not characters[unicode] then - if not characters[rule] then - local width = main.parameters .quad/4 or 4*65536 + -- local rootbarmiddle -- false = addprivate(main,formatters["M-R-%H"](next)) + -- local rootbarright -- false = addprivate(main,formatters["M-R-%H"](next)) + + local function rootbar(main,unicode,rule,right,normal) + local characters = main.characters + if not characters[unicode] then local height = main.mathparameters.defaultrulethickness or 4*65536/10 - characters[rule] = { - height = height, - width = width, - commands = { push, { "rule", height, width }, pop }, - } + if rule and right and normal then + local mdata = characters[rule] + local rdata = characters[right] + local ndata = characters[normal] + local mwidth = mdata.width or 0 + local rwidth = rdata.width or 0 + local nwidth = ndata.width or 0 + local down = (mdata.height / 2) - height + -- + local f_rule = rule and formatters["M-ROOTBAR-RULE-%H"](rule) + local f_right = right and formatters["M-ROOTBAR-RIGHT-%H"](right) + local p_rule = rule and hasprivate(main,f_rule) + local p_right = right and hasprivate(main,f_right) + -- + if not p_rule then + p_rule = addprivate(main,f_rule,{ + height = height, + width = .95*mwidth, + commands = { + push, + leftcommand[.05*mwidth], + downcommand[down], + slotcommand[0][rule], + pop, + }, + }) + end + if right and not p_right then + p_right = addprivate(main,p_right,{ + height = height, + width = .95*rwidth, + commands = { + push, + leftcommand[.05*rwidth], + downcommand[down], + slotcommand[0][right], + pop, + }, + }) + end + characters[unicode] = { + keepvirtual = true, + partsorientation = "horizontal", + height = height, + width = rwidth, + commands = { + slotcommand[0][p_right], + }, + parts = { + { glyph = p_rule, extender = 1, ["start"] = mwidth, ["end"] = 0.9*mwidth }, + { glyph = p_right, ["start"] = 0.6*rwidth }, + } + } + end end - characters[unicode] = { - keepvirtual = true, - partsorientation = "horizontal", - parts = { - { glyph = rule }, - { glyph = rule, extender = 1 }, - } - } end -end -local function parent(main,characters,id,size,unicode,first,rule,last,where) - if not characters[unicode] then - local template = characters[first] - if template then - if not characters[rule] then - local width = template.width / 4 - local height = template.height - characters[rule] = { - height = where == "top" and height or 3*height, - depth = where == "top" and 2*height or 0, - width = width, - commands = { push, { "rule", height, width }, pop }, + local function parent(main,unicode,first,rule,last,where) + local characters = main.characters + local chardata = characters[unicode] + if characters[unicode] then + local template = characters[first] + if template then + if not characters[rule] then + local xheight = main.mathparameters.xheight + local width = template.width / 4 + local height = template.height + local depth = template.depth + local rheight = where == "top" and height or 3*height + local rdepth = where == "top" and 2*height or 0 + characters[rule] = { + height = rheight, + depth = rdepth, + width = width, + commands = { push, { "rule", height, width }, pop }, + } + characters[first].depth = rdepth + characters[last] .depth = rdepth + while true do + chardata.height = chardata.height - xheight + chardata.depth = 0 + chardata.yoffset = -xheight + local next = chardata.next + if next then + unicode = next + chardata = characters[unicode] + else + break + end + end + end + chardata.keepvirtual = true + chardata.partsorientation = "horizontal" + chardata.parts = { + { glyph = first }, + { glyph = rule, extender = 1 }, + { glyph = last }, } end - characters[unicode] = { - keepvirtual = true, - partsorientation = "horizontal", - parts = { + end + end + + local function brace(main,unicode,first,rule,left,right,rule,last) + local characters = main.characters + local chardata = characters[unicode] + if chardata then + local template = characters[first] + if template then + if not characters[rule] then + local xheight = main.mathparameters.xheight + local width = template.width / 4 + local height = template.height + local depth = template.depth + local rheight = 3*height + local rdepth = 2*height + characters[rule] = { + height = rheight, + depth = rdepth, + width = width, + commands = { push, { "rule", height, width }, pop }, + } + characters[first].depth = rdepth + characters[last] .depth = rdepth + characters[left] .height = rheight + characters[right].height = rheight + while true do + chardata.height = chardata.height - xheight + chardata.depth = 0 + chardata.yoffset = -xheight + local next = chardata.next + if next then + unicode = next + chardata = characters[unicode] + else + break + end + end + end + chardata.keepvirtual = true + chardata.partsorientation = "horizontal" + chardata.parts = { { glyph = first }, { glyph = rule, extender = 1 }, + { glyph = left }, + { glyph = right }, + { glyph = rule, extender = 1 }, { glyph = last }, } - } + end end end -end - --- local function extension(main,characters,id,size,unicode,first,middle,last) --- local chr = characters[unicode] --- if not chr then --- return -- skip --- end --- local fw = characters[first] --- if not fw then --- return --- end --- local mw = characters[middle] --- if not mw then --- return --- end --- local lw = characters[last] --- if not lw then --- return --- end --- fw = fw.width --- mw = mw.width --- lw = lw.width --- if fw == 0 then --- fw = 1 --- end --- if lw == 0 then --- lw = 1 --- end --- chr.partsorientation = "horizontal" --- chr.parts = { --- { extender = 0, glyph = first, ["end"] = fw/2, start = 0, advance = fw }, --- { extender = 1, glyph = middle, ["end"] = mw/2, start = mw/2, advance = mw }, --- { extender = 0, glyph = last, ["end"] = 0, start = lw/2, advance = lw }, --- } --- end - --- local step = 0.2 -- 0.1 is nicer but gives larger files --- local function clipped(main,characters,id,size,unicode,original) -- push/pop needed? --- local minus = characters[original] --- if minus then --- local mu = size/18 --- local step = 3*mu --- local width = minus.width --- if width > step then --- width = width - step --- step = step / 2 --- else --- width = width / 2 --- step = width --- end --- characters[unicode] = { --- width = width, --- height = minus.height, --- depth = minus.depth, --- commands = { --- push, --- leftcommand[step], --- slotcommand[id][original], --- pop, --- } --- } --- end --- end - -local function dots(main,characters,id,size,unicode) - local c = characters[0x002E] - if c then - local w = c.width - local h = c.height - local d = c.depth - local mu = size/18 - local right3mu = rightcommand[3*mu] - local right1mu = rightcommand[1*mu] - local up1size = upcommand[.1*size] - local up4size = upcommand[.4*size] - local up7size = upcommand[.7*size] - local right2muw = rightcommand[2*mu + w] - local slot = slotcommand[id][0x002E] - if unicode == 0x22EF then - local c = characters[0x022C5] - if c then - local width = c.width - local height = c.height - local depth = c.depth - local slot = slotcommand[id][0x022C5] + local function dots(main,unicode) + local characters = main.characters + local c = characters[0x002E] + if c then + local w = c.width + local h = c.height + local d = c.depth + local size = main.parameters.size + local mu = size/18 + local right3mu = rightcommand[3*mu] + local right1mu = rightcommand[1*mu] + local up1size = upcommand[.1*size] + local up4size = upcommand[.4*size] + local up7size = upcommand[.7*size] + local right2muw = rightcommand[2*mu + w] + local slot = slotcommand[0][0x002E] + if unicode == 0x22EF then + local c = characters[0x022C5] + if c then + local width = c.width + local height = c.height + local depth = c.depth + local slot = slotcommand[0][0x022C5] + -- local stay = staycommand[0x022C5] + -- local right3mu = rightcommand[width+3*mu] + characters[unicode] = { + width = 3*width + 2*3*mu, + height = height, + depth = depth, + commands = { + slot, right3mu, slot, right3mu, slot, + -- push, slot, right3mu, slot, right3mu, slot, pop, + -- stay, right3mu, stay, right3mu, stay, + } + } + end + elseif unicode == 0x22EE then characters[unicode] = { - width = 3*width + 2*3*mu, - height = height, - depth = depth, + width = w, + height = h+0.8*size, + depth = 0, commands = { - push, slot, right3mu, slot, right3mu, slot, pop, + -- push, push, slot, pop, up4size, push, slot, pop, up4size, slot, pop, + push, slot, pop, up4size, push, slot, pop, up4size, slot, } } - end - elseif unicode == 0x22EE then - characters[unicode] = { - width = w, - height = h+0.8*size, - depth = 0, - commands = { - push, push, slot, pop, up4size, push, slot, pop, up4size, slot, pop, + elseif unicode == 0x22F1 then + characters[unicode] = { + width = 3*w + 6*size/18, + height = h+0.7*size, + depth = 0, + commands = { + -- push, + right1mu, + push, up7size, slot, pop, + right2muw, + push, up4size, slot, pop, + right2muw, + push, up1size, slot, pop, + right1mu, + -- pop + } } - } - elseif unicode == 0x22F1 then + elseif unicode == 0x22F0 then + characters[unicode] = { + width = 3*w + 6*size/18, + height = h+0.7*size, + depth = 0, + commands = { + -- push, + right1mu, + push, up1size, slot, pop, + right2muw, + push, up4size, slot, pop, + right2muw, + push, up7size, slot, pop, + right1mu, + -- pop + } + } + else + characters[unicode] = { + width = 3*w + 2*3*mu, + height = h, + depth = d, + commands = { + -- push, slot, right3mu, slot, right3mu, slot, pop, + slot, right3mu, slot, right3mu, slot, + } + } + end + end + end + + local function jointwo(main,unicode,u1,d12,u2) + local characters = main.characters + local c1 = characters[u1] + local c2 = characters[u2] + if c1 and c2 then + local w1 = c1.width + local w2 = c2.width + local width + if d12 == false then + d12 = 0 + width = w2 + elseif d12 < 0 then + d12 = d12 * w2 + width = w2 + else + d12 = d12 * main.parameters.size/18 -- mu + width = w1 + w2 - d12 + end characters[unicode] = { - width = 3*w + 6*size/18, - height = h+0.7*size, - depth = 0, + width = width, + height = max(c1.height or 0, c2.height or 0), + depth = max(c1.depth or 0, c2.depth or 0), commands = { - push, - right1mu, - push, up7size, slot, pop, - right2muw, - push, up4size, slot, pop, - right2muw, - push, up1size, slot, pop, - right1mu, - pop - } + -- { "inspect" }, + -- { "trace" }, + slotcommand[0][u1], + -- { "trace" }, + d12 ~= 0 and leftcommand[d12] or false, + slotcommand[0][u2], + -- { "trace" }, + }, } - elseif unicode == 0x22F0 then + end + end + + local function overlaytwo(main,unicode,u1,factor,u2) -- not ... + local characters = main.characters + local c1 = characters[u1] + local c2 = characters[u2] + if c1 and c2 then + local width = c2.width characters[unicode] = { - width = 3*w + 6*size/18, - height = h+0.7*size, - depth = 0, + width = width, + height = max(c1.height or 0, c2.height or 0), + depth = max(c1.depth or 0, c2.depth or 0), commands = { push, - right1mu, - push, up1size, slot, pop, - right2muw, - push, up4size, slot, pop, - right2muw, - push, up7size, slot, pop, - right1mu, - pop - } + slotcommand[0][u2], -- = + pop, + factor ~= 0 and rightcommand[factor*width] or false, + slotcommand[0][u1], -- / + }, } - else + end + end + + local function jointhree(main,unicode,u1,d12,u2,d23,u3) + local characters = main.characters + local c1 = characters[u1] + local c2 = characters[u2] + local c3 = characters[u3] + if c1 and c2 and c3 then + local w1 = c1.width + local w2 = c2.width + local w3 = c3.width + local mu = main.parameters.size/18 + d12 = d12 * ds + d23 = d23 * ds characters[unicode] = { - width = 3*w + 2*3*mu, - height = h, - depth = d, + width = w1 + w2 + w3 - d12 - d23, + height = max(c1.height or 0, c2.height or 0, c3.height or 0), + depth = max(c1.depth or 0, c2.depth or 0, c3.depth or 0), commands = { - push, slot, right3mu, slot, right3mu, slot, pop, + -- push, + slotcommand[0][u1], + -- pop, + d12 ~= 0 and leftcommand[d12] or false, + -- push, + slotcommand[0][u2], + -- pop, + d23 ~= 0 and leftcommand[d23] or false, + -- push, + slotcommand[0][u3], + -- pop, } } end end -end --- local function vertbar(main,characters,id,size,parent,scale,unicode) --- local cp = characters[parent] --- if cp then --- local sc = scale * size --- local pc = slotcommand[id][parent] --- characters[unicode] = { --- width = cp.width, --- height = cp.height + sc, --- depth = cp.depth + sc, --- next = cp.next, -- can be extensible --- commands = { --- push, upcommand [sc], pc, pop, --- push, downcommand[sc], pc, pop, --- pc, --- }, --- } --- cp.next = unicode --- end --- end - -local function jointwo(main,characters,id,size,unicode,u1,d12,u2,what) - local c1 = characters[u1] - local c2 = characters[u2] - if c1 and c2 then - local w1 = c1.width - local w2 = c2.width - local width - if d12 == false then - d12 = 0 - width = w2 - else - d12 = d12 * size/18 -- mu - width = w1 + w2 - d12 + local function stack(main,unicode,u1,d12,u2) + local characters = main.characters + local c1 = characters[u1] + if not c1 then + return end + local c2 = characters[u2] + if not c2 then + return + end + local w1 = c1.width or 0 + local h1 = c1.height or 0 + local d1 = c1.depth or 0 + local w2 = c2.width or 0 + local h2 = c2.height or 0 + local d2 = c2.depth or 0 + local mu = main.parameters.size/18 characters[unicode] = { - width = width, - height = max(c1.height or 0, c2.height or 0), - depth = max(c1.depth or 0, c2.depth or 0), - commands = { --- { "inspect" }, --- { "trace" }, - slotcommand[id][u1], --- { "trace" }, - d12 ~= 0 and leftcommand[d12] or false, - slotcommand[id][u2], --- { "trace" }, - }, - } - end -end - -local function jointhree(main,characters,id,size,unicode,u1,d12,u2,d23,u3) - local c1 = characters[u1] - local c2 = characters[u2] - local c3 = characters[u3] - if c1 and c2 and c3 then - local w1 = c1.width - local w2 = c2.width - local w3 = c3.width - d12 = d12 * size/18 -- mu - d23 = d23 * size/18 -- mu - characters[unicode] = { - width = w1 + w2 + w3 - d12 - d23, - height = max(c1.height or 0, c2.height or 0, c3.height or 0), - depth = max(c1.depth or 0, c2.depth or 0, c3.depth or 0), + width = w1, + height = h1 + h2 + d12*mu, + depth = d1, commands = { --- push, - slotcommand[id][u1], --- pop, - d12 ~= 0 and leftcommand[d12] or false, --- push, - slotcommand[id][u2], --- pop, - d23 ~= 0 and leftcommand[d23] or false, --- push, - slotcommand[id][u3], --- pop, + slotcommand[0][u1], + leftcommand[w1/2 + w2/2], + downcommand[-h1 + d2 -d12*mu], + slotcommand[0][u2], } } end -end - -local function stack(main,characters,id,size,unicode,u1,d12,u2) - local c1 = characters[u1] - if not c1 then - return - end - local c2 = characters[u2] - if not c2 then - return - end - local w1 = c1.width or 0 - local h1 = c1.height or 0 - local d1 = c1.depth or 0 - local w2 = c2.width or 0 - local h2 = c2.height or 0 - local d2 = c2.depth or 0 - local mu = size/18 - characters[unicode] = { - width = w1, - height = h1 + h2 + d12*mu, - depth = d1, - commands = { - slotcommand[id][u1], - leftcommand[w1/2 + w2/2], - downcommand[-h1 + d2 -d12*mu], - slotcommand[id][u2], - } - } -end -local function repeated(main,characters,id,size,unicode,u,n,fraction) - local c = characters[u] - if c then - if n == 1 then - -- skip this one - else - local width = c.width - local italic = fraction*width -- c.italic or 0 -- larger ones have funny italics - local tc = slotcommand[id][u] - local tr = leftcommand[italic] -- see hack elsewhere - local commands = { } - for i=1,n-1 do + local function repeated(main,unicode,u,n,fraction) + local characters = main.characters + local c = characters[u] + if c then + if n == 1 then + -- skip this one + else + local width = c.width + local italic = fraction*width -- c.italic or 0 -- larger ones have funny italics + local tc = slotcommand[0][u] + local tr = leftcommand[italic] -- see hack elsewhere + local commands = { } + for i=1,n-1 do + commands[#commands+1] = tc + commands[#commands+1] = tr + end commands[#commands+1] = tc - commands[#commands+1] = tr - end - commands[#commands+1] = tc - local next = c.next - if next then - local p = addprivate(main,formatters["M-R-%H"](next)) - repeated(main,characters,id,size,p,next,n,fraction) - next = p + local next = c.next + if next then + local p = addprivate(main,formatters["M-R-%H"](next)) + repeated(main,p,next,n,fraction) + next = p + end + characters[unicode] = { + width = width + (n-1)*(width-italic), + height = c.height, + depth = c.depth, + italic = italic, + commands = commands, + keepvirtual = true, + next = next, + } end - characters[unicode] = { - width = width + (n-1)*(width-italic), - height = c.height, - depth = c.depth, - italic = italic, - commands = commands, - keepvirtual = true, - next = next, - } end end -end - --- local function cloned(main,characters,id,size,source,target) --- local data = characters[source] --- if data then --- characters[target] = data --- return true --- end --- end - --- we use the fact that context defines the smallest sizes first .. a real dirty and ugly hack - --- todo: use privates as we don't need access by number - -local data_of_smaller = nil -local size_of_smaller = 0 - -function vfmath.addmissing(main,id,size) - - local id_of_smaller = nil - - if size < size_of_smaller or size_of_smaller == 0 then - data_of_smaller = main.fonts[id] - id_of_smaller = id - else - id_of_smaller = #main.fonts + 1 - main.fonts[id_of_smaller] = data_of_smaller - end - - -- here id is the index in fonts (normally 14 or so) and that slot points to self - - local characters = main.characters - local shared = main.shared - local variables = main.goodies.mathematics and main.goodies.mathematics.variables or { } - local joinrelfactor = variables.joinrelfactor or 3 - - brace (main,characters,id,size,0x23DE,0xFE07A,0xFE070,0xFE07D,0xFE07C,0xFE070,0xFE07B) - brace (main,characters,id,size,0x23DF,0xFE07C,0xFE070,0xFE07B,0xFE07A,0xFE070,0xFE07D) - - parent (main,characters,id,size,0x23DC,0xFE07A,0xFE071,0xFE07B,"top") - parent (main,characters,id,size,0x23DD,0xFE07C,0xFE072,0xFE07D,"bottom") - - dots (main,characters,id,size,0x2026) -- ldots - dots (main,characters,id,size,0x22EE) -- vdots - dots (main,characters,id,size,0x22EF) -- cdots - dots (main,characters,id,size,0x22F1) -- ddots - dots (main,characters,id,size,0x22F0) -- udots - - horibar (main,characters,id,size,0x203E,0xFE073) -- overbar underbar - - -- vertbar (main,characters,id,size,0x0007C,0.10,0xFF601) -- big : 0.85 bodyfontsize - -- vertbar (main,characters,id,size,0xFF601,0.30,0xFF602) -- Big : 1.15 bodyfontsize - -- vertbar (main,characters,id,size,0xFF602,0.30,0xFF603) -- bigg : 1.45 bodyfontsize - -- vertbar (main,characters,id,size,0xFF603,0.30,0xFF604) -- Bigg : 1.75 bodyfontsize - -- vertbar (main,characters,id,size,0x02016,0.10,0xFF605) - -- vertbar (main,characters,id,size,0xFF605,0.30,0xFF606) - -- vertbar (main,characters,id,size,0xFF606,0.30,0xFF607) - -- vertbar (main,characters,id,size,0xFF607,0.30,0xFF608) - -- clipped (main,characters,id,size,0xFF501,0x0002D) -- minus - -- clipped (main,characters,id,size,0xFF502,0x02190) -- lefthead - -- clipped (main,characters,id,size,0xFF503,0x02192) -- righthead - -- clipped (main,characters,id,size,0xFF504,0xFE321) -- mapsto - -- clipped (main,characters,id,size,0xFF505,0xFE322) -- lhook - -- clipped (main,characters,id,size,0xFF506,0xFE323) -- rhook - -- clipped (main,characters,id,size,0xFF507,0xFE324) -- mapsfrom - -- clipped (main,characters,id,size,0xFF508,0x021D0) -- double lefthead - -- clipped (main,characters,id,size,0xFF509,0x021D2) -- double righthead - -- clipped (main,characters,id,size,0xFF50A,0x0003D) -- equal - -- clipped (main,characters,id,size,0xFF50B,0x0219E) -- lefttwohead - -- clipped (main,characters,id,size,0xFF50C,0x021A0) -- righttwohead - -- clipped (main,characters,id,size,0xFF50D,0xFF350) -- lr arrow combi snippet - -- clipped (main,characters,id,size,0xFF50E,0xFF351) -- lr arrow combi snippet - -- clipped (main,characters,id,size,0xFF50F,0xFF352) -- lr arrow combi snippet - -- clipped (main,characters,id,size,0xFF510,0x02261) -- equiv - - -- extension(main,characters,id,size,0x2190,0xFF502,0xFF501,0xFF501) -- \leftarrow - -- extension(main,characters,id,size,0x2192,0xFF501,0xFF501,0xFF503) -- \rightarrow - - -- extension(main,characters,id,size,0x002D,0xFF501,0xFF501,0xFF501) -- \rel - -- extension(main,characters,id,size,0x003D,0xFF50A,0xFF50A,0xFF50A) -- \equal - -- extension(main,characters,id,size,0x2261,0xFF510,0xFF510,0xFF510) -- \equiv - - -- jointwo (main,characters,id,size,0x21A6,0xFE321,0,0x02192) -- \mapstochar\rightarrow - -- jointwo (main,characters,id,size,0x21A9,0x02190,joinrelfactor,0xFE323) -- \leftarrow\joinrel\rhook - -- jointwo (main,characters,id,size,0x21AA,0xFE322,joinrelfactor,0x02192) -- \lhook\joinrel\rightarrow - jointwo (main,characters,id,size,0x27F5,0x02190,joinrelfactor,0x0002D) -- \leftarrow\joinrel\relbar - jointwo (main,characters,id,size,0x27F6,0x0002D,joinrelfactor,0x02192,2) -- \relbar\joinrel\rightarrow - jointwo (main,characters,id,size,0x27F7,0x02190,joinrelfactor,0x02192) -- \leftarrow\joinrel\rightarrow - jointwo (main,characters,id,size,0x27F8,0x021D0,joinrelfactor,0x0003D) -- \Leftarrow\joinrel\Relbar - jointwo (main,characters,id,size,0x27F9,0x0003D,joinrelfactor,0x021D2) -- \Relbar\joinrel\Rightarrow - jointwo (main,characters,id,size,0x27FA,0x021D0,joinrelfactor,0x021D2) -- \Leftarrow\joinrel\Rightarrow - -- jointhree(main,characters,id,size,0x27FB,0x02190,joinrelfactor,0x0002D,0,0xFE324) -- \leftarrow\joinrel\relbar\mapsfromchar - -- jointhree(main,characters,id,size,0x27FC,0xFE321,0,0x0002D,joinrelfactor,0x02192) -- \mapstochar\relbar\joinrel\rightarrow - - -- extension(main,characters,id,size,0x21A6,0xFF504,0xFF501,0xFF503) -- \mapstochar\rightarrow - -- extension(main,characters,id,size,0x21A9,0xFF502,0xFF501,0xFF506) -- \leftarrow\joinrel\rhook - -- extension(main,characters,id,size,0x21AA,0xFF505,0xFF501,0xFF503) -- \lhook\joinrel\rightarrow - -- extension(main,characters,id,size,0x27F5,0xFF502,0xFF501,0xFF501) -- \leftarrow\joinrel\relbar - -- extension(main,characters,id,size,0x27F6,0xFF501,0xFF501,0xFF503) -- \relbar\joinrel\rightarrow - -- extension(main,characters,id,size,0x27F7,0xFF502,0xFF501,0xFF503) -- \leftarrow\joinrel\rightarrow - -- extension(main,characters,id,size,0x27F8,0xFF508,0xFF50A,0xFF50A) -- \Leftarrow\joinrel\Relbar - -- extension(main,characters,id,size,0x27F9,0xFF50A,0xFF50A,0xFF509) -- \Relbar\joinrel\Rightarrow - -- extension(main,characters,id,size,0x27FA,0xFF508,0xFF50A,0xFF509) -- \Leftarrow\joinrel\Rightarrow - -- extension(main,characters,id,size,0x27FB,0xFF502,0xFF501,0xFF507) -- \leftarrow\joinrel\relbar\mapsfromchar - -- extension(main,characters,id,size,0x27FC,0xFF504,0xFF501,0xFF503) -- \mapstochar\relbar\joinrel\rightarrow - - -- extension(main,characters,id,size,0x219E,0xFF50B,0xFF501,0xFF501) -- \twoheadleftarrow\joinrel\relbar - -- extension(main,characters,id,size,0x21A0,0xFF501,0xFF501,0xFF50C) -- \relbar\joinrel\twoheadrightarrow - -- extension(main,characters,id,size,0x21C4,0xFF50D,0xFF50E,0xFF50F) -- leftoverright - - -- 21CB leftrightharpoon - -- 21CC rightleftharpoon - - stack(main,characters,id,size,0x2259,0x0003D,3,0x02227) -- \buildrel\wedge\over= - - jointwo(main,characters,id,size,0x22C8,0x022B3,joinrelfactor,0x022B2) -- \mathrel\triangleright\joinrel\mathrel\triangleleft (4 looks better than 3) - jointwo(main,characters,id,size,0x22A7,0x0007C,joinrelfactor,0x0003D) -- \mathrel|\joinrel= - jointwo(main,characters,id,size,0x2260,0x00338,0,0x0003D) -- \not\equal - jointwo(main,characters,id,size,0x2284,0x00338,false,0x02282) -- \not\subset - jointwo(main,characters,id,size,0x2285,0x00338,false,0x02283) -- \not\supset - jointwo(main,characters,id,size,0x2209,0x00338,false,0x02208) -- \not\in - jointwo(main,characters,id,size,0x2254,0x03A,0,0x03D) -- := (≔) - - repeated(main,characters,id,size,0x222B,0x222B,1,1/2) - repeated(main,characters,id,size,0x222C,0x222B,2,1/2) - repeated(main,characters,id,size,0x222D,0x222B,3,1/2) - - characters[0x02B9] = characters[0x2032] -- we're nice + vfmath.builders = { + horibar = horibar, + rootbar = rootbar, + parent = parent, + brace = brace, + dots = dots, + jointwo = jointwo, + overlaytwo = overlaytwo, + jointhree = jointhree, + stack = stack, + repeated = repeated, + } - data_of_smaller = main.fonts[id] - size_of_smaller = size + -- todo: move this to the lfg files end @@ -706,6 +731,7 @@ local function virtualize(s,uni,fci,skewchar,move,mathparameters,unicode,paramet depth = half - axis end -- + local next = fci.next return { advance = advance, width = width, @@ -797,7 +823,9 @@ function vfmath.define(specification,set,goodies) hasitalics = true, hasmath = true, } - local goodies = { } + if not goodies then + goodies = { } + end local main = { metadata = metadata, properties = properties, @@ -899,8 +927,8 @@ function vfmath.define(specification,set,goodies) mathparameters.sup3 = newparameters[15] or 0 -- sup3 : superscript shift-up in cramped styles mathparameters.sub1 = newparameters[16] or 0 -- sub1 : subscript shift-down if superscript is absent mathparameters.sub2 = newparameters[17] or 0 -- sub2 : subscript shift-down if superscript is present - mathparameters.sup_drop = newparameters[18] or 0 -- sup_drop : superscript baseline below top of large box - mathparameters.sub_drop = newparameters[19] or 0 -- sub_drop : subscript baseline below bottom of large box + mathparameters.supdrop = newparameters[18] or 0 -- supdrop : superscript baseline below top of large box + mathparameters.subdrop = newparameters[19] or 0 -- subdrop : subscript baseline below bottom of large box mathparameters.delim1 = newparameters[20] or 0 -- delim1 : size of \atopwithdelims delimiters in display styles mathparameters.delim2 = newparameters[21] or 0 -- delim2 : size of \atopwithdelims delimiters in non-displays mathparameters.axisheight = newparameters[22] or 0 -- axisheight : height of fraction lines above the baseline @@ -984,11 +1012,24 @@ function vfmath.define(specification,set,goodies) end end end +-- if ss.jmn then +-- local extension = mathencodings["extensible-jmn-private"] +-- for unicode, index in sortedhash(extension) do +-- if not characters[unicode] then +-- local uni = backmap and backmap[index] or index +-- local fci = fc[uni] +-- characters[unicode] = virtualize(s,uni,fci,skewchar,false,mathparameters,unicode,fp) +-- end +-- end +-- end if isextension then local extension = mathencodings["large-to-small"] for uni, fci in sortedhash(fc) do - if not done[uni] then - local t = virtualize(s,uni,fci,skewchar,tonumber(badones and badones[fci.name or ""]),mathparameters,nil,fp) + local name = fci.name or "" + if ignore and ignore[name] then + -- get rid of ugly antykwa bar + elseif not done[uni] then + local t = virtualize(s,uni,fci,skewchar,tonumber(badones and badones[name]),mathparameters,nil,fp) local o = addprivate(main,f_extra(offset)) extras[uni] = o characters[o] = t @@ -1011,7 +1052,7 @@ function vfmath.define(specification,set,goodies) end fci.keepvirtual = true fci.parts = p - fci.partsorientation = "vertical" + fci.partsorientation = "vertical" -- nasty as some are horizontal fci.partsitalic = fci.partsitalic or fci.italic end end @@ -1045,7 +1086,11 @@ function vfmath.define(specification,set,goodies) size = size, fontname = name, -- diagnostics } - vfmath.addmissing(main,#fontlist,size) + -- + local addmissing = goodies.mathematics.addmissing + if type(addmissing) == "function" then + addmissing(main) + end -- mathematics.addfallbacks(main) -- @@ -1057,6 +1102,22 @@ function vfmath.define(specification,set,goodies) main.MathConstants = main.mathconstants main.nomath = false -- + mathematics.tweaks.setoptions(main,main,{ + tweak = "setoptions", + set = { "ignorekerndimensions" } + }) -- we have dp > ht fences + -- + mathematics.tweaks.fixprimes(main, main, { + tweak = "fixprimes", + factor = 1, -- accent base height + fake = 0.9, -- replace multiples with this width proportion + }) + -- +-- mathematics.tweaks.addbars(main,main,{ +-- tweak = "addbars", +-- advance = 0.52, +-- }) + -- if trace_virtual or trace_timings then report_virtual("loading and virtualizing font %a at size %p took %0.3f seconds",name,size,os.clock()-start) end @@ -1086,3 +1147,145 @@ function vfmath.setdigits(font_encoding, name, digits) enc[digits+i] = i + 0x30 end end + +-- local function extension(main,characters,id,size,unicode,first,middle,last) +-- local chr = characters[unicode] +-- if not chr then +-- return -- skip +-- end +-- local fw = characters[first] +-- if not fw then +-- return +-- end +-- local mw = characters[middle] +-- if not mw then +-- return +-- end +-- local lw = characters[last] +-- if not lw then +-- return +-- end +-- fw = fw.width +-- mw = mw.width +-- lw = lw.width +-- if fw == 0 then +-- fw = 1 +-- end +-- if lw == 0 then +-- lw = 1 +-- end +-- chr.partsorientation = "horizontal" +-- chr.parts = { +-- { extender = 0, glyph = first, ["end"] = fw/2, start = 0, advance = fw }, +-- { extender = 1, glyph = middle, ["end"] = mw/2, start = mw/2, advance = mw }, +-- { extender = 0, glyph = last, ["end"] = 0, start = lw/2, advance = lw }, +-- } +-- end + +-- local step = 0.2 -- 0.1 is nicer but gives larger files + +-- local function clipped(main,characters,id,size,unicode,original) -- push/pop needed? +-- local minus = characters[original] +-- if minus then +-- local mu = size/18 +-- local step = 3*mu +-- local width = minus.width +-- if width > step then +-- width = width - step +-- step = step / 2 +-- else +-- width = width / 2 +-- step = width +-- end +-- characters[unicode] = { +-- width = width, +-- height = minus.height, +-- depth = minus.depth, +-- commands = { +-- push, +-- leftcommand[step], +-- slotcommand[0][original], +-- pop, +-- } +-- } +-- end +-- end + +-- local function vertbar(main,characters,id,size,parent,scale,unicode) +-- local cp = characters[parent] +-- if cp then +-- local sc = scale * size +-- local pc = slotcommand[0][parent] +-- characters[unicode] = { +-- width = cp.width, +-- height = cp.height + sc, +-- depth = cp.depth + sc, +-- next = cp.next, -- can be extensible +-- commands = { +-- push, upcommand [sc], pc, pop, +-- push, downcommand[sc], pc, pop, +-- pc, +-- }, +-- } +-- cp.next = unicode +-- end +-- end + +-- vertbar (main,characters,id,size,0x0007C,0.10,0xFF601) -- big : 0.85 bodyfontsize +-- vertbar (main,characters,id,size,0xFF601,0.30,0xFF602) -- Big : 1.15 bodyfontsize +-- vertbar (main,characters,id,size,0xFF602,0.30,0xFF603) -- bigg : 1.45 bodyfontsize +-- vertbar (main,characters,id,size,0xFF603,0.30,0xFF604) -- Bigg : 1.75 bodyfontsize +-- vertbar (main,characters,id,size,0x02016,0.10,0xFF605) +-- vertbar (main,characters,id,size,0xFF605,0.30,0xFF606) +-- vertbar (main,characters,id,size,0xFF606,0.30,0xFF607) +-- vertbar (main,characters,id,size,0xFF607,0.30,0xFF608) + +-- clipped (main,characters,id,size,0xFF501,0x0002D) -- minus +-- clipped (main,characters,id,size,0xFF502,0x02190) -- lefthead +-- clipped (main,characters,id,size,0xFF503,0x02192) -- righthead +-- clipped (main,characters,id,size,0xFF504,ps("maps to piece") -- mapsto +-- clipped (main,characters,id,size,0xFF505,0xFE322) -- lhook +-- clipped (main,characters,id,size,0xFF506,0xFE323) -- rhook +-- clipped (main,characters,id,size,0xFF507,0xFE324) -- mapsfrom +-- clipped (main,characters,id,size,0xFF508,0x021D0) -- double lefthead +-- clipped (main,characters,id,size,0xFF509,0x021D2) -- double righthead +-- clipped (main,characters,id,size,0xFF50A,0x0003D) -- equal +-- clipped (main,characters,id,size,0xFF50B,0x0219E) -- lefttwohead +-- clipped (main,characters,id,size,0xFF50C,0x021A0) -- righttwohead +-- clipped (main,characters,id,size,0xFF50D,0xFF350) -- lr arrow combi snippet +-- clipped (main,characters,id,size,0xFF50E,0xFF351) -- lr arrow combi snippet +-- clipped (main,characters,id,size,0xFF50F,0xFF352) -- lr arrow combi snippet +-- clipped (main,characters,id,size,0xFF510,0x02261) -- equiv + +-- extension(main,characters,id,size,0x2190,0xFF502,0xFF501,0xFF501) -- \leftarrow +-- extension(main,characters,id,size,0x2192,0xFF501,0xFF501,0xFF503) -- \rightarrow + +-- extension(main,characters,id,size,0x002D,0xFF501,0xFF501,0xFF501) -- \rel +-- extension(main,characters,id,size,0x003D,0xFF50A,0xFF50A,0xFF50A) -- \equal +-- extension(main,characters,id,size,0x2261,0xFF510,0xFF510,0xFF510) -- \equiv + +-- local lh = ps("left hook piece")] -- was FE322 +-- local rh = ps("right hook piece")] -- was FE323 + +-- jointwo (main,characters,id,size,0x21A6,ps("maps to piece"),0,0x02192) -- \mapstochar\rightarrow +-- jointwo (main,characters,id,size,0x21A9,0x02190,joinrelfactor,0xFE323) -- \leftarrow\joinrel\rhook +-- jointwo (main,characters,id,size,0x21AA,0xFE322,joinrelfactor,0x02192) -- \lhook\joinrel\rightarrow +-- jointhree(main,characters,id,size,0x27FB,0x02190,joinrelfactor,0x0002D,0,0xFE324) -- \leftarrow\joinrel\relbar\mapsfromchar + +-- jointhree(main,characters,id,size,0x27FC,ps("maps to piece"),0,0x0002D,joinrelfactor,0x02192) -- \mapstochar\relbar\joinrel\rightarrow + +-- extension(main,characters,id,size,0x21A6,0xFF504,0xFF501,0xFF503) -- \mapstochar\rightarrow +-- extension(main,characters,id,size,0x21A9,0xFF502,0xFF501,0xFF506) -- \leftarrow\joinrel\rhook +-- extension(main,characters,id,size,0x21AA,0xFF505,0xFF501,0xFF503) -- \lhook\joinrel\rightarrow +-- extension(main,characters,id,size,0x27F5,0xFF502,0xFF501,0xFF501) -- \leftarrow\joinrel\relbar +-- extension(main,characters,id,size,0x27F6,0xFF501,0xFF501,0xFF503) -- \relbar\joinrel\rightarrow +-- extension(main,characters,id,size,0x27F7,0xFF502,0xFF501,0xFF503) -- \leftarrow\joinrel\rightarrow +-- extension(main,characters,id,size,0x27F8,0xFF508,0xFF50A,0xFF50A) -- \Leftarrow\joinrel\Relbar +-- extension(main,characters,id,size,0x27F9,0xFF50A,0xFF50A,0xFF509) -- \Relbar\joinrel\Rightarrow +-- extension(main,characters,id,size,0x27FA,0xFF508,0xFF50A,0xFF509) -- \Leftarrow\joinrel\Rightarrow +-- extension(main,characters,id,size,0x27FB,0xFF502,0xFF501,0xFF507) -- \leftarrow\joinrel\relbar\mapsfromchar +-- extension(main,characters,id,size,0x27FC,0xFF504,0xFF501,0xFF503) -- \mapstochar\relbar\joinrel\rightarrow + +-- extension(main,characters,id,size,0x219E,0xFF50B,0xFF501,0xFF501) -- \twoheadleftarrow\joinrel\relbar +-- extension(main,characters,id,size,0x21A0,0xFF501,0xFF501,0xFF50C) -- \relbar\joinrel\twoheadrightarrow +-- extension(main,characters,id,size,0x21C4,0xFF50D,0xFF50E,0xFF50F) -- leftoverright diff --git a/tex/context/base/mkxl/pack-ori.lmt b/tex/context/base/mkxl/pack-ori.lmt index a786b19ef..81e8776b9 100644 --- a/tex/context/base/mkxl/pack-ori.lmt +++ b/tex/context/base/mkxl/pack-ori.lmt @@ -30,8 +30,8 @@ local horizontal = { [variables.middle] = 0x000, [variables.flushleft] = 0x100, [variables.flushright] = 0x200, - [variables.left] = 0x300, - [variables.right] = 0x400, + [variables.left] = 0x300, -- why not 0x100 + [variables.right] = 0x400, -- why not 0x200 } implement { diff --git a/tex/context/base/mkxl/strc-lst.lmt b/tex/context/base/mkxl/strc-lst.lmt index 703e580d7..359fbd6b6 100644 --- a/tex/context/base/mkxl/strc-lst.lmt +++ b/tex/context/base/mkxl/strc-lst.lmt @@ -873,17 +873,17 @@ end filters[v_product] = function(specification) local reference = specification.reference if reference and reference ~= "" then - -- local utilitydata = job.loadother(reference,true) - local fullname = file.replacesuffix(reference,"tuc") - if lfs.isfile(fullname) then - local utilitydata = job.loadother(fullname) + local utilitydata = job.loadother(reference,true) +-- local fullname = file.replacesuffix(reference,"tuc") +-- if lfs.isfile(fullname) then +-- local utilitydata = job.loadother(fullname) if utilitydata then local collected = utilitydata.structures.lists.collected or { } - setmetatableindex(collected,{ external = reference }) local result = { } local nofresult = 0 local all = specification.all local names = specification.names +setmetatableindex(result,{ external = reference }) -- brr for i=1,#collected do local v = collected[i] local m = v.metadata @@ -893,7 +893,7 @@ filters[v_product] = function(specification) end end return result - end +-- end end end return { } diff --git a/tex/context/base/mkxl/strc-mat.mkxl b/tex/context/base/mkxl/strc-mat.mkxl index 86e77e63c..bcbe4a6f8 100644 --- a/tex/context/base/mkxl/strc-mat.mkxl +++ b/tex/context/base/mkxl/strc-mat.mkxl @@ -1326,6 +1326,11 @@ \lastnamedcs\else\begincsname\??mathtextalign\v!middle:\v!auto\endcsname \fi} +\letcsname\??mathtextalign\v!right \expandafter\endcsname\csname\??mathtextalign\v!flushleft \endcsname +\letcsname\??mathtextalign\v!left \expandafter\endcsname\csname\??mathtextalign\v!flushright \endcsname +\letcsname\??mathtextalign\v!right:\v!auto\expandafter\endcsname\csname\??mathtextalign\v!flushleft :\v!auto\endcsname +\letcsname\??mathtextalign\v!left :\v!auto\expandafter\endcsname\csname\??mathtextalign\v!flushright:\v!auto\endcsname + \startsetups[math:penalties:\v!text] \interlinepenalty \plustenthousand \shapingpenalty \plustenthousand diff --git a/tex/context/base/mkxl/strc-ref.lmt b/tex/context/base/mkxl/strc-ref.lmt index 238201336..b97a1619b 100644 --- a/tex/context/base/mkxl/strc-ref.lmt +++ b/tex/context/base/mkxl/strc-ref.lmt @@ -494,7 +494,7 @@ implement { -- no metatable here .. better be sparse -local function register_from_lists(collected,derived,pages,sections) +local function register_from_list(collected,derived,pages,sections) local derived_g = derived[""] -- global local derived_p = nil local derived_c = nil @@ -556,7 +556,11 @@ local function register_from_lists(collected,derived,pages,sections) end end -references.registerinitializer(function() register_from_lists(lists.collected,derived) end) +references.registerfromlist = function(collected,pages,sections) + register_from_list(collected,derived,pages,sections) +end + +references.registerinitializer(function() register_from_list(lists.collected,derived) end) -- tracing @@ -1025,13 +1029,26 @@ local function loadexternalreferences(name,utilitydata) report_importing("registering %a reference, kind %a, name %a, prefix %a, reference %a", "external","regular",name,prefix,reference) end - local section = reference.section - local realpage = reference.realpage - if section then - reference.sectiondata = lists[section] - end - if realpage then - reference.pagedata = pages[realpage] + -- weird code + -- local section = reference.section + -- local realpage = reference.realpage + -- if section then + -- reference.sectiondata = lists[section] + -- end + -- if realpage then + -- reference.pagedata = pages[realpage] + -- end + -- better? + local references = data.references -- hm. plural + if references then + local section = references.section + local realpage = references.realpage + if not references.sectiondata then + references.sectiondata = sections[references.section or false] + end + if not references.pagedata then + references.pagedata = pages[references.realpage or false] + end end end end @@ -1046,20 +1063,18 @@ local function loadexternalreferences(name,utilitydata) local kind = metadata.kind local realpage = references.realpage if kind and realpage then - references.pagedata = pages[realpage] + -- quite likely already done so this might go + if pages and not references.pagedata then + references.pagedata = pages[references.realpage or false] + end + if sections and not references.sectiondata then + references.sectiondata = sections[references.section or false] + end + -- local prefix = references.prefix or "" if prefix == "" then prefix = name -- this can clash! end - local section = references.section - if section then - -- we have to make sure that the right section is used, see helpers.prefix - if sections then - references.sectiondata = sections[section] - else - -- warning - end - end local target = external[prefix] if not target then target = { } @@ -1127,8 +1142,9 @@ local function loadproductreferences(productname,componentname,utilitydata) local struc = utilitydata.structures if struc then local productreferences = struc.references.collected -- direct references - local lists = struc.lists.collected -- indirect references (derived) - local pages = struc.pages.collected -- pagenumber data + local lists = struc.lists.collected -- indirect references (derived) + local pages = struc.pages.collected -- pagenumber data + local sections = struc.sections.collected -- section number data -- we use indirect tables to save room but as they are eventually -- just references we resolve them to data here (the mechanisms -- that use this data check for indirectness) @@ -1138,13 +1154,11 @@ local function loadproductreferences(productname,componentname,utilitydata) report_importing("registering %s reference, kind %a, name %a, prefix %a, reference %a", "product","regular",productname,prefix,reference) end - local section = reference.section - local realpage = reference.realpage - if section then - reference.sectiondata = lists[section] + if not reference.sectiondata then + reference.sectiondata = sections[reference.section or false] end - if realpage then - reference.pagedata = pages[realpage] + if not reference.pagedata then + reference.pagedata = pages[reference.realpage or false] end end end @@ -1160,7 +1174,6 @@ local function loadproductreferences(productname,componentname,utilitydata) local kind = metadata.kind local realpage = references.realpage if kind and realpage then - references.pagedata = pages[realpage] local prefix = references.prefix or "" local component = references.component local ctarget, ptarget diff --git a/tex/context/base/mkxl/strc-reg.lmt b/tex/context/base/mkxl/strc-reg.lmt index 85198a151..a3a7dae6c 100644 --- a/tex/context/base/mkxl/strc-reg.lmt +++ b/tex/context/base/mkxl/strc-reg.lmt @@ -1403,7 +1403,9 @@ function registers.flush(data,options,prefixspec,pagespec) if nofpages > 0 then -- or 0 d = dd for p=1,nofpages do - local first, last = pages[p][1], pages[p][2] + local page = pages[p] + local first = page[1] + local last = page[2] if first == last then if first.references.lastrealpage then pagerange(first,first,true,prefixspec,pagespec) diff --git a/tex/context/base/mkxl/tabl-ntb.mkxl b/tex/context/base/mkxl/tabl-ntb.mkxl index 049dff58c..6eb926b09 100644 --- a/tex/context/base/mkxl/tabl-ntb.mkxl +++ b/tex/context/base/mkxl/tabl-ntb.mkxl @@ -331,13 +331,13 @@ \letcsname\??naturaltablesqueeze\v!local\endcsname\donetrue \def\tabl_ntb_let_gal{\gletcsname\??naturaltablegal\m_tabl_tbl_level\endcsname} -\def\tabl_ntb_get_gal{\csname\??naturaltablegal\m_tabl_tbl_level\endcsname} +\def\tabl_ntb_get_gal{\csname \??naturaltablegal\m_tabl_tbl_level\endcsname} \def\tabl_ntb_let_tal#1{\gletcsname\??naturaltabletal\m_tabl_tbl_level:\number#1\endcsname} -\def\tabl_ntb_get_tal#1{\csname\??naturaltabletal\m_tabl_tbl_level:\number#1\endcsname} +\def\tabl_ntb_get_tal#1{\csname \??naturaltabletal\m_tabl_tbl_level:\number#1\endcsname} \def\tabl_ntb_set_nob#1{\letcsname\??naturaltablenob\m_tabl_tbl_level:\number#1\endcsname\plusone} -\def\tabl_ntb_get_nob#1{\ifcsname\??naturaltablenob\m_tabl_tbl_level:\number#1\endcsname\plusone\else\zerocount\fi} +\def\tabl_ntb_get_nob#1{\ifcsname \??naturaltablenob\m_tabl_tbl_level:\number#1\endcsname\plusone\else\zerocount\fi} %def\tabl_ntb_set_tag#1#2{\expandafter\integerdef\csname\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2\endcsname} \def\tabl_ntb_set_col#1#2{\expandafter\integerdef\csname\??naturaltablecol\m_tabl_tbl_level:\number#1:\number#2\endcsname} @@ -733,9 +733,23 @@ % \bTR \bTD left \eTD\bTD right \eTD\eTR % \eTABLE +% plugin + +\let\tabl_ntb_section_mark \relax +\let\tabl_ntb_section_checkup\relax +\let\tabl_ntb_section_split \relax +\let\tabl_ntb_section_install\relax +\let\tabl_ntb_section_setup \relax +\let\tabl_ntb_section_wrapup \relax + +% till here + \tolerant\protected\def\tabl_ntb_tr[#1]% {\c_tabl_ntb_running_col\zerocount \c_tabl_ntb_encountered_col\zerocount + % + \tabl_ntb_section_mark + % \advanceby\c_tabl_ntb_maximum_row\plusone \ifparameter#1\or \expandafter\tabl_ntb_tr_yes @@ -1009,6 +1023,7 @@ \setupcurrentnaturaltablelocal[\c!align={\v!right,\v!broad,\v!high},#1]% % \tabl_ntb_anchor_setup + \tabl_ntb_section_setup % \d_tabl_ntb_leftmargindistance \naturaltablelocalparameter\c!leftmargindistance\relax \d_tabl_ntb_rightmargindistance\naturaltablelocalparameter\c!rightmargindistance\relax @@ -1052,6 +1067,7 @@ \let\currentTABLEcolumn\tabl_ntb_current_column \let\nofTABLErows \tabl_ntb_n_of_rows \let\nofTABLEcolumns \tabl_ntb_n_of_columns + % \enforced\let\bTR\tabl_ntb_bTR \enforced\let\bTD\tabl_ntb_bTD \enforced\let\bTH\tabl_ntb_bTH @@ -1133,6 +1149,7 @@ % \vskip-\strutdp % \fi \fi + \tabl_ntb_section_wrapup % tracing % \iftrue % \blank \tttf @@ -1375,6 +1392,7 @@ \ifconditional\c_strc_tags_enabled \tabl_ntb_start_tagged \fi + \tabl_ntb_section_checkup \hbox\bgroup \kern\dimexpr\d_tabl_ntb_leftmargindistance\relax} @@ -1798,6 +1816,7 @@ \t_split_after{\m_tabl_ntb_after_split}% \t_split_before{\m_tabl_ntb_before_split}% not used (yet) \setbox\b_split_content\vbox{\tabl_ntb_flush_content}% + \tabl_ntb_section_install % we need content to be set \ifmultipleTBLheads \localcontrolledloop\plusone\c_tabl_ntb_n_of_head_lines\plusone {\setbox\scratchbox\vsplit\b_split_content to \lineheight diff --git a/tex/context/base/mkxl/tabl-tsp.mkxl b/tex/context/base/mkxl/tabl-tsp.mkxl index 160357a06..6facbfcae 100644 --- a/tex/context/base/mkxl/tabl-tsp.mkxl +++ b/tex/context/base/mkxl/tabl-tsp.mkxl @@ -217,6 +217,7 @@ \newtoks \t_split_before \newtoks \t_split_inbetween \newtoks \t_split_after +\newtoks \t_split_section \newtoks \everyresettsplit \newinteger \c_split_minimum_free_lines @@ -246,6 +247,7 @@ \t_split_inbetween \emptytoks \t_split_before \emptytoks \t_split_after \emptytoks + \t_split_section \emptytoks \let\postprocesstsplit \donothing \to \everyresettsplit @@ -301,6 +303,7 @@ \setbox\b_split_result\vbox {\ifdim\ht\b_split_head>\zeropoint \unvcopy\b_split_head + \the\t_split_section \the\t_split_inbetween \fi}% \ifconditional\c_tabl_split_done \else diff --git a/tex/context/fonts/mkiv/antykwa-math.lfg b/tex/context/fonts/mkiv/antykwa-math.lfg index 3c34d7af0..5bbd2cf6c 100644 --- a/tex/context/fonts/mkiv/antykwa-math.lfg +++ b/tex/context/fonts/mkiv/antykwa-math.lfg @@ -1,35 +1,115 @@ +local common = fonts.goodies.load("common-math-jmn.lfg") +local helpers = common.mathematics.helpers + +if not fonts.encodings.math["extensible-jmn-private"] then + + local nps = fonts.helpers.newprivateslot + + fonts.encodings.math["extensible-jmn-private"] = { + [nps("rule middle piece")] = 200, -- minusjmn + [nps("rule right piece")] = 201, -- minusrightjmn + [nps("rule left piece")] = 202, -- minusleftjmn + [nps("double rule middle piece")] = 203, -- equaljmn + [nps("double rule right piece")] = 204, -- equalrightjmn + [nps("double rule left piece")] = 205, -- equalleftjmn + [nps("arrow left piece")] = 206, -- arrowleftjmn + [nps("arrow right piece")] = 207, -- arrowrightjmn + [nps("double arrow left piece")] = 208, -- arrowdblleftjmn + [nps("double arrow right piece")] = 209, -- arrowdblrightjmn + } + +end + +local fraction = .25 + local badones = { - summationtext = .25, - producttext = .25, - integraltext = .25, - uniontext = .25, - intersectiontext = .25, - unionmultitext = .25, - logicalandtext = .25, - logicalortext = .25, - summationdisplay = .25, - productdisplay = .25, - integraldisplay = .25, - uniondisplay = .25, - intersectiondisplay = .25, - unionmultidisplay = .25, - logicalanddisplay = .25, - logicalordisplay = .25, - coproducttext = .25, - coproductdisplay = .25, + summationtext = fraction, + producttext = fraction, + integraltext = fraction, + uniontext = fraction, + intersectiontext = fraction, + unionmultitext = fraction, + logicalandtext = fraction, + logicalortext = fraction, + summationdisplay = fraction, + productdisplay = fraction, + integraldisplay = fraction, + uniondisplay = fraction, + intersectiondisplay = fraction, + unionmultidisplay = fraction, + logicalanddisplay = fraction, + logicalordisplay = fraction, + coproducttext = fraction, + coproductdisplay = fraction, + + braceleftBig = fraction, + braceleftBigg = fraction, + braceleftbig = fraction, + braceleftbigg = fraction, + parenleftBig = fraction, + parenleftBigg = fraction, + parenleftbig = fraction, + parenleftbigg = fraction, + bracketleftBig = fraction, + bracketleftBigg = fraction, + bracketleftbig = fraction, + bracketleftbigg = fraction, + ceilingleftBig = fraction, + ceilingleftBigg = fraction, + ceilingleftbig = fraction, + ceilingleftbigg = fraction, + floorleftBig = fraction, + floorleftBigg = fraction, + floorleftbig = fraction, + floorleftbigg = fraction, + anglebracketleftBig = fraction, + anglebracketleftBigg = fraction, + anglebracketleftbig = fraction, + anglebracketleftbigg = fraction, + + bracerightBig = fraction, + bracerightBigg = fraction, + bracerightbig = fraction, + bracerightbigg = fraction, + parenrightBig = fraction, + parenrightBigg = fraction, + parenrightbig = fraction, + parenrightbigg = fraction, + bracketrightBig = fraction, + bracketrightBigg = fraction, + bracketrightbig = fraction, + bracketrightbigg = fraction, + ceilingrightBig = fraction, + ceilingrightBigg = fraction, + ceilingrightbig = fraction, + ceilingrightbigg = fraction, + floorrightBig = fraction, + floorrightBigg = fraction, + floorrightbig = fraction, + floorrightbigg = fraction, + anglebracketrightBig = fraction, + anglebracketrightBigg = fraction, + anglebracketrightbig = fraction, + anglebracketrightbigg = fraction, + + backslashBig = fraction, + backslashBigg = fraction, + backslashbig = fraction, + backslashbigg = fraction, } local uglyones = { - braceleft = true, - braceright = true, + braceleft = true, + braceright = true, + vextendsingle = true, + vextenddouble = true, } - return { name = "antykwa-math", version = "1.00", comment = "Goodies that complement antykwa math.", - author = "Hans, Mojca, Aditya", + author = "Hans, Mojca, Aditya, Mikael", copyright = "ConTeXt development team", mathematics = { mapfiles = { @@ -37,7 +117,10 @@ return { "antt-mi.map", "antt-sy.map", "antt-ex.map", - "mkiv-base.map", + -- "mkiv-base.map", + }, + variables = { + notshiftfactor = 0.075, }, virtuals = { ["antykwa-math"] = { @@ -48,9 +131,10 @@ return { { name = "mi-anttri.tfm", vector = "tex-it", skewchar=0x7F }, { name = "mi-anttbi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-anttb.tfm", vector = "tex-bf", skewchar=0x7F }, - { name = "sy-anttrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, + { name = "sy-anttrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, -- jmn = true + { name = "sy-anttrz.tfm", vector = "extensible-jmn-private", skewchar=0x30 }, { name = "file:AntykwaTorunska-Regular", vector = "tex-ex-braces", backmap = false }, - { name = "ex-anttr.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-anttr.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["antykwa-light-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-antykwa-light", main = true, parameters = false }, @@ -60,9 +144,10 @@ return { { name = "mi-anttli.tfm", vector = "tex-it", skewchar=0x7F }, { name = "mi-anttri.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-anttr.tfm", vector = "tex-bf", skewchar=0x7F }, - { name = "sy-anttlz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, + { name = "sy-anttlz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, -- jmn = true + { name = "sy-anttlz.tfm", vector = "extensible-jmn-private", skewchar=0x30 }, { name = "file:AntykwaTorunskaLight-Regular", vector = "tex-ex-braces", backmap = false }, - { name = "ex-anttl.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-anttl.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyone }, }, ["antykwa-cond-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-antykwa-cond", main = true, parameters = false }, @@ -72,9 +157,10 @@ return { { name = "mi-anttcri.tfm", vector = "tex-it", skewchar=0x7F }, { name = "mi-anttcbi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-anttcb.tfm", vector = "tex-bf", skewchar=0x7F }, - { name = "sy-anttcrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, + { name = "sy-anttcrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, -- jmn = true + { name = "sy-anttcrz.tfm", vector = "extensible-jmn-private", skewchar=0x30 }, { name = "file:AntykwaTorunskaCond-Regular", vector = "tex-ex-braces", backmap = false }, - { name = "ex-anttcr.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-anttcr.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyone }, }, ["antykwa-lightcond-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-antykwa-lightcond", main = true, parameters = false }, @@ -84,10 +170,12 @@ return { { name = "mi-anttcli.tfm", vector = "tex-it", skewchar=0x7F }, { name = "mi-anttcri.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-anttcr.tfm", vector = "tex-bf", skewchar=0x7F }, - { name = "sy-anttclz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, + { name = "sy-anttclz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, -- jmn = true + { name = "sy-anttclz.tfm", vector = "extensible-jmn-private", skewchar=0x30 }, { name = "file:AntykwaTorunskaCondLight-Regular", vector = "tex-ex-braces", backmap = false }, - { name = "ex-anttcl.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-anttcl.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyone }, } - } + }, + addmissing = helpers.addmissing, } } diff --git a/tex/context/fonts/mkiv/common-math-jmn.lfg b/tex/context/fonts/mkiv/common-math-jmn.lfg new file mode 100644 index 000000000..331d65a5d --- /dev/null +++ b/tex/context/fonts/mkiv/common-math-jmn.lfg @@ -0,0 +1,119 @@ +return { + name = "common-math-jmn", + version = "1.00", + comment = "Goodies that complement the JMN collection.", + author = "Hans, Mikael", + copyright = "ConTeXt development team", + mathematics = { + helpers = { + addmissing = function(main) + + local builders = fonts.handlers.vf.math.builders + local ps = fonts.helpers.privateslot + + local characters = main.characters + local variables = main.goodies.mathematics and main.goodies.mathematics.variables or { } + local joinrelfactor = variables.joinrelfactor or 3 + local notshiftfactor = variables.notshiftfactor or 0 + + local umbracepiece = ps("um brace piece") + local lmbracepiece = ps("lm brace piece") + local cmbracepiece = ps("cm brace piece") + + local ulbracepiece = ps("ul brace piece") + local urbracepiece = ps("ur brace piece") + local llbracepiece = ps("ll brace piece") + local lrbracepiece = ps("lr brace piece") + + builders.brace(main,0x23DE,ulbracepiece,cmbracepiece,lrbracepiece,llbracepiece,cmbracepiece,urbracepiece) + builders.brace(main,0x23DF,llbracepiece,cmbracepiece,urbracepiece,ulbracepiece,cmbracepiece,lrbracepiece) + + builders.parent(main,0x23DC,ulbracepiece,umbracepiece,urbracepiece,"top") + builders.parent(main,0x23DD,llbracepiece,lmbracepiece,lrbracepiece,"bottom") + + builders.dots(main,0x2026) -- ldots + builders.dots(main,0x22EE) -- vdots + builders.dots(main,0x22EF) -- cdots + builders.dots(main,0x22F1) -- ddots + builders.dots(main,0x22F0) -- udots + + builders.jointwo(main,0x21A6,ps("maps to piece"),.15,0x02192) -- \mapstochar\rightarrow + + local srm = ps("rule middle piece") + local srr = ps("rule right piece") + local srl = ps("rule left piece") + + local drm = ps("double rule middle piece") + local drr = ps("double rule right piece") + local drl = ps("double rule left piece") + + local sal = ps("arrow left piece") + local sar = ps("arrow right piece") + + local dal = ps("double arrow left piece") + local dar = ps("double arrow right piece") + + local rad = ps("radical bar extender") + + if characters[srm] then + + builders.jointwo(main,0x27F5,sak,joinrelfactor,srr) + builders.jointwo(main,0x27F6,srl,joinrelfactor,sar) + builders.jointwo(main,0x27F7,sak,joinrelfactor,sar) + builders.jointwo(main,0x27F8,dal,joinrelfactor,drr) + builders.jointwo(main,0x27F9,drl,joinrelfactor,dar) + builders.jointwo(main,0x27FA,dal,joinrelfactor,dar) + + builders.horibar(main,0x203E,srm,srl,srr,0x02212) -- overbar underbar fraction (we take 90/91/92 too!) + -- builders.horibar(main,0x203E,srm,srl,srr,0x0002D) -- overbar underbar fraction (we take 90/91/92 too!) + + builders.rootbar(main,ps("radical bar extender"),srm,srr,0x02212) -- radical + + else + + builders.jointwo(main,0x27F5,0x02190,joinrelfactor,0x0002D) -- \leftarrow\joinrel\relbar + builders.jointwo(main,0x27F6,0x0002D,joinrelfactor,0x02192) -- \relbar\joinrel\rightarrow + builders.jointwo(main,0x27F7,0x02190,joinrelfactor,0x02192) -- \leftarrow\joinrel\rightarrow + builders.jointwo(main,0x27F8,0x021D0,joinrelfactor,0x0003D) -- \Leftarrow\joinrel\Relbar + builders.jointwo(main,0x27F9,0x0003D,joinrelfactor,0x021D2) -- \Relbar\joinrel\Rightarrow + builders.jointwo(main,0x27FA,0x021D0,joinrelfactor,0x021D2) -- \Leftarrow\joinrel\Rightarrow + + builders.horibar(main,0x203E,0xFE073) -- overbar underbar + + end + + builders.jointwo(main,0x2016,0x007C,0.20,0x007C) + builders.jointwo(main,0x2980,0x007C,0.20,0x007C,0.20,0x007C) + + characters[0x007C].extensible = true + characters[0x007C].varianttemplate = 0x5B + characters[0x2016].extensible = true + characters[0x2016].varianttemplate = 0x5B + characters[0x2980].extensible = true + characters[0x2980].varianttemplate = 0x5B + + -- 21CB leftrightharpoon + -- 21CC rightleftharpoon + + builders.stack(main,0x2259,0x0003D,3,0x02227) -- \buildrel\wedge\over= + + builders.jointwo(main,0x22C8,0x022B3,joinrelfactor,0x022B2) -- \mathrel\triangleright\joinrel\mathrel\triangleleft (4 looks better than 3) + builders.jointwo(main,0x22A7,0x0007C,joinrelfactor,0x0003D) -- \mathrel|\joinrel= + + builders.overlaytwo(main,0x2260,0x00338,notshiftfactor,0x0003D) -- \not\equal + builders.overlaytwo(main,0x2284,0x00338,notshiftfactor,0x02282) -- \not\subset + builders.overlaytwo(main,0x2285,0x00338,notshiftfactor,0x02283) -- \not\supset + builders.overlaytwo(main,0x2209,0x00338,notshiftfactor,0x02208) -- \not\in + + builders.jointwo(main,0x2254,0x03A,0,0x03D) -- := (≔) + + builders.repeated(main,0x222B,0x222B,1,1/2) + builders.repeated(main,0x222C,0x222B,2,1/2) + builders.repeated(main,0x222D,0x222B,3,1/2) + + characters[0x02B9] = characters[0x2032] -- we're nice + + end + } + } +} diff --git a/tex/context/fonts/mkiv/ebgaramond.lfg b/tex/context/fonts/mkiv/ebgaramond.lfg deleted file mode 100644 index 73676ce44..000000000 --- a/tex/context/fonts/mkiv/ebgaramond.lfg +++ /dev/null @@ -1,90 +0,0 @@ -return { - name = "ebgaramond", - version = "1.00", - comment = "Goodies that complement ebgaramond.", - author = "Hans Hagen & Mikael Sundqvist", - copyright = "ConTeXt development team", - mathematics = { - tweaks = { - aftercopying = { - { - tweak = "version", - expected = "Version 2019-08-16", - }, - { - tweak = "dimensions", - list = { - -- offset width italic - [0x00393] = { 0.05, 1.05, 0.075 }, -- \Gamma - -- [0x003A6] = { 0.05, 1.05, 0 }, -- \Phi difficult! - [0x003A8] = { 0.05, 1.05, 0.075 }, -- \Psi - [0x02113] = { 0, 1, 0.075 }, -- \ell - [0x1D436] = { 0, 1, 0.05 }, -- C - [0x1D43D] = { 0.3, 1.4, 0.1 }, -- J - [0x1D44B] = { 0, 1, 0.05 }, -- X - [0x1D450] = { 0, 1.1, 0 }, -- c - [0x1D451] = { 0, 1, 0.05 }, -- d - [0x1D452] = { 0, 1.1, 0.05 }, -- e - [0x1D453] = { 0.15, 1.15, 0.1 }, -- f - [0x1D454] = { 0.1, 1.2, 0.1 }, -- g - [0xF0276] = { 0, 1.1, 0 }, -- h - [0x1D457] = { 0.2, 1.25, 0.05 }, -- j - [0x1D459] = { 0, 1, 0.05 }, -- l - [0x1D45D] = { 0.15, 1.15, 0 }, -- p - [0x1D45E] = { 0, 1.05, 0 }, -- q - [0x1D45F] = { 0, 1.05, 0 }, -- r - [0x1D461] = { 0, 1, 0.1 }, -- t - [0x1D465] = { 0.05, 1.1, 0.05 }, -- x - [0x1D466] = { 0.2, 1.2, 0 }, -- y - [0x1D6FD] = { 0.05, 1.1, 0.05 }, -- \beta - [0x1D6FE] = { 0, 1.05, 0 }, -- \gamma - [0x1D6FF] = { 0, 1, 0.1 }, -- \delta - [0x1D716] = { 0, 1.1, 0 }, -- \epsilon - [0x1D700] = { 0, 1.1, 0 }, -- \varepsilon - [0x1D701] = { 0, 1, 0.15 }, -- \zeta - [0x1D703] = { 0, 1, 0.1 }, -- \theta - [0x1D705] = { 0, 1, 0.1 }, -- \kappa - [0x1D706] = { 0.05, 1.1, 0 }, -- \lambda - [0x1D707] = { 0.05, 1.05, 0 }, -- \mu - [0x1D708] = { 0, 1.1, 0 }, -- \nu - [0x1D709] = { 0, 1.1, 0 }, -- \xi - [0x1D70B] = { 0, 1.05, 0 }, -- \pi - [0x1D70C] = { 0.2, 1.2, 0 }, -- \rho - [0x1D70E] = { 0, 1, 0.1 }, -- \sigma - [0x1D70F] = { 0.05, 1.05, 0.1 }, -- \tau - [0x1D712] = { 0.15, 1.2, 0.05 }, -- \chi - [0x1D713] = { 0.05, 1.05, 0.05 }, -- \psi - }, - }, - { - tweak = "fixprimes", - scale = 0.75, - smaller = true, - factor = 0.8, - fake = 0.75, - }, - { - tweak = "checkspacing", - }, - { - tweak = "addscripts", - }, - }, - }, - alternates = { - partial = { feature = 'ss02', value = 1, comment = "Curved partial" }, - semibold = { feature = 'ss04', value = 1, comment = "Semibold" }, - extrabold = { feature = 'ss05', value = 1, comment = "Extrabold" }, - hbar = { feature = 'ss06', value = 1, comment = "Horizontal bar for h-bar" }, - integral = { feature = 'ss07', value = 1, comment = "A more slanted integral sign" }, - tilde = { feature = 'ss09', value = 1, comment = "A tilde variant" }, - outbendingh = { feature = 'ss10', value = 1, comment = "Out-bending h" }, - largeoperators = { feature = 'ss11', value = 1, comment = "Larger operators" }, - }, - bigslots = { - 1, 3, 5, 7 - }, - }, -} - - diff --git a/tex/context/fonts/mkiv/iwona-math.lfg b/tex/context/fonts/mkiv/iwona-math.lfg index bc402ea33..815b9e120 100644 --- a/tex/context/fonts/mkiv/iwona-math.lfg +++ b/tex/context/fonts/mkiv/iwona-math.lfg @@ -1,3 +1,6 @@ +local common = fonts.goodies.load("common-math-jmn.lfg") +local helpers = common.mathematics.helpers + local badones = { summationtext = .25, producttext = .25, @@ -19,6 +22,13 @@ local badones = { coproductdisplay = .25, } +local uglyones = { + -- braceleft = true, + -- braceright = true, + vextendsingle = true, + vextenddouble = true, +} + return { name = "iwona-math", version = "1.00", @@ -31,7 +41,7 @@ return { "iwona-mi.map", "iwona-sy.map", "iwona-ex.map", - "mkiv-base.map", + -- "mkiv-base.map", }, virtuals = { ["iwona-math"] = { @@ -43,7 +53,7 @@ return { { name = "mi-iwonami.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-iwonam.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-iwonarz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-iwonar.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-iwonar.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["iwona-light-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-iwona-light", main = true, parameters = false }, @@ -54,7 +64,7 @@ return { { name = "mi-iwonari.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-iwonar.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-iwonalz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-iwonal.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-iwonal.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["iwona-medium-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-iwona-medium", main = true, parameters = false }, @@ -65,7 +75,7 @@ return { { name = "mi-iwonabi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-iwonab.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-iwonamz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-iwonam.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-iwonam.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["iwona-heavy-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-iwona-heavy", main = true, parameters = false }, @@ -76,8 +86,9 @@ return { { name = "mi-iwonahi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-iwonah.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-iwonahz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-iwonah.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-iwonah.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, } }, + addmissing = helpers.addmissing, } } diff --git a/tex/context/fonts/mkiv/kurier-math.lfg b/tex/context/fonts/mkiv/kurier-math.lfg index bee2e08e4..221992518 100644 --- a/tex/context/fonts/mkiv/kurier-math.lfg +++ b/tex/context/fonts/mkiv/kurier-math.lfg @@ -1,3 +1,6 @@ +local common = fonts.goodies.load("common-math-jmn.lfg") +local helpers = common.mathematics.helpers + local badones = { summationtext = .25, producttext = .25, @@ -19,6 +22,13 @@ local badones = { coproductdisplay = .25, } +local uglyones = { + -- braceleft = true, + -- braceright = true, + vextendsingle = true, + vextenddouble = true, +} + return { name = "kurier-math", version = "1.00", @@ -31,7 +41,7 @@ return { "kurier-mi.map", "kurier-sy.map", "kurier-ex.map", - "mkiv-base.map", + -- "mkiv-base.map", }, virtuals = { ["kurier-math"] = { @@ -43,7 +53,7 @@ return { { name = "mi-kuriermi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-kurierm.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-kurierrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-kurierr.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-kurierr.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["kurier-light-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-kurier-light", main = true, parameters = false }, @@ -54,7 +64,7 @@ return { { name = "mi-kurierri.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-kurierr.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-kurierlz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-kurierl.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-kurierl.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["kurier-medium-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-kurier-medium", main = true, parameters = false }, @@ -65,7 +75,7 @@ return { { name = "mi-kurierhi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-kurierh.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-kuriermz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-kurierm.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-kurierm.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["kurier-heavy-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-kurier-heavy", main = true, parameters = false }, @@ -76,8 +86,9 @@ return { { name = "mi-kurierhi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-kurierh.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-kurierhz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-kurierh.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-kurierh.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, } }, + addmissing = helpers.addmissing, } } diff --git a/tex/context/fonts/mkiv/lucida-math.lfg b/tex/context/fonts/mkiv/lucida-math.lfg index 31589f5b3..64f53dc33 100644 --- a/tex/context/fonts/mkiv/lucida-math.lfg +++ b/tex/context/fonts/mkiv/lucida-math.lfg @@ -26,7 +26,7 @@ return { aftercopying = { { tweak = "version", - expected = "Version 1.803", + expected = "Version 1.901", }, { tweak = "fixoldschool", diff --git a/tex/context/fonts/mkiv/type-imp-antykwa.mkiv b/tex/context/fonts/mkiv/type-imp-antykwa.mkiv index 6ad747307..f5e3158f4 100644 --- a/tex/context/fonts/mkiv/type-imp-antykwa.mkiv +++ b/tex/context/fonts/mkiv/type-imp-antykwa.mkiv @@ -13,12 +13,34 @@ \starttypescriptcollection[antykwa-torunska] - \definefontfeature[virtualmath-antykwa] [virtualmath][virtualweight=antykwa] - \definefontfeature[virtualmath-antykwa-cond] [virtualmath][virtualweight=antykwa-cond] - \definefontfeature[virtualmath-antykwa-light] [virtualmath][virtualweight=antykwa-light] - \definefontfeature[virtualmath-antykwa-lightcond][virtualmath][virtualweight=antykwa-lightcond] + \startsetups[antykwa] + % \setupmathfraction[\c!rule=\v!symbol,\c!middle="0203E]% + % \setupmathradical [\c!rule=\v!symbol,\c!top ="FE010]% + % \setupmathfence [\c!alternative=1]% + \letmathfractionparameter\c!rule\v!symbol + \setmathfractionparameter\c!middle{"203E}% + \letmathradicalparameter \c!rule\v!symbol + \setmathradicalparameter \c!top{\radicalbarextenderuc}% + \setmathfenceparameter \c!alternative{1}% + \stopsetups - \starttypescript [antykwa,antykwa-torunska,antykwa-light,antykwa-torunska-light,antykwa-cond,antykwa-torunska-cond,antykwa-lightcond,antykwa-torunska-lightcond] + % cond => -cont as in iwona + + \startsetups[antykwa-light] \directsetup{antykwa}\stopsetups + \startsetups[antykwa-cond] \directsetup{antykwa}\stopsetups + \startsetups[antykwa-light-cond] \directsetup{antykwa}\stopsetups + % these long names are obsolete and will go away + \startsetups[antykwa-torunska] \directsetup{antykwa}\stopsetups + \startsetups[antykwa-torunska-light] \directsetup{antykwa}\stopsetups + \startsetups[antykwa-torunska-cond] \directsetup{antykwa}\stopsetups + \startsetups[antykwa-torunska-light-cond]\directsetup{antykwa}\stopsetups + + \definefontfeature[virtualmath-antykwa] [virtualmath][virtualweight=antykwa] + \definefontfeature[virtualmath-antykwa-cond] [virtualmath][virtualweight=antykwa-cond] + \definefontfeature[virtualmath-antykwa-light] [virtualmath][virtualweight=antykwa-light] + \definefontfeature[virtualmath-antykwa-light-cond][virtualmath][virtualweight=antykwa-light-cond] + + \starttypescript [antykwa,antykwa-torunska,antykwa-light,antykwa-torunska-light,antykwa-cond,antykwa-torunska-cond,antykwa-light-cond,antykwa-torunska-light-cond] \definetypeface[\typescriptone][\s!rm][\s!serif][\typescriptone] [\s!default] \definetypeface[\typescriptone][\s!ss][\s!sans] [modern] [\s!default] [\s!rscale=1.05] \definetypeface[\typescriptone][\s!tt][\s!mono] [modern] [\s!default] [\s!rscale=1.05] @@ -26,23 +48,23 @@ \quittypescriptscanning \stoptypescript - \starttypescript [\s!serif] [antykwa,antykwa-torunska,antykwa-light,antykwa-torunska-light,antykwa-cond,antykwa-torunska-cond,antykwa-lightcond,antykwa-torunska-lightcond] - \definefontsynonym [AntykwaTorunska-Regular] [\s!file:AntykwaTorunska-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-Italic] [\s!file:AntykwaTorunska-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-Bold] [\s!file:AntykwaTorunska-Bold] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-BoldItalic] [\s!file:AntykwaTorunska-BoldItalic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-Light] [\s!file:AntykwaTorunskaLight-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-LightItalic] [\s!file:AntykwaTorunskaLight-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-Medium] [\s!file:AntykwaTorunskaMed-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-MediumItalic] [\s!file:AntykwaTorunskaMed-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondRegular] [\s!file:AntykwaTorunskaCond-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondItalic] [\s!file:AntykwaTorunskaCond-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondBold] [\s!file:AntykwaTorunskaCond-Bold] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondBoldItalic] [\s!file:AntykwaTorunskaCond-BoldItalic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondLight] [\s!file:AntykwaTorunskaCondLight-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondLightItalic] [\s!file:AntykwaTorunskaCondLight-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondMedium] [\s!file:AntykwaTorunskaCondMed-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondMediumItalic] [\s!file:AntykwaTorunskaCondMed-Italic] [\s!features=\s!default] + \starttypescript [\s!serif] [antykwa,antykwa-torunska,antykwa-light,antykwa-torunska-light,antykwa-cond,antykwa-torunska-cond,antykwa-light-cond,antykwa-torunska-light-cond] + \definefontsynonym [AntykwaTorunska-Regular] [\s!file:AntykwaTorunska-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-Italic] [\s!file:AntykwaTorunska-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-Bold] [\s!file:AntykwaTorunska-Bold] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-BoldItalic] [\s!file:AntykwaTorunska-BoldItalic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-Light] [\s!file:AntykwaTorunskaLight-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-LightItalic] [\s!file:AntykwaTorunskaLight-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-Medium] [\s!file:AntykwaTorunskaMed-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-MediumItalic] [\s!file:AntykwaTorunskaMed-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondRegular] [\s!file:AntykwaTorunskaCond-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondItalic] [\s!file:AntykwaTorunskaCond-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondBold] [\s!file:AntykwaTorunskaCond-Bold] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondBoldItalic] [\s!file:AntykwaTorunskaCond-BoldItalic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondLight] [\s!file:AntykwaTorunskaCondLight-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondLightItalic] [\s!file:AntykwaTorunskaCondLight-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondMedium] [\s!file:AntykwaTorunskaCondMed-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondMediumItalic] [\s!file:AntykwaTorunskaCondMed-Italic] [\s!features=\s!default] \stoptypescript \starttypescript [\s!math][antykwa,antykwa-torunska][\s!all] @@ -60,45 +82,41 @@ \definefontsynonym[\s!MathRoman][antykwacondmath@antykwa-cond-math] \stoptypescript - \starttypescript [\s!math][antykwa-lightcond,antykwa-torunska-lightcond][\s!all] + \starttypescript [\s!math][antykwa-light-cond,antykwa-torunska-light-cond][\s!all] \loadfontgoodies[antykwa-math] - \definefontsynonym[\s!MathRoman][antykwalightcondmath@antykwa-lightcond-math] + \definefontsynonym[\s!MathRoman][antykwalightcondmath@antykwa-light-cond-math] \stoptypescript \starttypescript [\s!serif] [antykwa,antykwa-torunska] [\s!name] - \definefontsynonym [\s!Serif] [AntykwaTorunska-Regular] - \definefontsynonym [\s!SerifBold] [AntykwaTorunska-Bold] - \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-Italic] - \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-Italic] - \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-BoldItalic] - \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-BoldItalic] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [AntykwaTorunska-Regular] + \definefontsynonym [\s!SerifBold] [AntykwaTorunska-Bold] + \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-Italic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-BoldItalic] \stoptypescript \starttypescript [\s!serif] [antykwa-light,antykwa-torunska-light] [\s!name] - \definefontsynonym [\s!Serif] [AntykwaTorunska-Light] - \definefontsynonym [\s!SerifBold] [AntykwaTorunska-Medium] - \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-LightItalic] - \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-LightItalic] - \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-MediumItalic] - \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-MediumItalic] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [AntykwaTorunska-Light] + \definefontsynonym [\s!SerifBold] [AntykwaTorunska-Medium] + \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-LightItalic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-MediumItalic] \stoptypescript \starttypescript [\s!serif] [antykwa-cond,antykwa-torunska-cond] [\s!name] - \definefontsynonym [\s!Serif] [AntykwaTorunska-CondRegular] - \definefontsynonym [\s!SerifBold] [AntykwaTorunska-CondBold] - \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-CondItalic] - \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-CondItalic] - \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondBoldItalic] - \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-CondBoldItalic] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [AntykwaTorunska-CondRegular] + \definefontsynonym [\s!SerifBold] [AntykwaTorunska-CondBold] + \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-CondItalic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondBoldItalic] \stoptypescript - \starttypescript [\s!serif] [antykwa-lightcond,antykwa-torunska-lightcond] [\s!name] - \definefontsynonym [\s!Serif] [AntykwaTorunska-CondLight] - \definefontsynonym [\s!SerifBold] [AntykwaTorunska-CondMedium] - \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-CondLightItalic] - \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-CondLightItalic] - \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondMediumItalic] - \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-CondMediumItalic] + \starttypescript [\s!serif] [antykwa-light-cond,antykwa-torunska-light-cond] [\s!name] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [AntykwaTorunska-CondLight] + \definefontsynonym [\s!SerifBold] [AntykwaTorunska-CondMedium] + \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-CondLightItalic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondMediumItalic] \stoptypescript \stoptypescriptcollection diff --git a/tex/context/fonts/mkiv/type-imp-iwona.mkiv b/tex/context/fonts/mkiv/type-imp-iwona.mkiv index 8b67b7be9..f43731250 100644 --- a/tex/context/fonts/mkiv/type-imp-iwona.mkiv +++ b/tex/context/fonts/mkiv/type-imp-iwona.mkiv @@ -13,34 +13,52 @@ \starttypescriptcollection[iwona] + \startsetups[iwona] + % \setupmathfence [\c!alternative=1]% + \setmathfenceparameter \c!alternative{1}% +% \letmathfractionparameter\c!rule\v!symbol +% \setmathfractionparameter\c!middle{"203E}% +% \letmathradicalparameter \c!rule\v!symbol +% \setmathradicalparameter \c!top{\radicalbarextenderuc}% +% \setmathfenceparameter \c!alternative{1}% + \stopsetups + + \startsetups[iwona-light] \directsetup{antykwa}\stopsetups + \startsetups[iwona-medium] \directsetup{antykwa}\stopsetups + \startsetups[iwona-heavy] \directsetup{antykwa}\stopsetups + \startsetups[iwona-cond] \directsetup{antykwa}\stopsetups + \startsetups[iwona-light-cond] \directsetup{antykwa}\stopsetups + \startsetups[iwona-medium-cond]\directsetup{antykwa}\stopsetups + \startsetups[iwona-heavy-cond] \directsetup{antykwa}\stopsetups + \definefontfeature[virtualmath-iwona] [virtualmath][virtualweight=iwona] \definefontfeature[virtualmath-iwona-light] [virtualmath][virtualweight=iwona-light] \definefontfeature[virtualmath-iwona-medium][virtualmath][virtualweight=iwona-medium] \definefontfeature[virtualmath-iwona-heavy] [virtualmath][virtualweight=iwona-heavy] - \starttypescript [\s!sans] [iwona-light,iwona,iwona-medium,iwona-heavy,iwona-light-cond,iwona-cond,iwona-medium-cond,iwona-heavy-cond] - - \definefontsynonym [Iwona-Regular] [\s!file:Iwona-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-Italic] [\s!file:Iwona-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-Bold] [\s!file:Iwona-Bold] [\s!features=\s!default] - \definefontsynonym [Iwona-BoldItalic] [\s!file:Iwona-BoldItalic] [\s!features=\s!default] - \definefontsynonym [Iwona-Light-Regular] [\s!file:IwonaLight-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-Light-Italic] [\s!file:IwonaLight-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-Medium-Regular] [\s!file:IwonaMedium-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-Medium-Italic] [\s!file:IwonaMedium-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-Heavy-Regular] [\s!file:IwonaHeavy-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-Heavy-Italic] [\s!file:IwonaHeavy-Italic] [\s!features=\s!default] - - \definefontsynonym [Iwona-CondRegular] [\s!file:IwonaCond-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-CondItalic] [\s!file:IwonaCond-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-CondBold] [\s!file:IwonaCond-Bold] [\s!features=\s!default] - \definefontsynonym [Iwona-CondBoldItalic] [\s!file:IwonaCond-BoldItalic] [\s!features=\s!default] - \definefontsynonym [Iwona-CondLight-Regular] [\s!file:IwonaCondLight-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-CondLight-Italic] [\s!file:IwonaCondLight-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-CondMedium-Regular] [\s!file:IwonaCondMedium-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-CondMedium-Italic] [\s!file:IwonaCondMedium-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-CondHeavy-Regular] [\s!file:IwonaCondHeavy-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-CondHeavy-Italic] [\s!file:IwonaCondHeavy-Italic] [\s!features=\s!default] + \starttypescript [\s!sans] [iwona,iwona-light,iwona-medium,iwona-heavy,iwona-cond,iwona-light-cond,iwona-medium-cond,iwona-heavy-cond] + + \definefontsynonym [Iwona-Regular] [\s!file:Iwona-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-Italic] [\s!file:Iwona-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-Bold] [\s!file:Iwona-Bold] [\s!features=\s!default] + \definefontsynonym [Iwona-BoldItalic] [\s!file:Iwona-BoldItalic] [\s!features=\s!default] + \definefontsynonym [Iwona-Light-Regular] [\s!file:IwonaLight-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-Light-Italic] [\s!file:IwonaLight-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-Medium-Regular] [\s!file:IwonaMedium-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-Medium-Italic] [\s!file:IwonaMedium-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-Heavy-Regular] [\s!file:IwonaHeavy-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-Heavy-Italic] [\s!file:IwonaHeavy-Italic] [\s!features=\s!default] + + \definefontsynonym [Iwona-CondRegular] [\s!file:IwonaCond-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-CondItalic] [\s!file:IwonaCond-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-CondBold] [\s!file:IwonaCond-Bold] [\s!features=\s!default] + \definefontsynonym [Iwona-CondBoldItalic] [\s!file:IwonaCond-BoldItalic] [\s!features=\s!default] + \definefontsynonym [Iwona-CondLight-Regular] [\s!file:IwonaCondLight-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-CondLight-Italic] [\s!file:IwonaCondLight-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-CondMedium-Regular] [\s!file:IwonaCondMedium-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-CondMedium-Italic] [\s!file:IwonaCondMedium-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-CondHeavy-Regular] [\s!file:IwonaCondHeavy-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-CondHeavy-Italic] [\s!file:IwonaCondHeavy-Italic] [\s!features=\s!default] \stoptypescript @@ -65,59 +83,59 @@ \starttypescript [\s!sans] [iwona-light] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-Light-Regular] - \definefontsynonym [\s!SansItalic] [Iwona-Light-Italic] - \definefontsynonym [\s!SansBold] [Iwona-Medium-Regular] - \definefontsynonym [\s!SansBoldItalic] [Iwona-Medium-Italic] + \definefontsynonym [\s!Sans] [Iwona-Light-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-Light-Italic] + \definefontsynonym [\s!SansBold] [Iwona-Medium-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-Medium-Italic] \stoptypescript \starttypescript [\s!sans] [iwona] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-Regular] - \definefontsynonym [\s!SansItalic] [Iwona-Italic] - \definefontsynonym [\s!SansBold] [Iwona-Bold] - \definefontsynonym [\s!SansBoldItalic] [Iwona-BoldItalic] + \definefontsynonym [\s!Sans] [Iwona-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-Italic] + \definefontsynonym [\s!SansBold] [Iwona-Bold] + \definefontsynonym [\s!SansBoldItalic] [Iwona-BoldItalic] \stoptypescript \starttypescript [\s!sans] [iwona-medium] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-Medium-Regular] - \definefontsynonym [\s!SansItalic] [Iwona-Medium-Italic] - \definefontsynonym [\s!SansBold] [Iwona-Heavy-Regular] - \definefontsynonym [\s!SansBoldItalic] [Iwona-Heavy-Italic] + \definefontsynonym [\s!Sans] [Iwona-Medium-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-Medium-Italic] + \definefontsynonym [\s!SansBold] [Iwona-Heavy-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-Heavy-Italic] \stoptypescript \starttypescript [\s!sans] [iwona-heavy] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-Heavy-Regular] - \definefontsynonym [\s!SansItalic] [Iwona-Heavy-Italic] - \definefontsynonym [\s!SansBold] [Iwona-Heavy-Regular] - \definefontsynonym [\s!SansBoldItalic] [Iwona-Heavy-Italic] + \definefontsynonym [\s!Sans] [Iwona-Heavy-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-Heavy-Italic] + \definefontsynonym [\s!SansBold] [Iwona-Heavy-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-Heavy-Italic] \stoptypescript \starttypescript [\s!sans] [iwona-light-cond] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-CondLight-Regular] - \definefontsynonym [\s!SansItalic] [Iwona-CondLight-Italic] - \definefontsynonym [\s!SansBold] [Iwona-CondMedium-Regular] - \definefontsynonym [\s!SansBoldItalic] [Iwona-CondMedium-Italic] + \definefontsynonym [\s!Sans] [Iwona-CondLight-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-CondLight-Italic] + \definefontsynonym [\s!SansBold] [Iwona-CondMedium-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CondMedium-Italic] \stoptypescript \starttypescript [\s!sans] [iwona-cond] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-CondRegular] - \definefontsynonym [\s!SansItalic] [Iwona-CondItalic] - \definefontsynonym [\s!SansBold] [Iwona-CondBold] - \definefontsynonym [\s!SansBoldItalic] [Iwona-CondBoldItalic] + \definefontsynonym [\s!Sans] [Iwona-CondRegular] + \definefontsynonym [\s!SansItalic] [Iwona-CondItalic] + \definefontsynonym [\s!SansBold] [Iwona-CondBold] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CondBoldItalic] \stoptypescript \starttypescript [\s!sans] [iwona-medium-cond] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-CondMedium-Regular] - \definefontsynonym [\s!SansItalic] [Iwona-CondMedium-Italic] - \definefontsynonym [\s!SansBold] [Iwona-CondHeavy-Regular] - \definefontsynonym [\s!SansBoldItalic] [Iwona-CondHeavy-Italic] + \definefontsynonym [\s!Sans] [Iwona-CondMedium-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-CondMedium-Italic] + \definefontsynonym [\s!SansBold] [Iwona-CondHeavy-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CondHeavy-Italic] \stoptypescript \starttypescript [iwona,iwona-light,iwona-heavy,iwona-medium] diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index aaf99ed45..b7d60eefb 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 2023-02-14 17:41 +-- merge date : 2023-02-23 21:23 do -- begin closure to overcome local limits and interference |