summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--metapost/context/base/mpxl/mp-apos.mpxl48
-rw-r--r--scripts/context/lua/mtxrun.lua22
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua22
-rw-r--r--scripts/context/stubs/unix/mtxrun22
-rw-r--r--scripts/context/stubs/win64/mtxrun.lua22
-rw-r--r--source/luametatex/source/lua/lmtinterface.h13
-rw-r--r--source/luametatex/source/lua/lmtnodelib.c4
-rw-r--r--source/luametatex/source/lua/lmttexlib.c67
-rw-r--r--source/luametatex/source/tex/texdumpdata.h2
-rw-r--r--source/luametatex/source/tex/texmath.c21
-rw-r--r--source/luametatex/source/tex/texmlist.c259
-rw-r--r--source/luametatex/source/tex/texnodes.c8
-rw-r--r--source/luametatex/source/tex/texnodes.h171
-rw-r--r--source/luametatex/source/tex/texprinting.c8
-rw-r--r--source/luametatex/source/tex/texprinting.h6
-rw-r--r--source/luametatex/source/tex/textypes.h1
-rw-r--r--source/luametatex/source/utilities/auxunistring.c3
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/l-string.lua24
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24597 -> 24609 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin264620 -> 264666 bytes
-rw-r--r--tex/context/base/mkxl/anch-box.mkxl117
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl2
-rw-r--r--tex/context/base/mkxl/driv-shp.lmt14
-rw-r--r--tex/context/base/mkxl/font-imp-braille.lmt1
-rw-r--r--tex/context/base/mkxl/math-act.lmt2
-rw-r--r--tex/context/base/mkxl/pack-box.mkxl32
-rw-r--r--tex/context/base/mkxl/type-imp-braille.mkxl10
-rw-r--r--tex/context/fonts/mkiv/bonum-math.lfg337
-rw-r--r--tex/context/fonts/mkiv/cambria-math.lfg126
-rw-r--r--tex/context/fonts/mkiv/common-math.lfg22
-rw-r--r--tex/context/fonts/mkiv/concrete-math.lfg53
-rw-r--r--tex/context/fonts/mkiv/dejavu-math.lfg99
-rw-r--r--tex/context/fonts/mkiv/ebgaramond-math.lfg170
-rw-r--r--tex/context/fonts/mkiv/erewhon-math.lfg80
-rw-r--r--tex/context/fonts/mkiv/kpfonts-math.lfg51
-rw-r--r--tex/context/fonts/mkiv/libertinus-math.lfg139
-rw-r--r--tex/context/fonts/mkiv/lucida-math.lfg117
-rw-r--r--tex/context/fonts/mkiv/minion-math.lfg75
-rw-r--r--tex/context/fonts/mkiv/modern-math.lfg233
-rw-r--r--tex/context/fonts/mkiv/newcomputermodern-math.lfg14
-rw-r--r--tex/context/fonts/mkiv/pagella-math.lfg114
-rw-r--r--tex/context/fonts/mkiv/schola-math.lfg81
-rw-r--r--tex/context/fonts/mkiv/stixtwo-math.lfg76
-rw-r--r--tex/context/fonts/mkiv/termes-math.lfg113
-rw-r--r--tex/context/fonts/mkiv/xcharter-math.lfg61
-rw-r--r--tex/context/modules/mkxl/s-braille-basic.mkxl2
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua18
52 files changed, 904 insertions, 1988 deletions
diff --git a/metapost/context/base/mpxl/mp-apos.mpxl b/metapost/context/base/mpxl/mp-apos.mpxl
index 17b7abd92..05282e835 100644
--- a/metapost/context/base/mpxl/mp-apos.mpxl
+++ b/metapost/context/base/mpxl/mp-apos.mpxl
@@ -217,10 +217,12 @@ permanent
def anch_box_arrows_draw =
begingroup ;
- save f, t, p, alternative, delta, dashtype, edge ; pair f, t ; path p ; string alternative ;
+ save f, t, p, alternative, delta, dashtype, edge, arrow, ff, tt ;
+ pair f, t, ff, tt ; path p ; string alternative, arrow ;
dashtype := mpvarn("dashtype") ;
delta := mpvard("distance");
alternative := mpvars("alternative") ;
+ arrow := mpvars("arrow") ;
if positionx(mpvars("rightedge")) > 0 :
if alternative = "left" :
edge := positionx(mpvars("leftedge"));
@@ -241,21 +243,38 @@ def anch_box_arrows_draw =
else :
f := positionxy(mpvars("from")) ;
t := positionxy(mpvars("to")) ;
+% drawdot f withpen pencircle scaled 2pt;
+% drawdot t withpen pencircle scaled 2pt;
+% if alternative = "bottom" :
+% f := f yshifted (- abs(ypart f - ypart t)) ;
+% elseif alternative = "top" :
+% f := f yshifted (abs(ypart f - ypart t)) ;
+% elseif alternative = "left" :
+% f := f xshifted (- abs(xpart f - xpart t)) ;
+% elseif alternative = "right" :
+% f := f xshifted (abs(xpart f - xpart t)) ;
+% fi ;
+ %
+ %
if alternative = "bottom" :
- f := f yshifted (- abs(ypart f - ypart t)) ;
- p := (f -- (f yshifted -delta) -- (t yshifted -delta) -- t) ;
+ff := (xpart f, min(ypart f, ypart t));
+tt := (xpart t, ypart ff);
+ p := (f -- (ff yshifted -delta) -- (tt yshifted -delta) -- t) ;
draw thetextext.bot(mpvars("text"), (point .5 along p) yshifted -.25ExHeight) ;
elseif alternative = "top" :
- f := f yshifted (abs(ypart f - ypart t)) ;
- p := (f -- (f yshifted delta) -- (t yshifted delta) -- t) ;
+ff := (xpart f, max(ypart f, ypart t));
+tt := (xpart t, ypart ff);
+ p := (f -- (ff yshifted delta) -- (tt yshifted delta) -- t) ;
draw thetextext.top(mpvars("text"), (point .5 along p) yshifted .25ExHeight) ;
elseif alternative = "left" :
- f := f xshifted (- abs(xpart f - xpart t)) ;
- p := (f -- (f xshifted - delta) -- (t xshifted - delta) -- t) ;
+ff := (min(xpart f, xpart t), ypart f);
+tt := (xpart ff, ypart t);
+ p := (f -- (ff xshifted - delta) -- (tt xshifted - delta) -- t) ;
draw thetextext.lft(mpvars("text"), (point .5 along p) xshifted -ExHeight) ;
elseif alternative = "right" :
- f := f xshifted (abs(xpart f - xpart t)) ;
- p := (f -- (f xshifted delta) -- (t xshifted delta) -- t) ;
+ff := (max(xpart f, xpart t), ypart f);
+tt := (xpart ff, ypart t);
+ p := (f -- (ff xshifted delta) -- (tt xshifted delta) -- t) ;
draw thetextext.rt(mpvars("text"), (point .5 along p) xshifted ExHeight) ;
elseif alternative = "middle" :
p := f -- t ;
@@ -263,7 +282,16 @@ def anch_box_arrows_draw =
fi ;
fi ;
% 1 = dashed, 2 = dashed with background
- drawarrow p
+ if arrow ="no" :
+ draw
+ elseif arrow == "reverse" :
+ drawarrow reverse
+ elseif arrow == "both" :
+ drawdblarrow
+ else :
+ drawarrow
+ fi
+ p
if dashtype == 1 :
withdashes .5ExHeight
fi
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index e1f2df1bc..4cd71b7a1 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -2004,7 +2004,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-string"] = package.loaded["l-string"] or true
--- original size: 6644, stripped down to: 3410
+-- original size: 6955, stripped down to: 3504
if not modules then modules={} end modules ['l-string']={
version=1.001,
@@ -2014,7 +2014,7 @@ if not modules then modules={} end modules ['l-string']={
license="see context related readme files"
}
local string=string
-local sub,gmatch,format,char,byte,rep,lower=string.sub,string.gmatch,string.format,string.char,string.byte,string.rep,string.lower
+local sub,gmatch,format,char,byte,rep,lower,find=string.sub,string.gmatch,string.format,string.char,string.byte,string.rep,string.lower,string.find
local lpegmatch,patterns=lpeg.match,lpeg.patterns
local P,S,C,Ct,Cc,Cs=lpeg.P,lpeg.S,lpeg.C,lpeg.Ct,lpeg.Cc,lpeg.Cs
local unquoted=patterns.squote*C(patterns.nosquote)*patterns.squote+patterns.dquote*C(patterns.nodquote)*patterns.dquote
@@ -2024,10 +2024,18 @@ end
function string.quoted(str)
return format("%q",str)
end
-function string.count(str,pattern)
+function string.count(str,pattern)
local n=0
- for _ in gmatch(str,pattern) do
- n=n+1
+ local i=1
+ local l=#pattern
+ while true do
+ i=find(str,pattern,i)
+ if i then
+ n=n+1
+ i=i+l
+ else
+ break
+ end
end
return n
end
@@ -26062,8 +26070,8 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1034518
--- stripped bytes : 407617
+-- original bytes : 1034829
+-- stripped bytes : 407834
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index e1f2df1bc..4cd71b7a1 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -2004,7 +2004,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-string"] = package.loaded["l-string"] or true
--- original size: 6644, stripped down to: 3410
+-- original size: 6955, stripped down to: 3504
if not modules then modules={} end modules ['l-string']={
version=1.001,
@@ -2014,7 +2014,7 @@ if not modules then modules={} end modules ['l-string']={
license="see context related readme files"
}
local string=string
-local sub,gmatch,format,char,byte,rep,lower=string.sub,string.gmatch,string.format,string.char,string.byte,string.rep,string.lower
+local sub,gmatch,format,char,byte,rep,lower,find=string.sub,string.gmatch,string.format,string.char,string.byte,string.rep,string.lower,string.find
local lpegmatch,patterns=lpeg.match,lpeg.patterns
local P,S,C,Ct,Cc,Cs=lpeg.P,lpeg.S,lpeg.C,lpeg.Ct,lpeg.Cc,lpeg.Cs
local unquoted=patterns.squote*C(patterns.nosquote)*patterns.squote+patterns.dquote*C(patterns.nodquote)*patterns.dquote
@@ -2024,10 +2024,18 @@ end
function string.quoted(str)
return format("%q",str)
end
-function string.count(str,pattern)
+function string.count(str,pattern)
local n=0
- for _ in gmatch(str,pattern) do
- n=n+1
+ local i=1
+ local l=#pattern
+ while true do
+ i=find(str,pattern,i)
+ if i then
+ n=n+1
+ i=i+l
+ else
+ break
+ end
end
return n
end
@@ -26062,8 +26070,8 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1034518
--- stripped bytes : 407617
+-- original bytes : 1034829
+-- stripped bytes : 407834
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index e1f2df1bc..4cd71b7a1 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -2004,7 +2004,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-string"] = package.loaded["l-string"] or true
--- original size: 6644, stripped down to: 3410
+-- original size: 6955, stripped down to: 3504
if not modules then modules={} end modules ['l-string']={
version=1.001,
@@ -2014,7 +2014,7 @@ if not modules then modules={} end modules ['l-string']={
license="see context related readme files"
}
local string=string
-local sub,gmatch,format,char,byte,rep,lower=string.sub,string.gmatch,string.format,string.char,string.byte,string.rep,string.lower
+local sub,gmatch,format,char,byte,rep,lower,find=string.sub,string.gmatch,string.format,string.char,string.byte,string.rep,string.lower,string.find
local lpegmatch,patterns=lpeg.match,lpeg.patterns
local P,S,C,Ct,Cc,Cs=lpeg.P,lpeg.S,lpeg.C,lpeg.Ct,lpeg.Cc,lpeg.Cs
local unquoted=patterns.squote*C(patterns.nosquote)*patterns.squote+patterns.dquote*C(patterns.nodquote)*patterns.dquote
@@ -2024,10 +2024,18 @@ end
function string.quoted(str)
return format("%q",str)
end
-function string.count(str,pattern)
+function string.count(str,pattern)
local n=0
- for _ in gmatch(str,pattern) do
- n=n+1
+ local i=1
+ local l=#pattern
+ while true do
+ i=find(str,pattern,i)
+ if i then
+ n=n+1
+ i=i+l
+ else
+ break
+ end
end
return n
end
@@ -26062,8 +26070,8 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1034518
--- stripped bytes : 407617
+-- original bytes : 1034829
+-- stripped bytes : 407834
-- end library merge
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index e1f2df1bc..4cd71b7a1 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -2004,7 +2004,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-string"] = package.loaded["l-string"] or true
--- original size: 6644, stripped down to: 3410
+-- original size: 6955, stripped down to: 3504
if not modules then modules={} end modules ['l-string']={
version=1.001,
@@ -2014,7 +2014,7 @@ if not modules then modules={} end modules ['l-string']={
license="see context related readme files"
}
local string=string
-local sub,gmatch,format,char,byte,rep,lower=string.sub,string.gmatch,string.format,string.char,string.byte,string.rep,string.lower
+local sub,gmatch,format,char,byte,rep,lower,find=string.sub,string.gmatch,string.format,string.char,string.byte,string.rep,string.lower,string.find
local lpegmatch,patterns=lpeg.match,lpeg.patterns
local P,S,C,Ct,Cc,Cs=lpeg.P,lpeg.S,lpeg.C,lpeg.Ct,lpeg.Cc,lpeg.Cs
local unquoted=patterns.squote*C(patterns.nosquote)*patterns.squote+patterns.dquote*C(patterns.nodquote)*patterns.dquote
@@ -2024,10 +2024,18 @@ end
function string.quoted(str)
return format("%q",str)
end
-function string.count(str,pattern)
+function string.count(str,pattern)
local n=0
- for _ in gmatch(str,pattern) do
- n=n+1
+ local i=1
+ local l=#pattern
+ while true do
+ i=find(str,pattern,i)
+ if i then
+ n=n+1
+ i=i+l
+ else
+ break
+ end
end
return n
end
@@ -26062,8 +26070,8 @@ end -- of closure
-- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua libs-ini.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 1034518
--- stripped bytes : 407617
+-- original bytes : 1034829
+-- stripped bytes : 407834
-- end library merge
diff --git a/source/luametatex/source/lua/lmtinterface.h b/source/luametatex/source/lua/lmtinterface.h
index 756a25331..67c3f56d5 100644
--- a/source/luametatex/source/lua/lmtinterface.h
+++ b/source/luametatex/source/lua/lmtinterface.h
@@ -675,6 +675,8 @@ make_lua_key(L, first);\
make_lua_key(L, fixedboth);\
make_lua_key(L, fixedbottom);\
make_lua_key(L, fixedtop);\
+make_lua_key(L, fixedsuperorsubscript);\
+make_lua_key(L, fixedsuperandsubscript);\
make_lua_key(L, flags);\
make_lua_key(L, flataccent);\
make_lua_key(L, flattenedaccentbasedepth);\
@@ -1279,6 +1281,7 @@ make_lua_key(L, smaller);\
make_lua_key(L, smallfamily);\
make_lua_key(L, some_item);\
make_lua_key(L, source);\
+make_lua_key(L, sourceonnucleus);\
make_lua_key(L, space);\
make_lua_key(L, spaceafterscript);\
make_lua_key(L, SpaceAfterScript);\
@@ -1650,6 +1653,10 @@ extern lmt_keys_info lmt_keys;
# define lmt_checkhalfword(L,i) (halfword) luaL_checkinteger(L,i)
# define lmt_opthalfword(L,i,j) (halfword) luaL_optinteger(L,i,j)
+# define lmt_tofullword(L,i) (fullword) lua_tointeger(L,i)
+# define lmt_checkfullword(L,i) (fullword) luaL_checkinteger(L,i)
+# define lmt_optfullword(L,i,j) (fullword) luaL_optinteger(L,i,j)
+
# define lmt_toscaled(L,i) (scaled) lua_tointeger(L,i)
# define lmt_checkscaled(L,i) (scaled) luaL_checkinteger(L,i)
# define lmt_optscaled(L,i,j) (scaled) luaL_optinteger(L,i,j)
@@ -1658,9 +1665,9 @@ extern lmt_keys_info lmt_keys;
# define lmt_checkquarterword(L,i) (quarterword) luaL_checkinteger(L,i)
# define lmt_optquarterword(L,i,j) (quarterword) luaL_optinteger(L,i,j)
-# define lmt_tosingleword(L,i) (singleword) lua_tointeger(L,i)
-# define lmt_checksingleword(L,i) (singleword) luaL_checkinteger(L,i)
-# define lmt_optsingleword(L,i,j) (singleword) luaL_optinteger(L,i,j)
+# define lmt_tosingleword(L,i) (singleword) lua_tointeger(L,i)
+# define lmt_checksingleword(L,i) (singleword) luaL_checkinteger(L,i)
+# define lmt_optsingleword(L,i,j) (singleword) luaL_optinteger(L,i,j)
# undef lround
# include <math.h>
diff --git a/source/luametatex/source/lua/lmtnodelib.c b/source/luametatex/source/lua/lmtnodelib.c
index 58a98f7e3..afaa8bed5 100644
--- a/source/luametatex/source/lua/lmtnodelib.c
+++ b/source/luametatex/source/lua/lmtnodelib.c
@@ -2674,7 +2674,7 @@ static int nodelib_direct_setoptions(lua_State *L)
case fraction_noad:
case accent_noad:
case fence_noad:
- noad_options(n) = lmt_tohalfword(L, 2);
+ noad_options(n) = lmt_tofullword(L, 2);
break;
case math_char_node:
case math_text_char_node:
@@ -7372,7 +7372,7 @@ static int nodelib_common_setfield(lua_State *L, int direct, halfword n)
} else if (lua_key_eq(s, source)) {
noad_source(n) = lmt_tohalfword(L, 3);
} else if (lua_key_eq(s, options)) {
- noad_options(n) = lmt_tohalfword(L, 3);
+ noad_options(n) = lmt_tofullword(L, 3);
} else if (lua_key_eq(s, scriptorder)) {
noad_script_order(n) = lmt_tosingleword(L, 3);
} else if (lua_key_eq(s, class)) {
diff --git a/source/luametatex/source/lua/lmttexlib.c b/source/luametatex/source/lua/lmttexlib.c
index d3f4c0ab9..7d9395eb7 100644
--- a/source/luametatex/source/lua/lmttexlib.c
+++ b/source/luametatex/source/lua/lmttexlib.c
@@ -4757,38 +4757,41 @@ static int texlib_getglyphoptionvalues(lua_State *L)
static int texlib_getnoadoptionvalues(lua_State *L)
{
lua_createtable(L, 2, 32);
- lua_push_key_at_index(L, axis, noad_option_axis);
- lua_push_key_at_index(L, noaxis, noad_option_no_axis);
- lua_push_key_at_index(L, exact, noad_option_exact);
- lua_push_key_at_index(L, left, noad_option_left);
- lua_push_key_at_index(L, middle, noad_option_middle);
- lua_push_key_at_index(L, right, noad_option_right);
- lua_push_key_at_index(L, adapttoleftsize, noad_option_adapt_to_left_size);
- lua_push_key_at_index(L, adapttorightsize, noad_option_adapt_to_right_size);
- lua_push_key_at_index(L, nosubscript, noad_option_no_sub_script);
- lua_push_key_at_index(L, nosuperscript, noad_option_no_super_script);
- lua_push_key_at_index(L, nosubprescript, noad_option_no_sub_pre_script);
- lua_push_key_at_index(L, nosuperprescript, noad_option_no_super_pre_script);
- lua_push_key_at_index(L, noscript, noad_option_no_script);
- lua_push_key_at_index(L, nooverflow, noad_option_no_overflow);
- lua_push_key_at_index(L, void, noad_option_void);
- lua_push_key_at_index(L, phantom, noad_option_phantom);
- lua_push_key_at_index(L, openupheight, noad_option_openup_height);
- lua_push_key_at_index(L, openupdepth, noad_option_openup_depth);
- lua_push_key_at_index(L, limits, noad_option_limits);
- lua_push_key_at_index(L, nolimits, noad_option_no_limits);
- lua_push_key_at_index(L, preferfontthickness, noad_option_prefer_font_thickness);
- lua_push_key_at_index(L, noruling, noad_option_no_ruling);
- lua_push_key_at_index(L, shiftedsubscript, noad_option_shifted_sub_script);
- lua_push_key_at_index(L, shiftedsuperscript, noad_option_shifted_super_script);
- lua_push_key_at_index(L, shiftedsubprescript, noad_option_shifted_sub_pre_script);
- lua_push_key_at_index(L, shiftedsuperprescript, noad_option_shifted_super_pre_script);
- lua_push_key_at_index(L, unpacklist, noad_option_unpack_list);
- lua_push_key_at_index(L, nocheck, noad_option_no_check);
- lua_push_key_at_index(L, auto, noad_option_auto);
- lua_push_key_at_index(L, unrolllist, noad_option_unroll_list);
- lua_push_key_at_index(L, followedbyspace, noad_option_followed_by_space);
- lua_push_key_at_index(L, proportional, noad_option_proportional);
+ lua_push_key_at_index(L, axis, noad_option_axis);
+ lua_push_key_at_index(L, noaxis, noad_option_no_axis);
+ lua_push_key_at_index(L, exact, noad_option_exact);
+ lua_push_key_at_index(L, left, noad_option_left);
+ lua_push_key_at_index(L, middle, noad_option_middle);
+ lua_push_key_at_index(L, right, noad_option_right);
+ lua_push_key_at_index(L, adapttoleftsize, noad_option_adapt_to_left_size);
+ lua_push_key_at_index(L, adapttorightsize, noad_option_adapt_to_right_size);
+ lua_push_key_at_index(L, nosubscript, noad_option_no_sub_script);
+ lua_push_key_at_index(L, nosuperscript, noad_option_no_super_script);
+ lua_push_key_at_index(L, nosubprescript, noad_option_no_sub_pre_script);
+ lua_push_key_at_index(L, nosuperprescript, noad_option_no_super_pre_script);
+ lua_push_key_at_index(L, noscript, noad_option_no_script);
+ lua_push_key_at_index(L, nooverflow, noad_option_no_overflow);
+ lua_push_key_at_index(L, void, noad_option_void);
+ lua_push_key_at_index(L, phantom, noad_option_phantom);
+ lua_push_key_at_index(L, openupheight, noad_option_openup_height);
+ lua_push_key_at_index(L, openupdepth, noad_option_openup_depth);
+ lua_push_key_at_index(L, limits, noad_option_limits);
+ lua_push_key_at_index(L, nolimits, noad_option_no_limits);
+ lua_push_key_at_index(L, preferfontthickness, noad_option_prefer_font_thickness);
+ lua_push_key_at_index(L, noruling, noad_option_no_ruling);
+ lua_push_key_at_index(L, shiftedsubscript, noad_option_shifted_sub_script);
+ lua_push_key_at_index(L, shiftedsuperscript, noad_option_shifted_super_script);
+ lua_push_key_at_index(L, shiftedsubprescript, noad_option_shifted_sub_pre_script);
+ lua_push_key_at_index(L, shiftedsuperprescript, noad_option_shifted_super_pre_script);
+ lua_push_key_at_index(L, unpacklist, noad_option_unpack_list);
+ lua_push_key_at_index(L, nocheck, noad_option_no_check);
+ lua_push_key_at_index(L, auto, noad_option_auto);
+ lua_push_key_at_index(L, unrolllist, noad_option_unroll_list);
+ lua_push_key_at_index(L, followedbyspace, noad_option_followed_by_space);
+ lua_push_key_at_index(L, proportional, noad_option_proportional);
+ lua_push_key_at_index(L, sourceonnucleus, noad_option_source_on_nucleus);
+ lua_push_key_at_index(L, fixedsuperorsubscript, noad_option_fixed_super_or_sub_script);
+ lua_push_key_at_index(L, fixedsuperandsubscript, noad_option_fixed_super_and_sub_script);
return 1;
}
diff --git a/source/luametatex/source/tex/texdumpdata.h b/source/luametatex/source/tex/texdumpdata.h
index d9b4e5cdd..c8f373ea4 100644
--- a/source/luametatex/source/tex/texdumpdata.h
+++ b/source/luametatex/source/tex/texdumpdata.h
@@ -55,7 +55,7 @@
*/
-# define luametatex_format_fingerprint 676
+# define luametatex_format_fingerprint 677
/* These end up in the string pool. */
diff --git a/source/luametatex/source/tex/texmath.c b/source/luametatex/source/tex/texmath.c
index 1424e5e03..327e8e6a3 100644
--- a/source/luametatex/source/tex/texmath.c
+++ b/source/luametatex/source/tex/texmath.c
@@ -164,6 +164,14 @@ void tex_math_copy_char_data(halfword target, halfword source, int wipelist)
}
}
+static inline void tex_math_set_scripts_options(halfword n)
+{
+ switch (math_scripts_mode_par) {
+ case 1: noad_options(n) |= noad_option_fixed_super_or_sub_script; break;
+ case 2: noad_options(n) |= noad_option_fixed_super_and_sub_script; break;
+ }
+}
+
// static const math_styles map_cramped_style[] = { /*tex cramp the style */
// cramped_display_style,
// cramped_display_style,
@@ -2004,6 +2012,7 @@ static void tex_aux_append_math_char(mathcodeval mval, mathdictval dval, int aut
math_kernel_node_set_option(q, math_kernel_no_italic_correction);
}
node_subtype(p) = tex_aux_set_math_char(q, &mval, &dval);
+ tex_math_set_scripts_options(p);
tex_tail_append(p);
}
}
@@ -2420,6 +2429,7 @@ static void tex_aux_math_math_component(halfword target, int append)
void tex_run_math_math_component(void)
{
halfword n = tex_new_node(simple_noad, ordinary_noad_subtype);
+ tex_math_set_scripts_options(n);
tex_aux_math_math_component(n, 1);
}
@@ -2472,6 +2482,9 @@ void tex_run_math_modifier(void)
noad_options(tail) |= noad_option_void;
break;
case source_modifier_code:
+ if (tex_scan_keyword("nucleus")) {
+ noad_options(tail) |= noad_option_source_on_nucleus;
+ }
noad_source(tail) = tex_scan_int(0, NULL);
break;
case openup_height_modifier_code:
@@ -2606,7 +2619,7 @@ static void tex_aux_scan_delimiter(halfword target, int code, int class)
void tex_run_math_radical(void)
{
halfword code = cur_chr;
- halfword options = 0;
+ fullword options = 0;
halfword radical = tex_new_node(radical_noad, (quarterword) code);
halfword style = yet_unset_math_style;
halfword variant = 0; /* quad, harmless */
@@ -3437,7 +3450,7 @@ void tex_run_math_fraction(void)
halfword autostyle = tex_math_style_variant(cur_list.math_style, math_parameter_fraction_variant);
halfword userstyle = -1;
halfword attrlist = null;
- halfword options = 0;
+ fullword options = 0;
halfword class = fraction_noad_subtype;
halfword rulethickness = preset_rule_thickness;
int ruledone = 0;
@@ -3846,7 +3859,7 @@ void tex_run_math_fence(void)
scaled dp = 0;
scaled top = 0;
scaled bottom = 0;
- halfword options = 0;
+ fullword options = 0;
halfword mainclass = unset_noad_class;
halfword leftclass = unset_noad_class;
halfword rightclass = unset_noad_class;
@@ -4549,7 +4562,7 @@ static void tex_aux_finish_displayed_math(int atleft, halfword eqnumber, halfwor
}
/*tex
-*
+
A |math_node|, which occurs only in horizontal lists, appears before and after mathematical
formulas. The |subtype| field is |before| before the formula and |after| after it. There is a
|surround| field, which represents the amount of surrounding space inserted by |\mathsurround|.
diff --git a/source/luametatex/source/tex/texmlist.c b/source/luametatex/source/tex/texmlist.c
index b5412872a..83a8a8a96 100644
--- a/source/luametatex/source/tex/texmlist.c
+++ b/source/luametatex/source/tex/texmlist.c
@@ -4289,125 +4289,69 @@ static halfword tex_aux_analyze_script(halfword init, scriptdata *data)
/*tex
These prescripts are kind of special. For instance, should top and bottom scripts be aligned?
- When there is are two top or two bottom, should we then just use the maxima?
+ When there is are two top or two bottom, should we then just use the maxima? Watch out, the
+ implementation changed wrt \LUATEX.
*/
-static void tex_aux_get_math_sup_shifts(halfword sup, halfword style, scaled *shift_up)
+static void tex_aux_get_math_sup_shifts(halfword target, halfword sup, halfword style, scaled *shift_up)
{
- switch (math_scripts_mode_par) {
- case 1:
- *shift_up = tex_get_math_y_parameter_checked(style, math_parameter_superscript_shift_up);
- break;
- case 2:
- *shift_up = tex_get_math_y_parameter_checked(style, math_parameter_superscript_shift_up);
- break;
- case 3:
- *shift_up = tex_get_math_y_parameter_checked(style, math_parameter_superscript_shift_up)
- + tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_shift_down)
- - tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down);
- break;
- case 4:
- *shift_up = tex_get_math_y_parameter_checked(style, math_parameter_superscript_shift_up)
- + tex_half_scaled(tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_shift_down)
- - tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down));
- break;
- case 5:
- *shift_up = tex_get_math_y_parameter_checked(style, math_parameter_superscript_shift_up)
- + tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_shift_down)
- - tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down);
- break;
- default:
- {
- scaled clr = tex_get_math_y_parameter_checked(style, math_parameter_superscript_shift_up);
- scaled bot = tex_get_math_y_parameter_checked(style, math_parameter_superscript_bottom_min);
- if (*shift_up < clr) {
- *shift_up = clr;
- }
- clr = box_depth(sup) + bot;
- if (*shift_up < clr) {
- *shift_up = clr;
- }
- break;
- }
+ if (has_noad_option_fixed_super_or_sub_script(target) || has_noad_option_fixed_super_and_sub_script(target)) {
+ *shift_up = tex_get_math_y_parameter_checked(style, math_parameter_superscript_shift_up);
+ } else {
+ scaled clr = tex_get_math_y_parameter_checked(style, math_parameter_superscript_shift_up);
+ scaled bot = tex_get_math_y_parameter_checked(style, math_parameter_superscript_bottom_min);
+ if (*shift_up < clr) {
+ *shift_up = clr;
+ }
+ clr = box_depth(sup) + bot;
+ if (*shift_up < clr) {
+ *shift_up = clr;
+ }
}
}
-static void tex_aux_get_math_sub_shifts(halfword sub, halfword style, scaled *shift_down)
+static void tex_aux_get_math_sub_shifts(halfword target, halfword sub, halfword style, scaled *shift_down)
{
- switch (math_scripts_mode_par) {
- case 1:
- *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down);
- break;
- case 2:
- *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_shift_down);
- break;
- case 3:
- *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_shift_down);
- break;
- case 4:
- *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down)
- + tex_half_scaled(tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_shift_down)
- - tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down)) ;
- break;
- case 5:
- *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down);
- break;
- default:
- {
- scaled clr = tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down);
- scaled top = tex_get_math_y_parameter_checked(style, math_parameter_subscript_top_max);
- if (*shift_down < clr) {
- *shift_down = clr;
- }
- clr = box_height(sub) - top;
- if (*shift_down < clr) {
- *shift_down = clr;
- }
- break;
- }
+ if (has_noad_option_fixed_super_or_sub_script(target)) {
+ *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down);
+ } else if (has_noad_option_fixed_super_and_sub_script(target)) {
+ *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_shift_down);
+ } else {
+ scaled clr = tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down);
+ scaled top = tex_get_math_y_parameter_checked(style, math_parameter_subscript_top_max);
+ if (*shift_down < clr) {
+ *shift_down = clr;
+ }
+ clr = box_height(sub) - top;
+ if (*shift_down < clr) {
+ *shift_down = clr;
+ }
}
}
-static void tex_aux_get_math_sup_sub_shifts(halfword sup, halfword sub, halfword style, scaled *shift_up, scaled *shift_down)
+static void tex_aux_get_math_sup_sub_shifts(halfword target, halfword sup, halfword sub, halfword style, scaled *shift_up, scaled *shift_down)
{
- switch (math_scripts_mode_par) {
- case 1:
- *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down);
- break;
- case 2:
- *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_shift_down);
- break;
- case 3:
- *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_shift_down);
- break;
- case 4:
- *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down)
- + tex_half_scaled(tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_shift_down)
- - tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down));
- break;
- case 5:
- *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down);
- break;
- default:
- {
- scaled clr = tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_shift_down);
- scaled gap = tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_vgap);
- scaled bot = tex_get_math_y_parameter_checked(style, math_parameter_superscript_subscript_bottom_max);
- if (*shift_down < clr) {
- *shift_down = clr;
- }
- clr = gap - ((*shift_up - box_depth(sup)) - (box_height(sub) - *shift_down));
- if (clr > 0) {
- *shift_down += clr;
- clr = bot - (*shift_up - box_depth(sup));
- if (clr > 0) {
- *shift_up += clr;
- *shift_down -= clr;
- }
- }
- break;
+ if (has_noad_option_fixed_super_or_sub_script(target)) {
+ *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_shift_down);
+ } else if (has_noad_option_fixed_super_and_sub_script(target)) {
+ *shift_down = tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_shift_down);
+ } else {
+ scaled clr = tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_shift_down);
+ scaled gap = tex_get_math_y_parameter_checked(style, math_parameter_subscript_superscript_vgap);
+ scaled bot = tex_get_math_y_parameter_checked(style, math_parameter_superscript_subscript_bottom_max);
+ if (*shift_down < clr) {
+ *shift_down = clr;
+ }
+ clr = gap - ((*shift_up - box_depth(sup)) - (box_height(sub) - *shift_down));
+ if (clr > 0) {
+ *shift_down += clr;
+ clr = bot - (*shift_up - box_depth(sup));
+ if (clr > 0) {
+ *shift_up += clr;
+ *shift_down -= clr;
}
+ }
}
}
@@ -4802,6 +4746,24 @@ inline static int tex_aux_raise_prime_composed(halfword target)
return mainclass >= 0 ? tex_math_has_class_option(mainclass, raise_prime_option) : 0;
}
+static halfword tex_aux_shift_to_kern(halfword target, halfword box, scaled shift)
+{
+ halfword result;
+ if (box_source_anchor(box)) {
+ halfword kern = tex_new_kern_node(shift, vertical_math_kern_subtype);
+ tex_attach_attribute_list_copy(kern, target);
+ tex_couple_nodes(kern, box);
+ result = tex_vpack(kern, 0, packing_additional, max_dimen, (singleword) math_direction_par, holding_none_option);
+ tex_attach_attribute_list_copy(result, target);
+ node_subtype(result) = math_scripts_list;
+ box_shift_amount(result) = shift;
+ } else {
+ box_shift_amount(box) = shift;
+ result = box;
+ }
+ return result;
+}
+
static void tex_aux_make_scripts(halfword target, halfword kernel, scaled italic, int style, scaled supshift, scaled subshift, scaled supdrop, kernset *kerns)
{
halfword result = null;
@@ -5178,9 +5140,9 @@ static void tex_aux_make_scripts(halfword target, halfword kernel, scaled italic
/* */
if (postsupdata.box) {
/* Do we still want to chain these sups or should we combine it? */
- tex_aux_get_math_sup_shifts(postsupdata.box, style, &shift_up); /* maybe only in else branch */
+ tex_aux_get_math_sup_shifts(target, postsupdata.box, style, &shift_up); /* maybe only in else branch */
if (postsubdata.box) {
- tex_aux_get_math_sup_sub_shifts(postsupdata.box, postsubdata.box, style, &shift_up, &shift_down);
+ tex_aux_get_math_sup_sub_shifts(target, postsupdata.box, postsubdata.box, style, &shift_up, &shift_down);
tex_aux_get_sup_kern(kernel, &postsupdata, shift_up, supshift, &supkern, kerns);
tex_aux_get_sub_kern(kernel, &postsubdata, shift_down, subshift, &subkern, kerns);
if (primestate == prime_at_begin_location) {
@@ -5225,23 +5187,21 @@ static void tex_aux_make_scripts(halfword target, halfword kernel, scaled italic
} else if (supkern) {
tex_aux_prepend_hkern_to_box_list(postsupdata.box, supkern, math_shape_kern_subtype, "post sup shape");
}
- box_shift_amount(postsupdata.box) = -shift_up;
- result = postsupdata.box;
+ result = tex_aux_shift_to_kern(target, postsupdata.box, -shift_up);
if (presupdata.kern) {
kern_amount(presupdata.kern) += -supkern - subkern - italicmultiplier * italic;
kern_amount(postsupdata.kern) += supkern + subkern + italicmultiplier * italic;
}
}
} else {
- tex_aux_get_math_sub_shifts(postsubdata.box, style, &shift_down);
+ tex_aux_get_math_sub_shifts(target, postsubdata.box, style, &shift_down);
tex_aux_get_sub_kern(kernel, &postsubdata, shift_down, subshift, &subkern, kerns);
if (primestate == prime_at_begin_location) {
subkern = 0;
} else if (subkern) {
tex_aux_prepend_hkern_to_box_list(postsubdata.box, subkern, math_shape_kern_subtype, "post sub shape");
}
- box_shift_amount(postsubdata.box) = shift_down;
- result = postsubdata.box;
+ result = tex_aux_shift_to_kern(target, postsubdata.box, shift_down);
if (presubdata.kern) {
kern_amount(presubdata.kern) += -subkern;
kern_amount(postsubdata.kern) += subkern;
@@ -5275,8 +5235,8 @@ static void tex_aux_make_scripts(halfword target, halfword kernel, scaled italic
if (presubdata.box) {
if (presupdata.box) {
/* Do we still want to chain these sups or should we combine it? */
- tex_aux_get_math_sup_shifts(presupdata.box, style, &shift_up);
- tex_aux_get_math_sup_sub_shifts(presupdata.box, presubdata.box, style, &shift_up, &shift_down);
+ tex_aux_get_math_sup_shifts(target, presupdata.box, style, &shift_up);
+ tex_aux_get_math_sup_sub_shifts(target, presupdata.box, presubdata.box, style, &shift_up, &shift_down);
prekern = box_width(presupdata.box);
// test: what with negative extra kerns and what with a negative width
if (! splitscripts) {
@@ -5297,7 +5257,7 @@ static void tex_aux_make_scripts(halfword target, halfword kernel, scaled italic
box_shift_amount(preresult) = shift_down;
}
} else {
- tex_aux_get_math_sub_shifts(presubdata.box, style, &shift_down);
+ tex_aux_get_math_sub_shifts(target, presubdata.box, style, &shift_down);
if (! splitscripts) {
prekern = box_width(presubdata.box);
presubdata.box = tex_aux_combine_script(target, kernelsize.wd, presubdata.box, null, &presubdata.kern, &postsubdata.kern);
@@ -5306,7 +5266,7 @@ static void tex_aux_make_scripts(halfword target, halfword kernel, scaled italic
preresult = presubdata.box;
}
} else if (presupdata.box) {
- tex_aux_get_math_sup_shifts(presupdata.box, style, &shift_up);
+ tex_aux_get_math_sup_shifts(target, presupdata.box, style, &shift_up);
if (! splitscripts) {
prekern = box_width(presupdata.box);
presupdata.box = tex_aux_combine_script(target, kernelsize.wd, presupdata.box, null, &presupdata.kern, &postsupdata.kern);
@@ -6231,22 +6191,46 @@ static void tex_aux_show_math_list(const char *fmt, halfword list)
tex_end_diagnostic();
}
-static void tex_aux_wrapup_nucleus_and_add_scripts(halfword current, halfword nxt, int current_style, halfword *italic, kernset *kerns)
+static halfword tex_aux_check_source(halfword current, halfword list, int repack)
{
- halfword p = tex_aux_check_nucleus_complexity(current, italic, current_style, lmt_math_state.size, kerns);
- if (p && noad_source(current)) {
- switch (node_type(p)) {
+ if (list && noad_source(current)) {
+ switch (node_type(list)) {
case hlist_node:
case vlist_node:
- if (! box_source_anchor(p)) {
- box_source_anchor(p) = noad_source(current);
- tex_set_box_geometry(p, anchor_geometry);
- }
+ // printf("anchoring to list: %i\n", noad_source(current));
+ box_source_anchor(list) = noad_source(current);
+ tex_set_box_geometry(list, anchor_geometry);
+ noad_source(current) = 0;
break;
default:
- /*tex Todo: maybe pack and assign! */
+ if (repack) {
+ if (tracing_math_par >= 2) {
+ tex_begin_diagnostic();
+ tex_print_format("[math: packing due to source field %D]", noad_source(current));
+ tex_end_diagnostic();
+ }
+ list = tex_hpack(list, 0, packing_additional, direction_unknown, holding_none_option);
+ // printf("anchoring to wrapped list: %i\n", noad_source(current));
+ tex_attach_attribute_list_copy(list, current);
+ box_source_anchor(list) = noad_source(current);
+ noad_source(current) = 0;
+ tex_set_box_geometry(list, anchor_geometry);
+ noad_new_hlist(current) = list;
+ node_subtype(list) = math_pack_list;
+ }
break;
}
+ } else {
+ /* can't happen as we already checked before the call */
+ }
+ return list;
+}
+
+static void tex_aux_wrapup_nucleus_and_add_scripts(halfword current, halfword nxt, int current_style, halfword *italic, kernset *kerns)
+{
+ halfword p = tex_aux_check_nucleus_complexity(current, italic, current_style, lmt_math_state.size, kerns);
+ if (p && noad_source(current)) {
+ p = tex_aux_check_source(current, p, has_noad_option_source_on_nucleus(current));
}
if (noad_has_scripts(current)) {
scaled drop = 0;
@@ -6730,28 +6714,7 @@ static void tex_mlist_to_hlist_finalize_list(mliststate *state)
current_subtype = disc_class(box_list(list));
}
if (list && noad_source(current)) {
- if (tracing_math_par >= 2) {
- tex_begin_diagnostic();
- tex_print_format("[math: packing due to source field %D]", noad_source(current));
- tex_end_diagnostic();
- }
- switch (node_type(list)) {
- case hlist_node:
- case vlist_node:
- if (! box_source_anchor(list)) {
- box_source_anchor(list) = noad_source(current);
- tex_set_box_geometry(list, anchor_geometry);
- }
- break;
- default:
- list = tex_hpack(list, 0, packing_additional, direction_unknown, holding_none_option);
- tex_attach_attribute_list_copy(list, current);
- box_source_anchor(list) = noad_source(current);
- tex_set_box_geometry(list, anchor_geometry);
- noad_new_hlist(current) = list;
- node_subtype(list) = math_pack_list;
- break;
- }
+ tex_aux_check_source(current, list, 1);
}
break;
}
diff --git a/source/luametatex/source/tex/texnodes.c b/source/luametatex/source/tex/texnodes.c
index 1c4a6b896..7eba8a787 100644
--- a/source/luametatex/source/tex/texnodes.c
+++ b/source/luametatex/source/tex/texnodes.c
@@ -761,7 +761,7 @@ void lmt_nodelib_initialize(void) {
lmt_interface.node_data[nesting_node] = (node_info) { .id = nesting_node, .size = nesting_node_size, .first = 0, .last = 0, .subtypes = NULL, .fields = NULL, .name = lua_key(nestedlist), .lua = lua_key_index(nestedlist), .visible = 0 };
lmt_interface.node_data[span_node] = (node_info) { .id = span_node, .size = span_node_size, .first = 0, .last = 0, .subtypes = NULL, .fields = NULL, .name = lua_key(span), .lua = lua_key_index(span), .visible = 0 };
lmt_interface.node_data[align_stack_node] = (node_info) { .id = align_stack_node, .size = align_stack_node_size, .first = 0, .last = 0, .subtypes = NULL, .fields = NULL, .name = lua_key(alignstack), .lua = lua_key_index(alignstack), .visible = 0 };
- lmt_interface.node_data[noad_state_node] = (node_info) { .id = noad_state_node, .size = noad_state_node_size, .first = 0, .last = 0, .subtypes = NULL, .fields = NULL, .name = lua_key(noadstate), .lua = lua_key_index(noadstate), .visible = 0 };
+ // lmt_interface.node_data[noad_state_node] = (node_info) { .id = noad_state_node, .size = noad_state_node_size, .first = 0, .last = 0, .subtypes = NULL, .fields = NULL, .name = lua_key(noadstate), .lua = lua_key_index(noadstate), .visible = 0 };
lmt_interface.node_data[if_node] = (node_info) { .id = if_node, .size = if_node_size, .first = 0, .last = 0, .subtypes = NULL, .fields = NULL, .name = lua_key(ifstack), .lua = lua_key_index(ifstack), .visible = 0 };
lmt_interface.node_data[unhyphenated_node] = (node_info) { .id = unhyphenated_node, .size = active_node_size, .first = 0, .last = 0, .subtypes = NULL, .fields = NULL, .name = lua_key(unhyphenated), .lua = lua_key_index(unhyphenated), .visible = 0 };
lmt_interface.node_data[hyphenated_node] = (node_info) { .id = hyphenated_node, .size = active_node_size, .first = 0, .last = 0, .subtypes = NULL, .fields = NULL, .name = lua_key(hyphenated), .lua = lua_key_index(hyphenated), .visible = 0 };
@@ -1199,7 +1199,7 @@ halfword tex_copy_node(halfword p)
copy_sub_list(noad_subprescr(r), noad_subprescr(p)) ;
copy_sub_list(noad_supprescr(r), noad_supprescr(p)) ;
copy_sub_list(noad_prime(r), noad_prime(p)) ;
- copy_sub_list(noad_state(r), noad_state(p)) ;
+ // copy_sub_list(noad_state(r), noad_state(p)) ;
switch (t) {
case radical_noad:
copy_sub_node(radical_left_delimiter(r), radical_left_delimiter(p)) ;
@@ -1381,7 +1381,7 @@ void tex_flush_node(halfword p)
tex_aux_free_sub_node_list(noad_subprescr(p));
tex_aux_free_sub_node_list(noad_supprescr(p));
tex_aux_free_sub_node_list(noad_prime(p));
- tex_aux_free_sub_node_list(noad_state(p));
+ // tex_aux_free_sub_node_list(noad_state(p));
switch (t) {
case fraction_noad:
// tex_aux_free_sub_node_list(fraction_numerator(p));
@@ -1503,7 +1503,7 @@ static void tex_aux_check_node(halfword p)
tex_aux_node_range_test(p, noad_subprescr(p));
tex_aux_node_range_test(p, noad_supprescr(p));
tex_aux_node_range_test(p, noad_prime(p));
- tex_aux_node_range_test(p, noad_state(p));
+ // tex_aux_node_range_test(p, noad_state(p));
switch (t) {
case radical_noad:
tex_aux_node_range_test(p, radical_degree(p));
diff --git a/source/luametatex/source/tex/texnodes.h b/source/luametatex/source/tex/texnodes.h
index 8a462ebac..c6cc61ff2 100644
--- a/source/luametatex/source/tex/texnodes.h
+++ b/source/luametatex/source/tex/texnodes.h
@@ -128,7 +128,7 @@ typedef enum node_types {
nesting_node,
span_node,
align_stack_node,
- noad_state_node,
+ // noad_state_node,
if_node,
/*tex These two are active nodes. */
unhyphenated_node,
@@ -1601,15 +1601,15 @@ typedef enum simple_choice_subtypes {
*/
-# define noad_state_node_size 6
-# define noad_state_topright(a) vlink(a,2)
-# define noad_state_bottomright(a) vinfo(a,2)
-# define noad_state_topleft(a) vlink(a,3)
-# define noad_state_bottomleft(a) vinfo(a,3)
-# define noad_state_height(a) vlink(a,4)
-# define noad_state_depth(a) vinfo(a,4)
-# define noad_state_toptotal(a) vlink(a,5)
-# define noad_state_bottomtotal(a) vinfo(a,5)
+//define noad_state_node_size 6
+//define noad_state_topright(a) vlink(a,2)
+//define noad_state_bottomright(a) vinfo(a,2)
+//define noad_state_topleft(a) vlink(a,3)
+//define noad_state_bottomleft(a) vinfo(a,3)
+//define noad_state_height(a) vlink(a,4)
+//define noad_state_depth(a) vinfo(a,4)
+//define noad_state_toptotal(a) vlink(a,5)
+//define noad_state_bottomtotal(a) vinfo(a,5)
# define noad_size 14
# define noad_new_hlist(a) vlink(a,2) /*tex the translation of an mlist; a bit confusing name */
@@ -1622,12 +1622,17 @@ typedef enum simple_choice_subtypes {
# define noad_width(a) vinfo(a,5)
# define noad_height(a) vlink(a,6)
# define noad_depth(a) vinfo(a,6)
-# define noad_options(a) vlink(a,7)
-# define noad_style(a) vinfo00(a,7)
-# define noad_family(a) vinfo01(a,7)
-# define noad_script_state(a) vinfo02(a,7)
-# define noad_analyzed(a) vinfo03(a,7) /*tex used for experiments */
-# define noad_state(a) vlink(a,8) /*tex this might replace */
+//define noad_options(a) vlink(a,7)
+//define noad_style(a) vinfo00(a,7)
+//define noad_family(a) vinfo01(a,7)
+//define noad_script_state(a) vinfo02(a,7)
+//define noad_analyzed(a) vinfo03(a,7) /*tex used for experiments */
+//define noad_state(a) vlink(a,8) /*tex this might replace */
+# define noad_options(a) lvalue(a,7) /*tex 64 bit fullword */
+# define noad_style(a) vlink00(a,8)
+# define noad_family(a) vlink01(a,8)
+# define noad_script_state(a) vlink02(a,8)
+# define noad_analyzed(a) vlink03(a,8) /*tex used for experiments */
# define noad_class_main(a) vinfo00(a,8)
# define noad_class_left(a) vinfo01(a,8)
# define noad_class_right(a) vinfo02(a,8)
@@ -1717,41 +1722,52 @@ typedef struct noad_classes {
If we run out of options we can combine some, like auto.
*/
+// # if (defined(_MSC_VER) && ! defined(__MINGW32__))
+// typedef enum noad_options : unsigned __int64 {
+// # else
typedef enum noad_options {
- noad_option_axis = 0x00000001,
- noad_option_no_axis = 0x00000002,
- noad_option_exact = 0x00000004,
- noad_option_left = 0x00000008, /* align option for overflown under/over */ /* used ? */
- noad_option_middle = 0x00000010, /* idem */
- noad_option_right = 0x00000020, /* idem */
- noad_option_adapt_to_left_size = 0x00000040, /* old trickery, might go away but kind of fun */
- noad_option_adapt_to_right_size = 0x00000080, /* idem */
- noad_option_no_sub_script = 0x00000100,
- noad_option_no_super_script = 0x00000200,
- noad_option_no_sub_pre_script = 0x00000400,
- noad_option_no_super_pre_script = 0x00000800,
- noad_option_no_script = 0x00001000,
- noad_option_no_overflow = 0x00002000, /* keep (middle) extensible widthin target size */
- noad_option_void = 0x00004000, /* wipe and set width to zero */
- noad_option_phantom = 0x00008000, /* wipe */
- noad_option_openup_height = 0x00010000,
- noad_option_openup_depth = 0x00020000,
- noad_option_limits = 0x00040000, /* traditional modifier */
- noad_option_no_limits = 0x00080000, /* idem */
- noad_option_prefer_font_thickness = 0x00100000,
- noad_option_no_ruling = 0x00200000,
- noad_option_shifted_sub_script = 0x00400000,
- noad_option_shifted_super_script = 0x00800000,
- noad_option_shifted_sub_pre_script = 0x01000000,
- noad_option_shifted_super_pre_script = 0x02000000,
- noad_option_unpack_list = 0x04000000,
- noad_option_no_check = 0x08000000, /* don't check for missing end fence */
- noad_option_auto = 0x10000000,
- noad_option_unroll_list = 0x20000000,
- noad_option_followed_by_space = 0x40000000,
- noad_option_proportional = 0x80000000,
+// # endif
+ noad_option_axis = 0x000000001,
+ noad_option_no_axis = 0x000000002,
+ noad_option_exact = 0x000000004,
+ noad_option_left = 0x000000008, /* align option for overflown under/over */ /* used ? */
+ noad_option_middle = 0x000000010, /* idem */
+ noad_option_right = 0x000000020, /* idem */
+ noad_option_adapt_to_left_size = 0x000000040, /* old trickery, might go away but kind of fun */
+ noad_option_adapt_to_right_size = 0x000000080, /* idem */
+ noad_option_no_sub_script = 0x000000100,
+ noad_option_no_super_script = 0x000000200,
+ noad_option_no_sub_pre_script = 0x000000400,
+ noad_option_no_super_pre_script = 0x000000800,
+ noad_option_no_script = 0x000001000,
+ noad_option_no_overflow = 0x000002000, /* keep (middle) extensible widthin target size */
+ noad_option_void = 0x000004000, /* wipe and set width to zero */
+ noad_option_phantom = 0x000008000, /* wipe */
+ noad_option_openup_height = 0x000010000,
+ noad_option_openup_depth = 0x000020000,
+ noad_option_limits = 0x000040000, /* traditional modifier */
+ noad_option_no_limits = 0x000080000, /* idem */
+ noad_option_prefer_font_thickness = 0x000100000,
+ noad_option_no_ruling = 0x000200000,
+ noad_option_shifted_sub_script = 0x000400000,
+ noad_option_shifted_super_script = 0x000800000,
+ noad_option_shifted_sub_pre_script = 0x001000000,
+ noad_option_shifted_super_pre_script = 0x002000000,
+ noad_option_unpack_list = 0x004000000,
+ noad_option_no_check = 0x008000000, /* don't check for missing end fence */
+ noad_option_auto = 0x010000000,
+ noad_option_unroll_list = 0x020000000,
+ noad_option_followed_by_space = 0x040000000,
+ noad_option_proportional = 0x080000000,
+ /*tex Watch out: the following options exceed halfword: |noad_options| are |long long|. */
} noad_options;
+/*tex The Microsoft compiler truncates to int, so: */
+
+# define noad_option_source_on_nucleus 0x100000000
+# define noad_option_fixed_super_or_sub_script 0x200000000
+# define noad_option_fixed_super_and_sub_script 0x400000000
+
# define has_option(a,b) (((a) & (b)) == (b))
# define unset_option(a,b) ((a) & ~(b))
@@ -1777,34 +1793,37 @@ inline static int has_noad_no_script_option(halfword n, halfword option)
# define has_noad_option_nosubprescript(a) has_noad_no_script_option(a, noad_option_no_sub_pre_script)
# define has_noad_option_nosupprescript(a) has_noad_no_script_option(a, noad_option_no_super_pre_script)
-# define has_noad_option_shiftedsubscript(a) (has_option(noad_options(a), noad_option_shifted_sub_script))
-# define has_noad_option_shiftedsupscript(a) (has_option(noad_options(a), noad_option_shifted_super_script))
-# define has_noad_option_shiftedsubprescript(a) (has_option(noad_options(a), noad_option_shifted_sub_pre_script))
-# define has_noad_option_shiftedsupprescript(a) (has_option(noad_options(a), noad_option_shifted_super_pre_script))
-# define has_noad_option_axis(a) (has_option(noad_options(a), noad_option_axis))
-# define has_noad_option_exact(a) (has_option(noad_options(a), noad_option_exact))
-# define has_noad_option_noaxis(a) (has_option(noad_options(a), noad_option_no_axis))
-# define has_noad_option_openupheight(a) (has_option(noad_options(a), noad_option_openup_height))
-# define has_noad_option_openupdepth(a) (has_option(noad_options(a), noad_option_openup_depth))
-# define has_noad_option_adapttoleft(a) (has_option(noad_options(a), noad_option_adapt_to_left_size))
-# define has_noad_option_adapttoright(a) (has_option(noad_options(a), noad_option_adapt_to_right_size))
-# define has_noad_option_limits(a) (has_option(noad_options(a), noad_option_limits))
-# define has_noad_option_nolimits(a) (has_option(noad_options(a), noad_option_no_limits))
-# define has_noad_option_nooverflow(a) (has_option(noad_options(a), noad_option_no_overflow))
-# define has_noad_option_preferfontthickness(a) (has_option(noad_options(a), noad_option_prefer_font_thickness))
-# define has_noad_option_noruling(a) (has_option(noad_options(a), noad_option_no_ruling))
-# define has_noad_option_unpacklist(a) (has_option(noad_options(a), noad_option_unpack_list))
-# define has_noad_option_nocheck(a) (has_option(noad_options(a), noad_option_no_check))
-# define has_noad_option_exact(a) (has_option(noad_options(a), noad_option_exact))
-# define has_noad_option_left(a) (has_option(noad_options(a), noad_option_left))
-# define has_noad_option_middle(a) (has_option(noad_options(a), noad_option_middle))
-# define has_noad_option_right(a) (has_option(noad_options(a), noad_option_right))
-# define has_noad_option_auto(a) (has_option(noad_options(a), noad_option_auto))
-# define has_noad_option_phantom(a) (has_option(noad_options(a), noad_option_phantom))
-# define has_noad_option_void(a) (has_option(noad_options(a), noad_option_void))
-# define has_noad_option_unrolllist(a) (has_option(noad_options(a), noad_option_unroll_list))
-# define has_noad_option_followedbyspace(a) (has_option(noad_options(a), noad_option_followed_by_space))
-# define has_noad_option_proportional(a) (has_option(noad_options(a), noad_option_proportional))
+# define has_noad_option_shiftedsubscript(a) (has_option(noad_options(a), noad_option_shifted_sub_script))
+# define has_noad_option_shiftedsupscript(a) (has_option(noad_options(a), noad_option_shifted_super_script))
+# define has_noad_option_shiftedsubprescript(a) (has_option(noad_options(a), noad_option_shifted_sub_pre_script))
+# define has_noad_option_shiftedsupprescript(a) (has_option(noad_options(a), noad_option_shifted_super_pre_script))
+# define has_noad_option_axis(a) (has_option(noad_options(a), noad_option_axis))
+# define has_noad_option_exact(a) (has_option(noad_options(a), noad_option_exact))
+# define has_noad_option_noaxis(a) (has_option(noad_options(a), noad_option_no_axis))
+# define has_noad_option_openupheight(a) (has_option(noad_options(a), noad_option_openup_height))
+# define has_noad_option_openupdepth(a) (has_option(noad_options(a), noad_option_openup_depth))
+# define has_noad_option_adapttoleft(a) (has_option(noad_options(a), noad_option_adapt_to_left_size))
+# define has_noad_option_adapttoright(a) (has_option(noad_options(a), noad_option_adapt_to_right_size))
+# define has_noad_option_limits(a) (has_option(noad_options(a), noad_option_limits))
+# define has_noad_option_nolimits(a) (has_option(noad_options(a), noad_option_no_limits))
+# define has_noad_option_nooverflow(a) (has_option(noad_options(a), noad_option_no_overflow))
+# define has_noad_option_preferfontthickness(a) (has_option(noad_options(a), noad_option_prefer_font_thickness))
+# define has_noad_option_noruling(a) (has_option(noad_options(a), noad_option_no_ruling))
+# define has_noad_option_unpacklist(a) (has_option(noad_options(a), noad_option_unpack_list))
+# define has_noad_option_nocheck(a) (has_option(noad_options(a), noad_option_no_check))
+# define has_noad_option_exact(a) (has_option(noad_options(a), noad_option_exact))
+# define has_noad_option_left(a) (has_option(noad_options(a), noad_option_left))
+# define has_noad_option_middle(a) (has_option(noad_options(a), noad_option_middle))
+# define has_noad_option_right(a) (has_option(noad_options(a), noad_option_right))
+# define has_noad_option_auto(a) (has_option(noad_options(a), noad_option_auto))
+# define has_noad_option_phantom(a) (has_option(noad_options(a), noad_option_phantom))
+# define has_noad_option_void(a) (has_option(noad_options(a), noad_option_void))
+# define has_noad_option_unrolllist(a) (has_option(noad_options(a), noad_option_unroll_list))
+# define has_noad_option_followedbyspace(a) (has_option(noad_options(a), noad_option_followed_by_space))
+# define has_noad_option_proportional(a) (has_option(noad_options(a), noad_option_proportional))
+# define has_noad_option_source_on_nucleus(a) (has_option(noad_options(a), noad_option_source_on_nucleus))
+# define has_noad_option_fixed_super_or_sub_script(a) (has_option(noad_options(a), noad_option_fixed_super_or_sub_script))
+# define has_noad_option_fixed_super_and_sub_script(a) (has_option(noad_options(a), noad_option_fixed_super_and_sub_script))
/*tex
In the meantime the codes and subtypes are in sync. The variable component does not really
diff --git a/source/luametatex/source/tex/texprinting.c b/source/luametatex/source/tex/texprinting.c
index d18445f36..6d01854b7 100644
--- a/source/luametatex/source/tex/texprinting.c
+++ b/source/luametatex/source/tex/texprinting.c
@@ -592,9 +592,9 @@ void tex_print_sparse_dimension(scaled s, int unit)
as an unsigned.
*/
-void tex_print_hex(int sn)
+void tex_print_hex(long long sn)
{
- unsigned int n = (unsigned int) sn;
+ unsigned long long n = (unsigned long long) sn;
int k = 0;
unsigned char digits[24];
do {
@@ -612,13 +612,13 @@ void tex_print_hex(int sn)
}
}
-void tex_print_qhex(int n)
+void tex_print_qhex(long long n)
{
tex_print_char('"');
tex_print_hex(n);
}
-void tex_print_uhex(int n)
+void tex_print_uhex(long long n)
{
tex_print_str("U+");
if (n < 16) {
diff --git a/source/luametatex/source/tex/texprinting.h b/source/luametatex/source/tex/texprinting.h
index 5e311a0bb..745b8eeb0 100644
--- a/source/luametatex/source/tex/texprinting.h
+++ b/source/luametatex/source/tex/texprinting.h
@@ -59,9 +59,9 @@ extern void tex_print_banner (void);
extern void tex_print_log_banner (void);
extern void tex_print_version_banner (void);
extern void tex_print_int (int n);
-extern void tex_print_hex (int n);
-extern void tex_print_uhex (int n);
-extern void tex_print_qhex (int n);
+extern void tex_print_hex (long long n);
+extern void tex_print_uhex (long long n);
+extern void tex_print_qhex (long long n);
extern void tex_print_roman_int (int n);
extern void tex_print_current_string (void);
extern void tex_print_cs_checked (halfword p); /*tex Also does the |IMPOSSIBLE| etc. */
diff --git a/source/luametatex/source/tex/textypes.h b/source/luametatex/source/tex/textypes.h
index 3eebccbf1..a09409522 100644
--- a/source/luametatex/source/tex/textypes.h
+++ b/source/luametatex/source/tex/textypes.h
@@ -81,6 +81,7 @@
typedef int strnumber;
typedef int halfword;
+typedef long long fullword;
typedef unsigned short quarterword; /*tex It really is an unsigned one! But \MPLIB| had it signed. */
typedef unsigned char singleword;
typedef int scaled;
diff --git a/source/luametatex/source/utilities/auxunistring.c b/source/luametatex/source/utilities/auxunistring.c
index 10ae6393d..9fe5531d6 100644
--- a/source/luametatex/source/utilities/auxunistring.c
+++ b/source/luametatex/source/utilities/auxunistring.c
@@ -135,10 +135,9 @@ unsigned aux_splitutf2uni(unsigned int *ubuf, const char *utf8buf)
size_t aux_utf8len(const char *text, size_t size)
{
- size_t ls = size;
size_t ind = 0;
size_t num = 0;
- while (ind < ls) {
+ while (ind < size) {
unsigned char i = (unsigned char) *(text + ind);
if (i < 0x80) {
ind += 1;
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index e793ca865..1dec26734 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{2022.12.05 18:49}
+\newcontextversion{2022.12.07 20:21}
%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 870b3d0c9..176f510ba 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{2022.12.05 18:49}
+\edef\contextversion{2022.12.07 20:21}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 642c58bd3..96db775a1 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{2022.12.05 18:49}
+\newcontextversion{2022.12.07 20:21}
%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 60320035e..f78fb6cbd 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{2022.12.05 18:49}
+\edef\contextversion{2022.12.07 20:21}
%D Kind of special:
diff --git a/tex/context/base/mkiv/l-string.lua b/tex/context/base/mkiv/l-string.lua
index 1dee85e28..476820a17 100644
--- a/tex/context/base/mkiv/l-string.lua
+++ b/tex/context/base/mkiv/l-string.lua
@@ -7,7 +7,7 @@ if not modules then modules = { } end modules ['l-string'] = {
}
local string = string
-local sub, gmatch, format, char, byte, rep, lower = string.sub, string.gmatch, string.format, string.char, string.byte, string.rep, string.lower
+local sub, gmatch, format, char, byte, rep, lower, find = string.sub, string.gmatch, string.format, string.char, string.byte, string.rep, string.lower, string.find
local lpegmatch, patterns = lpeg.match, lpeg.patterns
local P, S, C, Ct, Cc, Cs = lpeg.P, lpeg.S, lpeg.C, lpeg.Ct, lpeg.Cc, lpeg.Cs
@@ -52,10 +52,26 @@ function string.quoted(str)
return format("%q",str) -- always double quote
end
-function string.count(str,pattern) -- variant 3
+-- function string.count(str,pattern) -- variant 3
+-- local n = 0
+-- for _ in gmatch(str,pattern) do -- not for utf
+-- n = n + 1
+-- end
+-- return n
+-- end
+
+function string.count(str,pattern)
local n = 0
- for _ in gmatch(str,pattern) do -- not for utf
- n = n + 1
+ local i = 1
+ local l = #pattern
+ while true do
+ i = find(str,pattern,i)
+ if i then
+ n = n + 1
+ i = i + l
+ else
+ break
+ end
end
return n
end
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 24196b4e9..e8ea30175 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 6c406bfa1..8ff4f4584 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkxl/anch-box.mkxl b/tex/context/base/mkxl/anch-box.mkxl
index 88809152e..02cdf5fb8 100644
--- a/tex/context/base/mkxl/anch-box.mkxl
+++ b/tex/context/base/mkxl/anch-box.mkxl
@@ -19,28 +19,68 @@
anch_box_arrows_draw ;
\stopMPpositiongraphic
+% \tolerant\permanent\protected\def\connectboxanchors[#1]#*[#2]#*[#3]#*[#4]#*#:#5#6%
+% {\begingroup
+% \defineboxanchor[#5]%
+% \setboxanchor[#5][#1][#3]\hpack{\xypos{\namespacedboxanchor{#5}}}%
+% \ifparameter#3\or\setupboxanchorcontent[#1][#3]\fi
+% \defineboxanchor[#6]%
+% \setboxanchor[#6][#2][#4]\hpack{\xypos{\namespacedboxanchor{#6}}}%
+% \ifparameter#4\or\setupboxanchorcontent[#1][#4]\fi
+% %\startpositionoverlay{text-1}% will become configurable region
+% \startpositionoverlay{text+1}% will become configurable region
+% \setMPpositiongraphic
+% {\namespacedboxanchor{#5}}%
+% {\namedboxanchorcontentparameter{#1}\c!mp}%
+% {from=\namespacedboxanchor{#5},%
+% to=\namespacedboxanchor{#6},%
+% distance={\namedboxanchorcontentparameter{#1}\c!distance},%
+% dashtype={\namedboxanchorcontentparameter{#1}\c!dash},%
+% alternative={\namedboxanchorcontentparameter{#1}\c!alternative},%
+% text={\namedboxanchorcontentparameter{#1}\c!text},%
+% rulethickness={\namedboxanchorcontentparameter{#1}\c!rulethickness},%
+% linecolor=\namedboxanchorcontentparameter{#1}{\c!rulecolor}}%
+% \stoppositionoverlay
+% \endgroup}
+
\tolerant\permanent\protected\def\connectboxanchors[#1]#*[#2]#*[#3]#*[#4]#*#:#5#6%
{\begingroup
- \defineboxanchor[#5]%
- \setboxanchor[#5][#1][#3]\hpack{\xypos{\namespacedboxanchor{#5}}}%
+ %
+ \edef\boxanchorone{\boxanchoringclass:#5}%
+ \edef\boxanchortwo{\boxanchoringclass:#6}%
+% \edef\boxanchorone{#5}%
+% \edef\boxanchortwo{#6}%
+ %
+ \doifnotanchorbox{\boxanchorone}{\defineboxanchor[\boxanchorone]}%
+ \doifnotanchorbox{\boxanchortwo}{\defineboxanchor[\boxanchortwo]}%
+ %
+ \edef\boxanchorposone{#1:#2:\namespacedboxanchor{\boxanchorone}}%
+ \edef\boxanchorpostwo{#1:#2:\namespacedboxanchor{\boxanchortwo}}%
+% \edef\boxanchorposone{#1:#2:\number\namedboxanchor{\boxanchorone}}%
+% \edef\boxanchorpostwo{#1:#2:\number\namedboxanchor{\boxanchortwo}}%
+ %
+ \setboxanchor[\boxanchorone][#1][#3]\hpack{\xypos{\boxanchorposone}}%
+ \setboxanchor[\boxanchortwo][#2][#4]\hpack{\xypos{\boxanchorpostwo}}%
+ %
\ifparameter#3\or\setupboxanchorcontent[#1][#3]\fi
- \defineboxanchor[#6]%
- \setboxanchor[#6][#2][#4]\hpack{\xypos{\namespacedboxanchor{#6}}}%
- \ifparameter#4\or\setupboxanchorcontent[#1][#4]\fi
-% \startpositionoverlay{text-1}% will become configurable region
- \startpositionoverlay{text+1}% will become configurable region
- \setMPpositiongraphic
- {\namespacedboxanchor{#5}}%
- {\namedboxanchorcontentparameter{#1}\c!mp}%
- {from=\namespacedboxanchor{#5},%
- to=\namespacedboxanchor{#6},%
- distance={\namedboxanchorcontentparameter{#1}\c!distance},%
- dashtype={\namedboxanchorcontentparameter{#1}\c!dash},%
- alternative={\namedboxanchorcontentparameter{#1}\c!alternative},%
- text={\namedboxanchorcontentparameter{#1}\c!text},%
- rulethickness={\namedboxanchorcontentparameter{#1}\c!rulethickness},%
- linecolor=\namedboxanchorcontentparameter{#1}{\c!rulecolor}}%
- \stoppositionoverlay
+ \ifparameter#4\or\setupboxanchorcontent[#2][#4]\fi % used ?
+ %
+ \normalexpanded{%
+ \startpositionoverlay{text+1}% will become configurable region
+ \setMPpositiongraphic
+ {\boxanchorposone}%
+ {\namedboxanchorcontentparameter{#1}\c!mp}%
+ {from=\boxanchorposone,%
+ to=\boxanchorpostwo,%
+ distance={\namedboxanchorcontentparameter{#1}\c!distance},%
+ dashtype={\namedboxanchorcontentparameter{#1}\c!dash},%
+ arrow={\namedboxanchorcontentparameter{#1}\c!arrow},%
+ alternative={\namedboxanchorcontentparameter{#1}\c!alternative},%
+ text={\namedboxanchorcontentparameter{#1}\c!text},%
+ rulethickness={\namedboxanchorcontentparameter{#1}\c!rulethickness},%
+ linecolor=\namedboxanchorcontentparameter{#1}{\c!rulecolor}}%
+ \stoppositionoverlay
+ }%
\endgroup}
% dedicated or not
@@ -69,6 +109,7 @@
to=\namespacedboxanchor{#6},%
distance={\namedboxanchorcontentparameter{#1}\c!distance},%
dashtype={\namedboxanchorcontentparameter{#1}\c!dash},%
+ arrow={\namedboxanchorcontentparameter{#1}\c!arrow},%
alternative={\namedboxanchorcontentparameter{#1}\c!alternative},%
text={\namedboxanchorcontentparameter{#1}\c!text},%
rulethickness={\namedboxanchorcontentparameter{#1}\c!rulethickness},%
@@ -177,4 +218,42 @@
\c!xoffset=.25\exheight,
\c!yoffset=.25\exheight]
+% \setupboxanchorcontent [top] [rulecolor=darkyellow]
+% \setupboxanchorcontent [left] [rulecolor=darkred]
+% \setupboxanchorcontent [bottom][rulecolor=darkblue]
+% \setupboxanchorcontent [right] [rulecolor=darkgreen]
+%
+% \startbuffer
+% \connectboxanchors[top] [top] [text={\small\small\strut\bf var 1}]{a1}{a2}
+% \connectboxanchors[top] [top] [text={\small\small\strut\bf var 2}]{b1}{b2}
+% \connectboxanchors[top] [top] [text={\small\small\strut\bf var 3}]{a1}{b1}
+% \connectboxanchors[bottom][bottom][text={\small\small\strut\bf var 4}]{b1}{b2}
+% \connectboxanchors[bottom][bottom][text={\small\small\strut\bf var 6}]{a1}{a2}
+% \connectboxanchors[bottom][bottom][rulecolor=darkgreen,distance=4ex,text={\small\small\strut\bf var 7}]{c1}{d1}
+%
+% % \start
+%
+% $\showboxes
+% % \mathboxanchored{a1}{a}^{2^x} +
+% % \mathboxanchored[nucleus]{a1}{a}^{2^x} +
+% % \mathboxanchored{a1}{g}^2 +
+% % \mathboxanchored{a1}{a} +
+% a^{\mathboxanchored{a1}{2}} +
+% % a^{\mathboxanchored{a1}{2}}_3 +
+% \mathboxanchored{b1}{b}
+% =
+% \mathboxanchored{c1}{c}^2 +
+% \mathboxanchored[nucleus]{d1}{d}^2
+% =
+% b_{\mathboxanchored{b2}{3}} +
+% \mathboxanchored{a2}{a}
+% $
+% \stopbuffer
+%
+% \starttext
+% \startTEXpage[offset=10mm]\startboxanchoring[a]\getbuffer\stopboxanchoring\stopTEXpage
+% \startTEXpage[offset=11mm]\startboxanchoring[b]\getbuffer\stopboxanchoring\stopTEXpage
+% \startTEXpage[offset=12mm]\startboxanchoring[+]\getbuffer\stopboxanchoring\stopTEXpage
+% \stoptext
+
\protect
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 21de832b0..0b29287cf 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{2022.12.05 18:49}
+\newcontextversion{2022.12.07 20:21}
%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 7942fb93a..9811ff9a4 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{2022.12.05 18:49}
+\immutable\edef\contextversion{2022.12.07 20:21}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/driv-shp.lmt b/tex/context/base/mkxl/driv-shp.lmt
index 0b9418ab8..7aba4ac01 100644
--- a/tex/context/base/mkxl/driv-shp.lmt
+++ b/tex/context/base/mkxl/driv-shp.lmt
@@ -1089,6 +1089,7 @@ local hlist_out, vlist_out do
anchor_v = anchor_v + (height - width)
end
end
+-- anchor_v = anchor_v + shift
anchors[source] = { anchor_h, anchor_v, width, height, depth }
end
if usedorientation then
@@ -1154,16 +1155,14 @@ local hlist_out, vlist_out do
pos_v = pos_v - depth
flushrule(current,pos_h + xoffset,pos_v + yoffset,pos_r,width,total,subtype)
end
+ cur_h = cur_h + width
end
- -- move into above if
- cur_h = cur_h + width
elseif id == math_code then
-- local kern = getkern(current)
-- if kern ~= 0 then
-- cur_h = cur_h + kern
-- else
--- cur_h = cur_h + effectiveglue(current,this_box)
-cur_h = cur_h + effectiveglue(current,this_box,true)
+ cur_h = cur_h + effectiveglue(current,this_box,true)
-- end
elseif id == dir_code then
-- We normally have proper begin-end pairs. A begin without end is (silently) handled
@@ -1278,8 +1277,7 @@ cur_h = cur_h + effectiveglue(current,this_box,true)
-- local id = getid(current)
for current, id, subtype in nextnode, current do
if id == glue_code then
--- local glueheight = effectiveglue(current,this_box)
-local glueheight = effectiveglue(current,this_box,true)
+ local glueheight = effectiveglue(current,this_box,true)
if glueheight ~= 0 then
if subtype >= leaders_code then
local leader = getleader(current)
@@ -1407,7 +1405,7 @@ local glueheight = effectiveglue(current,this_box,true)
end
pos_v = ref_v - (cur_v + basepoint_v)
elseif hasoffset then
--- local orientation, xoffset, yoffset = getorientation(current)
+ -- local orientation, xoffset, yoffset = getorientation(current)
local xoffset, yoffset = getoffsets(current)
-- local basepoint_h = shift
-- local basepoint_v = height
@@ -1535,8 +1533,8 @@ local glueheight = effectiveglue(current,this_box,true)
end
flushrule(current,pos_h + xoffset,pos_v - total - yoffset,pos_r,width,total,subtype)
end
+ cur_v = cur_v + total
end
- cur_v = cur_v + total
elseif id == whatsit_code then
flushwhatsit[subtype](current,pos_h,pos_v)
else
diff --git a/tex/context/base/mkxl/font-imp-braille.lmt b/tex/context/base/mkxl/font-imp-braille.lmt
index 2bbf0fd16..fb1ba6cb4 100644
--- a/tex/context/base/mkxl/font-imp-braille.lmt
+++ b/tex/context/base/mkxl/font-imp-braille.lmt
@@ -103,6 +103,7 @@ local function initialize(tfmdata,value)
d.height = height
d.depth = depth
d.commands = c
+ d.smaller = nil
else
characters[u] = {
width = n * width,
diff --git a/tex/context/base/mkxl/math-act.lmt b/tex/context/base/mkxl/math-act.lmt
index d4abed0ba..152707670 100644
--- a/tex/context/base/mkxl/math-act.lmt
+++ b/tex/context/base/mkxl/math-act.lmt
@@ -3451,7 +3451,7 @@ local function applytweaks(when,target,original)
if action then
local feature = tweak.feature
local features = target.specification.features.normal
- if not feature or features[feature] == true then
+ if feature == nil or features[feature] then
local version = tweak.version
if version and version ~= target.tweakversion then
report_math("skipping tweak %a version %a",tweak.tweak,version)
diff --git a/tex/context/base/mkxl/pack-box.mkxl b/tex/context/base/mkxl/pack-box.mkxl
index ecd793056..7c64b0032 100644
--- a/tex/context/base/mkxl/pack-box.mkxl
+++ b/tex/context/base/mkxl/pack-box.mkxl
@@ -1236,6 +1236,24 @@
\newcount\registeredboxanchor
+\installmacrostack\boxanchoringclass
+
+\mutable\let\boxanchoringclass\empty
+
+\newcount\c_anchor_auto_box_class
+
+\permanent\protected\def\startboxanchoring[#1]% + == auto
+ {\push_macro_boxanchoringclass
+ \iftok{#1}{+}%
+ \global\advance\c_anchor_auto_box_class\plusone
+ \edef\boxanchoringclass{\the\c_anchor_auto_box_class::}%
+ \else
+ \edef\boxanchoringclass{#1}
+ \fi}
+
+\permanent\protected\def\stopboxanchoring
+ {\pop_macro_boxanchoringclass}
+
\permanent\protected\def\registerboxanchor
{\global\advance\registeredboxanchor\minusone}
@@ -1243,6 +1261,13 @@
{\registerboxanchor
\global\expandafter\integerdef\csname\??boxanchors#1\endcsname\registeredboxanchor}
+\permanent\protected\def\doifnotanchorbox#1%
+ {\ifcsname\??boxanchors#1\endcsname
+ \expandafter\gobbleoneargument
+ \else
+ \expandafter\firstofoneargument
+ \fi}
+
\permanent\def\namedboxanchor#1%
{\normalexpanded{\ifcsname\??boxanchors#1\endcsname\lastnamedcs\orelse\ifchknum#1\or#1\else\zerocount\fi}}
@@ -1290,11 +1315,14 @@
%D The name might change:
-\permanent\protected\def\mathboxanchored#1#2{#2\Umathsource\namedboxanchor{#1}\relax}
-
\permanent\protected\def\mathrowanchored #1{\alignmentwrapsource\namedboxanchor{#1}\relax}
\permanent\protected\def\mathcellanchored#1{\alignmentcellsource\namedboxanchor{#1}\relax}
+%permanent\protected\def\mathboxanchored#1#2{#2\Umathsource\namedboxanchor{#1}\relax}
+
+\permanent\tolerant\protected\def\mathboxanchored[#1]#:#2#3%
+ {#3\Umathsource\iftok{#1}{nucleus}#1\fi\namedboxanchor{\boxanchoringclass:#2}\relax}
+
% to be used as:
%
% \scratchcounter\registeredboxanchor
diff --git a/tex/context/base/mkxl/type-imp-braille.mkxl b/tex/context/base/mkxl/type-imp-braille.mkxl
index 738874ec8..17209d50c 100644
--- a/tex/context/base/mkxl/type-imp-braille.mkxl
+++ b/tex/context/base/mkxl/type-imp-braille.mkxl
@@ -11,6 +11,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+\continuewhenlmtxmode
+
%D There is no need to waste money on a commercial braille font if we have dejavu. After
%D all it's just dots. We also don't need features.
@@ -35,7 +37,7 @@
\definefontfallback[BrailleMono] [\s!name:dejavuserif*brailletext][0x0000-0x1FFFF][force=yes]
\definefontfallback[BrailleSerif][\s!name:dejavuserif*brailletext][0x0000-0x1FFFF][force=yes]
\definefontfallback[BrailleSans] [\s!name:dejavuserif*brailletext][0x0000-0x1FFFF][force=yes]
- \definefontfallback[BrailleMath] [\s!name:dejavuserif*braillemath][0x0000-0x1FFFF][force=yes]
+ %\definefontfallback[BrailleMath] [\s!name:dejavuserif*braillemath][0x0000-0x1FFFF][force=yes]
\definefontfallback[BrailleMonoBold] [\s!name:dejavuserifbold*brailletext][0x0000-0x1FFFF][force=yes]
\definefontfallback[BrailleSerifBold][\s!name:dejavuserifbold*brailletext][0x0000-0x1FFFF][force=yes]
@@ -70,8 +72,10 @@
\starttypescript [\s!math][braille] [\s!name]
\loadfontgoodies[dejavu-math]
- \definefontsynonym[\s!MathRoman] [\s!file:texgyredejavu-math][\s!features={mathbraille,\s!math\mathsizesuffix},\s!fallbacks=BrailleMath]
- \definefontsynonym[\s!MathRomanBold][\s!file:texgyredejavu-math][\s!features={mathbraille,\s!math\mathsizesuffix,dejavu-math-bold},\s!fallbacks=BrailleMath]
+ %\definefontsynonym[\s!MathRoman] [\s!file:texgyredejavu-math][\s!features={mathbraille,\s!math\mathsizesuffix},\s!fallbacks=BrailleMath]
+ %\definefontsynonym[\s!MathRomanBold][\s!file:texgyredejavu-math][\s!features={mathbraille,\s!math\mathsizesuffix,dejavu-math-bold},\s!fallbacks=BrailleMath]
+ \definefontsynonym[\s!MathRoman] [\s!file:texgyredejavu-math][\s!features={braillemath,\s!math\mathsizesuffix},\s!goodies=dejavu-math]
+ \definefontsynonym[\s!MathRomanBold][\s!file:texgyredejavu-math][\s!features={braillemath,\s!math\mathsizesuffix,dejavu-math-bold},\s!goodies=dejavu-math]
\stoptypescript
\starttypescript[braille]
diff --git a/tex/context/fonts/mkiv/bonum-math.lfg b/tex/context/fonts/mkiv/bonum-math.lfg
index a7f4ec306..32152e15d 100644
--- a/tex/context/fonts/mkiv/bonum-math.lfg
+++ b/tex/context/fonts/mkiv/bonum-math.lfg
@@ -13,28 +13,17 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 900,
- AccentTopShiftUp = -15,
- FlattenedAccentTopShiftUp = -15,
- -- AccentExtendMargin = 50,
- AccentBaseDepth = 50,
- -- RadicalDegreeBottomRaisePercent = 60,
--- RadicalRuleThickness = 66, -- 72 in font
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- DisplayOperatorMinHeight = 1900, -- 1250 in font
- -- ScriptPercentScaleDown = 65, -- 77 in font
- -- ScriptScriptPercentScaleDown = 50, -- 60 in font
- SubscriptShiftDown = 201, -- 231 in font
- SuperscriptShiftUp = 364, -- 334 in font
+ AccentTopShiftUp = -15,
+ FlattenedAccentTopShiftUp = -15,
+ AccentBaseDepth = 50,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ DisplayOperatorMinHeight = 1900, -- 1250 in font
+ SubscriptShiftDown = 201, -- 231 in font
+ SuperscriptShiftUp = 364, -- 334 in font
SubscriptShiftDownWithSuperscript = "1.4*SubscriptShiftDown", -- trial and error
- -- PrimeRaisePercent = 0, -- set to 0 in math-act
- -- PrimeRaiseComposedPercent = 0, -- set to 0 in math-act
- PrimeShiftUp = "1.25*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.25*SuperscriptShiftUp",
-
- -- PrimeBaselineDropMax = 0,
+ PrimeShiftUp = "1.25*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.25*SuperscriptShiftUp",
},
tweaks = {
aftercopying = {
@@ -44,16 +33,13 @@ return {
},
{
tweak = "fixprimes",
- -- scale = 0.8,
- -- smaller = true,
- factor = 0.77,--1.1
+ factor = 0.77,
},
{
tweak = "addmirrors",
},
{
tweak = "replacealphabets",
- -- feature = "mathbeta", -- we always replace
list = {
{
source = { first = 0x003B1 },
@@ -76,18 +62,6 @@ return {
presets.moveitalics { correct = true },
presets.wipeanchors { },
presets.wipeitalics { },
- -- {
- -- tweak = "topaccents",
- -- list = {
- -- [0x1D453] = 0.7, -- f
- -- },
- -- },
- -- {
- -- tweak = "limits",
- -- list = {
- -- [0x0222B] = 1.5,
- -- },
- -- },
{
-- We need to check these, are the tweaks necessary or not?
tweak = "dimensions",
@@ -102,11 +76,6 @@ return {
["lowercasescript"] = {
factor = 1.2,
- -- width = 1.2,
- -- extend = 1.2,
- -- height = 1.2,
- -- depth = 1.2,
- -- squeeze = 1.2,
},
},
},
@@ -115,10 +84,6 @@ return {
list = {
[0x002F] = { topleft = -0.2, bottomright = -0.2 },
["0x002F.variants.*"] = { topleft = -0.2, bottomright = -0.2 },
- -- No!
- -- [0x0028] = { topleft = -0.1, bottomleft = -0.1 }, -- left parenthesis
- -- [0x0029] = { topright = -0.1, bottomright = -0.1, all = true }, -- right parenthesis
- --
[0x007D] = { topright = -0.05, bottomright = -0.05 }, -- right brace variants
["0x7D.variants.*"] = { topright = -0.05, bottomright = -0.05 }, -- right brace variants
["0x7D.parts.top"] = { topright = -0.15, }, -- right brace top
@@ -138,19 +103,10 @@ return {
--
[0x1D465] = { bottomright = -0.05, }, -- italic x (ic is too large)
[0x00393] = { bottomright = -0.30, }, -- upright Gamma
- -- [0x222B] = integral_variants, ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top,
["0x222B.parts.bottom"] = { bottomright = -0.20 }, -- int
["0x222C.parts.bottom"] = { bottomright = -0.15 }, -- iint
["0x222D.parts.bottom"] = { bottomright = -0.10 }, -- iiint
["0x2A0C.parts.bottom"] = { bottomright = -0.05 }, -- iiiint
- -- [0x222C] = integral_variants, ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top,
- -- [0x222D] = integral_variants, ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom,
- -- [0x222E] = integral_variants, ["0x222E.variants.*"] = integral_variants, ["0x222E.parts.top"] = integral_top, ["0x222E.parts.bottom"] = integral_bottom,
- -- [0x222F] = integral_variants, ["0x222F.variants.*"] = integral_variants, ["0x222F.parts.top"] = integral_top, ["0x222F.parts.bottom"] = integral_bottom,
- -- [0x2230] = integral_variants, ["0x2230.variants.*"] = integral_variants, ["0x2230.parts.top"] = integral_top, ["0x2230.parts.bottom"] = integral_bottom,
- -- [0x2231] = integral_variants, ["0x2231.variants.*"] = integral_variants, ["0x2231.parts.top"] = integral_top, ["0x2231.parts.bottom"] = integral_bottom,
- -- [0x2232] = integral_variants, ["0x2232.variants.*"] = integral_variants, ["0x2232.parts.top"] = integral_top, ["0x2232.parts.bottom"] = integral_bottom,
- -- [0x2233] = integral_variants, ["0x2233.variants.*"] = integral_variants, ["0x2233.parts.top"] = integral_top, ["0x2233.parts.bottom"] = integral_bottom,
},
},
-- Accents are a mess. We migrate the extensibles from the combiners to the base accent
@@ -159,29 +115,21 @@ return {
{
tweak = "extendaccents",
},
-{
- tweak = "flattenaccents",
- squeeze = 0.8,
- height = 0.9,
- offset = 0.1,
-},
-
-{
- tweak = "radicaldegreeanchors",
- list = {
- [0x221A] = { location = "left", hfactor = .1, vfactor = .3 },
- ["0x221A.variants.*"] = { location = "left", hfactor = .1, vfactor = .625 },
- ["0x221A.variants.1"] = { location = "left", hfactor = .1, vfactor = .575 },
- -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .575 },
- -- ["0x221A.variants.3"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.15 },
- }
-},
+ {
+ tweak = "flattenaccents",
+ squeeze = 0.8,
+ height = 0.9,
+ offset = 0.1,
+ },
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ [0x221A] = { location = "left", hfactor = .1, vfactor = .3 },
+ ["0x221A.variants.*"] = { location = "left", hfactor = .1, vfactor = .625 },
+ ["0x221A.variants.1"] = { location = "left", hfactor = .1, vfactor = .575 },
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.15 },
+ }
+ },
{
tweak = "fixaccents",
@@ -198,26 +146,7 @@ return {
},
},
-- Then we deal with all offsets and heights in one go. So we treat the initial accent
- -- as well as the variants here.
- {
- tweak = "dimensions",
- list = {
- -- here we want to apply to all
- -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060
- -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4
- -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6
- -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC
- -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8
- -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA
- -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7
-
- -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF
-
- -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9
- -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8
- -- [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self)
- },
- },
+ -- as well as the variants here. But none for Bonum.
-- We now copy these to the not wide slots so that we can set these to stretch as well,
-- if only because it is less confusing and more consistent.
{
@@ -254,7 +183,6 @@ return {
[0x00394] = { left = .1, right = .1 }, -- upright Delta
[0x003A3] = { left = .1, right = .1 }, -- upright Sigma
- -- [0x0004A] = { left = .1, right = .1 }, -- J
[0x00046] = { left = .1, right = .1 }, -- F
[0x0004C] = { left = .1, right = .1 }, -- L
[0x00050] = { left = .1, right = .1 }, -- P
@@ -263,78 +191,11 @@ return {
[0x0005A] = { left = .1, right = .1 }, -- Z
[0x1D43D] = { left = -.1, right = -.1 }, -- italic J
- -- [0x1D448] = { left = -.05, right = -.05 }, -- italic U
- -- [0x1D449] = { left = -.05, right = -.05 }, -- italic V
[0x1D44B] = { left = -.05, right = -.05 }, -- italic X
-
- -- [0x1D487] = { left = -.2, right = -.2 }, -- bold italic f
- -- [0x1D489] = { left = -.2, right = -.2 }, -- bold italic h
- -- [0x1D496] = { left = -.1, right = -.1 }, -- bold italic u
- -- [0x1D499] = { left = -.1, right = -.1 }, -- bold italic x
-
- -- [0x1D711] = { left = -.1, right = -.1 }, -- italic varphi
- -- [0x1D713] = { left = -.1, right = -.1 }, -- italic psi
-
- -- [0x1D659] = { left = -.1, right = -.1 }, -- sans bold italic d
- -- [0x1D65C] = { left = -.1, right = -.1 }, -- sans bold italic g
-
- -- [0x1D409] = { left = .1, right = .1 }, -- bold upright J
- -- [0x1D412] = { left = .1, right = .1 }, -- bold upright S
-
- -- [0x1D509] = { left = .1, right = .1 }, -- fraktur F
- -- [0x1D50C] = { left = .1, right = .1 }, -- fraktur I
- -- [0x1D50D] = { left = .1, right = .1 }, -- fraktur J
- -- [0x1D51D] = { left = .1, right = .1 }, -- fraktur Z
-
- -- [0x1D538] = { left = .1, right = .1 }, -- doublestruck A
- -- [0x1D539] = { left = .1, right = .1 }, -- doublestruck B
- -- [0x1D53C] = { left = .1, right = .1 }, -- doublestruck E
- -- [0x1D53D] = { left = .1, right = .1 }, -- doublestruck F
- -- [0x1D541] = { left = .1, right = .1 }, -- doublestruck J
- -- [0x1D542] = { left = .1, right = .1 }, -- doublestruck K
- -- [0x1D543] = { left = .1, right = .1 }, -- doublestruck L
- -- [0x1D547] = { left = .1, right = .1 }, -- doublestruck P
- -- [0x1D549] = { left = .1, right = .1 }, -- doublestruck R
- -- [0x1D54A] = { left = .1, right = .1 }, -- doublestruck S
- -- [0x1D54B] = { left = .1, right = .1 }, -- doublestruck T
- -- [0x1D54D] = { left = .1, right = .1 }, -- doublestruck V
- -- [0x1D550] = { left = .1, right = .1 }, -- doublestruck Y
-
- -- [0x1D506] = { left = .1, right = .1 }, -- fraktur C
-
- -- [0x00393] = { left = .1, right = .1 }, -- upfight Gamma
- -- [0x00396] = { left = .1, right = .1 }, -- upfight Zeta
-
- -- [0x1D5D8] = { left = .1, right = .1 }, -- sans bold E
- -- [0x1D5D9] = { left = .1, right = .1 }, -- sans bold F
- -- [0x1D5DD] = { left = .2, right = .2 }, -- sans bold J -- nope
- -- [0x1D5DF] = { left = .1, right = .1 }, -- sans bold L
- -- [0x1D5E6] = { left = .1, right = .1 }, -- sans bold S
-
- -- [0x1D61A] = { left = .1, right = .1 }, -- sans italic S
-
- -- [0x1D5A2] = { left = .1, right = .1 }, -- sans C
- -- [0x1D5A4] = { left = .1, right = .1 }, -- sans E
- -- [0x1D5A5] = { left = .1, right = .1 }, -- sans F
- -- [0x1D5AB] = { left = .1, right = .1 }, -- sans L -- nope
- -- [0x1D5AF] = { left = .1, right = .1 }, -- sans P
- -- [0x1D5B2] = { left = .1, right = .1 }, -- sans S
- -- [0x1D5B9] = { left = .1, right = .1 }, -- sans Z
-
- -- [0x1D4A0] = { left = .1, right = .1 }, -- script E
- -- [0x1D4AE] = { left = .1, right = .1 }, -- script S
- -- [0x1D4B4] = { left = .1, right = .1 }, -- script Y
},
},
{
tweak = "addprivates",
- -- list = {
- -- -- for specific parameters see act file
- -- ["unary minus"] = { preset = "unary minus" },
- -- ["unary plus"] = { preset = "unary plus" },
- -- ["unary plus minus"] = { preset = "unary plus minus" },
- -- ["unary minus plus"] = { preset = "unary minus plus" },
- -- },
},
{
tweak = "addscripts",
@@ -396,21 +257,6 @@ return {
[0x1D45F] = { -- r
[0x1D460] = -.1, -- s
},
- -- [mathematics.tweaks.subsets.acenorsuvxz] = {
- -- [mathematics.tweaks.subsets.acenorsuvxz] = 2,
- -- },
- -- [0x1D452] = {
- -- [0x1D453] = -.05,
- -- [0x1D465] = -.3,
- -- },
- -- [0x1D453] = {
- -- [0x1D453] = -.1,
- -- [0x1D454] = -.1,
- -- [0x1D465] = -.3,
- -- },
- -- [0x1D465] = {
- -- [0x1D465] = .1,
- -- }
}
},
{
@@ -436,11 +282,6 @@ return {
feature = "emulatelmtx",
comment = "this is for mkiv",
},
- --
- -- {
- -- tweak = "diagnose",
- -- },
-
},
},
alternates = {
@@ -450,126 +291,4 @@ return {
1, 3, 5, 7
},
},
-}
-
--- For now we keep these commented as they show where we came from.
-
--- \alpha is looking like an italic a. The one from Dejavu could perhaps be an alternative?
--- No hvariants in 772
-
--- [0x00393] = { xoffset = -0.05, width = 0.875, italic = 0 }, -- \Gamma
--- [0x00394] = { xoffset = -0.05, width = 0.875, italic = 0 }, -- \Delta
--- [0x00398] = { xoffset = -0.05, width = 0.9, italic = 0 }, -- \Theta
--- [0x0039B] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Lambda
--- [0x0039E] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Xi
--- [0x003A0] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Pi
--- [0x003A3] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Sigma
--- [0x003A5] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Upsilon
--- [0x003A6] = { xoffset = -0.05, width = 0.9, italic = 0 }, -- \Phi
--- [0x003A8] = { xoffset = -0.05, width = 0.9, italic = 0 }, -- \Psi
--- [0x003A9] = { xoffset = -0.05, width = 0.9, italic = 0 }, -- \Omega
--- [0x02202] = { xoffset = -0.075, width = 0.825, italic = 0 }, -- \partial
--- [0x1D43A] = { xoffset = -0.1, width = 1, italic = 0 }, -- G
--- [0x1D442] = { xoffset = -0.1, width = 1, italic = 0 }, -- O
--- [0x1D444] = { xoffset = -0.05, width = 1.025, italic = 0 }, -- Q
--- [0x1D44E] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.8 }, -- a
--- [0x1D44F] = { xoffset = -0.05, width = 1.1, italic = 0 }, -- b
--- [0x1D450] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.9 }, -- c
--- [0x1D451] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.75 }, -- d
--- [0x1D452] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.9 }, -- e
--- [0x1D453] = { xoffset = 0.45, width = 1.9, italic = 0.45, anchor = 1.1 }, -- f
--- [0x1D454] = { xoffset = 0.05, width = 1.1, italic = 0, anchor = 0.9 }, -- g
--- [0x0210E] = { xoffset = -0.1, width = 1.05, italic = 0, anchor = 1.15 }, -- h
--- [0x1D456] = { xoffset = -0.2, width = 1.1, italic = 0 }, -- i
--- [0x1D457] = { xoffset = 0.6, width = 1.7, italic = 0.45 }, -- j
--- [0x1D458] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 1.15 }, -- k
--- [0x1D459] = { xoffset = -0.15, width = 1.1, italic = 0, anchor = 0.8 }, -- l
--- [0x1D45A] = { xoffset = -0.05, width = 1, italic = 0 }, -- m
--- [0x1D45B] = { xoffset = -0.1, width = 1, italic = 0, anchor = 0.9 }, -- n
--- [0x1D45C] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.9 }, -- o
--- [0x1D45D] = { width = 1.05, italic = 0 }, -- p
--- [0x1D45E] = { xoffset = -0.05, width = 1.05, italic = 0, anchor = 0.9 }, -- q
--- [0x1D45F] = { xoffset = -0.1, width = 1.15, italic = 0, anchor = 0.9 }, -- r
--- [0x1D460] = { xoffset = -0.05, width = 1.05, italic = 0 }, -- s
--- [0x1D461] = { xoffset = -0.15, width = 1.2, italic = 0, anchor = 0.9 }, -- t
--- [0x1D462] = { xoffset = -0.1, width = 1.05, italic = 0, anchor = 0.85 }, -- u
--- [0x1D463] = { xoffset = -0.1, width = 1.05, italic = 0, anchor = 0.85 }, -- v
--- [0x1D464] = { xoffset = -0.05, width = 1.05, italic = 0, anchor = 0.95 }, -- w
--- [0x1D465] = { width = 1.175, italic = 0, anchor = 0.9 }, -- x
--- [0x1D466] = { xoffset = -0.05, width = 1.05, italic = 0 }, -- y
--- [0x1D467] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.9 }, -- z
--- [0x1D6FC] = { xoffset = -0.075, width = 0.825, italic = 0 }, -- \alpha
--- [0x1D6FD] = { width = 0.9, italic = 0, anchor = 1.05 }, -- \beta
--- [0x1D6FE] = { xoffset = -0.075, width = 0.85, italic = 0.05, anchor = 1.05 }, -- \gamma
--- [0x1D6FF] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \delta
--- [0x1D716] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \epsilon
--- [0x1D700] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \varepsilon
--- [0x1D701] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \zeta
--- [0x1D702] = { xoffset = -0.1, width = 0.85, italic = 0, anchor = 1.05 }, -- \eta
--- [0x1D703] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \theta
--- [0x1D717] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \vartheta
--- [0x1D704] = { xoffset = -0.1, width = 0.9, italic = 0, anchor = 1.05 }, -- \iota
--- [0x1D705] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \kappa
--- [0x1D706] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.05 }, -- \lambda
--- [0x1D707] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \mu
--- [0x1D708] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \nu
--- [0x1D709] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \xi
--- [0x1D70A] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \omicron
--- [0x1D70B] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \pi
--- [0x1D71B] = { xoffset = -0.07, width = 0.85, italic = 0 }, -- \varpi
--- [0x1D70C] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \rho
--- [0x1D71A] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \varrho
--- [0x1D70D] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.02 }, -- \varsigma
--- [0x1D70E] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \sigma
--- [0x1D70F] = { xoffset = -0.08, width = 0.85, italic = 0, anchor = 1.05 }, -- \tau
--- [0x1D710] = { xoffset = -0.08, width = 0.85, italic = 0, anchor = 1.03 }, -- \upsilon
--- [0x1D719] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \phi
--- [0x1D711] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.02 }, -- \varphi
--- [0x1D712] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \chi
--- [0x1D713] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \psi
--- [0x1D714] = { xoffset = -0.05, width = 0.875, italic = 0 }, -- \omega
--- -- [0x1D718] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \varkappa
--- [0x1D719] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \phi
--- [0x1D41B] = { width = 1, italic = 0, anchor = 1.5 }, -- bold lowercase upright b
--- [0x1D41D] = { width = 1, italic = 0, anchor = 0.6 }, -- bold lowercase upright d
--- [0x1D41F] = { width = 1.25, italic = 0, anchor = 0.8 }, -- bold lowercase upright f
--- [0x1D420] = { width = 1, italic = 0, anchor = 0.6 }, -- bold lowercase upright g
--- [0x1D421] = { width = 1, italic = 0, anchor = 1.5 }, -- bold lowercase upright h
--- [0x1D424] = { width = 1, italic = 0, anchor = 1.5 }, -- bold lowercase upright k
--- [0x1D425] = { width = 1, italic = 0, anchor = 0.75 }, -- bold lowercase upright l
--- [0x1D42A] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase upright q
--- [0x1D42B] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase upright r
--- [0x1D42C] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase upright s
--- -- [0x1D482] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic a
--- -- [0x1D483] = { width = 1, italic = 0, anchor = 1.1 }, -- bold lowercase italic b
--- -- [0x1D484] = { width = 1, italic = 0, anchor = 0.95 }, -- bold lowercase italic c
--- -- [0x1D485] = { width = 1, italic = 0, anchor = 0.75 }, -- bold lowercase italic d
--- -- [0x1D486] = { width = 1, italic = 0, anchor = 0.95 }, -- bold lowercase italic e
--- -- [0x1D487] = { width = 1, italic = 0, anchor = 0.95 }, -- bold lowercase italic f
--- -- [0x1D488] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic g
--- -- [0x1D489] = { width = 1, italic = 0, anchor = 1.2 }, -- bold lowercase italic h
--- -- [0x1D48A] = { width = 1, italic = 0, anchor = 0.6 }, -- bold lowercase italic i
--- -- [0x1D48B] = { width = 1, italic = 0, anchor = 0.8 }, -- bold lowercase italic j
--- -- [0x1D48C] = { width = 1, italic = 0, anchor = 1.2 }, -- bold lowercase italic k
--- -- [0x1D48D] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic l
--- -- [0x1D492] = { width = 1, italic = 0, anchor = 0.85 }, -- bold lowercase italic q
--- -- [0x1D493] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic r
--- -- [0x1D497] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic v
--- -- [0x1D499] = { width = 1.1, italic = 0, anchor = 0.9 }, -- bold lowercase italic x
--- -- [0x1D49A] = { width = 1, italic = 0, anchor = 0.95 }, -- bold lowercase italic y
--- -- [0x1D49B] = { width = 1, italic = 0, anchor = 1.1 }, -- bold lowercase italic z
--- [0x1D743] = { width = 1, italic = 0, anchor = 1.7 }, -- bold lowercase italic greek xi
--- -- [0x1D435] = { anchor = 1.05 }, -- italic B
--- -- [0x1D436] = { xoffset = -0.1, anchor = 0.7 }, -- italic C
--- -- [0x1D437] = { anchor = 1.25 }, -- italic D
--- -- [0x1D43A] = { anchor = 0.8 }, -- italic G
--- -- [0x1D442] = { anchor = 0.85 }, -- italic O
--- -- [0x1D443] = { anchor = 1.1 }, -- italic P
--- -- [0x1D444] = { anchor = 0.85 }, -- italic Q
--- -- [0x1D445] = { xoffset = -0.025, width = 1.05, anchor = 1.05 }, -- italic R
--- -- [0x1D446] = { xoffset = -0.05, anchor = 0.85 }, -- italic S
--- -- [0x1D447] = { xoffset = -0.05, width = 1.05, italic = 0.7, anchor = 0.9, }, -- italic T
--- -- [0x1D448] = { xoffset = -0.125, italic = 0.3, anchor = 0.9, }, -- italic U
--- -- [0x1D449] = { xoffset = -0.125, italic = 0.3, anchor = 0.9, }, -- italic V
--- -- [0x1D44A] = { xoffset = -0.075, italic = 0.3, anchor = 0.9, }, -- italic W
--- -- [0x1D44C] = { xoffset = -0.075, width = 1.1, italic = 0.35, anchor = 0.9, }, -- italic Y
+} \ No newline at end of file
diff --git a/tex/context/fonts/mkiv/cambria-math.lfg b/tex/context/fonts/mkiv/cambria-math.lfg
index e4791fc79..84c4d0070 100644
--- a/tex/context/fonts/mkiv/cambria-math.lfg
+++ b/tex/context/fonts/mkiv/cambria-math.lfg
@@ -9,22 +9,12 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 1000,
- -- AccentTopShiftUp = 0,
- -- FlattenedAccentTopShiftUp = 0,
- -- AccentExtendMargin = 50,
- AccentBaseDepth = 300,
- -- RadicalDegreeBottomRaisePercent = 65,
- -- RadicalKernAfterDegree = -900,
- -- RadicalRuleThickness = 128, -- 133 in font
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- DisplayOperatorMinHeight = 2800, -- 2500 in font
- -- PrimeRaisePercent = 0, -- set to 0 in math-act
- -- PrimeRaiseComposedPercent = 25, -- set to 0 in math-act
- PrimeShiftUp = "1.25*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.25*SuperscriptShiftUp",
+ AccentBaseDepth = 300,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ DisplayOperatorMinHeight = 2800, -- 2500 in font
+ PrimeShiftUp = "1.25*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.25*SuperscriptShiftUp",
},
tweaks = {
aftercopying = {
@@ -50,9 +40,6 @@ return {
list = {
[0x002F] = { topleft = -0.2, bottomright = -0.2 },
["0x002F.variants.*"] = { topleft = -0.2, bottomright = -0.2 },
- -- No!
- -- [0x0028] = { topleft = -0.1, bottomleft = -0.1 }, -- left parenthesis
- -- [0x0029] = { topright = -0.1, bottomright = -0.1, all = true }, -- right parenthesis
--
[0x007D] = { topright = -0.05, bottomright = -0.05 }, -- right brace variants
["0x7D.variants.*"] = { topright = -0.10, bottomright = -0.10 }, -- right brace variants
@@ -61,7 +48,7 @@ return {
[0x0029] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
["0x29.parts.top"] = { topright = -0.15, }, -- right parenthesis top
- ["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom
+ ["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom
[0x221A] = { topright = 0.2, bottomright = 0.2 }, -- radical
["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
["0x221A.parts.top"] = { topright = 0.2, },
@@ -72,16 +59,6 @@ return {
["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
-- Keep as example. not needed in cambria (after all it is the reference):
[0x2A0C] = { bottomright = -0.1 }, -- iiiint does not have any ic
-
- -- ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom,
- -- ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom,
- -- ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom,
- -- ["0x222E.variants.*"] = integral_variants, ["0x222E.parts.top"] = integral_top, ["0x222E.parts.bottom"] = integral_bottom,
- -- ["0x222F.variants.*"] = integral_variants, ["0x222F.parts.top"] = integral_top, ["0x222F.parts.bottom"] = integral_bottom,
- -- ["0x2230.variants.*"] = integral_variants, ["0x2230.parts.top"] = integral_top, ["0x2230.parts.bottom"] = integral_bottom,
- -- ["0x2231.variants.*"] = integral_variants, ["0x2231.parts.top"] = integral_top, ["0x2231.parts.bottom"] = integral_bottom,
- -- ["0x2232.variants.*"] = integral_variants, ["0x2232.parts.top"] = integral_top, ["0x2232.parts.bottom"] = integral_bottom,
- -- ["0x2233.variants.*"] = integral_variants, ["0x2233.parts.top"] = integral_top, ["0x2233.parts.bottom"] = integral_bottom,
},
},
@@ -91,22 +68,19 @@ return {
{
tweak = "extendaccents",
},
-{
- tweak = "radicaldegreeanchors",
- list = {
- [0x221A] = { location = "left", hfactor = -0.15, vfactor = .75 },
- ["0x221A.variants.*"] = { location = "left", hfactor = -0.1, vfactor = .15 },
- ["0x221A.variants.1"] = { location = "left", hfactor = -0.1, vfactor = .55 },
- ["0x221A.variants.2"] = { location = "left", hfactor = -0.1, vfactor = .375 },
- ["0x221A.variants.3"] = { location = "left", hfactor = -0.1, vfactor = .275 },
- ["0x221A.variants.4"] = { location = "left", hfactor = -0.1, vfactor = .22 },
- ["0x221A.variants.5"] = { location = "left", hfactor = -0.1, vfactor = .175 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = -0.1, vfactor = 0.95 },
- }
-},
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ [0x221A] = { location = "left", hfactor = -0.15, vfactor = .75 },
+ ["0x221A.variants.*"] = { location = "left", hfactor = -0.1, vfactor = .15 },
+ ["0x221A.variants.1"] = { location = "left", hfactor = -0.1, vfactor = .55 },
+ ["0x221A.variants.2"] = { location = "left", hfactor = -0.1, vfactor = .375 },
+ ["0x221A.variants.3"] = { location = "left", hfactor = -0.1, vfactor = .275 },
+ ["0x221A.variants.4"] = { location = "left", hfactor = -0.1, vfactor = .22 },
+ ["0x221A.variants.5"] = { location = "left", hfactor = -0.1, vfactor = .175 },
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = -0.1, vfactor = 0.95 },
+ }
+ },
{
tweak = "fixaccents",
},
@@ -127,18 +101,6 @@ return {
tweak = "dimensions",
list = {
-- here we want to apply to all
- -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060
- -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4
- -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6
- -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC
- -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8
- -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA
- -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7
-
- -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF
-
- -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9
- -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8
[0x020DB] = { yoffset = -0.03, height = .95, all = true }, -- widedddot : 0x20DB (self)
},
},
@@ -151,8 +113,6 @@ return {
{
tweak = "fixprimes",
- -- scale = 1.0,
- -- smaller = true,
factor = 0.83,
fake = 0.8,
},
@@ -165,16 +125,6 @@ return {
{
tweak = "accentdimensions",
list = { "over", "under" },
- -- list = {
- -- [0x203E] = { factor = "over" }, -- overbar
- -- [0x203E] = { factor = "under" }, -- underbar
- -- [0x23DE] = { factor = "over" }, -- overbrace
- -- [0x23DF] = { factor = "under" }, -- underbrace
- -- [0x23DC] = { factor = "over" }, -- overparent
- -- [0x23DD] = { factor = "under" }, -- underparent
- -- [0x23B4] = { factor = "over" }, -- overbracket
- -- [0x23B5] = { factor = "under" }, -- underbracket
- -- }
},
{
tweak = "addrules",
@@ -205,9 +155,6 @@ return {
{
tweak = "addprimed",
},
- -- { -- the ldots are squareshaped and the cdots are circular
- -- tweak = "fixellipses",
- -- },
},
},
bigslots = {
@@ -215,36 +162,3 @@ return {
},
},
}
-
--- For now we keep these commented as they show where we came from.
-
--- {
--- tweak = "dimensions",
--- list = {
--- -- [0x00060] = { yoffset = -0.1 }, -- grave
--- -- [0x000B4] = { yoffset = -0.1 }, -- acute
--- -- [0x002C6] = { yoffset = -0.1 }, -- hat
--- -- [0x002DC] = { yoffset = -0.1 }, -- tilde
--- -- [0x000AF] = { yoffset = -0.1 }, -- bar
--- -- [0x002D8] = { yoffset = -0.15 }, -- breve
--- -- [0x002D9] = { yoffset = -0.15 }, -- dot
--- -- [0x000A8] = { yoffset = -0.1 }, -- ddot
--- -- [0x020DB] = { yoffset = -0.05 }, -- dddot
--- -- [0x002C7] = { yoffset = -0.1 }, -- check
--- -- [0x020D7] = { yoffset = -0.05 }, -- vec
--- -- [0x00300] = { yoffset = -0.12, all=true }, -- widegrave
--- -- [0x00301] = { yoffset = -0.12, all=true }, -- wideacute
--- -- [0x00302] = { yoffset = -0.12, all=true }, -- widehat
--- -- [0x00303] = { yoffset = -0.12, all=true }, -- widetilde
--- -- [0x00304] = { yoffset = -0.12, all=true }, -- widebar
--- -- [0x00306] = { yoffset = -0.12, all=true }, -- widebreve
--- -- [0x00307] = { yoffset = -0.025, all=true }, -- widedot
--- -- [0x00308] = { yoffset = -0.025, all=true }, -- wideddot
--- -- [0x020DB] = { yoffset = -0.1, all=true }, -- widedddot
--- -- [0x0030A] = { yoffset = -0.12, all=true }, -- widering
--- -- [0x0030C] = { yoffset = -0.12, all=true }, -- widecheck
--- [0x1D43D] = { xoffset = 0.25, width = 1.15, italic = 0.2 }, -- J
--- [0x1D487] = { anchor = 0.8 }, -- bold lower case italic f
--- -- [0x1D487] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- bold lower case italic f
--- },
--- },
diff --git a/tex/context/fonts/mkiv/common-math.lfg b/tex/context/fonts/mkiv/common-math.lfg
index d2785b3b2..5074c83ec 100644
--- a/tex/context/fonts/mkiv/common-math.lfg
+++ b/tex/context/fonts/mkiv/common-math.lfg
@@ -18,12 +18,12 @@ return {
feature = "scripttocalligraphic",
list = {
{
- source = "uppercasescript",
- target = "uppercasecalligraphic",
+ source = "uppercasescript",
+ target = "uppercasecalligraphic",
},
{
- source = "uppercaseboldscript",
- target = "uppercaseboldcalligraphic",
+ source = "uppercaseboldscript",
+ target = "uppercaseboldcalligraphic",
},
},
}
@@ -110,6 +110,20 @@ return {
},
}
end,
+ braille = function(parameters)
+ return {
+ tweak = "replacealphabets",
+ feature = "braille",
+ list = {
+ {
+ source = "braillepatterns",
+ target = "braillepatterns",
+ filename = "dejavuserif.ttf",
+ rscale = parameters.rscale,
+ },
+ },
+ }
+ end,
xitsarabic = function(parameters)
return {
tweak = "replacealphabets",
diff --git a/tex/context/fonts/mkiv/concrete-math.lfg b/tex/context/fonts/mkiv/concrete-math.lfg
index d0fc5749f..b69ee0103 100644
--- a/tex/context/fonts/mkiv/concrete-math.lfg
+++ b/tex/context/fonts/mkiv/concrete-math.lfg
@@ -9,15 +9,11 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 900,
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- -- DisplayOperatorMinHeight = 1800, -- 1400 in font (one size)
- -- PrimeRaisePercent = 0, -- set to 0 in math-act
- -- PrimeRaiseComposedPercent = 25, -- set to 0 in math-act
- PrimeShiftUp = "1.2*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.2*SuperscriptShiftUp",
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ PrimeShiftUp = "1.2*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.2*SuperscriptShiftUp",
+ PrimeBaselineDropMax = "0.5*SuperscriptBaselineDropMax",
},
tweaks = {
aftercopying = {
@@ -25,13 +21,9 @@ return {
tweak = "fixprimes",
factor = 0.92,
},
- -- there are circular variants
--- {
--- tweak = "addmirrors",
--- },
-{
- tweak = "fixintegrals",
-},
+ {
+ tweak = "fixintegrals",
+ },
presets.scripttocalligraphic { },
presets.rsfstoscript { },
presets.rsfsuprighttoscript { },
@@ -53,9 +45,6 @@ return {
list = {
[0x002F] = { topleft = -0.2, bottomright = -0.2 },
["0x002F.variants.*"] = { topleft = -0.2, bottomright = -0.2 },
- -- No!
- -- [0x0028] = { topleft = -0.1, bottomleft = -0.1 }, -- left parenthesis
- -- [0x0029] = { topright = -0.1, bottomright = -0.1, all = true }, -- right parenthesis
--
[0x007D] = { topright = -0.05, bottomright = -0.05 }, -- right brace variants
["0x7D.variants.*"] = { topright = -0.25, bottomright = -0.25 }, -- right brace variants
@@ -64,7 +53,7 @@ return {
[0x0029] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
["0x29.parts.top"] = { topright = -0.15, }, -- right parenthesis top
- ["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom
+ ["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom
[0x221A] = { topright = 0.2, bottomright = 0.2 }, -- radical
["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
["0x221A.parts.top"] = { topright = 0.2, },
@@ -84,24 +73,12 @@ return {
[0x00393] = { width = 0.875, }, -- upright Gamma
},
},
-
-
-{
- tweak = "radicaldegreeanchors",
- list = {
- -- [0x221A] = { location = "left", hfactor = .1, vfactor = .3 },
- -- ["0x221A.variants.*"] = { location = "left", hfactor = .1, vfactor = .625 },
- -- ["0x221A.variants.1"] = { location = "left", hfactor = .1, vfactor = .575 },
- -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .575 },
- -- ["0x221A.variants.3"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = .0, vfactor = 1.075 },
- }
-},
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = .0, vfactor = 1.075 },
+ }
+ },
{
tweak = "fixellipses",
},
diff --git a/tex/context/fonts/mkiv/dejavu-math.lfg b/tex/context/fonts/mkiv/dejavu-math.lfg
index af6a4bd55..fb7368b0f 100644
--- a/tex/context/fonts/mkiv/dejavu-math.lfg
+++ b/tex/context/fonts/mkiv/dejavu-math.lfg
@@ -12,27 +12,19 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 900,
- FractionRuleThickness = 60,
- AccentTopShiftUp = -25,
- FlattenedAccentTopShiftUp = -25,
- -- AccentExtendMargin = 50,
- AccentBaseDepth = 30,
- -- RadicalDegreeBottomRaisePercent = 62,
- -- RadicalRuleThickness = 46, -- 52 in font
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- DisplayOperatorMinHeight = 1800, -- 1333 in font
- -- ScriptPercentScaleDown = 70, -- 80 in font (set in typescript)
- -- ScriptScriptPercentScaleDown = 55, -- 65 in font (set in typescript)
- SubscriptShiftDown = 177, -- 277 in font
- SuperscriptShiftUp = 428, -- 381 in font
+ FractionRuleThickness = 60,
+ AccentTopShiftUp = -25,
+ FlattenedAccentTopShiftUp = -25,
+ AccentBaseDepth = 30,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ DisplayOperatorMinHeight = 1800, -- 1333 in font
+ SubscriptShiftDown = 177, -- 277 in font
+ SuperscriptShiftUp = 428, -- 381 in font
SubscriptShiftDownWithSuperscript = "1.3*SubscriptShiftDown", -- trial and error
- -- PrimeRaisePercent = 50, -- 50 default
- -- PrimeRaiseComposedPercent = 10, -- 25 default
- PrimeShiftUp = "1.4*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.4*SuperscriptShiftUp",
+ PrimeShiftUp = "1.4*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.4*SuperscriptShiftUp",
+ PrimeBaselineDropMax = "0.5*SuperscriptBaselineDropMax",
},
tweaks = {
aftercopying = {
@@ -48,6 +40,7 @@ return {
tweak = "addmirrors",
},
presets.scripttocalligraphic { },
+ presets.braille { },
presets.rsfstoscript { rscale = 1.02 },
presets.rsfsuprighttoscript { rscale = 1.02 },
presets.moderntocalligraphic { rscale = 1.02 },
@@ -94,16 +87,6 @@ return {
["0x222C.parts.bottom"] = { bottomright = -0.15 }, -- iint
["0x222D.parts.bottom"] = { bottomright = -0.10 }, -- iiint
["0x2A0C.parts.bottom"] = { bottomright = -0.05 }, -- iiiint
- -- ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom,
- -- ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom,
- -- ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom,
- -- ["0x222E.variants.*"] = integral_variants, ["0x222E.parts.top"] = integral_top, ["0x222E.parts.bottom"] = integral_bottom,
- -- ["0x222F.variants.*"] = integral_variants, ["0x222F.parts.top"] = integral_top, ["0x222F.parts.bottom"] = integral_bottom,
- -- ["0x2230.variants.*"] = integral_variants, ["0x2230.parts.top"] = integral_top, ["0x2230.parts.bottom"] = integral_bottom,
- -- ["0x2231.variants.*"] = integral_variants, ["0x2231.parts.top"] = integral_top, ["0x2231.parts.bottom"] = integral_bottom,
- -- ["0x2232.variants.*"] = integral_variants, ["0x2232.parts.top"] = integral_top, ["0x2232.parts.bottom"] = integral_bottom,
- -- ["0x2233.variants.*"] = integral_variants, ["0x2233.parts.top"] = integral_top, ["0x2233.parts.bottom"] = integral_bottom,
-
},
},
-- Accents are a mess. We migrate the extensibles from the combiners to the base accent
@@ -112,24 +95,16 @@ return {
{
tweak = "extendaccents",
},
-
-
-{
- tweak = "radicaldegreeanchors",
- list = {
- [0x221A] = { location = "left", hfactor = .1, vfactor = .65 },
- ["0x221A.variants.*"] = { location = "left", hfactor = .1, vfactor = .6 },
- ["0x221A.variants.1"] = { location = "left", hfactor = .1, vfactor = .65 },
- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .65 },
- -- ["0x221A.variants.3"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.1 },
- }
-},
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ [0x221A] = { location = "left", hfactor = .1, vfactor = .65 },
+ ["0x221A.variants.*"] = { location = "left", hfactor = .1, vfactor = .6 },
+ ["0x221A.variants.1"] = { location = "left", hfactor = .1, vfactor = .65 },
+ ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .65 },
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.1 },
+ }
+ },
{
tweak = "fixaccents",
},
@@ -149,17 +124,6 @@ return {
{
tweak = "dimensions",
list = {
- -- here we want to apply to all
- -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060
- -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4
- -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6
- -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC
- -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8
- -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA
- -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7
- -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF
- -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9
- -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8
[0x020DB] = { yoffset = 0.015, height = .95, all = true }, -- widedddot : 0x20DB (self)
},
},
@@ -214,22 +178,5 @@ return {
bigslots = {
1, 3, 5, 7
},
- -- --
- -- -- experimental fixes for mkiv:
- -- --
- -- dimensions = dimensions,
- -- kerns = kerns,
},
}
-
--- For now we keep these commented as they show where we came from.
-
--- {
--- tweak = "dimensions",
--- list = {
--- [0x1D44E] = { width = 1, italic = 0, anchor = 0.9 }, -- a
--- -- [0x1D449] = { width = .8, italic = .2 },
--- -- [0x1D44A] = { width = .8, italic = .2 },
--- ["0x1D449:0x1D44A"] = { width = .8, italic = .2 },
--- }
--- },
diff --git a/tex/context/fonts/mkiv/ebgaramond-math.lfg b/tex/context/fonts/mkiv/ebgaramond-math.lfg
index 43bafadd1..d5d31c73f 100644
--- a/tex/context/fonts/mkiv/ebgaramond-math.lfg
+++ b/tex/context/fonts/mkiv/ebgaramond-math.lfg
@@ -9,28 +9,21 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 1200,
- FractionRuleThickness = 60,
- OverbarRuleThickness = 60,
- UnderbarRuleThickness = 60,
- AccentTopShiftUp = -75,
- FlattenedAccentTopShiftUp = -75,
- -- AccentExtendMargin = 50,
- -- AccentBaseHeight = 0,
- AccentBaseDepth = 75,
- -- RadicalRuleThickness = 50, -- 50 in font
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
+ FractionRuleThickness = 60,
+ OverbarRuleThickness = 60,
+ UnderbarRuleThickness = 60,
+ AccentTopShiftUp = -75,
+ FlattenedAccentTopShiftUp = -75,
+ AccentBaseDepth = 75,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
SubscriptShiftDown = 200, -- 250 in font
SuperscriptShiftUp = 400, -- 430 in font
SubscriptShiftDownWithSuperscript = "1.25*SubscriptShiftDown", -- trial and error
SubSuperscriptGapMin = 200, -- 250 in font
- -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
- -- PrimeRaisePercent = 0, -- set to 0 in math-act
- -- PrimeRaiseComposedPercent = 25, -- set to 0 in math-act
- PrimeShiftUp = "1.2*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.2*SuperscriptShiftUp",
+ PrimeShiftUp = "1.2*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.2*SuperscriptShiftUp",
+ PrimeBaselineDropMax = "0.5*SuperscriptBaselineDropMax",
},
tweaks = {
aftercopying = {
@@ -40,10 +33,7 @@ return {
},
{
tweak = "fixprimes",
- -- scale = 1,
- -- smaller = true,
factor = 0.73,
- -- fake = 0.75,
},
{
tweak = "addmirrors",
@@ -71,7 +61,6 @@ return {
{
tweak = "dimensions",
list = {
- -- for older entries, see bottom of file
[0x1D453] = { width = 1.1 }, -- italic f
},
},
@@ -142,10 +131,6 @@ return {
[mathematics.tweaks.subsets.f] = -.25,
[0x1D70C] = -.25, -- italic \rho
},
- -- ["uppercaseitalic"] = {
- -- [mathematics.tweaks.subsets.f] = -.25,
- -- [0x1D70C] = -.25, -- italic \rho
- -- },
},
},
-- Accents are a mess. We migrate the extensibles from the combiners to the base accent
@@ -153,60 +138,17 @@ return {
-- accent anchor offset). First we copy and fix.
{
tweak = "extendaccents",
- -- all = true,
--- all = 5,
},
-{
- tweak = "radicaldegreeanchors",
- list = {
- -- [0x221A] = { location = "left", hfactor = .1, vfactor = .3 },
- -- ["0x221A.variants.*"] = { location = "left", hfactor = .1, vfactor = .625 },
- -- ["0x221A.variants.1"] = { location = "left", hfactor = .1, vfactor = .575 },
- -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .575 },
- -- ["0x221A.variants.3"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = .0, vfactor = 1.0 },
- }
-},
- -- {
- -- tweak = "fixanchors",
- -- },
- -- First we set the dimensions of the initial accent which started out as zero but we want
- -- a proper width.
{
- tweak = "dimensions",
- list = {
- -- [0x00302] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widehat
- -- [0x00303] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widetilde
- -- [0x00306] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widebreve
- -- [0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck
- },
+ tweak = "radicaldegreeanchors",
+ list = {
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = .0, vfactor = 1.0 },
+ }
},
+ -- First we set the dimensions of the initial accent which started out as zero but we want
+ -- a proper width. None in ebgaramond.
-- Then we deal with all offsets and heights in one go. So we treat the initial accent
- -- as well as the variants here.
- {
- tweak = "dimensions",
- list = {
- -- here we want to apply to all
- -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060
- -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4
- -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6
- -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC
- -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8
- -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA
- -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7
-
- -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF
-
- -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9
- -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8
- -- [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self)
- },
- },
+ -- as well as the variants here. None in ebgaramond
-- We now copy these to the not wide slots so that we can set these to stretch as well,
-- if only because it is less confusing and more consistent.
{
@@ -267,79 +209,3 @@ return {
},
},
}
-
--- For now we keep these commented as they show where we came from.
-
--- {
--- tweak = "dimensions",
--- list = {
--- -- offset width italic
--- -- -- [0x00060] = { yoffset = -0.1 }, -- grave
--- -- -- [0x000B4] = { yoffset = -0.1 }, -- acute
--- -- [0x002C6] = { yoffset = -0.1 }, -- hat
--- -- [0x002DC] = { yoffset = -0.1 }, -- tilde
--- -- -- [0x000AF] = { yoffset = -0.1 }, -- bar
--- -- [0x002D8] = { yoffset = -0.15 }, -- breve
--- -- [0x002D9] = { yoffset = -0.15 }, -- dot
--- -- -- [0x000A8] = { yoffset = -0.1 }, -- ddot
--- -- [0x020DB] = { yoffset = -0.115 }, -- dddot
--- -- [0x002C7] = { yoffset = -0.1 }, -- check
--- -- [0x020D7] = { yoffset = -0.1 }, -- vec
-
--- -- [0x00300] = { yoffset = -0.12 , all = true }, -- widegrave
--- -- [0x00301] = { yoffset = -0.12 , all = true }, -- wideacute
--- -- [0x00302] = { yoffset = -0.12 , all = true }, -- widehat
--- -- [0x00303] = { yoffset = -0.12 , all = true }, -- widetilde
--- -- [0x00304] = { yoffset = -0.12 , all = true }, -- widebar
--- -- [0x00306] = { yoffset = -0.12 , all = true }, -- widebreve
--- -- [0x00307] = { yoffset = -0.12 , all = true }, -- widedot
--- -- [0x00308] = { yoffset = -0.12 , all = true }, -- wideddot
--- -- -- [0x020DB] = { yoffset = -0.1 , all = true }, -- widedddot
--- -- [0x0030A] = { yoffset = -0.12 , all = true }, -- widering
--- -- [0x0030C] = { yoffset = -0.12 , all = true }, -- widecheck
-
--- -- [0x002C6] = { scale =.85, yoffset = .1, width = .85, height = .935 }, -- hat
--- [0x00393] = { xoffset = 0.05, width = 1.05, italic = 0.075 }, -- \Gamma
--- -- [0x003A6] = { xoffset = 0.05, width = 1.05, italic = 0 }, -- \Phi difficult!
--- [0x003A8] = { xoffset = 0.05, width = 1.05, italic = 0.075 }, -- \Psi
--- [0x02113] = { width = 1, italic = 0.075 }, -- \ell
--- [0x1D436] = { width = 1, italic = 0.05 }, -- C
--- [0x1D43D] = { xoffset = 0.3, width = 1.4, italic = 0.1 }, -- J
--- [0x1D44B] = { width = 1, italic = 0.05 }, -- X
--- [0x1D44F] = { width = 1, italic = 0, }, -- b
--- [0x1D450] = { width = 1.1, italic = 0 }, -- c
--- [0x1D451] = { width = 1, italic = 0.05, }, -- d
--- [0x1D452] = { width = 1.1, italic = 0.05 }, -- e
--- [0x00066] = { width = 1.4, italic = 0.0, }, -- f
--- [0x1D453] = { xoffset = 0.15, width = 1.15, italic = 0.1, }, -- f
--- [0x1D454] = { xoffset = 0.1, width = 1.2, italic = 0.1 }, -- g
--- [0x0210E] = { width = 1.1, italic = 0, }, -- h
--- [0x1D457] = { xoffset = 0.2, width = 1.25, italic = 0.05 }, -- j
--- [0x1D458] = { width = 1, italic = 0, }, -- k
--- [0x1D459] = { width = 1, italic = 0.05 }, -- l
--- [0x1D45D] = { xoffset = 0.15, width = 1.15, italic = 0, }, -- p
--- [0x1D45E] = { width = 1.05, italic = 0 }, -- q
--- [0x1D45F] = { width = 1.05, italic = 0 }, -- r
--- [0x1D461] = { width = 1, italic = 0.1 }, -- t
--- [0x1D465] = { xoffset = 0.05, width = 1.1, italic = 0.05 }, -- x
--- [0x1D466] = { xoffset = 0.2, width = 1.2, italic = 0, }, -- y
--- [0x1D6FD] = { xoffset = 0.05, width = 1.1, italic = 0.05 }, -- \beta
--- [0x1D6FE] = { width = 1.05, italic = 0 }, -- \gamma
--- [0x1D6FF] = { width = 1, italic = 0.1 }, -- \delta
--- [0x1D716] = { width = 1.1, italic = 0 }, -- \epsilon
--- [0x1D700] = { width = 1.1, italic = 0 }, -- \varepsilon
--- [0x1D701] = { width = 1, italic = 0.15 }, -- \zeta
--- [0x1D703] = { width = 1, italic = 0.1 }, -- \theta
--- [0x1D705] = { width = 1, italic = 0.1 }, -- \kappa
--- [0x1D706] = { xoffset = 0.05, width = 1.1, italic = 0 }, -- \lambda
--- [0x1D707] = { xoffset = 0.05, width = 1.05, italic = 0 }, -- \mu
--- [0x1D708] = { width = 1.1, italic = 0 }, -- \nu
--- [0x1D709] = { width = 1.1, italic = 0 }, -- \xi
--- [0x1D70B] = { width = 1.05, italic = 0 }, -- \pi
--- [0x1D70C] = { xoffset = 0.2, width = 1.2, italic = 0 }, -- \rho
--- [0x1D70E] = { width = 1, italic = 0.1 }, -- \sigma
--- [0x1D70F] = { xoffset = 0.05, width = 1.05, italic = 0.1 }, -- \tau
--- [0x1D712] = { xoffset = 0.15, width = 1.2, italic = 0.05 }, -- \chi
--- [0x1D713] = { xoffset = 0.05, width = 1.05, italic = 0.05 }, -- \psi
--- },
--- },
diff --git a/tex/context/fonts/mkiv/erewhon-math.lfg b/tex/context/fonts/mkiv/erewhon-math.lfg
index 0cb72d149..54cc687fa 100644
--- a/tex/context/fonts/mkiv/erewhon-math.lfg
+++ b/tex/context/fonts/mkiv/erewhon-math.lfg
@@ -12,43 +12,35 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 900,
- -- AccentBaseHeight = 0,
- AccentBaseDepth = 60,
- -- RadicalDegreeBottomRaisePercent = 55,
- -- RadicalKernAfterDegree = -600,
- -- RadicalRuleThickness = 45, -- 55 in font
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- -- DisplayOperatorMinHeight = 1800, -- 1300 in font (one size)
- SubscriptShiftDown = 200, -- 220 in font
- SuperscriptShiftUp = 400, -- 400 in font
+ AccentBaseDepth = 60,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ SubscriptShiftDown = 200, -- 220 in font
+ SuperscriptShiftUp = 400, -- 400 in font
SubscriptShiftDownWithSuperscript = "1.2*SubscriptShiftDown", -- unclear original value, trial and error
- PrimeShiftUp = "1.1*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.1*SuperscriptShiftUp",
+ PrimeShiftUp = "1.1*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.1*SuperscriptShiftUp",
+ PrimeBaselineDropMax = "0.5*SuperscriptBaselineDropMax",
},
tweaks = {
aftercopying = {
{
- tweak = "fixprimes",
- -- smaller = true, -- replace multiples
- factor = 0.94 ,
- -- scale = 1.0,
- fake = 0.85, -- replace multiples with this width proportion
+ tweak = "fixprimes",
+ factor = 0.94 ,
+ fake = 0.85, -- replace multiples with this width proportion
},
{
tweak = "addmirrors",
},
-{
- tweak = "dimensions",
- list = {
- ["0x222B.variants.*"] = { axis = .15 },
- },
-},
-{
- tweak = "fixintegrals",
-},
+ {
+ tweak = "dimensions",
+ list = {
+ ["0x222B.variants.*"] = { axis = .15 },
+ },
+ },
+ {
+ tweak = "fixintegrals",
+ },
presets.scripttocalligraphic { },
presets.rsfstoscript { },
presets.rsfsuprighttoscript { },
@@ -77,26 +69,15 @@ return {
["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 },
[0x27EB] = { topright = -0.1, bottomright = -0.1 },
["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
- [0x00393] = { bottomright = -0.30, }, -- upright Gamma
+ [0x00393] = { bottomright = -0.3 }, -- upright Gamma
},
},
-{
- tweak = "radicaldegreeanchors",
- list = {
- -- [0x221A] = { location = "left", hfactor = .1, vfactor = .3 },
- -- ["0x221A.variants.*"] = { location = "left", hfactor = .1, vfactor = .625 },
- -- ["0x221A.variants.1"] = { location = "left", hfactor = .1, vfactor = .575 },
- -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .575 },
- -- ["0x221A.variants.3"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.025 },
- }
-},
-
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.025 },
+ }
+ },
{
tweak = "checkspacing",
},
@@ -124,14 +105,7 @@ return {
},
{
tweak = "setoptions",
--- set = { "ignorekerndimensions" }
},
- -- this is the mkiv section
--- {
--- tweak = "emulatelmtx",
--- feature = "emulatelmtx",
--- comment = "this is for mkiv",
--- },
},
},
bigslots = {
diff --git a/tex/context/fonts/mkiv/kpfonts-math.lfg b/tex/context/fonts/mkiv/kpfonts-math.lfg
index 7cb968860..409b17cbc 100644
--- a/tex/context/fonts/mkiv/kpfonts-math.lfg
+++ b/tex/context/fonts/mkiv/kpfonts-math.lfg
@@ -12,19 +12,11 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 900,
- -- AccentBaseHeight = 0,
- AccentBaseDepth = 30,
- -- RadicalDegreeBottomRaisePercent = 70,
- -- RadicalRuleThickness = 50, -- 50 in font
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- -- DisplayOperatorMinHeight = 1800, -- 1500 in font (only one)
- -- PrimeRaisePercent = 25, -- set to 0 in math-act
- -- PrimeRaiseComposedPercent = 25, -- set to 0 in math-act
- PrimeShiftUp = "1.15*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.15*SuperscriptShiftUp",
+ AccentBaseDepth = 30,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ PrimeShiftUp = "1.15*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.15*SuperscriptShiftUp",
SubscriptShiftDownWithSuperscript = "1.2*SubscriptShiftDown", -- unclear original value, trial and error
},
tweaks = {
@@ -61,7 +53,6 @@ return {
smaller = true, -- replace multiples
scale = 1, -- glyph scale
fake = 0.8, -- replace multiples with this width proportion
- -- keep = true, -- keep the text size prime (aka minute)
},
{
tweak = "addmirrors",
@@ -102,23 +93,15 @@ return {
{
tweak = "checkspacing",
},
-
-{
- tweak = "radicaldegreeanchors",
- list = {
- [0x221A] = { location = "left", hfactor = .0, vfactor = .75 },
- ["0x221A.variants.*"] = { location = "left", hfactor = .0, vfactor = .55 },
- ["0x221A.variants.1"] = { location = "left", hfactor = .0, vfactor = .6 },
- -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .575 },
- -- ["0x221A.variants.3"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = .0, vfactor = 0.65 },
- }
-},
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ [0x221A] = { location = "left", hfactor = .0, vfactor = .75 },
+ ["0x221A.variants.*"] = { location = "left", hfactor = .0, vfactor = .55 },
+ ["0x221A.variants.1"] = { location = "left", hfactor = .0, vfactor = .6 },
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = .0, vfactor = 0.65 },
+ }
+ },
{
tweak = "addscripts",
@@ -151,12 +134,6 @@ return {
tweak = "setoptions",
set = { "ignorekerndimensions" }
},
- -- this is the mkiv section
--- {
--- tweak = "emulatelmtx",
--- feature = "emulatelmtx",
--- comment = "this is for mkiv",
--- },
},
},
alternates = {
diff --git a/tex/context/fonts/mkiv/libertinus-math.lfg b/tex/context/fonts/mkiv/libertinus-math.lfg
index 30f8f6456..6f707ed2b 100644
--- a/tex/context/fonts/mkiv/libertinus-math.lfg
+++ b/tex/context/fonts/mkiv/libertinus-math.lfg
@@ -16,48 +16,36 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 1000,
- FractionRuleThickness = 50,
- OverbarRuleThickness = 50,
- -- RadicalRuleThickness = 50,
- UnderbarRuleThickness = 50,
- AccentTopShiftUp = -35,
- FlattenedAccentTopShiftUp = -35,
- -- AccentExtendMargin = 50,
- -- AccentTopShiftUp = 0,
- AccentBaseDepth = 10,
- -- RadicalDegreeBottomRaisePercent = 60,
- -- RadicalKernAfterDegree = -425,
- -- RadicalRuleThickness = 40, -- 40 in font
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- -- DisplayOperatorMinHeight = 1800, -- 1250 in font (only one)
- -- PrimeRaisePercent = 70, -- set to 0 in math-act
- -- PrimeRaiseComposedPercent = 10, -- set to 0 in math-act
- PrimeShiftUp = "1.2*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.2*SuperscriptShiftUp",
+ FractionRuleThickness = 50,
+ OverbarRuleThickness = 50,
+ UnderbarRuleThickness = 50,
+ AccentTopShiftUp = -35,
+ FlattenedAccentTopShiftUp = -35,
+ AccentBaseDepth = 10,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ PrimeShiftUp = "1.2*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.2*SuperscriptShiftUp",
},
tweaks = {
aftercopying = {
{
tweak = "version",
- -- expected = "Version 6.8",
expected = "Version 7.040",
},
{
tweak = "addmirrors",
},
--- we have a weird middle integral piece
-{
- tweak = "dimensions",
- list = {
- [0x23AE] = { xoffset = -.19 },
- },
-},
-{
- tweak = "fixintegrals",
-},
+ -- we have a weird middle integral piece
+ {
+ tweak = "dimensions",
+ list = {
+ [0x23AE] = { xoffset = -.19 },
+ },
+ },
+ {
+ tweak = "fixintegrals",
+ },
presets.scripttocalligraphic { },
presets.rsfstoscript { rscale = 0.97 },
presets.rsfsuprighttoscript { rscale = 0.97 },
@@ -78,7 +66,6 @@ return {
[0x002F] = { topleft = -0.15, bottomright = -0.15 },
["0x7D.parts.top"] = { topright = -0.2, }, -- right brace top
["0x7D.parts.bottom"] = { bottomright = -0.2 }, -- right brace bottom
- -- ["0x7D.variants.*"] = { topright = -0.05, bottomright = -0.05 }, -- right brace variants
["0x29.parts.top"] = { topright = -0.15, }, -- right parenthesis top
["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom
["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
@@ -114,53 +101,24 @@ return {
},
},
-- Then we deal with all offsets and heights in one go. So we treat the initial accent
- -- as well as the variants here.
- {
- tweak = "dimensions",
- list = {
- -- here we want to apply to all
- -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060
- -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4
- -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6
- -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC
- -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8
- -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA
- -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7
- -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF
- -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9
- -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8
- -- [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self)
- },
- },
+ -- as well as the variants here. None in libertinus.
-- We now copy these to the not wide slots so that we can set these to stretch as well,
-- if only because it is less confusing and more consistent.
{
tweak = "copyaccents",
},
-- So far for the accents.
-{
- tweak = "radicaldegreeanchors",
- list = {
- [0x221A] = { location = "left", hfactor = .0, vfactor = .625 },
- ["0x221A.variants.*"] = { location = "left", hfactor = .0, vfactor = .5 },
- ["0x221A.variants.1"] = { location = "left", hfactor = .0, vfactor = .55 },
- -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .575 },
- -- ["0x221A.variants.3"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = .0, vfactor = 1.15 },
- }
-},
-
-
-
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ [0x221A] = { location = "left", hfactor = .0, vfactor = .625 },
+ ["0x221A.variants.*"] = { location = "left", hfactor = .0, vfactor = .5 },
+ ["0x221A.variants.1"] = { location = "left", hfactor = .0, vfactor = .55 },
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = .0, vfactor = 1.15 },
+ }
+ },
{
tweak = "fixprimes",
- -- scale = 1,
- -- smaller = true,
factor = 0.92,
fake = 0.75,
},
@@ -211,40 +169,3 @@ return {
},
},
}
-
--- For now we keep these commented as they show where we came from.
-
--- {
--- tweak = "dimensions",
--- list = {
--- -- [0x00060] = { yoffset = -0.075 }, -- grave
--- -- [0x000B4] = { yoffset = -0.075 }, -- acute
--- -- [0x002C6] = { yoffset = -0.075 }, -- hat
--- -- [0x002DC] = { yoffset = -0.075 }, -- tilde
--- -- [0x000AF] = { yoffset = -0.1 }, -- bar
--- -- [0x002D8] = { yoffset = -0.075 }, -- breve
--- -- [0x002D9] = { yoffset = -0.05 }, -- dot
--- -- [0x000A8] = { yoffset = -0.02 }, -- ddot
--- -- [0x020DB] = { yoffset = -0.02 }, -- dddot
--- -- [0x002DA] = { yoffset = -0.1 }, -- ring
--- -- [0x002C7] = { yoffset = -0.1 }, -- check
--- -- [0x020D7] = { yoffset = -0.1 }, -- vec
-
--- -- [0x00300] = { yoffset = -0.1, all = true }, -- widegrave
--- -- [0x00301] = { yoffset = -0.1, all = true }, -- wideacute
--- -- [0x00302] = { yoffset = -0.1, all = true }, -- widehat
--- -- [0x00303] = { yoffset = -0.09, all = true }, -- widetilde
--- -- [0x00304] = { yoffset = -0.12, all = true }, -- widebar
--- -- [0x00306] = { yoffset = -0.05, all = true }, -- widebreve
--- -- [0x00307] = { yoffset = -0.02, all = true }, -- widedot
--- -- [0x00308] = { yoffset = -0.02, all = true }, -- wideddot
--- -- [0x020DB] = { yoffset = -0.1, all = true }, -- widedddot
--- -- [0x0030A] = { yoffset = -0.12, all = true }, -- widering
--- -- [0x0030C] = { yoffset = -0.04, all = true }, -- widecheck
-
--- -- [0x1D44F] = { width = 1, italic = 0, anchor = 1.5 }, -- b (6.8)
--- -- [0x1D451] = { width = 1, italic = 0, anchor = 1.2 }, -- d (6.8)
--- -- [0x0210E] = { width = 1, italic = 0, anchor = 1.5 }, -- h (6.8)
--- -- [0x1D458] = { width = 1, italic = 0, anchor = 1.5 }, -- k (6.8)
--- },
--- },
diff --git a/tex/context/fonts/mkiv/lucida-math.lfg b/tex/context/fonts/mkiv/lucida-math.lfg
index f0ab84b8b..c95a32c5d 100644
--- a/tex/context/fonts/mkiv/lucida-math.lfg
+++ b/tex/context/fonts/mkiv/lucida-math.lfg
@@ -13,26 +13,14 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- -- RadicalDisplayStyleVerticalGap = 100,
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 900,
- FractionRuleThickness = 55,
- -- AccentTopShiftUp = 0,
- -- FlattenedAccentTopShiftUp = 0,
- -- AccentExtendMargin = 50,
- -- AccentBaseHeight = 650,
- AccentBaseDepth = 250,
- -- RadicalDegreeBottomRaisePercent = 50,
- -- RadicalKernAfterDegree = -600,
- -- RadicalRuleThickness = 35, -- 40 in font (46 in demi)
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
+ FractionRuleThickness = 55,
+ AccentBaseDepth = 250,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
SuperscriptBottomMaxWithSubscript = 325,
- -- PrimeRaisePercent = 60, -- set to 0 in math-act
- -- PrimeRaiseComposedPercent = 50, -- set to 0 in math-act
- PrimeShiftUp = "1.4*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.4*SuperscriptShiftUp",
+ PrimeShiftUp = "1.4*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.4*SuperscriptShiftUp",
+ PrimeBaselineDropMax = "0.5*SuperscriptBaselineDropMax",
},
tweaks = {
aftercopying = {
@@ -44,10 +32,6 @@ return {
tweak = "fixoldschool",
version = "Version 1.802",
},
- -- {
- -- tweak = "showinfo",
- -- version = "Version 1.803",
- -- },
{
tweak = "addmirrors",
},
@@ -90,8 +74,6 @@ return {
-- The < and > are slightly too small. We scale them by 867/795
["0x003C"] = { scale = 1.09057, width = 1.09057, height = 1.09057 },
["0x003E"] = { scale = 1.09057, width = 1.09057, height = 1.09057 },
- -- The = is too big if in ss03. We scale it by 795/867 (not working like this)
- -- ["0x003D.ss03"] = { scale = 0.916955, width = 0.916955, height = 0.916955 },
},
},
{
@@ -105,15 +87,6 @@ return {
["0x23DD.parts.1"] = { xoffset = -0.075, depth = .8, yoffset = 0.2 },
["0x23DD.parts.2"] = { depth = .8, yoffset = 0.2 },
["0x23DD.parts.3"] = { xoffset = 0.075, depth = .8, yoffset = 0.2 },
- -- these are done later using the AccentBase* parameters
- -- [0x23DC] = { height = .2, yoffset = -0.8 },
- -- [0x23DD] = { depth = .6, yoffset = 0.4 },
- --
- -- ["0x7C.variants.1"] = { squeeze = 0.75, height = 0.75, depth = 0.75 },
- -- ["0x7C.variants.2"] = { squeeze = 0.75, height = 0.75, depth = 0.75 },
- -- ["0x7C.variants.3"] = { squeeze = 0.75, height = 0.75, depth = 0.75 },
- -- ["0x7C.variants.4"] = { squeeze = 0.75, height = 0.75, depth = 0.75 },
- -- going zero makes them be ignored
["0x7C.variants.3"] = { squeeze = 0.90, height = 0.90, depth = 0.90 },
["0x7C.variants.4"] = { squeeze = 0.80, height = 0.80, depth = 0.80 },
},
@@ -124,68 +97,30 @@ return {
{
tweak = "extendaccents",
},
-{
- tweak = "radicaldegreeanchors",
- list = {
- -- [0x221A] = { location = "left", hfactor = .05, vfactor = .675 },
- -- ["0x221A.variants.*"] = { location = "left", hfactor = .05, vfactor = .6 },
- -- ["0x221A.variants.1"] = { location = "left", hfactor = .05, vfactor = .65 },
- -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .65 },
- ["0x221A.variants.3"] = { location = "left", hfactor = 0, vfactor = .55 },
- ["0x221A.variants.4"] = { location = "left", hfactor = 0, vfactor = .50 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .05, vfactor = .525 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = 0, vfactor = .85 },
- }
-},
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ ["0x221A.variants.3"] = { location = "left", hfactor = 0, vfactor = .55 },
+ ["0x221A.variants.4"] = { location = "left", hfactor = 0, vfactor = .50 },
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = 0, vfactor = .85 },
+ }
+ },
{
tweak = "fixaccents",
},
-- First we set the dimensions of the initial accent which started out as zero but we want
- -- a proper width.
--- {
--- tweak = "dimensions",
--- list = {
--- -- [0x00302] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widehat
--- -- [0x00303] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widetilde
--- -- [0x00306] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widebreve
--- -- [0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck
--- },
--- },
+ -- a proper width. Not in lucida
-- Then we deal with all offsets and heights in one go. So we treat the initial accent
- -- as well as the variants here.
--- {
--- tweak = "dimensions",
--- list = {
--- -- here we want to apply to all
--- -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060
--- -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4
--- -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6
--- -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC
--- -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8
--- -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA
--- -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7
--- -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF
--- -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9
--- -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8
--- -- [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self)
--- },
--- },
+ -- as well as the variants here. Not in lucida.
-- We now copy these to the not wide slots so that we can set these to stretch as well,
-- if only because it is less confusing and more consistent.
{
tweak = "copyaccents",
},
-- So far for the accents.
-
{
tweak = "fixslashes",
},
- -- {
- -- tweak = "fixellipses",
- -- },
{
tweak = "addbreve",
},
@@ -206,26 +141,12 @@ return {
["0x27E9.variants.*"] = { topright = -0.3, bottomright = -0.3 },
[0x27EB] = { topright = -0.2, bottomright = -0.2 },
["0x27EB.variants.*"] = { topright = -0.3, bottomright = -0.3 },
- -- ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom,
- -- ["0x222C.variants.*"] = integral_variants, -- ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom,
- -- ["0x222D.variants.*"] = integral_variants, -- ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom,
- -- ["0x222E.variants.*"] = integral_variants, -- ["0x222E.parts.top"] = integral_top, ["0x222E.parts.bottom"] = integral_bottom,
- -- ["0x222F.variants.*"] = integral_variants, -- ["0x222F.parts.top"] = integral_top, ["0x222F.parts.bottom"] = integral_bottom,
- -- ["0x2230.variants.*"] = integral_variants, -- ["0x2230.parts.top"] = integral_top, ["0x2230.parts.bottom"] = integral_bottom,
- -- ["0x2231.variants.*"] = integral_variants, -- ["0x2231.parts.top"] = integral_top, ["0x2231.parts.bottom"] = integral_bottom,
- -- ["0x2232.variants.*"] = integral_variants, -- ["0x2232.parts.top"] = integral_top, ["0x2232.parts.bottom"] = integral_bottom,
- -- ["0x2233.variants.*"] = integral_variants, -- ["0x2233.parts.top"] = integral_top, ["0x2233.parts.bottom"] = integral_bottom,
-
},
},
{
tweak = "fixprimes",
- -- factor = 0.75, -- accent base height
factor = 0.7, -- accent base height
- -- smaller = true, -- replace multiples
- -- scale = 1.1, -- glyph scale
fake = 0.65, -- replace multiples with this width proportion
- -- keep = true, -- keep the text size prime (aka minute)
},
{
tweak = "checkspacing",
@@ -244,7 +165,6 @@ return {
},
{
tweak = "addfourier",
- -- scale = 1.5,
variant = 1,
},
{
@@ -262,9 +182,6 @@ return {
[0x2192] = false,
[0x219E] = false,
[0x21A0] = false,
- -- [0x21A6] = false,
- -- [0x21CB] = false,
- -- [0x21CC] = false,
}
},
-- this is the mkiv section
diff --git a/tex/context/fonts/mkiv/minion-math.lfg b/tex/context/fonts/mkiv/minion-math.lfg
index dfc2251ec..ab58d0dc6 100644
--- a/tex/context/fonts/mkiv/minion-math.lfg
+++ b/tex/context/fonts/mkiv/minion-math.lfg
@@ -26,28 +26,10 @@ return {
},
mathematics = {
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 900,
- -- AccentTopShiftUp = -15,
- -- FlattenedAccentTopShiftUp = -15,
- -- AccentExtendMargin = 50,
- -- AccentBaseDepth = 50,
- -- RadicalDegreeBottomRaisePercent = 60,
- -- RadicalRuleThickness = 66, -- 72 in font
- -- DelimiterPercent = 90,
- -- DelimiterShortfall = 400,
- -- DisplayOperatorMinHeight = 1900, -- 1250 in font
- -- AccentSuperscriptDrop = 100,
- -- AccentSuperscriptPercent = 20,
- SubscriptShiftDown = 200, -- 250 in font
- SubscriptShiftDownWithSuperscript = "1.4*SubscriptShiftDown", -- 1.5* in math-act
- -- PrimeRaisePercent = 50, -- set to 0 in math-act
- -- PrimeRaiseComposedPercent = 25, -- set to 0 in math-act
- PrimeShiftUp = "1.15*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.15*SuperscriptShiftUp",
- -- PrimeBaselineDropMax = 0,
- -- RadicalKernAfterExtensible = 100, -- 0 default
- -- RadicalKernBeforeExtensible = 100, -- 0 default
+ SubscriptShiftDown = 200, -- 250 in font
+ SubscriptShiftDownWithSuperscript = "1.40*SubscriptShiftDown", -- 1.5* in math-act
+ PrimeShiftUp = "1.15*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.15*SuperscriptShiftUp",
},
tweaks = {
aftercopying = {
@@ -74,9 +56,6 @@ return {
list = {
[0x002F] = { topleft = -0.2, bottomright = -0.2 },
["0x002F.variants.*"] = { topleft = -0.2, bottomright = -0.2 },
- -- No!
- -- [0x0028] = { topleft = -0.1, bottomleft = -0.1 }, -- left parenthesis
- -- [0x0029] = { topright = -0.1, bottomright = -0.1, all = true }, -- right parenthesis
--
[0x007D] = { topright = -0.05, bottomright = -0.05 }, -- right brace variants
["0x7D.variants.*"] = { topright = -0.10, bottomright = -0.10 }, -- right brace variants
@@ -85,7 +64,7 @@ return {
[0x0029] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
["0x29.parts.top"] = { topright = -0.15, }, -- right parenthesis top
- ["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom
+ ["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom
[0x221A] = { topright = 0.2, bottomright = 0.2 }, -- radical
["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 },
["0x221A.parts.top"] = { topright = 0.2, },
@@ -98,31 +77,24 @@ return {
[0x2A0C] = { bottomright = -0.1 }, -- iiiint does not have any ic
},
},
-
-
{
tweak = "simplifykerns",
},
{
tweak = "extendaccents",
},
-{
- tweak = "radicaldegreeanchors",
- list = {
- [0x221A] = { location = "left", hfactor = -0.15, vfactor = .75 },
- ["0x221A.variants.*"] = { location = "left", hfactor = -0.1, vfactor = .575 },
- ["0x221A.variants.1"] = { location = "left", hfactor = -0.1, vfactor = .725 },
- ["0x221A.variants.2"] = { location = "left", hfactor = -0.1, vfactor = .65 },
- ["0x221A.variants.3"] = { location = "left", hfactor = -0.1, vfactor = .625 },
- ["0x221A.variants.4"] = { location = "left", hfactor = -0.1, vfactor = .625 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = 0.05, vfactor = .525 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = -0.1, vfactor = 0.85 },
- }
-},
-
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ [0x221A] = { location = "left", hfactor = -0.15, vfactor = .75 },
+ ["0x221A.variants.*"] = { location = "left", hfactor = -0.1, vfactor = .575 },
+ ["0x221A.variants.1"] = { location = "left", hfactor = -0.1, vfactor = .725 },
+ ["0x221A.variants.2"] = { location = "left", hfactor = -0.1, vfactor = .65 },
+ ["0x221A.variants.3"] = { location = "left", hfactor = -0.1, vfactor = .625 },
+ ["0x221A.variants.4"] = { location = "left", hfactor = -0.1, vfactor = .625 },
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = -0.1, vfactor = 0.85 },
+ }
+ },
{
tweak = "fixaccents",
},
@@ -132,20 +104,7 @@ return {
{
tweak = "fixprimes",
factor = 1,
- -- scale = 0.9,
},
- -- {
- -- tweak = "checkspacing",
- -- },
- -- {
- -- tweak = "addscripts",
- -- },
- -- {
- -- tweak = "accentdimensions",
- -- },
- -- {
- -- tweak = "addrules",
- -- },
{
tweak = "addfourier",
variant = 1,
diff --git a/tex/context/fonts/mkiv/modern-math.lfg b/tex/context/fonts/mkiv/modern-math.lfg
index 4c433702c..fadd13da7 100644
--- a/tex/context/fonts/mkiv/modern-math.lfg
+++ b/tex/context/fonts/mkiv/modern-math.lfg
@@ -12,36 +12,27 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- FractionNumeratorDisplayStyleShiftUp = 600, -- used to be a function
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 900,
- AccentTopShiftUp = -60,
- FlattenedAccentTopShiftUp = -60,
- -- AccentExtendMargin = 50,
- -- AccentBaseHeight = 0,
- -- AccentBaseDepth = 0,
- -- AccentTopOvershoot = 66,
- AccentSuperscriptDrop = 100, -- drop the superscripts if accents are present. Amount in percentage of height of accent(?)
- AccentSuperscriptPercent = 0,
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
- -- SubSuperscriptGapMin = 160, -- 160 in font (4*ruleheight)
- -- SubscriptBaselineDropMin = 50, -- 200 in font (multiplied by 0.59999/2.39868)
- SubscriptShiftDown = 150, -- 247 in font (multiplied to be consistent with cm)
- SubscriptShiftDownWithSuperscript = 247, -- relates to the previous one (see math-act)
- -- SubscriptTopMax = 344, -- 344 in font .8 exheight
- -- SuperscriptBaselineDropMax = 386, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm)) 0 means: align the baseline of the superscript at the (top)
- SuperscriptBaselineDropMax = 0.6*431, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm))
- SubscriptBaselineDropMin = 0.1*431, -- 200 in font
- -- SuperscriptBottomMaxWithSubscript = 344, -- 344 in font .8 exheight
- -- SuperscriptBottomMin = 108, -- 108 in font .25 exheight
- SuperscriptShiftUp = 413, -- 363 in font (multiplied with 4.9547/4.3536, got 413)
- SuperscriptShiftUpCramped = 413, -- 289 in font (no distinction, old TeX)
+ FractionNumeratorDisplayStyleShiftUp = 600, -- used to be a function
+ AccentTopShiftUp = -60,
+ FlattenedAccentTopShiftUp = -60,
+ AccentSuperscriptDrop = 100, -- drop the superscripts if accents are present. Amount in percentage of height of accent(?)
+ AccentSuperscriptPercent = 0,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ SubscriptShiftDown = 150, -- 247 in font (multiplied to be consistent with cm)
+ SubscriptShiftDownWithSuperscript = 247, -- relates to the previous one (see math-act)
+ -- SubscriptTopMax = 344, -- 344 in font .8 exheight
+ -- SuperscriptBaselineDropMax = 386, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm)) 0 means: align the baseline of the superscript at the (top)
+ SuperscriptBaselineDropMax = 0.6*431, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm))
+ SubscriptBaselineDropMin = 0.1*431, -- 200 in font
+ -- SuperscriptBottomMaxWithSubscript = 344, -- 344 in font .8 exheight
+ -- SuperscriptBottomMin = 108, -- 108 in font .25 exheight
+ SuperscriptShiftUp = 413, -- 363 in font (multiplied with 4.9547/4.3536, got 413)
+ SuperscriptShiftUpCramped = 413, -- 289 in font (no distinction, old TeX)
PrimeShiftUp = "1.1*SuperscriptShiftUp",
PrimeShiftUpCramped = "1.1*SuperscriptShiftUp",
- -- PrimeRaisePercent = 0,
- -- PrimeRaiseComposedPercent = 25,
+ -- PrimeRaisePercent = 0, -- set to 0 in math-act
+ -- PrimeRaiseComposedPercent = 0, -- set to 0 in math-act
},
tweaks = {
aftercopying = {
@@ -64,12 +55,9 @@ return {
presets.moveintegrals { factor = 1.4, icfactor = 0.8 }, -- the icfactor is due to the very slanted integral.
presets.wipeanchors { },
presets.wipeitalics { },
- -- these will become moveanchors
{
tweak = "dimensions",
list = {
- -- [0x1D483] = { anchor = 1.15 }, -- bold italic b
- -- [0x1D485] = { anchor = 0.8 }, -- bold italic d
[0x1D487] = { anchor = 0.9 }, -- bold italic f
[0x1D489] = { anchor = 1.2 }, -- bold italic h
[0x1D48C] = { anchor = 1.2 }, -- bold italic k
@@ -86,13 +74,10 @@ return {
[0x1D6FE] = { anchor = 1.1 }, -- italic gamma
[0x1D702] = { anchor = 1.1 }, -- italic eta
- -- [0x1D70A] = { anchor = 1.2 }, -- italic omicron -- no difference
- -- [0x1D70D] = { anchor = 1.2 }, -- italic varsigma -- no difference
[0x1D44F] = { anchor = 1.15 }, -- italic b
[0x1D451] = { anchor = 0.8, }, -- italic d
[0x1D455] = { anchor = 1.15 }, -- italic h
- -- [0x1D456] = { anchor = 1.15 }, -- italic i (wrong code?)
[0x1D458] = { anchor = 1.15 }, -- italic k
[0x1D45B] = { anchor = 1.1 }, -- italic n
[0x1D45D] = { anchor = 1.1 }, -- italic p
@@ -109,9 +94,7 @@ return {
[0x1D46E] = { anchor = 0.75 }, -- bold italic G
[0x1D479] = { anchor = 1.2 }, -- bold italic R
[0x1D47A] = { anchor = 0.8 }, -- bold italic S
-
-- uppercaseboldscript could be improved
-
[0x1D435] = { anchor = 1.05 }, -- italic B
[0x1D436] = { anchor = 0.7 }, -- italic C
[0x1D437] = { anchor = 1.05 }, -- italic D
@@ -119,7 +102,6 @@ return {
[0x1D443] = { anchor = 1.1 }, -- italic P
[0x1D445] = { anchor = 1.05 }, -- italic R
[0x1D446] = { anchor = 0.85 }, -- italic S
-
[0x1D49C] = { anchor = 0.9 }, -- script A
[0x1D49D] = { anchor = 0.95 }, -- script B
[0x1D49E] = { anchor = 0.8 }, -- script C
@@ -146,18 +128,6 @@ return {
[0x1D4B3] = { anchor = 0.95 }, -- script X
[0x1D4B4] = { anchor = 0.9 }, -- script Y
[0x1D4B5] = { anchor = 1 }, -- script Z
-
- -- [984874] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
- -- [984881] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
- -- [984888] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
- -- [984895] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
- -- [984902] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
- -- [984909] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
- -- [984916] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
-
- -- ["0x7C.variants.*"] = { squeeze = 0.75, height = 0.75, depth = 0.75, extend = 1.15, width = 1.15 }, -- squeeze: glyph, height, depth: bbox
- -- ["0x7C.variants.*"] = { squeeze = 0.75, height = 0.8, depth = 0.8, extend = 1.1, width = 1.1 }, -- squeeze: glyph, height, depth: bbox
-
["0x7C.variants.1"]={ squeeze = 0.90, height = 0.90, depth = 0.90 },
["0x7C.variants.2"]={ squeeze = 0.85, height = 0.85, depth = 0.85 },
["0x7C.variants.3"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
@@ -165,50 +135,20 @@ return {
["0x7C.variants.5"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
["0x7C.variants.6"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
["0x7C.variants.7"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
-
- -- [utf.byte("1")] = {
- -- original = utf.byte("2"),
- -- mode = 1,
- -- scale = 2,
- -- },
-
- -- ["lowercasegreeksansserifbolditalic"] = {
- -- delta = 0x003B1 - 0x1D7AA,
- -- slant = 0.4,
- -- slant = -0.2,
- -- line = 0.1,
- -- mode = 1,
- -- width = 1.25,
- -- width = 0.95,
- -- scale = 0.975,
- -- },
},
},
-
-- Accents are a mess. We migrate the extensibles from the combiners to the base accent
-- and then need to tweak the width (which is auto set because it was zero with a large
-- accent anchor offset). First we copy and fix.
{
tweak = "extendaccents",
},
-
-{
- tweak = "radicaldegreeanchors",
- list = {
- -- [0x221A] = { location = "left", hfactor = 0.05, vfactor = .675 },
- -- ["0x221A.variants.*"] = { location = "left", hfactor = 0.05, vfactor = .6 },
- -- ["0x221A.variants.1"] = { location = "left", hfactor = 0.05, vfactor = .65 },
- -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .65 },
- -- ["0x221A.variants.3"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = 0.05, vfactor = .525 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.05 },
- }
-},
-
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.05 },
+ }
+ },
{
tweak = "fixaccents",
},
@@ -217,12 +157,9 @@ return {
{
tweak = "dimensions",
list = {
- -- [0x00300] = { width = 0.8 }, -- widegrave
- -- [0x00301] = { width = 0.9 }, -- wideacute
[0x00302] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widehat
[0x00303] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widetilde
[0x00306] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widebreve
- -- [0x0030A] = { width = 0.9, xoffset = -.0 }, -- widering
[0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck
},
},
@@ -231,17 +168,6 @@ return {
{
tweak = "dimensions",
list = {
- -- here we want to apply to all
- -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060
- -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4
- -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6
- -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC
- -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8
- -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA
- -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7
- -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF
- -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9
- -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8
[0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self)
},
},
@@ -251,7 +177,6 @@ return {
tweak = "copyaccents",
},
-- So far for the accents.
-
{
-- Here we modify "corner kerns".
-- We started with 0x2F, the solidus
@@ -305,11 +230,6 @@ return {
},
},
- -- {
- -- tweak = "staircase",
- -- list = {
- -- },
- -- },
{
-- This one fakes margins to get larger/smaller accents
-- with for example \widetilde.
@@ -355,7 +275,6 @@ return {
[0x1D5D8] = { left = .1, right = .1 }, -- sans bold E
[0x1D5D9] = { left = .1, right = .1 }, -- sans bold F
- -- [0x1D5DD] = { left = .2, right = .2 }, -- sans bold J -- nope
[0x1D5DF] = { left = .1, right = .1 }, -- sans bold L
[0x1D5E6] = { left = .1, right = .1 }, -- sans bold S
@@ -364,7 +283,6 @@ return {
[0x1D5A2] = { left = .1, right = .1 }, -- sans C
[0x1D5A4] = { left = .1, right = .1 }, -- sans E
[0x1D5A5] = { left = .1, right = .1 }, -- sans F
- -- [0x1D5AB] = { left = .1, right = .1 }, -- sans L -- nope
[0x1D5AF] = { left = .1, right = .1 }, -- sans P
[0x1D5B2] = { left = .1, right = .1 }, -- sans S
[0x1D5B9] = { left = .1, right = .1 }, -- sans Z
@@ -373,7 +291,6 @@ return {
[0x1D4AE] = { left = .1, right = .1 }, -- script S
[0x1D4B4] = { left = .1, right = .1 }, -- script Y
- -- [0x0004A] = { left = .2, right = .2 }, -- J
[0x0004C] = { left = .1, right = .1 }, -- L
[0x00053] = { left = .1, right = .1 }, -- S
[0x0005A] = { left = .1, right = .1 }, -- Z
@@ -387,9 +304,6 @@ return {
{
tweak = "fixprimes",
factor = 0.825,
- -- smaller = true,
- -- scale = 1,
- -- fake = 0.6,
},
{
tweak = "checkspacing",
@@ -426,12 +340,6 @@ return {
{
tweak = "addequals",
},
- -- {
- -- tweak = "wipevariants",
- -- list = {
- -- 0x7C,
- -- },
- -- },
-- this is the mkiv section
{
tweak = "emulatelmtx",
@@ -441,98 +349,7 @@ return {
},
},
bigslots = {
- -- 1, 3, 5, 7 -- In fact, 7 is the last one.
1, 4, 6, 7 -- In fact, 7 is the last one.
},
},
}
-
--- For now we keep these commented as they show where we came from.
-
--- [0x00060] = { yoffset = -0.05 }, -- grave
--- [0x000B4] = { yoffset = -0.05 }, -- acute
--- [0x002C6] = { yoffset = -0.05 }, -- hat
--- [0x002DC] = { yoffset = -0.05 }, -- tilde
--- [0x000AF] = { yoffset = -0.075 }, -- bar
--- [0x002D8] = { yoffset = -0.05 }, -- breve
--- [0x002D9] = { yoffset = -0.05 }, -- dot
--- [0x000A8] = { yoffset = -0.05 }, -- ddot
--- [0x020DB] = { yoffset = 0.2 }, -- dddot (done below!)
--- [0x002DA] = { width = 0 }, -- ring (bounding box is wrong)
--- [0x002C7] = { yoffset = -0.05 }, -- check
--- [0x020D7] = { yoffset = -0.05 }, -- vec
-
--- [0x00300] = { yoffset = -0.03, all = true }, -- widegrave
--- [0x00301] = { yoffset = -0.03, all = true }, -- wideacute
--- [0x00302] = { yoffset = -0.075, all = true }, -- widehat
--- [0x00303] = { yoffset = -0.05, all = true }, -- widetilde
--- [0x00304] = { yoffset = -0.02, all = true }, -- widebar
--- [0x00306] = { yoffset = -0.05, all = true }, -- widebreve
--- [0x00307] = { yoffset = -0.027, all = true }, -- widedot
--- [0x00308] = { yoffset = -0.027, all = true }, -- wideddot
--- [0x020DB] = { yoffset = -0.065, all = true }, -- widedddot
--- [0x0030C] = { yoffset = -0.05, all = true }, -- widecheck
--- [0x0030A] = { yoffset = -0.025, all = true }, -- widering
-
--- [0x0212C] = { width = 0.95, italic = 0.05 }, -- script B
--- [0x1D49E] = { width = 0.8, italic = 0.25 }, -- script C
--- [0x1D49F] = { width = 0.9, italic = 0.11 }, -- script D
--- [0x02130] = { width = 0.85, italic = 0.18 }, -- script E
--- [0x02131] = { width = 0.75, italic = 0.3 }, -- script F
--- [0x1D4A2] = { width = 0.9, italic = 0.11 }, -- script G
--- [0x0210B] = { width = 0.85, italic = 0.18 }, -- script H
--- [0x02110] = { width = 0.8, italic = 0.25 }, -- script I
--- [0x1D4A5] = { width = 0.8, italic = 0.25 }, -- script J
--- [0x1D4A6] = { width = 0.9, italic = 0.11 }, -- script K
--- [0x02112] = { width = 0.95, italic = 0.05 }, -- script L
--- [0x02133] = { width = 0.9, italic = 0.11 }, -- script M
--- [0x1D4A9] = { width = 0.85, italic = 0.18 }, -- script N
--- [0x1D4AA] = { width = 0.95, italic = 0.05 }, -- script O
--- [0x1D4AB] = { width = 0.8, italic = 0.25 }, -- script P
--- [0x1D4AB] = { width = 0.95, italic = 0.05 }, -- script Q
--- [0x0211B] = { width = 0.95, italic = 0.05 }, -- script R
--- [0x1D4AE] = { width = 0.9, italic = 0.11 }, -- script S
--- [0x1D4AF] = { width = 0.75, italic = 0.33 }, -- script T
--- [0x1D4B0] = { width = 0.9, italic = 0.11 }, -- script U
--- [0x1D4B1] = { width = 0.8, italic = 0.25 }, -- script V
--- [0x1D4B2] = { width = 0.8, italic = 0.25 }, -- script W
--- [0x1D4B3] = { width = 0.9, italic = 0.11 }, -- script X
--- [0x1D4B4] = { width = 0.85, italic = 0.18 }, -- script Y
--- [0x1D4B5] = { width = 0.95, italic = 0.05 }, -- script Z
-
--- Setting anchors to shift the location of accents
--- Note: Many non-italic alphabets are wiped below
--- Todo: Check the less common italic alphabets
-
--- {
--- -- For non-italic alphabets we
--- -- remove italic correction.
--- tweak = "wipeitalics",
--- list = {
--- -- "digitsbold",
--- -- "digitsdoublestruck",
--- -- "digitsmonospace",
--- -- "digitsnormal",
--- -- "digitssansserifbold",
--- -- "digitssansserifnormal",
--- -- "lowercasebold",
--- -- "lowercaseboldfraktur",
--- -- "lowercasedoublestruck",
--- -- "lowercasefraktur",
--- "lowercasemonospace",
--- -- "lowercasenormal",
--- -- "lowercasesansserifbold",
--- -- "lowercasesansserifnormal",
--- -- "lowercasegreeknormal",
--- "uppercasebold",
--- -- "uppercaseboldfraktur",
--- -- "uppercasedoublestruck",
--- -- "uppercasefraktur",
--- -- "uppercasegreekbold",
--- -- "uppercasegreeknormal",
--- -- "uppercasegreeksansserifbold",
--- "uppercasemonospace",
--- "uppercasesansserifbold",
--- "uppercasesanserifnormal",
--- },
--- },
diff --git a/tex/context/fonts/mkiv/newcomputermodern-math.lfg b/tex/context/fonts/mkiv/newcomputermodern-math.lfg
index bf818b077..4eb557221 100644
--- a/tex/context/fonts/mkiv/newcomputermodern-math.lfg
+++ b/tex/context/fonts/mkiv/newcomputermodern-math.lfg
@@ -56,6 +56,7 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
+ -- Borrow values from lm:
FractionNumeratorDisplayStyleShiftUp = function(value,target,original)
local o = original.mathparameters.FractionNumeratorDisplayStyleShiftUp
if o > 675 then
@@ -69,16 +70,10 @@ return {
NoLimitSubFactor = 1200,
DelimiterPercent = 90,
DelimiterShortfall = 400,
- -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
- -- Borrow values from lm:
- -- SubSuperscriptGapMin = 160, -- 160 in font (4*ruleheight)
SubscriptBaselineDropMin = 50, -- 200 in font (multiplied by 0.59999/2.39868)
SubscriptShiftDown = 150, -- 247 in font (multiplied to be consistent with cm)
SubscriptShiftDownWithSuperscript = 247, -- relates to the previous one (see math-act)
- -- SubscriptTopMax = 344, -- 344 in font .8 exheight
SuperscriptBaselineDropMax = 386, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm))
- -- SuperscriptBottomMaxWithSubscript = 344, -- 344 in font .8 exheight
- -- SuperscriptBottomMin = 108, -- 108 in font .25 exheight
SuperscriptShiftUp = 413, -- 363 in font (multiplied with 4.9547/4.3536, got 413)
SuperscriptShiftUpCramped = 413, -- 289 in font (no distinction, old TeX)
PrimeShiftUp = "1.1*SuperscriptShiftUp",
@@ -91,16 +86,9 @@ return {
expected = "Version 1.958",
},
{
- tweak = "dimensions",
- list = {
- -- nothing yet
- },
- },
- {
tweak = "fixprimes",
factor = 0.825,
smaller = true,
- -- scale = 0.70,
fake = 0.6,
},
{
diff --git a/tex/context/fonts/mkiv/pagella-math.lfg b/tex/context/fonts/mkiv/pagella-math.lfg
index 4df58ad3b..c1d0c7dd5 100644
--- a/tex/context/fonts/mkiv/pagella-math.lfg
+++ b/tex/context/fonts/mkiv/pagella-math.lfg
@@ -13,30 +13,17 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 900,
- AccentTopShiftUp = 10,
- FlattenedAccentTopShiftUp = 10,
- -- AccentExtendMargin = 50,
- -- AccentBaseHeight = 0,
- AccentBaseDepth = 80,
- -- SpaceAfterScript = 0,
- -- SpaceAfterScript = 30,
- -- RadicalDegreeBottomRaisePercent = 60,
- -- RadicalKernAfterDegree = -500,
- -- RadicalRuleThickness = 54, -- 60 in font
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- DisplayOperatorMinHeight = 1800, -- 1500 in font
- -- RadicalKernAfterExtensible = 0, -- 0 default
- -- RadicalKernBeforeExtensible = 0, -- 0 default
- SuperscriptShiftUp = 386, -- 354 in font
- SubscriptShiftDown = 200, -- 232 in font
+ AccentTopShiftUp = 10,
+ FlattenedAccentTopShiftUp = 10,
+ AccentBaseDepth = 80,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ DisplayOperatorMinHeight = 1800, -- 1500 in font
+ SuperscriptShiftUp = 386, -- 354 in font
+ SubscriptShiftDown = 200, -- 232 in font
SubscriptShiftDownWithSuperscript = "1.4*SubscriptShiftDown", -- 1.5* in math-act
- -- PrimeRaisePercent = 75, -- set to 0 in math-act
- -- PrimeRaiseComposedPercent = 10, -- set to 0 in math-act
- PrimeShiftUp = "1.3*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.3*SuperscriptShiftUp",
+ PrimeShiftUp = "1.3*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.3*SuperscriptShiftUp",
},
tweaks = {
aftercopying = {
@@ -46,19 +33,13 @@ return {
},
{
tweak = "fixprimes",
- -- factor = 0.7,
factor = 0.8,
- -- smaller = true,
- -- scale = 1,
- -- fake = 0.65,
},
{
tweak = "replacealphabets",
feature = "euleroverpagella",
filename = "euler-math.otf",
list = {
- -- { source = { first = 0x02100, last = 0x0210D } }, -- no 0x2210E
- -- { source = { first = 0x0210F, last = 0x02BFF } },
{ source = { first = 0x02100, last = 0x02BFF } },
{ source = { first = 0x1D400, last = 0x1D7FF } },
{ source = { first = 0x1D538, last = 0x1D550 } },
@@ -112,22 +93,12 @@ return {
{
tweak = "extendaccents",
},
-{
- tweak = "radicaldegreeanchors",
- list = {
- -- [0x221A] = { location = "left", hfactor = 0.05 },
- -- ["0x221A.variants.*"] = { location = "left", hfactor = 0.05 },
- -- ["0x221A.variants.1"] = { location = "left", hfactor = 0.05, vfactor = .65 },
- -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .65 },
- -- ["0x221A.variants.3"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = 0.05, vfactor = .525 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.0, vfactor = 1.1 },
- }
-},
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.0, vfactor = 1.1 },
+ }
+ },
{
tweak = "fixaccents",
},
@@ -151,16 +122,6 @@ return {
tweak = "dimensions",
list = {
-- here we want to apply to all
- -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060
- -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4
- -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6
- -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC
- -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8
- -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA
- -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7
- -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF
- -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9
- -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8
[0x020DB] = { yoffset = -0.01, height = .95, all = true }, -- widedddot : 0x20DB (self)
},
},
@@ -170,15 +131,12 @@ return {
tweak = "copyaccents",
},
-- So far for the accents.
-
{
tweak = "fixslashes",
},
-
{
tweak = "kerns",
list = {
- -- ["*:0x2F"] = { ... }
[0x002F] = { topleft = -0.2, bottomright = -0.2 },
--
["0x7D.parts.top"] = { topright = -0.15, }, -- right brace top
@@ -202,15 +160,6 @@ return {
["0x222C.parts.bottom"] = { bottomright = -0.15 }, -- iint
["0x222D.parts.bottom"] = { bottomright = -0.10 }, -- iiint
["0x2A0C.parts.bottom"] = { bottomright = -0.05 }, -- iiiint
- -- ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom,
- -- ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom,
- -- ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom,
- -- ["0x222E.variants.*"] = integral_variants, ["0x222E.parts.top"] = integral_top, ["0x222E.parts.bottom"] = integral_bottom,
- -- ["0x222F.variants.*"] = integral_variants, ["0x222F.parts.top"] = integral_top, ["0x222F.parts.bottom"] = integral_bottom,
- -- ["0x2230.variants.*"] = integral_variants, ["0x2230.parts.top"] = integral_top, ["0x2230.parts.bottom"] = integral_bottom,
- -- ["0x2231.variants.*"] = integral_variants, ["0x2231.parts.top"] = integral_top, ["0x2231.parts.bottom"] = integral_bottom,
- -- ["0x2232.variants.*"] = integral_variants, ["0x2232.parts.top"] = integral_top, ["0x2232.parts.bottom"] = integral_bottom,
- -- ["0x2233.variants.*"] = integral_variants, ["0x2233.parts.top"] = integral_top, ["0x2233.parts.bottom"] = integral_bottom,
},
},
{
@@ -282,34 +231,3 @@ return {
},
},
}
-
--- For now we keep these commented as they show where we came from.
-
--- {
--- tweak = "dimensions",
--- list = { -- offset width italic
--- [0x020D7] = { yoffset = -0.05 }, -- vec
--- [0x1D44E] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- a
--- [0x1D44F] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- b
--- [0x1D450] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- c
--- [0x1D451] = { xoffset = 0, width = 1, italic = 0, anchor = 0.7 }, -- d
--- [0x1D452] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- e
--- [0x1D453] = { xoffset = 0.50, width = 1.70, italic = 0.6, anchor = 1.2 }, -- f
--- [0x1D454] = { xoffset = 0.10, width = 1.15, italic = 0.2 }, -- g
--- [0x0210E] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- h
--- [0x1D458] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- k
--- [0x1D459] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- l
--- [0x1D45E] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- q
--- [0x1D463] = { xoffset = 0, width = 1, italic = 0, anchor = 1.25 }, -- v
--- [0x1D464] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- w
--- [0x1D6FE] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- \gamma
--- [0x1D706] = { xoffset = 0, width = 1, italic = 0, anchor = 1.05 }, -- \lambda
--- [0x1D70A] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- \omicron
--- [0x1D70D] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- \varsigma
--- [0x1D70E] = { xoffset = 0, width = 1, italic = 0, anchor = 1.1 }, -- \sigma
--- [0x1D70F] = { xoffset = -.10, width = 1, italic = 0, anchor = 0.95 }, -- \tau
--- [0x1D712] = { xoffset = 0.1, width = 1.2, italic = 0.1 }, -- \chi
--- [0x1D713] = { xoffset = -0.05, width = 0.95, italic = 0.1 }, -- \psi
--- [0x1D71D] = { xoffset = 0, width = 1, italic = 0, anchor = 0.7 }, -- \varpi
--- },
--- },
diff --git a/tex/context/fonts/mkiv/schola-math.lfg b/tex/context/fonts/mkiv/schola-math.lfg
index d1711bce0..e4a3ad397 100644
--- a/tex/context/fonts/mkiv/schola-math.lfg
+++ b/tex/context/fonts/mkiv/schola-math.lfg
@@ -12,24 +12,15 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 900,
- AccentTopShiftUp = -15,
- FlattenedAccentTopShiftUp = -15,
- -- AccentExtendMargin = 50,
- -- AccentBaseHeight = 0,
- AccentBaseDepth = 30,
- -- RadicalDegreeBottomRaisePercent = 60,
- -- RadicalKernAfterDegree = -500,
- -- RadicalRuleThickness = 64, -- 70 in font
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- DisplayOperatorMinHeight = 1800, -- 1333 in font
- -- PrimeRaisePercent = 50, -- set to 0 in math-act
- -- PrimeRaiseComposedPercent = 10, -- set to 0 in math-act
- PrimeShiftUp = "1.35*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.35*SuperscriptShiftUp",
- -- Can be improved: Smaller script and scriptscript, modified SuperShiftUp and SubShiftDown, ...
+ AccentTopShiftUp = -15,
+ FlattenedAccentTopShiftUp = -15,
+ AccentBaseDepth = 30,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ DisplayOperatorMinHeight = 1800, -- 1333 in font
+ PrimeShiftUp = "1.35*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.35*SuperscriptShiftUp",
+ -- Can be improved: Smaller script and scriptscript, modified SuperShiftUp and SubShiftDown, ...
},
tweaks = {
aftercopying = {
@@ -39,8 +30,6 @@ return {
},
{
tweak = "fixprimes",
- -- scale = 0.95,
- -- smaller = true,
factor = 0.74,
},
{
@@ -79,16 +68,6 @@ return {
["0x222C.parts.bottom"] = { bottomright = -0.15 }, -- iint
["0x222D.parts.bottom"] = { bottomright = -0.10 }, -- iiint
["0x2A0C.parts.bottom"] = { bottomright = -0.05 }, -- iiiint
- -- ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom,
- -- ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom,
- -- ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom,
- -- ["0x222E.variants.*"] = integral_variants, ["0x222E.parts.top"] = integral_top, ["0x222E.parts.bottom"] = integral_bottom,
- -- ["0x222F.variants.*"] = integral_variants, ["0x222F.parts.top"] = integral_top, ["0x222F.parts.bottom"] = integral_bottom,
- -- ["0x2230.variants.*"] = integral_variants, ["0x2230.parts.top"] = integral_top, ["0x2230.parts.bottom"] = integral_bottom,
- -- ["0x2231.variants.*"] = integral_variants, ["0x2231.parts.top"] = integral_top, ["0x2231.parts.bottom"] = integral_bottom,
- -- ["0x2232.variants.*"] = integral_variants, ["0x2232.parts.top"] = integral_top, ["0x2232.parts.bottom"] = integral_bottom,
- -- ["0x2233.variants.*"] = integral_variants, ["0x2233.parts.top"] = integral_top, ["0x2233.parts.bottom"] = integral_bottom,
-
},
},
@@ -98,22 +77,12 @@ return {
{
tweak = "extendaccents",
},
-{
- tweak = "radicaldegreeanchors",
- list = {
- -- [0x221A] = { location = "left", hfactor = 0.05 },
- -- ["0x221A.variants.*"] = { location = "left", hfactor = 0.05 },
- -- ["0x221A.variants.1"] = { location = "left", hfactor = 0.05, vfactor = .65 },
- -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .65 },
- -- ["0x221A.variants.3"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = 0.05, vfactor = .525 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.1 },
- }
-},
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.1 },
+ }
+ },
{
tweak = "fixaccents",
},
@@ -129,24 +98,7 @@ return {
},
},
-- Then we deal with all offsets and heights in one go. So we treat the initial accent
- -- as well as the variants here.
- {
- tweak = "dimensions",
- list = {
- -- here we want to apply to all
- -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060
- -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4
- -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6
- -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC
- -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8
- -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA
- -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7
- -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF
- -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9
- -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8
- -- [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self)
- },
- },
+ -- as well as the variants here. Not in schola
-- We now copy these to the not wide slots so that we can set these to stretch as well,
-- if only because it is less confusing and more consistent.
{
@@ -176,7 +128,6 @@ return {
},
{
tweak = "addfourier",
- -- scale = 1.25,
variant = 1,
},
{
diff --git a/tex/context/fonts/mkiv/stixtwo-math.lfg b/tex/context/fonts/mkiv/stixtwo-math.lfg
index dadc70067..b6b1757b6 100644
--- a/tex/context/fonts/mkiv/stixtwo-math.lfg
+++ b/tex/context/fonts/mkiv/stixtwo-math.lfg
@@ -28,24 +28,14 @@ return {
circled = { feature = 'ss16', value = 1, comment = "Mathematical Alternative Circled Operators" },
},
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 1000,
- -- AccentBaseHeight = 0,
- AccentBaseDepth = 30,
- FlattenedAccentTopShiftUp = 0,
- -- AccentExtendMargin = 50,
- -- RadicalDegreeBottomRaisePercent = 65,
- -- RadicalKernBeforeDegree = 500,
- RadicalKernAfterDegree = -500,
- -- RadicalVerticalGap = 10,
- -- RadicalRuleThickness = 68, -- 68 in font (but shifted down)
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- DisplayOperatorMinHeight = 1800, -- 1800 in font
- -- PrimeRaisePercent = 75, -- set to 0 in math-act
- -- PrimeRaiseComposedPercent = 10, -- set to 0 in math-act
- PrimeShiftUp = "1.3*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.3*SuperscriptShiftUp",
+ AccentBaseDepth = 30,
+ FlattenedAccentTopShiftUp = 0,
+ RadicalKernAfterDegree = -500,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ DisplayOperatorMinHeight = 1800, -- 1800 in font
+ PrimeShiftUp = "1.3*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.3*SuperscriptShiftUp",
},
tweaks = {
aftercopying = {
@@ -96,7 +86,6 @@ return {
[0x002F] = { topleft = -0.2, bottomright = -0.2 },
["0x7D.parts.top"] = { topright = -0.15, }, -- right brace top
["0x7D.parts.bottom"] = { bottomright = -0.15 }, -- right brace bottom
- -- ["0x7D.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right brace variants
["0x29.parts.top"] = { topright = -0.1, }, -- right parenthesis top
["0x29.parts.bottom"] = { bottomright = -0.1 }, -- right parenthesis bottom
["0x29.variants.*"] = { topright = -0.2, bottomright = -0.2 }, -- right parenthesis variants
@@ -109,18 +98,6 @@ return {
["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 },
--
["0x222B.parts.bottom"] = { bottomright = -0.30 }, -- int
- -- ["0x222C.parts.bottom"] = { bottomright = -0.15 }, -- iint does not exist
- -- ["0x222D.parts.bottom"] = { bottomright = -0.10 }, -- iiint does not exist
- -- ["0x2A0C.parts.bottom"] = { bottomright = -0.05 }, -- iiiint does not exist
- -- -- ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom,
- -- ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom,
- -- ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom,
- -- ["0x222E.variants.*"] = integral_variants, ["0x222E.parts.top"] = integral_top, ["0x222E.parts.bottom"] = integral_bottom,
- -- ["0x222F.variants.*"] = integral_variants, ["0x222F.parts.top"] = integral_top, ["0x222F.parts.bottom"] = integral_bottom,
- -- ["0x2230.variants.*"] = integral_variants, ["0x2230.parts.top"] = integral_top, ["0x2230.parts.bottom"] = integral_bottom,
- -- ["0x2231.variants.*"] = integral_variants, ["0x2231.parts.top"] = integral_top, ["0x2231.parts.bottom"] = integral_bottom,
- -- ["0x2232.variants.*"] = integral_variants, ["0x2232.parts.top"] = integral_top, ["0x2232.parts.bottom"] = integral_bottom,
- -- ["0x2233.variants.*"] = integral_variants, ["0x2233.parts.top"] = integral_top, ["0x2233.parts.bottom"] = integral_bottom,
},
},
-- Accents are a mess. We migrate the extensibles from the combiners to the base accent
@@ -129,23 +106,15 @@ return {
{
tweak = "extendaccents",
},
-
-{
- tweak = "radicaldegreeanchors",
- list = {
- [0x221A] = { location = "left", hfactor = 0.00, vfactor = 0.7 },
- ["0x221A.variants.*"] = { location = "left", hfactor = 0.00, vfactor = 0.55 },
- -- ["0x221A.variants.1"] = { location = "left", hfactor = 0.05, vfactor = .65 },
- -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .65 },
- ["0x221A.variants.3"] = { location = "left", hfactor = 0.00, vfactor = .525 },
- -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = 0.05, vfactor = .525 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.00 },
- }
-},
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ [0x221A] = { location = "left", hfactor = 0.00, vfactor = 0.7 },
+ ["0x221A.variants.*"] = { location = "left", hfactor = 0.00, vfactor = 0.55 },
+ ["0x221A.variants.3"] = { location = "left", hfactor = 0.00, vfactor = .525 },
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.00 },
+ }
+ },
{
tweak = "fixaccents",
@@ -167,16 +136,6 @@ return {
tweak = "dimensions",
list = {
-- here we want to apply to all
- -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060
- -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4
- -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6
- -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC
- -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8
- -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA
- -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7
- -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF
- -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9
- -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8
[0x020DB] = { yoffset = 0.025, height = .95, all = true }, -- widedddot : 0x20DB (self)
},
},
@@ -226,7 +185,6 @@ return {
template = 0x2192,
sequence = {
{ glyph = "first", factor = 2 },
--- { glyph = 0x2022 },
{ glyph = 0x2218 },
{ glyph = "first", factor = 2 },
{ glyph = "last" },
diff --git a/tex/context/fonts/mkiv/termes-math.lfg b/tex/context/fonts/mkiv/termes-math.lfg
index cff3090a9..d9c53ee28 100644
--- a/tex/context/fonts/mkiv/termes-math.lfg
+++ b/tex/context/fonts/mkiv/termes-math.lfg
@@ -12,27 +12,17 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 900,
- AccentTopShiftUp = -15,
- FlattenedAccentTopShiftUp = -15,
- -- AccentExtendMargin = 50,
- -- AccentBaseHeight = 0,
- AccentBaseDepth = 50,
- -- RadicalDegreeBottomRaisePercent = 60,
- -- RadicalRuleThickness = 46, -- 52 in font
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
- -- ScriptPercentScaleDown = 70, -- 74 in font (set in typescript)
- -- ScriptScriptPercentScaleDown = 50, -- 50 in font (set in typescript)
- SuperscriptShiftUp = 310, -- 339
- SubscriptShiftDown = 200, -- 222
- SubscriptShiftDownWithSuperscript = "1.4*SubscriptShiftDown", -- 1.5* in math-act
- -- PrimeRaisePercent = 60, -- set to 0 in math-act
- -- PrimeRaiseComposedPercent = 10, -- set to 0 in math-act
- PrimeShiftUp = "1.35*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.35*SuperscriptShiftUp",
+ AccentTopShiftUp = -15,
+ FlattenedAccentTopShiftUp = -15,
+ AccentBaseDepth = 50,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
+ SuperscriptShiftUp = 310, -- 339
+ SubscriptShiftDown = 200, -- 222
+ SubscriptShiftDownWithSuperscript = "1.40*SubscriptShiftDown", -- 1.5* in math-act
+ PrimeShiftUp = "1.35*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.35*SuperscriptShiftUp",
},
tweaks = {
aftercopying = {
@@ -42,8 +32,6 @@ return {
},
{
tweak = "fixprimes",
- -- scale = 0.9,
- -- smaller = true,
factor = 0.76,
},
{
@@ -84,15 +72,6 @@ return {
["0x222C.parts.bottom"] = { bottomright = -0.15 }, -- iint
["0x222D.parts.bottom"] = { bottomright = -0.10 }, -- iiint
["0x2A0C.parts.bottom"] = { bottomright = -0.05 }, -- iiiint
- -- ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom,
- -- ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom,
- -- ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom,
- -- ["0x222E.variants.*"] = integral_variants, ["0x222E.parts.top"] = integral_top, ["0x222E.parts.bottom"] = integral_bottom,
- -- ["0x222F.variants.*"] = integral_variants, ["0x222F.parts.top"] = integral_top, ["0x222F.parts.bottom"] = integral_bottom,
- -- ["0x2230.variants.*"] = integral_variants, ["0x2230.parts.top"] = integral_top, ["0x2230.parts.bottom"] = integral_bottom,
- -- ["0x2231.variants.*"] = integral_variants, ["0x2231.parts.top"] = integral_top, ["0x2231.parts.bottom"] = integral_bottom,
- -- ["0x2232.variants.*"] = integral_variants, ["0x2232.parts.top"] = integral_top, ["0x2232.parts.bottom"] = integral_bottom,
- -- ["0x2233.variants.*"] = integral_variants, ["0x2233.parts.top"] = integral_top, ["0x2233.parts.bottom"] = integral_bottom,
},
},
-- Accents are a mess. We migrate the extensibles from the combiners to the base accent
@@ -101,22 +80,14 @@ return {
{
tweak = "extendaccents",
},
-{
- tweak = "radicaldegreeanchors",
- list = {
- [0x221A] = { location = "left", hfactor = 0.0, vfactor = 0.6 },
- ["0x221A.variants.*"] = { location = "left", hfactor = 0.0, vfactor = 0.6 },
- -- ["0x221A.variants.1"] = { location = "left", hfactor = 0.05, vfactor = .65 },
- -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .65 },
- -- ["0x221A.variants.3"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = 0.05, vfactor = .525 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.1 },
- }
-},
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ [0x221A] = { location = "left", hfactor = 0.0, vfactor = 0.6 },
+ ["0x221A.variants.*"] = { location = "left", hfactor = 0.0, vfactor = 0.6 },
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.1 },
+ }
+ },
{
tweak = "fixaccents",
},
@@ -132,24 +103,7 @@ return {
},
},
-- Then we deal with all offsets and heights in one go. So we treat the initial accent
- -- as well as the variants here.
- {
- tweak = "dimensions",
- list = {
- -- here we want to apply to all
- -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060
- -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4
- -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6
- -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC
- -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8
- -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA
- -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7
- -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF
- -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9
- -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8
- -- [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self)
- },
- },
+ -- as well as the variants here. Not in termes.
-- We now copy these to the not wide slots so that we can set these to stretch as well,
-- if only because it is less confusing and more consistent.
{
@@ -176,6 +130,9 @@ return {
tweak = "addactuarian",
},
{
+ tweak = "addprimed",
+ },
+ {
tweak = "addequals",
},
{
@@ -198,27 +155,3 @@ return {
},
},
}
-
--- For now we keep these commented as they show where we came from.
-
--- Do a testrun with hats on these:
---
--- {
--- tweak = "dimensions",
--- list = {
--- [0x1D44F] = { width = 1, italic = 0, anchor = 1.3 }, -- b
--- [0x1D451] = { width = 1, italic = 0, anchor = 0.8 }, -- d
--- [0x1D452] = { width = 1, italic = 0, anchor = 0.9 }, -- e
--- [0x0210E] = { width = 1, italic = 0, anchor = 1.3 }, -- h
--- [0x1D458] = { width = 1, italic = 0, anchor = 1.3 }, -- k
--- [0x1D453] = { xoffset = 0.6, width = 1.4, italic = 1.2, anchor = 1.5 }, -- f
--- [0x1D457] = { xoffset = 0.5, width = 1.3, italic = 1.7 }, -- j
--- [0x1D45D] = { xoffset = 0.15, width = 1.15, italic = 0, anchor = 1.4 }, -- p
--- [0x1D45E] = { width = 1, italic = 0, anchor = 0.9 }, -- q
--- [0x1D464] = { width = 1, italic = 0, anchor = 1.1 }, -- w
--- [0x1D6FE] = { width = 1, italic = 0, anchor = 1.1 }, -- \gamma
--- [0x1D706] = { width = 1, italic = 0, anchor = 1.05 }, -- \lambda
--- [0x1D70A] = { width = 1, italic = 0, anchor = 1.2 }, -- \omicron
--- [0x1D70F] = { width = 1, italic = 0, anchor = 1.05 }, -- \tau
--- },
--- },
diff --git a/tex/context/fonts/mkiv/xcharter-math.lfg b/tex/context/fonts/mkiv/xcharter-math.lfg
index c91ea6fa7..1ff5d41d8 100644
--- a/tex/context/fonts/mkiv/xcharter-math.lfg
+++ b/tex/context/fonts/mkiv/xcharter-math.lfg
@@ -12,40 +12,21 @@ return {
copyright = "ConTeXt development team",
mathematics = {
parameters = {
- -- NoLimitSupFactor = 0,
- -- NoLimitSubFactor = 900,
- -- AccentBaseHeight = 0,
- -- AccentBaseDepth = 60,
- -- RadicalDegreeBottomRaisePercent = 55,
- -- RadicalKernAfterDegree = -600,
- -- RadicalRuleThickness = 45, -- 55 in font
- -- DelimiterPercent = 90,
- -- DelimiterShortfall = 400,
- -- DisplayOperatorMinHeight = 1800, -- 1300 in font (one size)
- SubscriptShiftDown = 200, -- 300 in font
- SubscriptShiftDownWithSuperscript = "1.3*SubscriptShiftDown", -- 1.5* in math-act
- PrimeShiftUp = "1.2*SuperscriptShiftUp",
- PrimeShiftUpCramped = "1.2*SuperscriptShiftUp",
+ SubscriptShiftDown = 200, -- 300 in font
+ SubscriptShiftDownWithSuperscript = "1.3*SubscriptShiftDown", -- 1.5* in math-act
+ PrimeShiftUp = "1.2*SuperscriptShiftUp",
+ PrimeShiftUpCramped = "1.2*SuperscriptShiftUp",
+ PrimeBaselineDropMax = "0.5*SuperscriptBaselineDropMax",
},
tweaks = {
aftercopying = {
{
tweak = "fixprimes",
factor = 0.92,
- -- scale = 1,
},
{
tweak = "addmirrors",
},
-{
- tweak = "dimensions",
- list = {
- -- ["0x222B.variants.*"] = { axis = 0.15 },
- },
-},
-{
- -- tweak = "fixintegrals",
-},
presets.scripttocalligraphic { },
presets.rsfstoscript { },
presets.rsfsuprighttoscript { },
@@ -78,23 +59,12 @@ return {
[0x00393] = { bottomright = -0.20, }, -- upright Gamma
},
},
-{
- tweak = "radicaldegreeanchors",
- list = {
- -- [0x221A] = { location = "left", hfactor = .1, vfactor = .3 },
- -- ["0x221A.variants.*"] = { location = "left", hfactor = .1, vfactor = .625 },
- -- ["0x221A.variants.1"] = { location = "left", hfactor = .1, vfactor = .575 },
- -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .575 },
- -- ["0x221A.variants.3"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 },
- -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top
- ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.025 },
- }
-},
-
+ {
+ tweak = "radicaldegreeanchors",
+ list = {
+ ["0x221A.parts.bottom"] = { location = "left", hfactor = .1, vfactor = 1.025 },
+ }
+ },
{
tweak = "checkspacing",
},
@@ -114,6 +84,9 @@ return {
tweak = "addequals",
},
{
+ tweak = "addprimed",
+ },
+ {
tweak = "addfourier",
variant = 2,
},
@@ -121,12 +94,6 @@ return {
tweak = "setoptions",
-- set = { "ignorekerndimensions" }
},
- -- this is the mkiv section
--- {
--- tweak = "emulatelmtx",
--- feature = "emulatelmtx",
--- comment = "this is for mkiv",
--- },
},
},
bigslots = {
diff --git a/tex/context/modules/mkxl/s-braille-basic.mkxl b/tex/context/modules/mkxl/s-braille-basic.mkxl
index 0a10f6ad6..aac6dc207 100644
--- a/tex/context/modules/mkxl/s-braille-basic.mkxl
+++ b/tex/context/modules/mkxl/s-braille-basic.mkxl
@@ -119,7 +119,7 @@
\startsection[title=Four]
- Here is some simple inline math: \formula {$x_2 = 10 \neq \alpha$} and here is
+ Here is some simple inline math: \formula {x_2 = 10 \neq \alpha} and here is
some (quick and dirty) display:
\startformula
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 53cd64c67..4bc9e13a2 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 : 2022-12-05 18:49
+-- merge date : 2022-12-07 20:21
do -- begin closure to overcome local limits and interference
@@ -927,7 +927,7 @@ if not modules then modules={} end modules ['l-string']={
license="see context related readme files"
}
local string=string
-local sub,gmatch,format,char,byte,rep,lower=string.sub,string.gmatch,string.format,string.char,string.byte,string.rep,string.lower
+local sub,gmatch,format,char,byte,rep,lower,find=string.sub,string.gmatch,string.format,string.char,string.byte,string.rep,string.lower,string.find
local lpegmatch,patterns=lpeg.match,lpeg.patterns
local P,S,C,Ct,Cc,Cs=lpeg.P,lpeg.S,lpeg.C,lpeg.Ct,lpeg.Cc,lpeg.Cs
local unquoted=patterns.squote*C(patterns.nosquote)*patterns.squote+patterns.dquote*C(patterns.nodquote)*patterns.dquote
@@ -937,10 +937,18 @@ end
function string.quoted(str)
return format("%q",str)
end
-function string.count(str,pattern)
+function string.count(str,pattern)
local n=0
- for _ in gmatch(str,pattern) do
- n=n+1
+ local i=1
+ local l=#pattern
+ while true do
+ i=find(str,pattern,i)
+ if i then
+ n=n+1
+ i=i+l
+ else
+ break
+ end
end
return n
end