summaryrefslogtreecommitdiff
path: root/tex/context/modules
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-03-12 18:45:40 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-03-12 18:45:40 +0100
commit188632f4b0f71c5170a20f1b151bde68f603bfd9 (patch)
tree49a5a917a1ce6f17cbb6f542dff5b8254cd74c70 /tex/context/modules
parentb7a7de31716616b7a5176259e2b60349f8089615 (diff)
downloadcontext-188632f4b0f71c5170a20f1b151bde68f603bfd9.tar.gz
2022-03-12 11:26:00
Diffstat (limited to 'tex/context/modules')
-rw-r--r--tex/context/modules/mkiv/m-zint.mkiv33
-rw-r--r--tex/context/modules/mkiv/s-math-characters.lua35
-rw-r--r--tex/context/modules/mkiv/s-math-characters.mkiv80
-rw-r--r--tex/context/modules/mkiv/s-math-parameters.lua22
-rw-r--r--tex/context/modules/mkxl/m-svg.mkxl39
-rw-r--r--tex/context/modules/mkxl/s-math-atoms.mkxl104
-rw-r--r--tex/context/modules/mkxl/s-math-definitions.mkxl56
-rw-r--r--tex/context/modules/mkxl/s-math-tweaks.mkxl185
8 files changed, 485 insertions, 69 deletions
diff --git a/tex/context/modules/mkiv/m-zint.mkiv b/tex/context/modules/mkiv/m-zint.mkiv
index 7fe9f761c..87e0d382c 100644
--- a/tex/context/modules/mkiv/m-zint.mkiv
+++ b/tex/context/modules/mkiv/m-zint.mkiv
@@ -68,9 +68,12 @@ function moduledata.zint.generate(code,data,suffix,options)
if not lfs.isfile(name) then
local temp = file.addsuffix(base,"tmp")
local code = numberofcode(code)
- logs.simple("using 'zint' to generate '%s'",base)
io.savedata(temp,data)
- os.execute(format('%s --barcode=%s --output="%s" --input="%s" %s',zint,code,name,temp,options or ""))
+ local command = format('%s --barcode=%s %s --output="%s" --input="%s"',zint,code,options or "",name,temp)
+ logs.simple("using 'zint' to generate '%s'",base)
+ logs.simple("command '%s'",command)
+ print(command)
+ os.execute(command)
os.remove(temp)
end
return name
@@ -83,10 +86,10 @@ end
\unexpanded\def\barcode[#1]% [alternative=,text=]
{\bgroup
\getdummyparameters
- [\c!alternative=,\c!text=,#1]%
+ [\c!alternative=,\c!text=,\c!suffix=eps,\c!option=,#1]%
\externalfigure
- [\cldcontext{moduledata.zint.generate("\dummyparameter\c!alternative",\!!bs\dummyparameter\c!text\!!es)}]%
- [#1,\c!alternative=,\c!text=]%
+ [\cldcontext{moduledata.zint.generate("\dummyparameter\c!alternative",\!!bs\dummyparameter\c!text\!!es,"\dummyparameter\c!suffix","\dummyparameter\c!option")}]%
+ [#1,\c!option=,\c!alternative=,\c!text=]%
\egroup}
\protect
@@ -95,15 +98,17 @@ end
\starttext
- \externalfigure[\cldcontext{moduledata.zint.generate("PDF417",[[Hans Hagen]])}]
- \blank
- \externalfigure[\cldcontext{moduledata.zint.generate("PDF417","Ton Otten")}]
- \blank
- \externalfigure[\cldcontext{moduledata.zint.generate("ISBN","9789490688011")}]
- \blank
- \barcode[text=Does It Work?,width=\textwidth]
- \blank
- \barcode[alternative=isbn,text=9789490688011,width=3cm]
+% \externalfigure[\cldcontext{moduledata.zint.generate("PDF417",[[Hans Hagen]])}]
+% \blank
+% \externalfigure[\cldcontext{moduledata.zint.generate("PDF417","Ton Otten")}]
+% \blank
+% \externalfigure[\cldcontext{moduledata.zint.generate("ISBN","9789490688011")}]
+% \blank
+% \barcode[text=Does It Work?,width=\textwidth]
+% \blank
+% \barcode[alternative=isbn,text=9789490688011,width=3cm]
+% \blank
+ \barcode[alternative=datamatrix,text=whatever,width=3cm,option=--square]
\stoptext
diff --git a/tex/context/modules/mkiv/s-math-characters.lua b/tex/context/modules/mkiv/s-math-characters.lua
index fc697cae5..aed3258d2 100644
--- a/tex/context/modules/mkiv/s-math-characters.lua
+++ b/tex/context/modules/mkiv/s-math-characters.lua
@@ -157,8 +157,8 @@ local alllookups = collectalllookups(tfmdata,"math","dflt")
-- skip
else
local next_sizes = char.next
- local vvariants = char.vvariants or char.vert_variants
- local hvariants = char.hvariants or char.horiz_variants
+ local vparts = char.vparts or char.vert_variants
+ local hparts = char.hparts or char.horiz_variants
local mathclass = info.mathclass
local mathspec = info.mathspec
local mathsymbol = info.mathsymbol
@@ -208,32 +208,33 @@ local alllookups = collectalllookups(tfmdata,"math","dflt")
done[next_sizes] = true
context.showmathcharactersnextentry(n,f_unicode(next_sizes),next_sizes)
next_sizes = characters[next_sizes]
- vvariants = next_sizes.vvariants or next_sizes.vert_variants or vvariants
- hvariants = next_sizes.hvariants or next_sizes.horiz_variants or hvariants
+ vparts = next_sizes.vparts or next_sizes.vert_variants or vparts
+ hparts = next_sizes.hparts or next_sizes.horiz_variants or hparts
if next_sizes then
next_sizes = next_sizes.next
end
end
end
context.showmathcharactersstopnext()
- if hvariants or vvariants then
+ if vparts or hparts then
context.showmathcharactersbetweennextandvariants()
end
end
- if hvariants then
- context.showmathcharactersstarthvariants()
- for i=1,#hvariants do -- we might go top-down in the original
- local vi = hvariants[i]
- context.showmathcharactershvariantsentry(i,f_unicode(vi.glyph),vi.glyph)
+ if vparts then
+ context.showmathcharactersstartvparts()
+ for i=1,#vparts do -- we might go top-down in the original
+ local vi = vparts[i]
+ context.showmathcharactersvpartsentry(i,f_unicode(vi.glyph),vi.glyph)
end
- context.showmathcharactersstophvariants()
- elseif vvariants then
- context.showmathcharactersstartvvariants()
- for i=1,#vvariants do
- local vi = vvariants[#vvariants-i+1]
- context.showmathcharactersvvariantsentry(i,f_unicode(vi.glyph),vi.glyph)
+ context.showmathcharactersstopvparts()
+ end
+ if hparts then
+ context.showmathcharactersstarthparts()
+ for i=1,#hparts do
+ local hi = hparts[#hparts-i+1]
+ context.showmathcharactershpartsentry(i,f_unicode(hi.glyph),hi.glyph)
end
- context.showmathcharactersstopvvariants()
+ context.showmathcharactersstophparts()
end
local lookups = alllookups[unicode]
if lookups then
diff --git a/tex/context/modules/mkiv/s-math-characters.mkiv b/tex/context/modules/mkiv/s-math-characters.mkiv
index e5e0d084f..c9011fbe1 100644
--- a/tex/context/modules/mkiv/s-math-characters.mkiv
+++ b/tex/context/modules/mkiv/s-math-characters.mkiv
@@ -20,33 +20,33 @@
\startsetups s-math-characters:reset
- \let\showmathcharactersstart \relax
- \let\showmathcharactersstop \relax
- \let\showmathcharactersreference \gobbleoneargument
- \let\showmathcharactersstartentry \relax
- \let\showmathcharactersstopentry \relax
- \let\showmathcharactersentryhexdectit \gobblethreearguments
- \let\showmathcharactersentrywdhtdpic \gobblefourarguments
- \let\showmathcharactersentryresource \gobbleoneargument
- \let\showmathcharactersstartnext \relax
- \let\showmathcharactersnextentry \gobblethreearguments
- \let\showmathcharactersnextcycle \gobbleonearguments
- \let\showmathcharactersstopnext \relax
- \let\showmathcharactersstarthvariants \relax
- \let\showmathcharactershvariantsentry \gobblethreearguments
- \let\showmathcharactersstophvariants \relax
- \let\showmathcharactersstartvvariants \showmathcharactersstarthvariants
- \let\showmathcharactersvvariantsentry \showmathcharactershvariantsentry
- \let\showmathcharactersstopvvariants \showmathcharactersstophvariants
- \let\showmathcharactersbetweennextandvariants\relax
- \let\showmathcharactersstartentryclassspec \relax
- \let\showmathcharactersstopentryclassspec \relax
- \let\showmathcharactersentryclassname \gobbletwoarguments
- \let\showmathcharactersentrysymbol \gobbletwoarguments
- \let\showmathcharactersstartlookupvariants \relax
- \let\showmathcharacterslookupvariant \gobblefourarguments
- \let\showmathcharactersstoplookupvariants \relax
- \let\showmathcharacterssetrange \gobblethreearguments
+ \let\showmathcharactersstart \relax
+ \let\showmathcharactersstop \relax
+ \let\showmathcharactersreference \gobbleoneargument
+ \let\showmathcharactersstartentry \relax
+ \let\showmathcharactersstopentry \relax
+ \let\showmathcharactersentryhexdectit \gobblethreearguments
+ \let\showmathcharactersentrywdhtdpic \gobblefourarguments
+ \let\showmathcharactersentryresource \gobbleoneargument
+ \let\showmathcharactersstartnext \relax
+ \let\showmathcharactersnextentry \gobblethreearguments
+ \let\showmathcharactersnextcycle \gobbleonearguments
+ \let\showmathcharactersstopnext \relax
+ \let\showmathcharactersstarthparts \relax
+ \let\showmathcharactershpartsentry \gobblethreearguments
+ \let\showmathcharactersstophparts \relax
+ \let\showmathcharactersstartvparts \relax
+ \let\showmathcharactersvpartsentry \gobblethreearguments
+ \let\showmathcharactersstopvparts \relax
+ \let\showmathcharactersbetweennextandvparts\relax
+ \let\showmathcharactersstartentryclassspec \relax
+ \let\showmathcharactersstopentryclassspec \relax
+ \let\showmathcharactersentryclassname \gobbletwoarguments
+ \let\showmathcharactersentrysymbol \gobbletwoarguments
+ \let\showmathcharactersstartlookupvariants \relax
+ \let\showmathcharacterslookupvariant \gobblefourarguments
+ \let\showmathcharactersstoplookupvariants \relax
+ \let\showmathcharacterssetrange \gobblethreearguments
\stopsetups
@@ -70,7 +70,7 @@
{virtual:\space##1\par}
\def\showmathcharactersstartnext
- {\par\begingroup\hangindent\emwidth\hangafter-\plushundred\hskip-\emwidth
+ {\par\begingroup\hangindent\emwidth\hangafter-\plushundred\hskip-\emwidth\relax
next:\space}
\def\showmathcharactersnextentry##1##2##3%
@@ -82,21 +82,25 @@
\def\showmathcharactersstopnext
{\par\endgroup}
- \def\showmathcharactersstarthvariants
- {\par\begingroup\hangindent\emwidth\hangafter-\plushundred\hskip-\emwidth
- variants:\space}
+ \def\showmathcharactersstartparts
+ {\par\begingroup\hangindent\emwidth\hangafter-\plushundred\hskip-\emwidth\relax
+ parts:\space}
- \def\showmathcharactershvariantsentry##1##2##3%
+ \def\showmathcharacterspartsentry##1##2##3%
{\ifnum##1>\plusone \space=>\space\fi##2~\ruledhbox{\char##3}}
- \def\showmathcharactersstophvariants
+ \def\showmathcharactersstopparts
{\par\endgroup}
- \let\showmathcharactersstartvvariants\showmathcharactersstarthvariants
- \let\showmathcharactersvvariantsentry\showmathcharactershvariantsentry
- \let\showmathcharactersstopvvariants \showmathcharactersstophvariants
+ \let\showmathcharactersstartvparts\showmathcharactersstartparts
+ \let\showmathcharactersvpartsentry\showmathcharacterspartsentry
+ \let\showmathcharactersstopvparts \showmathcharactersstopparts
- \def\showmathcharactersbetweennextandvariants
+ \let\showmathcharactersstarthparts\showmathcharactersstartparts
+ \let\showmathcharactershpartsentry\showmathcharacterspartsentry
+ \let\showmathcharactersstophparts \showmathcharactersstopparts
+
+ \def\showmathcharactersbetweennextandparts
{}% \space=>\space}
\def\showmathcharactersentryclassname##1##2%
@@ -106,7 +110,7 @@
{mathsymbol:\space##1~\ruledhbox{\char##2}\par}
\def\showmathcharactersstartlookupvariants
- {\par\begingroup\hangindent\emwidth\hangafter-\plushundred\hskip-\emwidth
+ {\par\begingroup\hangindent\emwidth\hangafter-\plushundred\hskip-\emwidth\relax
lookupvariants:\space}
\def\showmathcharacterslookupvariant##1##2##3##4%
diff --git a/tex/context/modules/mkiv/s-math-parameters.lua b/tex/context/modules/mkiv/s-math-parameters.lua
index 8e8c15a2d..73d5f4208 100644
--- a/tex/context/modules/mkiv/s-math-parameters.lua
+++ b/tex/context/modules/mkiv/s-math-parameters.lua
@@ -34,6 +34,28 @@ tables.parameters = {
"spaceafterscript", "connectoroverlapmin",
}
+if CONTEXTLMTXMODE > 0 then
+
+ tables.styleaxis = table.imerged ( tables.styleaxis, {
+ "frac", "rad",
+ } )
+
+ tables.parameters = table.imerged ( tables.parameters, {
+ "extrasupshift", "extrasubshift", "extrasuppreshift", "extrasubpreshift",
+ "extrasupspace", "extrasubspace", "extrasupprespace", "extrasubprespace",
+ -- "overlinevariant", "underlinevariant",
+ -- "overdelimitervariant", "underdelimitervariant",
+ -- "delimiterovervariant", "delimiterundervariant",
+ -- "hextensiblevariant", "vextensiblevariant",
+ -- "fractionvariant", "radicalvariant", "degreevariant",
+ -- "accentvariant", "topaccentvariant", "botaccentvariant", "overlayaccentvariant",
+ -- "numeratorvariant", "denominatorvariant",
+ -- "superscriptvariant", "subscriptvariant",
+ -- "stackvariant",
+ } )
+
+end
+
tables.styles = {
"display",
"text",
diff --git a/tex/context/modules/mkxl/m-svg.mkxl b/tex/context/modules/mkxl/m-svg.mkxl
new file mode 100644
index 000000000..56a101979
--- /dev/null
+++ b/tex/context/modules/mkxl/m-svg.mkxl
@@ -0,0 +1,39 @@
+%D \module
+%D [ file=m-svg,
+%D version=2022.02.18,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=SVG Helper Macros,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\protected\def\showSVGcode#1#2%
+ {\ctxlua{metapost.showsvgpage{
+ filename = "#1",
+ index = tonumber(#2),
+ method = "code"
+ }}}
+
+\protected\def\showSVGcodeG#1#2%
+ {\ctxlua{metapost.showsvgpage{
+ filename = "#1",
+ index = tonumber(#2),
+ method = "code",
+ x = 0,
+ y = 1000,
+ width = 1000,
+ height = 1000,
+ noclip = true
+ }}}
+
+\protected\def\typeSVGcode#1#2%
+ {\ctxlua{metapost.typesvgpage{
+ filename = "#1",
+ index = tonumber(#2)
+ }}}
+
+% \continueifinputfile{m-svg.mkxl}
diff --git a/tex/context/modules/mkxl/s-math-atoms.mkxl b/tex/context/modules/mkxl/s-math-atoms.mkxl
new file mode 100644
index 000000000..1b5ebed41
--- /dev/null
+++ b/tex/context/modules/mkxl/s-math-atoms.mkxl
@@ -0,0 +1,104 @@
+%D \module
+%D [ file=s-math-atoms.mksl,
+%D version=2022.02.13,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Show Math Atom Spacing,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is just a quick and dirty overview.
+
+\startmodule[math-atoms]
+
+\setvalue{atom:\number\mathordinarycode }{ord}%inary}
+\setvalue{atom:\number\mathoperatorcode }{ope}%rator}
+\setvalue{atom:\number\mathbinarycode }{bin}%ary}
+\setvalue{atom:\number\mathrelationcode }{rel}%ation}
+\setvalue{atom:\number\mathopencode }{ope}%n}
+\setvalue{atom:\number\mathclosecode }{clo}%se}
+\setvalue{atom:\number\mathpunctuationcode }{pun}%ctuation}
+%setvalue{atom:\number\mathinnercode }{inn}%er}
+%setvalue{atom:\number\mathovercode }{ove}%r}
+%setvalue{atom:\number\mathundercode }{und}%er}
+\setvalue{atom:\number\mathfractioncode }{fra}%ction}
+\setvalue{atom:\number\mathradicalcode }{rad}%ical}
+\setvalue{atom:\number\mathmiddlecode }{mid}%dle}
+%setvalue{atom:\number\mathaccentcode }{acc}%ent}
+%setvalue{atom:\number\mathfencedcode }{fen}%ced}
+%setvalue{atom:\number\mathvariablecode }{var}%iable}
+%setvalue{atom:\number\mathactivecode }{act}%ive}
+%setvalue{atom:\number\mathvcentercode }{vce}%nter}
+%setvalue{atom:\number\mathreservedcode }{res}%erved}
+%setvalue{atom:\number\mathimaginarycode }{ima}%ginary}
+%setvalue{atom:\number\mathdifferentialcode}{dif}%ferential}
+%setvalue{atom:\number\mathexponentialcode }{exp}%onential}
+\setvalue{atom:\number\mathfunctioncode }{fun}%ction}
+\setvalue{atom:\number\mathdigitcode }{dig}%it}
+
+\dostepwiserecurse \mathordinarycode \mathdigitcode \plusone {
+ \setmathatomrule \mathbegincode #1 \allmathstyles \mathbegincode #1
+ \setmathatomrule #1 \mathendcode \allmathstyles #1 \mathendcode
+ \dostepwiserecurse \mathordinarycode \mathdigitcode \plusone {
+ \setmathatomrule#1 ##1 \allmathstyles #1 ##1
+ }
+}
+
+\protected\def\showmathatomspacing#1{
+ \startTEXpage[offset=10pt]
+ \showmakeup[mathglue]
+ \bTABLE[align=middle,width=4em]
+ \dostepwiserecurse \mathordinarycode \mathdigitcode \plusone {%
+ \ifcsname atom:##1\endcsname
+ \bTR
+ \dostepwiserecurse \mathordinarycode \mathdigitcode \plusone {%
+ \ifcsname atom:####1\endcsname
+ \bTD
+ $ #1%
+ \mathatom class ##1 {\hpack to 1.5em{\infofont[\hss\getvalue{atom:##1}\hss]}}
+ \mathatom class ####1 {\hpack to 1.5em{\infofont[\hss\getvalue{atom:####1}\hss]}}
+ $
+ \eTD
+ \fi
+ }
+ \eTR
+ \fi
+ }
+ \bTR[frame=off]
+ \bTD[nx=12,height=6ex,align={middle,lohi}]
+ \type{#1}
+ \eTD
+ \eTR
+ \bTR
+ \bTD[nx=12,align=middle]
+ \infofont\hfill
+ tiny : \the\tinymuskip\hfill
+ thin : \the\thinmuskip\hfill
+ med : \the\medmuskip\hfill
+ thick : \the\thickmuskip\hfill\strut
+ \eTD
+ \eTR
+ \eTABLE
+ \stopTEXpage
+}
+
+\stopmodule
+
+\continueifinputfile{s-math-atoms.mkxl}
+
+\starttext
+
+ \showmathatomspacing{\displaystyle}
+ \showmathatomspacing{\textstyle}
+ \showmathatomspacing{\scriptstyle}
+ \showmathatomspacing{\scriptscriptstyle}
+ \showmathatomspacing{\crampeddisplaystyle}
+ \showmathatomspacing{\crampedtextstyle}
+ \showmathatomspacing{\crampedscriptstyle}
+ \showmathatomspacing{\crampedscriptscriptstyle}
+
+\stoptext
diff --git a/tex/context/modules/mkxl/s-math-definitions.mkxl b/tex/context/modules/mkxl/s-math-definitions.mkxl
new file mode 100644
index 000000000..8b99ae602
--- /dev/null
+++ b/tex/context/modules/mkxl/s-math-definitions.mkxl
@@ -0,0 +1,56 @@
+%D \module
+%D [ file=s-math-definitions.mkxl,
+%D version=2022.01.27,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Math Definition Checking,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D I use this file for checking the classes as set in \type {char-def.lua}. It
+%D could work with \MKIV\ but because we have more clases in \LMTX\ we only use
+%D (and need) it there.
+
+\startmodule[math-definitions]
+
+\registerctxluafile{s-math-definitions}{autosuffix}
+
+\permanent\tolerant\protected\def\showmathcharacterdefinitions[#1]%
+ {\ctxlua{moduledata.math.definitions.showlist()}}
+
+\permanent\tolerant\protected\def\showmathatomspacing[#1]%
+ {\ctxlua{moduledata.math.definitions.showatoms()}}
+
+\def\ShowMathAtomSpacingPage#1#2#3#4%
+ {\startTEXpage[offset=10pt]
+ \raggedcenter
+ \dontleavehmode\framed
+ [height=60pt,width=150pt]
+ {$\showglyphs\showmakeup[math]#3 #4$}
+ \blank
+ \strut\infofont\detokenize{#1 #2 : $#3 #4$}
+ \stopTEXpage}
+
+\permanent\tolerant\protected\def\showmathatomspacingpage[#1]%
+ {\ctxlua{moduledata.math.definitions.showatomspage()}}
+
+\stopmodule
+
+\continueifinputfile{s-math-definitions.mkxl}
+
+\setuplayout[tight]
+
+\setupbodyfont[cambria,10pt]
+
+\starttext
+ \showmathatomspacing
+% \page
+% \showmathatomspacingpage
+% \page
+% \showmathcharacterdefinitions
+\stoptext
+
diff --git a/tex/context/modules/mkxl/s-math-tweaks.mkxl b/tex/context/modules/mkxl/s-math-tweaks.mkxl
new file mode 100644
index 000000000..2579f1ec4
--- /dev/null
+++ b/tex/context/modules/mkxl/s-math-tweaks.mkxl
@@ -0,0 +1,185 @@
+%D \module
+%D [ file=s-math-atoms.mksl,
+%D version=2022.02.13,
+%D title=\CONTEXT\ Style File,
+%D subtitle=Show Math Atom Spacing,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This is just a quick and dirty overview.
+
+\startmodule[math-tweaks]
+
+\unprotect
+
+\starttexdefinition protected showmathfonttweaks_text_accent #1
+ \bTR
+ \bTD[width=7em,align=flushleft,style=mono] #1 \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{i} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{I} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{x} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{X} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{xx} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{XX} } \eTD
+ \eTR
+\stoptexdefinition
+
+\starttexdefinition protected showmathfonttweaks_wide_accent #1
+ \bTR
+ \bTD[width=7em,align=flushleft,style=mono] #1 \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{i} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{I} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{x} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{X} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{xx} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{XX} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{xxxxx} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{XXXXX} } \eTD
+ \eTR
+\stoptexdefinition
+
+\starttexdefinition protected showmathfonttweaks_prime #1
+ \bTR
+ \bTD \type{#1} \eTD
+ \bTD \m {\showglyphs #1} \eTD
+ \eTR
+\stoptexdefinition
+
+\starttexdefinition protected showmathfonttweaks_bracer #1
+ \bTR
+ \bTD \type{#1} \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{x} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{xxxxx} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{X} } \eTD
+ \bTD \m {\showglyphs \getvalue{#1}{XXXXX} } \eTD
+ \eTR
+\stoptexdefinition
+
+\starttexdefinition protected showmathfonttweaks
+
+ \startsubject[title=text accents]
+ \startlinecorrection
+ \bTABLE[align=middle,offset=1ex]
+ \showmathfonttweaks_text_accent{grave}
+ \showmathfonttweaks_text_accent{bar}
+ \showmathfonttweaks_text_accent{acute}
+ \showmathfonttweaks_text_accent{hat}
+ \showmathfonttweaks_text_accent{check}
+ \showmathfonttweaks_text_accent{breve}
+ \showmathfonttweaks_text_accent{dot}
+ \showmathfonttweaks_text_accent{ring}
+ \showmathfonttweaks_text_accent{tilde}
+ \showmathfonttweaks_text_accent{ddot}
+ \showmathfonttweaks_text_accent{dddot}
+ \eTABLE
+ \stoplinecorrection
+ \stopsubject
+
+ \startsubject[title=wide accents]
+ \startlinecorrection
+ \bTABLE[align=middle,offset=1ex]
+ \showmathfonttweaks_wide_accent{widegrave}
+ \showmathfonttweaks_wide_accent{widebar}
+ \showmathfonttweaks_wide_accent{wideacute}
+ \showmathfonttweaks_wide_accent{widehat}
+ \showmathfonttweaks_wide_accent{widecheck}
+ \showmathfonttweaks_wide_accent{widebreve}
+ \showmathfonttweaks_wide_accent{widedot}
+ \showmathfonttweaks_wide_accent{widering}
+ \showmathfonttweaks_wide_accent{widetilde}
+ \showmathfonttweaks_wide_accent{wideddot}
+ \showmathfonttweaks_wide_accent{widedddot}
+ \eTABLE
+ \stoplinecorrection
+ \stopsubject
+
+ \startsubject[title=primes]
+ \startlinecorrection
+ \bTABLE[align=flushleft,offset=1ex]
+ \showmathfonttweaks_prime{x'}
+ \showmathfonttweaks_prime{x''}
+ \showmathfonttweaks_prime{x'''}
+ \showmathfonttweaks_prime{X'}
+ \showmathfonttweaks_prime{X''}
+ \showmathfonttweaks_prime{X'''}
+ \showmathfonttweaks_prime{x'}
+ \showmathfonttweaks_prime{x'^2}
+ \showmathfonttweaks_prime{x'_2}
+ \showmathfonttweaks_prime{x'^2_2}
+ \showmathfonttweaks_prime{x'}
+ \showmathfonttweaks_prime{x^2'}
+ \showmathfonttweaks_prime{x_2'}
+ \showmathfonttweaks_prime{x^2_2'}
+ \eTABLE
+ \stoplinecorrection
+ \stopsubject
+
+ \startsubject[title=bracers]
+ \startlinecorrection
+ \bTABLE[align=flushleft,offset=1ex]
+ \showmathfonttweaks_bracer{overbrace}
+ \showmathfonttweaks_bracer{underbrace}
+ \showmathfonttweaks_bracer{overbracket}
+ \showmathfonttweaks_bracer{underbracket}
+ \showmathfonttweaks_bracer{overparent}
+ \showmathfonttweaks_bracer{underparent}
+ \showmathfonttweaks_bracer{overbar}
+ \showmathfonttweaks_bracer{underbar}
+ \showmathfonttweaks_bracer{overline}
+ \showmathfonttweaks_bracer{underline}
+ \eTABLE
+ \stoplinecorrection
+ \stopsubject
+
+ \startsubject[title=whatever]
+ \startlinecorrection
+ \bTABLE[align=flushleft,offset=1ex]
+ \bTR
+ \bTD \m{\mfunction{máx}}\eTD
+ \eTR
+ \eTABLE
+ \stoplinecorrection
+ \stopsubject
+\stoptexdefinition
+
+\protect
+
+\stopmodule
+
+\continueifinputfile{s-math-tweaks.mkxl}
+
+\setuplayout
+ [tight]
+
+\starttext
+
+\definefontfeature[mathextra][compose=yes]
+
+% \number"23DC
+ \doifelse {\getdocumentargument{bodyfont}} {} {
+
+% \setupbodyfont[cambria,10pt] \starttitle[title=\fontclass] \showmathfonttweaks \stoptitle
+% \setupbodyfont[modern] \starttitle[title=\fontclass] \showmathfonttweaks \stoptitle
+% \setupbodyfont[pagella] \starttitle[title=\fontclass] \showmathfonttweaks \stoptitle
+% \setupbodyfont[termes] \starttitle[title=\fontclass] \showmathfonttweaks \stoptitle
+% \setupbodyfont[bonum] \starttitle[title=\fontclass] \showmathfonttweaks \stoptitle
+% \setupbodyfont[schola] \starttitle[title=\fontclass] \showmathfonttweaks \stoptitle
+% \setupbodyfont[lucidaot,10pt] \starttitle[title=\fontclass] \showmathfonttweaks \stoptitle
+ \setupbodyfont[ebgaramond] \starttitle[title=\fontclass] \showmathfonttweaks \stoptitle
+% \setupbodyfont[stixtwo] \starttitle[title=\fontclass] \showmathfonttweaks \stoptitle
+
+ } {
+
+ \normalexpanded{\setupbodyfont[\getdocumentargument{bodyfont},12pt]}
+ \showmathfonttweaks
+
+ }
+
+
+\stoptext
+