summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-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/context.mkxl2
-rw-r--r--tex/context/base/mkiv/luat-cod.lua6
-rw-r--r--tex/context/base/mkiv/mlib-cnt.lmt (renamed from tex/context/base/mkiv/mlib-cnt.lua)0
-rw-r--r--tex/context/base/mkiv/mlib-ctx.lua27
-rw-r--r--tex/context/base/mkiv/mlib-ctx.mkiv10
-rw-r--r--tex/context/base/mkiv/mlib-ctx.mkxl21
-rw-r--r--tex/context/base/mkiv/mlib-int.lmt130
-rw-r--r--tex/context/base/mkiv/mlib-int.lua354
-rw-r--r--tex/context/base/mkiv/mlib-lmp.lmt70
-rw-r--r--tex/context/base/mkiv/mlib-lmp.lua138
-rw-r--r--tex/context/base/mkiv/mlib-lmt.lmt (renamed from tex/context/base/mkiv/mlib-lmt.lua)0
-rw-r--r--tex/context/base/mkiv/mlib-lua.lmt120
-rw-r--r--tex/context/base/mkiv/mlib-lua.lua1412
-rw-r--r--tex/context/base/mkiv/mlib-mat.lmt (renamed from tex/context/base/mkiv/mlib-mat.lua)0
-rw-r--r--tex/context/base/mkiv/mlib-mpf.lua1245
-rw-r--r--tex/context/base/mkiv/mlib-pps.lua4
-rw-r--r--tex/context/base/mkiv/mlib-ran.lmt (renamed from tex/context/base/mkiv/mlib-ran.lua)0
-rw-r--r--tex/context/base/mkiv/mlib-run.lua273
-rw-r--r--tex/context/base/mkiv/mlib-scn.lmt (renamed from tex/context/base/mkiv/mlib-scn.lua)0
-rw-r--r--tex/context/base/mkiv/mlib-svg.lmt (renamed from tex/context/base/mkiv/mlib-svg.lua)0
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin27742 -> 27734 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin255197 -> 255207 bytes
-rw-r--r--tex/context/base/mkiv/toks-ini.lua2
-rw-r--r--tex/context/interface/mkiv/context-en.xml124
-rw-r--r--tex/context/interface/mkiv/i-attachment.xml22
-rw-r--r--tex/context/interface/mkiv/i-bar.xml100
-rw-r--r--tex/context/interface/mkiv/i-buffer.xml6
-rw-r--r--tex/context/interface/mkiv/i-columns.xml8
-rw-r--r--tex/context/interface/mkiv/i-comment.xml23
-rw-r--r--tex/context/interface/mkiv/i-common-instance.xml4
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin954235 -> 959252 bytes
-rw-r--r--tex/context/interface/mkiv/i-delimitedtext.xml80
-rw-r--r--tex/context/interface/mkiv/i-fittingpage.xml20
-rw-r--r--tex/context/interface/mkiv/i-floats.xml196
-rw-r--r--tex/context/interface/mkiv/i-formula.xml28
-rw-r--r--tex/context/interface/mkiv/i-fraction.xml67
-rw-r--r--tex/context/interface/mkiv/i-framed.xml71
-rw-r--r--tex/context/interface/mkiv/i-indent.xml2
-rw-r--r--tex/context/interface/mkiv/i-labeltext.xml385
-rw-r--r--tex/context/interface/mkiv/i-lines.xml12
-rw-r--r--tex/context/interface/mkiv/i-list.xml28
-rw-r--r--tex/context/interface/mkiv/i-makeup.xml36
-rw-r--r--tex/context/interface/mkiv/i-margindata.xml265
-rw-r--r--tex/context/interface/mkiv/i-mathalignment.xml20
-rw-r--r--tex/context/interface/mkiv/i-mathcases.xml20
-rw-r--r--tex/context/interface/mkiv/i-mathmatrix.xml20
-rw-r--r--tex/context/interface/mkiv/i-mathstackers.xml838
-rw-r--r--tex/context/interface/mkiv/i-mixedcolumns.xml12
-rw-r--r--tex/context/interface/mkiv/i-note.xml81
-rw-r--r--tex/context/interface/mkiv/i-pairedbox.xml30
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin24964 -> 24972 bytes
-rw-r--r--tex/context/interface/mkiv/i-script.xml18
-rw-r--r--tex/context/interface/mkiv/i-sectionblock.xml48
-rw-r--r--tex/context/interface/mkiv/i-shift.xml16
-rw-r--r--tex/context/interface/mkiv/i-sort.xml27
-rw-r--r--tex/context/interface/mkiv/i-synonym.xml28
-rw-r--r--tex/context/interface/mkiv/i-tabulation.xml18
-rw-r--r--tex/context/interface/mkiv/i-tooltip.xml26
-rw-r--r--tex/context/interface/mkiv/i-unit.xml10
-rw-r--r--tex/context/interface/mkiv/i-verbatim.xml103
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
65 files changed, 2072 insertions, 4544 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 6a5882366..bc18e3c22 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{2020.07.13 16:23}
+\newcontextversion{2020.07.13 23:44}
%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 b087acf4f..f45afe0a8 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{2020.07.13 16:23}
+\edef\contextversion{2020.07.13 23:44}
%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 f41893ad6..dad7578d4 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{2020.07.13 16:23}
+\newcontextversion{2020.07.13 23:44}
%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 4ce7764ff..3ef78b28c 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -45,7 +45,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2020.07.13 16:23}
+\edef\contextversion{2020.07.13 23:44}
%D Kind of special:
diff --git a/tex/context/base/mkiv/context.mkxl b/tex/context/base/mkiv/context.mkxl
index 9f3235584..614c9a659 100644
--- a/tex/context/base/mkiv/context.mkxl
+++ b/tex/context/base/mkiv/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2020.07.13 16:23}
+\edef\contextversion{2020.07.13 23:44}
%D Kind of special:
diff --git a/tex/context/base/mkiv/luat-cod.lua b/tex/context/base/mkiv/luat-cod.lua
index 8d5d65a45..18126b186 100644
--- a/tex/context/base/mkiv/luat-cod.lua
+++ b/tex/context/base/mkiv/luat-cod.lua
@@ -59,9 +59,6 @@ local strip = false if arg then for i=-1,#arg do if arg[i] == "--c:strip" then s
function lua.registercode(filename,options)
local barename = gsub(filename,"%.[%a%d]+$","")
- if barename == filename then
- filename = filename .. ".lua"
- end
local basename = match(barename,"^.+[/\\](.-)$") or barename
if not bytedone[basename] then
local opts = { }
@@ -70,6 +67,9 @@ function lua.registercode(filename,options)
opts[s] = true
end
end
+ if barename == filename then
+ filename = filename .. (opts.autosuffix and CONTEXTLMTXMODE > 0 and ".lmt" or ".lua")
+ end
local code = environment.luafilechunk(filename,false,opts.optimize)
if code then
bytedone[basename] = true
diff --git a/tex/context/base/mkiv/mlib-cnt.lua b/tex/context/base/mkiv/mlib-cnt.lmt
index 667384ed7..667384ed7 100644
--- a/tex/context/base/mkiv/mlib-cnt.lua
+++ b/tex/context/base/mkiv/mlib-cnt.lmt
diff --git a/tex/context/base/mkiv/mlib-ctx.lua b/tex/context/base/mkiv/mlib-ctx.lua
index c913408cd..0240c6a80 100644
--- a/tex/context/base/mkiv/mlib-ctx.lua
+++ b/tex/context/base/mkiv/mlib-ctx.lua
@@ -400,3 +400,30 @@ implement {
name = "mptexreset",
actions = mptex.reset
}
+
+-- moved from mlib-lua:
+
+mp = mp or { -- system namespace
+ set = { },
+ get = { },
+ aux = { },
+ scan = { },
+ inject = { },
+}
+
+MP = MP or { } -- user namespace
+
+-- We had this:
+--
+-- table.setmetatablecall(mp,function(t,k) mpprint(k) end)
+--
+-- but the next one is more interesting because we cannot use calls like:
+--
+-- lua.mp.somedefdname("foo")
+--
+-- which is due to expansion of somedefdname during suffix creation. So:
+--
+-- lua.mp("somedefdname","foo")
+
+table.setmetatablecall(mp,function(t,k,...) return t[k](...) end)
+table.setmetatablecall(MP,function(t,k,...) return t[k](...) end)
diff --git a/tex/context/base/mkiv/mlib-ctx.mkiv b/tex/context/base/mkiv/mlib-ctx.mkiv
index a1ed7efeb..61b02ad88 100644
--- a/tex/context/base/mkiv/mlib-ctx.mkiv
+++ b/tex/context/base/mkiv/mlib-ctx.mkiv
@@ -15,12 +15,10 @@
\registerctxluafile{mlib-run}{}
\registerctxluafile{mlib-ctx}{}
-\registerctxluafile{mlib-lua}{}
-\registerctxluafile{mlib-lmp}{}
-\registerctxluafile{mlib-int}{}
-
-\doifelsefileexists{mlib-cnt.lua}{\registerctxluafile{mlib-cnt}{optimize}}{}
-\doifelsefileexists{mlib-svg.lua}{\registerctxluafile{mlib-svg}{optimize}}{}
+\registerctxluafile{mlib-lua}{autosuffix}
+\registerctxluafile{mlib-mpf}{}
+\registerctxluafile{mlib-lmp}{autosuffix}
+\registerctxluafile{mlib-int}{autosuffix}
\unprotect
diff --git a/tex/context/base/mkiv/mlib-ctx.mkxl b/tex/context/base/mkiv/mlib-ctx.mkxl
index dd2d0ae24..8069f5932 100644
--- a/tex/context/base/mkiv/mlib-ctx.mkxl
+++ b/tex/context/base/mkiv/mlib-ctx.mkxl
@@ -15,18 +15,17 @@
\registerctxluafile{mlib-run}{}
\registerctxluafile{mlib-ctx}{}
-\registerctxluafile{mlib-lua}{}
-\registerctxluafile{mlib-scn}{}
-\registerctxluafile{mlib-mat}{}
-\registerctxluafile{mlib-ran}{}
-\registerctxluafile{mlib-lmp}{}
-\registerctxluafile{mlib-int}{}
-\registerctxluafile{mlib-lmt}{}
-
-\doifelsefileexists{mlib-cnt.lua}{\registerctxluafile{mlib-cnt}{}}{}
-\doifelsefileexists{mlib-svg.lua}{\registerctxluafile{mlib-svg}{}}{}
+\registerctxluafile{mlib-lua}{autosuffix}
+\registerctxluafile{mlib-mpf}{}
+\registerctxluafile{mlib-scn}{autosuffix}
+\registerctxluafile{mlib-mat}{autosuffix}
+\registerctxluafile{mlib-ran}{autosuffix}
+\registerctxluafile{mlib-lmp}{autosuffix}
+\registerctxluafile{mlib-int}{autosuffix}
+\registerctxluafile{mlib-lmt}{autosuffix}
+\registerctxluafile{mlib-cnt}{autosuffix,optimize}
+\registerctxluafile{mlib-svg}{autosuffix,optimize}
\unprotect
\protect \endinput
-
diff --git a/tex/context/base/mkiv/mlib-int.lmt b/tex/context/base/mkiv/mlib-int.lmt
new file mode 100644
index 000000000..4cdc3b076
--- /dev/null
+++ b/tex/context/base/mkiv/mlib-int.lmt
@@ -0,0 +1,130 @@
+if not modules then modules = { } end modules ['mlib-int'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+local factor = number.dimenfactors.bp
+local mpstring = mp.string
+local getdimen = tex.getdimen
+local getcount = tex.getcount
+local getmacro = tokens.getters.macro
+local get = tex.get
+local emwidths = fonts.hashes.emwidths
+local exheights = fonts.hashes.exheights
+
+local registerscript = metapost.registerscript
+
+local on_right_page = structures.pages.on_right
+local is_odd_page = structures.pages.is_odd
+local in_body_page = structures.pages.in_body
+local page_fraction = structures.pages.fraction
+
+local function defaultcolormodel() -- can be helper
+ local colormethod = getcount("MPcolormethod")
+ return (colormethod == 0 or colormethod == 1) and 1 or 3
+end
+
+local t = os.date("*t") -- maybe this should be a very early on global
+
+registerscript("year", function() return t.year end)
+registerscript("month", function() return t.month end)
+registerscript("day", function() return t.day end)
+registerscript("hour", function() return t.hour end)
+registerscript("minute", function() return t.min end)
+registerscript("second", function() return t.sec end)
+
+registerscript("PaperHeight", function() return getdimen("paperheight") * factor end)
+registerscript("PaperWidth", function() return getdimen("paperwidth") * factor end)
+registerscript("PrintPaperHeight", function() return getdimen("printpaperheight") * factor end)
+registerscript("PrintPaperWidth", function() return getdimen("printpaperwidth") * factor end)
+registerscript("TopSpace", function() return getdimen("topspace") * factor end)
+registerscript("BottomSpace", function() return getdimen("bottomspace") * factor end)
+registerscript("BackSpace", function() return getdimen("backspace") * factor end)
+registerscript("CutSpace", function() return getdimen("cutspace") * factor end)
+registerscript("MakeupHeight", function() return getdimen("makeupheight") * factor end)
+registerscript("MakeupWidth", function() return getdimen("makeupwidth") * factor end)
+registerscript("TopHeight", function() return getdimen("topheight") * factor end)
+registerscript("TopDistance", function() return getdimen("topdistance") * factor end)
+registerscript("HeaderHeight", function() return getdimen("headerheight") * factor end)
+registerscript("HeaderDistance", function() return getdimen("headerdistance") * factor end)
+registerscript("TextHeight", function() return getdimen("textheight") * factor end)
+registerscript("FooterDistance", function() return getdimen("footerdistance") * factor end)
+registerscript("FooterHeight", function() return getdimen("footerheight") * factor end)
+registerscript("BottomDistance", function() return getdimen("bottomdistance") * factor end)
+registerscript("BottomHeight", function() return getdimen("bottomheight") * factor end)
+registerscript("LeftEdgeWidth", function() return getdimen("leftedgewidth") * factor end)
+registerscript("LeftEdgeDistance", function() return getdimen("leftedgedistance") * factor end)
+registerscript("LeftMarginWidth", function() return getdimen("leftmarginwidth") * factor end)
+registerscript("LeftMarginDistance", function() return getdimen("leftmargindistance") * factor end)
+registerscript("TextWidth", function() return getdimen("textwidth") * factor end)
+registerscript("RightMarginDistance", function() return getdimen("rightmargindistance") * factor end)
+registerscript("RightMarginWidth", function() return getdimen("rightmarginwidth") * factor end)
+registerscript("RightEdgeDistance", function() return getdimen("rightedgedistance") * factor end)
+registerscript("RightEdgeWidth", function() return getdimen("rightedgewidth") * factor end)
+registerscript("InnerMarginDistance", function() return getdimen("innermargindistance") * factor end)
+registerscript("InnerMarginWidth", function() return getdimen("innermarginwidth") * factor end)
+registerscript("OuterMarginDistance", function() return getdimen("outermargindistance") * factor end)
+registerscript("OuterMarginWidth", function() return getdimen("outermarginwidth") * factor end)
+registerscript("InnerEdgeDistance", function() return getdimen("inneredgedistance") * factor end)
+registerscript("InnerEdgeWidth", function() return getdimen("inneredgewidth") * factor end)
+registerscript("OuterEdgeDistance", function() return getdimen("outeredgedistance") * factor end)
+registerscript("OuterEdgeWidth", function() return getdimen("outeredgewidth") * factor end)
+registerscript("PageOffset", function() return getdimen("pagebackgroundoffset") * factor end)
+registerscript("PageDepth", function() return getdimen("pagebackgrounddepth") * factor end)
+registerscript("LayoutColumns", function() return getcount("layoutcolumns") end)
+registerscript("LayoutColumnDistance", function() return getdimen("layoutcolumndistance") * factor end)
+registerscript("LayoutColumnWidth", function() return getdimen("layoutcolumnwidth") * factor end)
+registerscript("SpineWidth", function() return getdimen("spinewidth") * factor end)
+registerscript("PaperBleed", function() return getdimen("paperbleed") * factor end)
+
+registerscript("RealPageNumber", function() return getcount("realpageno") end)
+registerscript("LastPageNumber", function() return getcount("lastpageno") end)
+
+registerscript("PageNumber", function() return getcount("pageno") end)
+registerscript("NOfPages", function() return getcount("lastpageno") end)
+
+registerscript("SubPageNumber", function() return getcount("subpageno") end)
+registerscript("NOfSubPages", function() return getcount("lastsubpageno") end)
+
+registerscript("CurrentColumn", function() return getcount("mofcolumns") end)
+registerscript("NOfColumns", function() return getcount("nofcolumns") end)
+
+registerscript("BaseLineSkip", function() return get ("baselineskip",true) * factor end)
+registerscript("LineHeight", function() return getdimen("lineheight") * factor end)
+registerscript("BodyFontSize", function() return getdimen("bodyfontsize") * factor end)
+
+registerscript("TopSkip", function() return get ("topskip",true) * factor end)
+registerscript("StrutHeight", function() return getdimen("strutht") * factor end)
+registerscript("StrutDepth", function() return getdimen("strutdp") * factor end)
+
+registerscript("PageNumber", function() return getcount("pageno") end)
+registerscript("RealPageNumber", function() return getcount("realpageno") end)
+registerscript("NOfPages", function() return getcount("lastpageno") end)
+
+registerscript("CurrentWidth", function() return get ("hsize") * factor end)
+registerscript("CurrentHeight", function() return get ("vsize") * factor end)
+
+registerscript("EmWidth", function() return emwidths [false] * factor end)
+registerscript("ExHeight", function() return exheights[false] * factor end)
+
+registerscript("HSize", function() return get ("hsize") * factor end)
+registerscript("VSize", function() return get ("vsize") * factor end)
+registerscript("LastPageNumber", function() return getcount("lastpageno") end)
+
+registerscript("OverlayWidth", function() return getdimen("d_overlay_width") * factor end)
+registerscript("OverlayHeight", function() return getdimen("d_overlay_height") * factor end)
+registerscript("OverlayDepth", function() return getdimen("d_overlay_depth") * factor end)
+registerscript("OverlayLineWidth", function() return getdimen("d_overlay_linewidth") * factor end)
+registerscript("OverlayOffset", function() return getdimen("d_overlay_offset") * factor end)
+registerscript("OverlayRegion", function() mpstring(getmacro("m_overlay_region")) end)
+--------------("CurrentLayout", function() mpstring(getmacro("currentlayout")) end)
+
+registerscript("PageFraction", page_fraction)
+registerscript("OnRightPage", on_right_page)
+registerscript("OnOddPage", is_odd_page )
+registerscript("InPageBody", in_body_page )
+
+registerscript("defaultcolormodel", defaultcolormodel)
diff --git a/tex/context/base/mkiv/mlib-int.lua b/tex/context/base/mkiv/mlib-int.lua
index b8d74d5b5..2f5f539e9 100644
--- a/tex/context/base/mkiv/mlib-int.lua
+++ b/tex/context/base/mkiv/mlib-int.lua
@@ -20,8 +20,6 @@ local mpcolor = attributes.colors.mpcolor
local emwidths = fonts.hashes.emwidths
local exheights = fonts.hashes.exheights
-local mpgetdimen = mp.getdimen
-
local registerscript = metapost.registerscript
local on_right_page = structures.pages.on_right
@@ -34,235 +32,123 @@ local function defaultcolormodel() -- can be helper
return (colormethod == 0 or colormethod == 1) and 1 or 3
end
-if CONTEXTLMTXMODE > 0 then
-
- local t = os.date("*t") -- maybe this should be a very early on global
-
- local mpnumeric = mp.inject.numeric
-
- registerscript("year", function() return t.year end)
- registerscript("month", function() return t.month end)
- registerscript("day", function() return t.day end)
- registerscript("hour", function() return t.hour end)
- registerscript("minute", function() return t.min end)
- registerscript("second", function() return t.sec end)
-
- registerscript("PaperHeight", function() return getdimen("paperheight") * factor end)
- registerscript("PaperWidth", function() return getdimen("paperwidth") * factor end)
- registerscript("PrintPaperHeight", function() return getdimen("printpaperheight") * factor end)
- registerscript("PrintPaperWidth", function() return getdimen("printpaperwidth") * factor end)
- registerscript("TopSpace", function() return getdimen("topspace") * factor end)
- registerscript("BottomSpace", function() return getdimen("bottomspace") * factor end)
- registerscript("BackSpace", function() return getdimen("backspace") * factor end)
- registerscript("CutSpace", function() return getdimen("cutspace") * factor end)
- registerscript("MakeupHeight", function() return getdimen("makeupheight") * factor end)
- registerscript("MakeupWidth", function() return getdimen("makeupwidth") * factor end)
- registerscript("TopHeight", function() return getdimen("topheight") * factor end)
- registerscript("TopDistance", function() return getdimen("topdistance") * factor end)
- registerscript("HeaderHeight", function() return getdimen("headerheight") * factor end)
- registerscript("HeaderDistance", function() return getdimen("headerdistance") * factor end)
- registerscript("TextHeight", function() return getdimen("textheight") * factor end)
- registerscript("FooterDistance", function() return getdimen("footerdistance") * factor end)
- registerscript("FooterHeight", function() return getdimen("footerheight") * factor end)
- registerscript("BottomDistance", function() return getdimen("bottomdistance") * factor end)
- registerscript("BottomHeight", function() return getdimen("bottomheight") * factor end)
- registerscript("LeftEdgeWidth", function() return getdimen("leftedgewidth") * factor end)
- registerscript("LeftEdgeDistance", function() return getdimen("leftedgedistance") * factor end)
- registerscript("LeftMarginWidth", function() return getdimen("leftmarginwidth") * factor end)
- registerscript("LeftMarginDistance", function() return getdimen("leftmargindistance") * factor end)
- registerscript("TextWidth", function() return getdimen("textwidth") * factor end)
- registerscript("RightMarginDistance", function() return getdimen("rightmargindistance") * factor end)
- registerscript("RightMarginWidth", function() return getdimen("rightmarginwidth") * factor end)
- registerscript("RightEdgeDistance", function() return getdimen("rightedgedistance") * factor end)
- registerscript("RightEdgeWidth", function() return getdimen("rightedgewidth") * factor end)
- registerscript("InnerMarginDistance", function() return getdimen("innermargindistance") * factor end)
- registerscript("InnerMarginWidth", function() return getdimen("innermarginwidth") * factor end)
- registerscript("OuterMarginDistance", function() return getdimen("outermargindistance") * factor end)
- registerscript("OuterMarginWidth", function() return getdimen("outermarginwidth") * factor end)
- registerscript("InnerEdgeDistance", function() return getdimen("inneredgedistance") * factor end)
- registerscript("InnerEdgeWidth", function() return getdimen("inneredgewidth") * factor end)
- registerscript("OuterEdgeDistance", function() return getdimen("outeredgedistance") * factor end)
- registerscript("OuterEdgeWidth", function() return getdimen("outeredgewidth") * factor end)
- registerscript("PageOffset", function() return getdimen("pagebackgroundoffset") * factor end)
- registerscript("PageDepth", function() return getdimen("pagebackgrounddepth") * factor end)
- registerscript("LayoutColumns", function() return getcount("layoutcolumns") end)
- registerscript("LayoutColumnDistance", function() return getdimen("layoutcolumndistance") * factor end)
- registerscript("LayoutColumnWidth", function() return getdimen("layoutcolumnwidth") * factor end)
- registerscript("SpineWidth", function() return getdimen("spinewidth") * factor end)
- registerscript("PaperBleed", function() return getdimen("paperbleed") * factor end)
-
- registerscript("RealPageNumber", function() return getcount("realpageno") end)
- registerscript("LastPageNumber", function() return getcount("lastpageno") end)
-
- registerscript("PageNumber", function() return getcount("pageno") end)
- registerscript("NOfPages", function() return getcount("lastpageno") end)
-
- registerscript("SubPageNumber", function() return getcount("subpageno") end)
- registerscript("NOfSubPages", function() return getcount("lastsubpageno") end)
-
- registerscript("CurrentColumn", function() return getcount("mofcolumns") end)
- registerscript("NOfColumns", function() return getcount("nofcolumns") end)
-
- registerscript("BaseLineSkip", function() return get ("baselineskip",true) * factor end)
- registerscript("LineHeight", function() return getdimen("lineheight") * factor end)
- registerscript("BodyFontSize", function() return getdimen("bodyfontsize") * factor end)
-
- registerscript("TopSkip", function() return get ("topskip",true) * factor end)
- registerscript("StrutHeight", function() return getdimen("strutht") * factor end)
- registerscript("StrutDepth", function() return getdimen("strutdp") * factor end)
-
- registerscript("PageNumber", function() return getcount("pageno") end)
- registerscript("RealPageNumber", function() return getcount("realpageno") end)
- registerscript("NOfPages", function() return getcount("lastpageno") end)
-
- registerscript("CurrentWidth", function() return get ("hsize") * factor end)
- registerscript("CurrentHeight", function() return get ("vsize") * factor end)
-
- registerscript("EmWidth", function() return emwidths [false] * factor end)
- registerscript("ExHeight", function() return exheights[false] * factor end)
-
- registerscript("HSize", function() return get ("hsize") * factor end)
- registerscript("VSize", function() return get ("vsize") * factor end)
- registerscript("LastPageNumber", function() return getcount("lastpageno") end)
-
- registerscript("OverlayWidth", function() return getdimen("d_overlay_width") * factor end)
- registerscript("OverlayHeight", function() return getdimen("d_overlay_height") * factor end)
- registerscript("OverlayDepth", function() return getdimen("d_overlay_depth") * factor end)
- registerscript("OverlayLineWidth", function() return getdimen("d_overlay_linewidth") * factor end)
- registerscript("OverlayOffset", function() return getdimen("d_overlay_offset") * factor end)
- registerscript("OverlayRegion", function() mpstring(getmacro("m_overlay_region")) end)
- -- ("CurrentLayout", function() mpstring(getmacro("currentlayout")) end)
-
- registerscript("PageFraction", page_fraction)
- registerscript("OnRightPage", on_right_page)
- registerscript("OnOddPage", is_odd_page )
- registerscript("InPageBody", in_body_page )
-
- registerscript("defaultcolormodel", defaultcolormodel)
-
-else
-
- function mp.PaperHeight () mpnumeric(getdimen("paperheight") * factor) end
- function mp.PaperWidth () mpnumeric(getdimen("paperwidth") * factor) end
- function mp.PrintPaperHeight () mpnumeric(getdimen("printpaperheight") * factor) end
- function mp.PrintPaperWidth () mpnumeric(getdimen("printpaperwidth") * factor) end
- function mp.TopSpace () mpnumeric(getdimen("topspace") * factor) end
- function mp.BottomSpace () mpnumeric(getdimen("bottomspace") * factor) end
- function mp.BackSpace () mpnumeric(getdimen("backspace") * factor) end
- function mp.CutSpace () mpnumeric(getdimen("cutspace") * factor) end
- function mp.MakeupHeight () mpnumeric(getdimen("makeupheight") * factor) end
- function mp.MakeupWidth () mpnumeric(getdimen("makeupwidth") * factor) end
- function mp.TopHeight () mpnumeric(getdimen("topheight") * factor) end
- function mp.TopDistance () mpnumeric(getdimen("topdistance") * factor) end
- function mp.HeaderHeight () mpnumeric(getdimen("headerheight") * factor) end
- function mp.HeaderDistance () mpnumeric(getdimen("headerdistance") * factor) end
- function mp.TextHeight () mpnumeric(getdimen("textheight") * factor) end
- function mp.FooterDistance () mpnumeric(getdimen("footerdistance") * factor) end
- function mp.FooterHeight () mpnumeric(getdimen("footerheight") * factor) end
- function mp.BottomDistance () mpnumeric(getdimen("bottomdistance") * factor) end
- function mp.BottomHeight () mpnumeric(getdimen("bottomheight") * factor) end
- function mp.LeftEdgeWidth () mpnumeric(getdimen("leftedgewidth") * factor) end
- function mp.LeftEdgeDistance () mpnumeric(getdimen("leftedgedistance") * factor) end
- function mp.LeftMarginWidth () mpnumeric(getdimen("leftmarginwidth") * factor) end
- function mp.LeftMarginDistance () mpnumeric(getdimen("leftmargindistance") * factor) end
- function mp.TextWidth () mpnumeric(getdimen("textwidth") * factor) end
- function mp.RightMarginDistance () mpnumeric(getdimen("rightmargindistance") * factor) end
- function mp.RightMarginWidth () mpnumeric(getdimen("rightmarginwidth") * factor) end
- function mp.RightEdgeDistance () mpnumeric(getdimen("rightedgedistance") * factor) end
- function mp.RightEdgeWidth () mpnumeric(getdimen("rightedgewidth") * factor) end
- function mp.InnerMarginDistance () mpnumeric(getdimen("innermargindistance") * factor) end
- function mp.InnerMarginWidth () mpnumeric(getdimen("innermarginwidth") * factor) end
- function mp.OuterMarginDistance () mpnumeric(getdimen("outermargindistance") * factor) end
- function mp.OuterMarginWidth () mpnumeric(getdimen("outermarginwidth") * factor) end
- function mp.InnerEdgeDistance () mpnumeric(getdimen("inneredgedistance") * factor) end
- function mp.InnerEdgeWidth () mpnumeric(getdimen("inneredgewidth") * factor) end
- function mp.OuterEdgeDistance () mpnumeric(getdimen("outeredgedistance") * factor) end
- function mp.OuterEdgeWidth () mpnumeric(getdimen("outeredgewidth") * factor) end
- function mp.PageOffset () mpnumeric(getdimen("pagebackgroundoffset") * factor) end
- function mp.PageDepth () mpnumeric(getdimen("pagebackgrounddepth") * factor) end
- function mp.LayoutColumns () mpnumeric(getcount("layoutcolumns")) end
- function mp.LayoutColumnDistance() mpnumeric(getdimen("layoutcolumndistance") * factor) end
- function mp.LayoutColumnWidth () mpnumeric(getdimen("layoutcolumnwidth") * factor) end
- function mp.SpineWidth () mpnumeric(getdimen("spinewidth") * factor) end
- function mp.PaperBleed () mpnumeric(getdimen("paperbleed") * factor) end
-
- function mp.RealPageNumber () mpnumeric(getcount("realpageno") ) end
- function mp.LastPageNumber () mpnumeric(getcount("lastpageno") ) end
-
- function mp.PageNumber () mpnumeric(getcount("pageno") ) end
- function mp.NOfPages () mpnumeric(getcount("lastpageno") ) end
-
- function mp.SubPageNumber () mpnumeric(getcount("subpageno") ) end
- function mp.NOfSubPages () mpnumeric(getcount("lastsubpageno") ) end
-
- function mp.CurrentColumn () mpnumeric(getcount("mofcolumns") ) end
- function mp.NOfColumns () mpnumeric(getcount("nofcolumns") ) end
-
- function mp.BaseLineSkip () mpnumeric(get ("baselineskip",true) * factor) end
- function mp.LineHeight () mpnumeric(getdimen("lineheight") * factor) end
- function mp.BodyFontSize () mpnumeric(getdimen("bodyfontsize") * factor) end
-
- function mp.TopSkip () mpnumeric(get ("topskip",true) * factor) end
- function mp.StrutHeight () mpnumeric(getdimen("strutht") * factor) end
- function mp.StrutDepth () mpnumeric(getdimen("strutdp") * factor) end
-
- function mp.PageNumber () mpnumeric(getcount("pageno") ) end
- function mp.RealPageNumber () mpnumeric(getcount("realpageno") ) end
- function mp.NOfPages () mpnumeric(getcount("lastpageno") ) end
-
- function mp.CurrentWidth () mpnumeric(get ("hsize") * factor) end
- function mp.CurrentHeight () mpnumeric(get ("vsize") * factor) end
-
- function mp.EmWidth () mpnumeric(emwidths [false] * factor) end
- function mp.ExHeight () mpnumeric(exheights[false] * factor) end
-
- function mp.OverlayWidth () mpnumeric(getdimen("d_overlay_width") * factor) end
- function mp.OverlayHeight () mpnumeric(getdimen("d_overlay_height") * factor) end
- function mp.OverlayDepth () mpnumeric(getdimen("d_overlay_depth") * factor) end
- function mp.OverlayLineWidth () mpnumeric(getdimen("d_overlay_linewidth") * factor) end
- function mp.OverlayOffset () mpnumeric(getdimen("d_overlay_offset") * factor) end
- function mp.OverlayRegion () mpstring (getmacro("m_overlay_region") ) end
-
- function mp.PageFraction () mpnumeric(page_fraction() ) end
- function mp.OnRightPage () mpboolean(on_right_page() ) end
- function mp.OnOddPage () mpboolean(is_odd_page () ) end
- function mp.InPageBody () mpboolean(in_body_page () ) end
-
- function mp.OverlayWidth () mpnumeric(getdimen("d_overlay_width") * factor) end
- function mp.OverlayHeight () mpnumeric(getdimen("d_overlay_height") * factor) end
- function mp.OverlayDepth () mpnumeric(getdimen("d_overlay_depth") * factor) end
- function mp.OverlayLineWidth () mpnumeric(getdimen("d_overlay_linewidth") * factor) end
- function mp.OverlayOffset () mpnumeric(getdimen("d_overlay_offset") * factor) end
- function mp.OverlayRegion () mpstring (getmacro("m_overlay_region") ) end
- -- mp.CurrentLayout () mpstring (getmacro("currentlayout")) end
-
- function mp.defaultcolormodel () mpnumeric(defaultcolormodel()) end
-
- mp.HSize = mp.CurrentWidth
- mp.VSize = mp.CurrentHeight
- mp.LastPageNumber = mp.NOfPages
-
- -- not much difference (10000 calls in a graphic neither as expansion seems to win
- -- over defining the macro etc) so let's not waste counters then
-
- -- function mp.OverlayColor()
- -- local c = mpcolor(
- -- getcount("c_overlay_colormodel"),
- -- getcount("c_overlay_color"),
- -- getcount("c_overlay_transparency")
- -- )
- -- mpquoted(c)
- -- end
- --
- -- function mp.OverlayLineColor()
- -- local c = mpcolor(
- -- getcount("c_overlay_colormodel"),
- -- getcount("c_overlay_linecolor"),
- -- getcount("c_overlay_linetransparency")
- -- )
- -- mpquoted(c)
- -- end
-
-end
-
-
+function mp.PaperHeight () mpnumeric(getdimen("paperheight") * factor) end
+function mp.PaperWidth () mpnumeric(getdimen("paperwidth") * factor) end
+function mp.PrintPaperHeight () mpnumeric(getdimen("printpaperheight") * factor) end
+function mp.PrintPaperWidth () mpnumeric(getdimen("printpaperwidth") * factor) end
+function mp.TopSpace () mpnumeric(getdimen("topspace") * factor) end
+function mp.BottomSpace () mpnumeric(getdimen("bottomspace") * factor) end
+function mp.BackSpace () mpnumeric(getdimen("backspace") * factor) end
+function mp.CutSpace () mpnumeric(getdimen("cutspace") * factor) end
+function mp.MakeupHeight () mpnumeric(getdimen("makeupheight") * factor) end
+function mp.MakeupWidth () mpnumeric(getdimen("makeupwidth") * factor) end
+function mp.TopHeight () mpnumeric(getdimen("topheight") * factor) end
+function mp.TopDistance () mpnumeric(getdimen("topdistance") * factor) end
+function mp.HeaderHeight () mpnumeric(getdimen("headerheight") * factor) end
+function mp.HeaderDistance () mpnumeric(getdimen("headerdistance") * factor) end
+function mp.TextHeight () mpnumeric(getdimen("textheight") * factor) end
+function mp.FooterDistance () mpnumeric(getdimen("footerdistance") * factor) end
+function mp.FooterHeight () mpnumeric(getdimen("footerheight") * factor) end
+function mp.BottomDistance () mpnumeric(getdimen("bottomdistance") * factor) end
+function mp.BottomHeight () mpnumeric(getdimen("bottomheight") * factor) end
+function mp.LeftEdgeWidth () mpnumeric(getdimen("leftedgewidth") * factor) end
+function mp.LeftEdgeDistance () mpnumeric(getdimen("leftedgedistance") * factor) end
+function mp.LeftMarginWidth () mpnumeric(getdimen("leftmarginwidth") * factor) end
+function mp.LeftMarginDistance () mpnumeric(getdimen("leftmargindistance") * factor) end
+function mp.TextWidth () mpnumeric(getdimen("textwidth") * factor) end
+function mp.RightMarginDistance () mpnumeric(getdimen("rightmargindistance") * factor) end
+function mp.RightMarginWidth () mpnumeric(getdimen("rightmarginwidth") * factor) end
+function mp.RightEdgeDistance () mpnumeric(getdimen("rightedgedistance") * factor) end
+function mp.RightEdgeWidth () mpnumeric(getdimen("rightedgewidth") * factor) end
+function mp.InnerMarginDistance () mpnumeric(getdimen("innermargindistance") * factor) end
+function mp.InnerMarginWidth () mpnumeric(getdimen("innermarginwidth") * factor) end
+function mp.OuterMarginDistance () mpnumeric(getdimen("outermargindistance") * factor) end
+function mp.OuterMarginWidth () mpnumeric(getdimen("outermarginwidth") * factor) end
+function mp.InnerEdgeDistance () mpnumeric(getdimen("inneredgedistance") * factor) end
+function mp.InnerEdgeWidth () mpnumeric(getdimen("inneredgewidth") * factor) end
+function mp.OuterEdgeDistance () mpnumeric(getdimen("outeredgedistance") * factor) end
+function mp.OuterEdgeWidth () mpnumeric(getdimen("outeredgewidth") * factor) end
+function mp.PageOffset () mpnumeric(getdimen("pagebackgroundoffset") * factor) end
+function mp.PageDepth () mpnumeric(getdimen("pagebackgrounddepth") * factor) end
+function mp.LayoutColumns () mpnumeric(getcount("layoutcolumns")) end
+function mp.LayoutColumnDistance() mpnumeric(getdimen("layoutcolumndistance") * factor) end
+function mp.LayoutColumnWidth () mpnumeric(getdimen("layoutcolumnwidth") * factor) end
+function mp.SpineWidth () mpnumeric(getdimen("spinewidth") * factor) end
+function mp.PaperBleed () mpnumeric(getdimen("paperbleed") * factor) end
+
+function mp.RealPageNumber () mpnumeric(getcount("realpageno") ) end
+function mp.LastPageNumber () mpnumeric(getcount("lastpageno") ) end
+
+function mp.PageNumber () mpnumeric(getcount("pageno") ) end
+function mp.NOfPages () mpnumeric(getcount("lastpageno") ) end
+
+function mp.SubPageNumber () mpnumeric(getcount("subpageno") ) end
+function mp.NOfSubPages () mpnumeric(getcount("lastsubpageno") ) end
+
+function mp.CurrentColumn () mpnumeric(getcount("mofcolumns") ) end
+function mp.NOfColumns () mpnumeric(getcount("nofcolumns") ) end
+
+function mp.BaseLineSkip () mpnumeric(get ("baselineskip",true) * factor) end
+function mp.LineHeight () mpnumeric(getdimen("lineheight") * factor) end
+function mp.BodyFontSize () mpnumeric(getdimen("bodyfontsize") * factor) end
+
+function mp.TopSkip () mpnumeric(get ("topskip",true) * factor) end
+function mp.StrutHeight () mpnumeric(getdimen("strutht") * factor) end
+function mp.StrutDepth () mpnumeric(getdimen("strutdp") * factor) end
+
+function mp.PageNumber () mpnumeric(getcount("pageno") ) end
+function mp.RealPageNumber () mpnumeric(getcount("realpageno") ) end
+function mp.NOfPages () mpnumeric(getcount("lastpageno") ) end
+
+function mp.CurrentWidth () mpnumeric(get ("hsize") * factor) end
+function mp.CurrentHeight () mpnumeric(get ("vsize") * factor) end
+
+function mp.EmWidth () mpnumeric(emwidths [false] * factor) end
+function mp.ExHeight () mpnumeric(exheights[false] * factor) end
+
+function mp.OverlayWidth () mpnumeric(getdimen("d_overlay_width") * factor) end
+function mp.OverlayHeight () mpnumeric(getdimen("d_overlay_height") * factor) end
+function mp.OverlayDepth () mpnumeric(getdimen("d_overlay_depth") * factor) end
+function mp.OverlayLineWidth () mpnumeric(getdimen("d_overlay_linewidth") * factor) end
+function mp.OverlayOffset () mpnumeric(getdimen("d_overlay_offset") * factor) end
+function mp.OverlayRegion () mpstring (getmacro("m_overlay_region") ) end
+
+function mp.PageFraction () mpnumeric(page_fraction() ) end
+function mp.OnRightPage () mpboolean(on_right_page() ) end
+function mp.OnOddPage () mpboolean(is_odd_page () ) end
+function mp.InPageBody () mpboolean(in_body_page () ) end
+
+function mp.OverlayWidth () mpnumeric(getdimen("d_overlay_width") * factor) end
+function mp.OverlayHeight () mpnumeric(getdimen("d_overlay_height") * factor) end
+function mp.OverlayDepth () mpnumeric(getdimen("d_overlay_depth") * factor) end
+function mp.OverlayLineWidth () mpnumeric(getdimen("d_overlay_linewidth") * factor) end
+function mp.OverlayOffset () mpnumeric(getdimen("d_overlay_offset") * factor) end
+function mp.OverlayRegion () mpstring (getmacro("m_overlay_region") ) end
+-- mp.CurrentLayout () mpstring (getmacro("currentlayout")) end
+
+function mp.defaultcolormodel () mpnumeric(defaultcolormodel()) end
+
+mp.HSize = mp.CurrentWidth
+mp.VSize = mp.CurrentHeight
+mp.LastPageNumber = mp.NOfPages
+
+-- not much difference (10000 calls in a graphic neither as expansion seems to win
+-- over defining the macro etc) so let's not waste counters then
+
+-- function mp.OverlayColor()
+-- local c = mpcolor(
+-- getcount("c_overlay_colormodel"),
+-- getcount("c_overlay_color"),
+-- getcount("c_overlay_transparency")
+-- )
+-- mpquoted(c)
+-- end
+--
+-- function mp.OverlayLineColor()
+-- local c = mpcolor(
+-- getcount("c_overlay_colormodel"),
+-- getcount("c_overlay_linecolor"),
+-- getcount("c_overlay_linetransparency")
+-- )
+-- mpquoted(c)
+-- end
diff --git a/tex/context/base/mkiv/mlib-lmp.lmt b/tex/context/base/mkiv/mlib-lmp.lmt
new file mode 100644
index 000000000..ff9682e87
--- /dev/null
+++ b/tex/context/base/mkiv/mlib-lmp.lmt
@@ -0,0 +1,70 @@
+if not modules then modules = { } end modules ['mlib-lmp'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+-- path relates stuff ... todo: use a stack (or numeric index to list)
+
+local type = type
+
+local aux = mp.aux
+local mpnumeric = aux.numeric
+local mppair = aux.pair
+
+local p = nil
+local n = 0
+
+local function mf_path_reset()
+ p = nil
+ n = 0
+end
+
+local scan = mp.scan
+local scannumber = scan.number
+local scanpath = scan.path
+
+local function mf_path_length()
+ p = scanpath()
+ n = p and #p or 1
+ mpnumeric(n)
+end
+
+local function mf_path_point()
+ local i = scannumber()
+ if i > 0 and i <= n then
+ local pi = p[i]
+ mppair(pi[1],pi[2])
+ end
+end
+
+local function mf_path_left()
+ local i = scannumber()
+ if i > 0 and i <= n then
+ local pi = p[i]
+ mppair(pi[5],pi[6])
+ end
+end
+
+local function mf_path_right()
+ local i = scannumber()
+ if i > 0 and i <= n then
+ local pn
+ if i == 1 then
+ pn = p[2] or p[1]
+ else
+ pn = p[i+1] or p[1]
+ end
+ mppair(pn[3],pn[4])
+ end
+end
+
+local registerscript = metapost.registerscript
+
+registerscript("pathreset", mf_path_reset)
+registerscript("pathlengthof", mf_path_length)
+registerscript("pathpointof", mf_path_point)
+registerscript("pathleftof", mf_path_left)
+registerscript("pathrightof", mf_path_right)
diff --git a/tex/context/base/mkiv/mlib-lmp.lua b/tex/context/base/mkiv/mlib-lmp.lua
index 3186a3b25..79370d2ce 100644
--- a/tex/context/base/mkiv/mlib-lmp.lua
+++ b/tex/context/base/mkiv/mlib-lmp.lua
@@ -8,116 +8,58 @@ if not modules then modules = { } end modules ['mlib-lmp'] = {
-- path relates stuff ... todo: use a stack (or numeric index to list)
-
local type = type
local aux = mp.aux
local mpnumeric = aux.numeric
local mppair = aux.pair
-local mpquoted = aux.quoted
-
-do
-
- local p = nil
- local n = 0
-
- local function mf_path_reset()
- p = nil
- n = 0
- end
-
- if CONTEXTLMTXMODE > 0 then
-
- local scan = mp.scan
- local scannumber = scan.number
- local scanpath = scan.path
-
- local function mf_path_length()
- p = scanpath()
- n = p and #p or 1
- mpnumeric(n)
- end
-
- local function mf_path_point()
- local i = scannumber()
- if i > 0 and i <= n then
- local pi = p[i]
- mppair(pi[1],pi[2])
- end
- end
-
- local function mf_path_left()
- local i = scannumber()
- if i > 0 and i <= n then
- local pi = p[i]
- mppair(pi[5],pi[6])
- end
- end
-
- local function mf_path_right()
- local i = scannumber()
- if i > 0 and i <= n then
- local pn
- if i == 1 then
- pn = p[2] or p[1]
- else
- pn = p[i+1] or p[1]
- end
- mppair(pn[3],pn[4])
- end
- end
- local registerscript = metapost.registerscript
+local p = nil
+local n = 0
- registerscript("pathreset", mf_path_reset)
- registerscript("pathlengthof", mf_path_length)
- registerscript("pathpointof", mf_path_point)
- registerscript("pathleftof", mf_path_left)
- registerscript("pathrightof", mf_path_right)
-
- else
+local function mf_path_reset()
+ p = nil
+ n = 0
+end
- local get = mp.get
- local mpgetpath = get.path
+local get = mp.get
+local mpgetpath = get.path
- local function mf_path_length(name)
- p = mpgetpath(name)
- n = p and #p or 0
- mpnumeric(n)
- end
+local function mf_path_length(name)
+ p = mpgetpath(name)
+ n = p and #p or 0
+ mpnumeric(n)
+end
- local function mf_path_point(i)
- if i > 0 and i <= n then
- local pi = p[i]
- mppair(pi[1],pi[2])
- end
- end
+local function mf_path_point(i)
+ if i > 0 and i <= n then
+ local pi = p[i]
+ mppair(pi[1],pi[2])
+ end
+end
- local function mf_path_left(i)
- if i > 0 and i <= n then
- local pi = p[i]
- mppair(pi[5],pi[6])
- end
- end
+local function mf_path_left(i)
+ if i > 0 and i <= n then
+ local pi = p[i]
+ mppair(pi[5],pi[6])
+ end
+end
- local function mf_path_right(i)
- if i > 0 and i <= n then
- local pn
- if i == 1 then
- pn = p[2] or p[1]
- else
- pn = p[i+1] or p[1]
- end
- mppair(pn[3],pn[4])
- end
+local function mf_path_right(i)
+ if i > 0 and i <= n then
+ local pn
+ if i == 1 then
+ pn = p[2] or p[1]
+ else
+ pn = p[i+1] or p[1]
end
-
- mp.mf_path_length = mf_path_length mp.pathlength = mf_path_length
- mp.mf_path_point = mf_path_point mp.pathpoint = mf_path_point
- mp.mf_path_left = mf_path_left mp.pathleft = mf_path_left
- mp.mf_path_right = mf_path_right mp.pathright = mf_path_right
- mp.mf_path_reset = mf_path_reset mp.pathreset = mf_path_reset
-
+ mppair(pn[3],pn[4])
end
-
end
+
+mp.mf_path_length = mf_path_length mp.pathlength = mf_path_length
+mp.mf_path_point = mf_path_point mp.pathpoint = mf_path_point
+mp.mf_path_left = mf_path_left mp.pathleft = mf_path_left
+mp.mf_path_right = mf_path_right mp.pathright = mf_path_right
+mp.mf_path_reset = mf_path_reset mp.pathreset = mf_path_reset
+
diff --git a/tex/context/base/mkiv/mlib-lmt.lua b/tex/context/base/mkiv/mlib-lmt.lmt
index f0b59248a..f0b59248a 100644
--- a/tex/context/base/mkiv/mlib-lmt.lua
+++ b/tex/context/base/mkiv/mlib-lmt.lmt
diff --git a/tex/context/base/mkiv/mlib-lua.lmt b/tex/context/base/mkiv/mlib-lua.lmt
new file mode 100644
index 000000000..ed65b9401
--- /dev/null
+++ b/tex/context/base/mkiv/mlib-lua.lmt
@@ -0,0 +1,120 @@
+if not modules then modules = { } end modules ['mlib-lua'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+local type = type
+local insert, remove = table.insert, table.remove
+
+local scan = mp.scan
+local inject = mp.inject
+
+local currentmpx = nil
+local stack = { }
+
+local scan_next = mplib.scan_next
+local scan_expression = mplib.scan_expression
+local scan_token = mplib.scan_token
+local scan_symbol = mplib.scan_symbol
+local scan_numeric = mplib.scan_numeric
+local scan_integer = mplib.scan_integer
+local scan_boolean = mplib.scan_boolean
+local scan_string = mplib.scan_string
+local scan_pair = mplib.scan_pair
+local scan_color = mplib.scan_color
+local scan_cmykcolor = mplib.scan_cmykcolor
+local scan_transform = mplib.scan_transform
+local scan_path = mplib.scan_path
+local scan_pen = mplib.scan_pen
+
+scan.next = function(k) return scan_next (currentmpx,k) end
+scan.expression = function(k) return scan_expression(currentmpx,k) end
+scan.token = function(k) return scan_token (currentmpx,k) end
+scan.symbol = function(k,e) return scan_symbol (currentmpx,k,e) end
+scan.numeric = function() return scan_numeric (currentmpx) end
+scan.integer = function() return scan_integer (currentmpx) end
+scan.boolean = function() return scan_boolean (currentmpx) end
+scan.string = function() return scan_string (currentmpx) end
+scan.pair = function(t) return scan_pair (currentmpx,t) end
+scan.color = function(t) return scan_color (currentmpx,t) end
+scan.cmykcolor = function(t) return scan_cmykcolor (currentmpx,t) end
+scan.transform = function(t) return scan_transform (currentmpx,t) end
+scan.path = function(t) return scan_path (currentmpx,t) end
+scan.pen = function(t) return scan_pen (currentmpx,t) end
+
+local inject_path = mplib.inject_path
+local inject_numeric = mplib.inject_numeric
+local inject_pair = mplib.inject_pair
+local inject_boolean = mplib.inject_boolean
+local inject_integer = mplib.inject_integer
+local inject_string = mplib.inject_string
+local inject_color = mplib.inject_color
+local inject_cmykcolor = mplib.inject_cmykcolor
+local inject_transform = mplib.inject_transform
+local inject_whatever = mplib.inject_whatever
+
+inject.path = function(t,cycle,curled) return inject_path (currentmpx,t,cycle,curled) end
+inject.numeric = function(n) return inject_numeric (currentmpx,n) end
+inject.pair = function(x,y) return inject_pair (currentmpx,x,y) end
+inject.boolean = function(b) return inject_boolean (currentmpx,b) end
+inject.integer = function(i) return inject_integer (currentmpx,i) end
+inject.string = function(s) return inject_string (currentmpx,s) end
+inject.color = function(r,g,b) return inject_color (currentmpx,r,g,b) end
+inject.cmykcolor = function(c,m,y,k) return inject_cmykcolor(currentmpx,c,m,y,k) end
+inject.transform = function(x,y,xx,xy,yx,yy) return inject_transform(currentmpx,x,y,xx,xy,yx,yy) end
+inject.whatever = function(...) return inject_whatever (currentmpx,...) end
+
+-- bonus:
+
+scan .number = scan .numeric
+inject.number = inject.numeric
+
+table.setmetatablecall(inject,function(t,...)
+ inject_whatever(currentmpx,...)
+end)
+
+-- experiment
+
+function mp.autoinject(m)
+ local t = type(m)
+ if t == "table" then
+ local n = #t
+ if n == 2 then
+ inject_pair(currentmpx,m)
+ elseif n == 3 then
+ inject_color(currentmpx,m)
+ elseif n == 4 then
+ inject_cmykcolor(currentmpx,m)
+ elseif n == 6 then
+ inject_transform(currentmpx,m)
+ end
+ elseif t == "number" then
+ inject_numeric(currentmpx,m)
+ elseif t == "string" then
+ inject_string(currentmpx,m)
+ elseif t == "boolean" then
+ inject_boolean(currentmpx,m)
+ end
+end
+
+function metapost.pushscriptrunner(mpx)
+ insert(stack,mpx)
+ currentmpx = mpx
+end
+
+function metapost.popscriptrunner()
+ currentmpx = remove(stack,mpx)
+end
+
+function metapost.currentmpx()
+ return currentmpx
+end
+
+local status = mplib.status
+
+function metapost.currentmpxstatus()
+ return status and status(currentmpx) or 0
+end
diff --git a/tex/context/base/mkiv/mlib-lua.lua b/tex/context/base/mkiv/mlib-lua.lua
index 9b4ec44dd..b38dbdcf6 100644
--- a/tex/context/base/mkiv/mlib-lua.lua
+++ b/tex/context/base/mkiv/mlib-lua.lua
@@ -6,1399 +6,45 @@ if not modules then modules = { } end modules ['mlib-lua'] = {
license = "see context related readme files",
}
--- This is very preliminary code!
+local type = type
+local insert, remove = table.insert, table.remove
--- maybe we need mplib.model, but how with instances
+local set = mp.set
+local get = mp.get
-local type, tostring, tonumber, select, loadstring = type, tostring, tonumber, select, loadstring
-local find, match, gsub, gmatch = string.find, string.match, string.gsub, string.gmatch
-local concat, insert, remove = table.concat, table.insert, table.remove
+local currentmpx = nil
+local stack = { }
-local formatters = string.formatters
-local lpegmatch = lpeg.match
-local lpegpatterns = lpeg.patterns
+local get_numeric = mplib.get_numeric
+local get_integer = mplib.get_integer
+local get_string = mplib.get_string
+local get_boolean = mplib.get_boolean
+local get_path = mplib.get_path
+local set_path = mplib.set_path
-local P, S, Ct, Cs, Cc, C = lpeg.P, lpeg.S, lpeg.Ct, lpeg.Cs, lpeg.Cc, lpeg.C
-
-local report_luarun = logs.reporter("metapost","lua")
-local report_script = logs.reporter("metapost","script")
-local report_message = logs.reporter("metapost")
-
-local trace_luarun = false trackers.register("metapost.lua",function(v) trace_luarun = v end)
-
-local be_tolerant = true directives.register("metapost.lua.tolerant", function(v) be_tolerant = v end)
-
-local get, set, aux, scan, inject = { }, { }, { }, { }, { }
-
-mp = mp or { -- system namespace
- set = set,
- get = get,
- aux = aux,
- scan = scan,
- inject = inject,
-}
-
-MP = MP or { -- user namespace
-}
-
--- We had this:
---
--- table.setmetatablecall(mp,function(t,k) mpprint(k) end)
---
--- but the next one is more interesting because we cannot use calls like:
---
--- lua.mp.somedefdname("foo")
---
--- which is due to expansion of somedefdname during suffix creation. So:
---
--- lua.mp("somedefdname","foo")
-
-table.setmetatablecall(mp,function(t,k,...) return t[k](...) end)
-table.setmetatablecall(MP,function(t,k,...) return t[k](...) end)
-
-do
-
- local currentmpx = nil
- local stack = { }
-
- if CONTEXTLMTXMODE > 0 then
-
- local scan_next = mplib.scan_next
- local scan_expression = mplib.scan_expression
- local scan_token = mplib.scan_token
- local scan_symbol = mplib.scan_symbol
- local scan_numeric = mplib.scan_numeric
- local scan_integer = mplib.scan_integer
- local scan_boolean = mplib.scan_boolean
- local scan_string = mplib.scan_string
- local scan_pair = mplib.scan_pair
- local scan_color = mplib.scan_color
- local scan_cmykcolor = mplib.scan_cmykcolor
- local scan_transform = mplib.scan_transform
- local scan_path = mplib.scan_path
- local scan_pen = mplib.scan_pen
-
- scan.next = function(k) return scan_next (currentmpx,k) end
- scan.expression = function(k) return scan_expression(currentmpx,k) end
- scan.token = function(k) return scan_token (currentmpx,k) end
- scan.symbol = function(k,e) return scan_symbol (currentmpx,k,e) end
- scan.numeric = function() return scan_numeric (currentmpx) end
- scan.integer = function() return scan_integer (currentmpx) end
- scan.boolean = function() return scan_boolean (currentmpx) end
- scan.string = function() return scan_string (currentmpx) end
- scan.pair = function(t) return scan_pair (currentmpx,t) end
- scan.color = function(t) return scan_color (currentmpx,t) end
- scan.cmykcolor = function(t) return scan_cmykcolor (currentmpx,t) end
- scan.transform = function(t) return scan_transform (currentmpx,t) end
- scan.path = function(t) return scan_path (currentmpx,t) end
- scan.pen = function(t) return scan_pen (currentmpx,t) end
-
- local inject_path = mplib.inject_path
- local inject_numeric = mplib.inject_numeric
- local inject_pair = mplib.inject_pair
- local inject_boolean = mplib.inject_boolean
- local inject_integer = mplib.inject_integer
- local inject_string = mplib.inject_string
- local inject_color = mplib.inject_color
- local inject_cmykcolor = mplib.inject_cmykcolor
- local inject_transform = mplib.inject_transform
- local inject_whatever = mplib.inject_whatever
-
- inject.path = function(t,cycle,curled) return inject_path (currentmpx,t,cycle,curled) end
- inject.numeric = function(n) return inject_numeric (currentmpx,n) end
- inject.pair = function(x,y) return inject_pair (currentmpx,x,y) end
- inject.boolean = function(b) return inject_boolean (currentmpx,b) end
- inject.integer = function(i) return inject_integer (currentmpx,i) end
- inject.string = function(s) return inject_string (currentmpx,s) end
- inject.color = function(r,g,b) return inject_color (currentmpx,r,g,b) end
- inject.cmykcolor = function(c,m,y,k) return inject_cmykcolor(currentmpx,c,m,y,k) end
- inject.transform = function(x,y,xx,xy,yx,yy) return inject_transform(currentmpx,x,y,xx,xy,yx,yy) end
- inject.whatever = function(...) return inject_whatever (currentmpx,...) end
-
- -- bonus:
-
- scan .number = scan .numeric
- inject.number = inject.numeric
-
- table.setmetatablecall(inject,function(t,...)
- inject_whatever(currentmpx,...)
- end)
-
- -- experiment
-
- function mp.autoinject(m)
- local t = type(m)
- if t == "table" then
- local n = #t
- if n == 2 then
- inject_pair(currentmpx,m)
- elseif n == 3 then
- inject_color(currentmpx,m)
- elseif n == 4 then
- inject_cmykcolor(currentmpx,m)
- elseif n == 6 then
- inject_transform(currentmpx,m)
- end
- elseif t == "number" then
- inject_numeric(currentmpx,m)
- elseif t == "string" then
- inject_string(currentmpx,m)
- elseif t == "boolean" then
- inject_boolean(currentmpx,m)
- end
- end
-
- else
-
- local get_numeric = mplib.get_numeric
- local get_integer = mplib.get_integer
- local get_string = mplib.get_string
- local get_boolean = mplib.get_boolean
- local get_path = mplib.get_path
- local set_path = mplib.set_path
-
- get.numeric = function(s) return get_numeric(currentmpx,s) end
- get.number = function(s) return get_numeric(currentmpx,s) end
- get.integer = function(s) return get_integer(currentmpx,s) end
- get.string = function(s) return get_string (currentmpx,s) end
- get.boolean = function(s) return get_boolean(currentmpx,s) end
- get.path = function(s) return get_path (currentmpx,s) end
- set.path = function(s,t) return set_path (currentmpx,s,t) end -- not working yet
-
- end
-
- function metapost.pushscriptrunner(mpx)
- insert(stack,mpx)
- currentmpx = mpx
- end
-
- function metapost.popscriptrunner()
- currentmpx = remove(stack,mpx)
- end
-
- function metapost.currentmpx()
- return currentmpx
- end
-
- local status = mplib.status
-
- function metapost.currentmpxstatus()
- return status and status(currentmpx) or 0
- end
-
-end
-
--- unless we adapt the old mp library too, in the end we will have two
--- variants
-
-do
-
- local lmtxmode = CONTEXTLMTXMODE > 0
-
- -- serializers
-
- local f_integer = formatters["%i"]
- local f_numeric = formatters["%F"]
-
- -- no %n as that can produce -e notation and that is not so nice for scaled butmaybe we
- -- should then switch between ... i.e. make a push/pop for the formatters here ... not now.
-
- local f_integer = formatters["%i"]
- local f_numeric = formatters["%F"]
- local f_pair = formatters["(%F,%F)"]
- local f_ctrl = formatters["(%F,%F) .. controls (%F,%F) and (%F,%F)"]
- local f_triplet = formatters["(%F,%F,%F)"]
- local f_quadruple = formatters["(%F,%F,%F,%F)"]
- local f_transform = formatters["totransform(%F,%F,%F,%F,%F,%F)"]
- local f_pen = formatters["(pencircle transformed totransform(%F,%F,%F,%F,%F,%F))"]
-
- local f_points = formatters["%p"]
- local f_pair_pt = formatters["(%p,%p)"]
- local f_ctrl_pt = formatters["(%p,%p) .. controls (%p,%p) and (%p,%p)"]
- local f_triplet_pt = formatters["(%p,%p,%p)"]
- local f_quadruple_pt = formatters["(%p,%p,%p,%p)"]
-
- local r = P('%') / "percent"
- + P('"') / "dquote"
- + P('\n') / "crlf"
- -- + P(' ') / "space"
- local a = Cc("&")
- local q = Cc('"')
- local p = Cs(q * (r * a)^-1 * (a * r * (P(-1) + a) + P(1))^0 * q)
-
- mp.cleaned = function(s) return lpegmatch(p,s) or s end
-
- -- management
-
- -- sometimes we gain (e.g. .5 sec on the sync test)
-
- local cache = table.makeweak()
-
- local runscripts = { }
- local runnames = { }
- local nofscripts = 0
-
- function metapost.registerscript(name,f)
- nofscripts = nofscripts + 1
- if f then
- runscripts[nofscripts] = f
- runnames[name] = nofscripts
- else
- runscripts[nofscripts] = name
- end
- return nofscripts
- end
-
- function metapost.scriptindex(name)
- return runnames[name] or 0
- end
-
- -- The gbuffer sharing and such is not really needed now but make a dent when
- -- we have a high volume of simpel calls (loops) so we keep it around for a
- -- while.
-
- local nesting = 0
- local runs = 0
- local gbuffer = { }
- local buffer = gbuffer
- local n = 0
-
- local function mpdirect1(a)
- n = n + 1 buffer[n] = a
- end
- local function mpdirect2(a,b)
- n = n + 1 buffer[n] = a
- n = n + 1 buffer[n] = b
- end
- local function mpdirect3(a,b,c)
- n = n + 1 buffer[n] = a
- n = n + 1 buffer[n] = b
- n = n + 1 buffer[n] = c
- end
- local function mpdirect4(a,b,c,d)
- n = n + 1 buffer[n] = a
- n = n + 1 buffer[n] = b
- n = n + 1 buffer[n] = c
- n = n + 1 buffer[n] = d
- end
- local function mpdirect5(a,b,c,d,e)
- n = n + 1 buffer[n] = a
- n = n + 1 buffer[n] = b
- n = n + 1 buffer[n] = c
- n = n + 1 buffer[n] = d
- n = n + 1 buffer[n] = e
- end
-
- local function mpflush(separator)
- buffer[1] = concat(buffer,separator or "",1,n)
- n = 1
- end
-
- function metapost.runscript(code)
- nesting = nesting + 1
- runs = runs + 1
-
- local index = type(code) == "number"
- local f
- local result
-
- if index then
- f = runscripts[code]
- if not f then
- report_luarun("%i: bad index: %s",nesting,code)
- elseif trace_luarun then
- report_luarun("%i: index: %i",nesting,code)
- end
- else
- if trace_luarun then
- report_luarun("%i: code: %s",nesting,code)
- end
- f = cache[code]
- if not f then
- f = loadstring("return " .. code)
- if f then
- cache[code] = f
- elseif be_tolerant then
- f = loadstring(code)
- if f then
- cache[code] = f
- end
- end
- end
- end
-
- -- returning nil is more efficient and a signal not to scan in mp
-
- if f then
-
- local lbuffer, ln
-
- if nesting == 1 then
- buffer = gbuffer
- n = 0
- else
- lbuffer = buffer
- ln = n
- buffer = { }
- n = 0
- end
-
- result = f()
- if result then
- local t = type(result)
- if lmtxmode then
- -- we can consider to use the injector for tables but then we need to
- -- check of concatination is expected so best keep this!
- if t == "number" or t == "boolean" then
- -- native types
- elseif t == "string" or t == "table" then
- -- (concatenated) passed to scantokens
- else
- -- scantokens
- result = tostring(result)
- end
- else
- if t == "number" then
- result = f_numeric(result)
- elseif t == "table" then
- result = concat(result) -- no spaces here
- else
- result = tostring(result)
- end
- end
- if trace_luarun then
- report_luarun("%i: %s result: %s",nesting,t,result)
- end
- elseif n == 0 then
--- result = ""
-result = nil -- no scantokens done then
- if trace_luarun then
- report_luarun("%i: no buffered result",nesting)
- end
- elseif n == 1 then
- result = buffer[1]
- if trace_luarun then
- report_luarun("%i: 1 buffered result: %s",nesting,result)
- end
- else
- -- the space is why we sometimes have collectors
- if nesting == 1 then
- -- if we had no space we could pass result directly in lmtx
- result = concat(buffer," ",1,n)
- if n > 500 or #result > 10000 then
- gbuffer = { } -- newtable(20,0)
- lbuffer = gbuffer
- end
- else
- -- if we had no space we could pass result directly in lmtx
- result = concat(buffer," ")
- end
- if trace_luarun then
- report_luarun("%i: %i buffered results: %s",nesting,n,result)
- end
- end
-
- if nesting == 1 then
- n = 0
- else
- buffer = lbuffer
- n = ln
- end
-
- else
- report_luarun("%i: no result, invalid code: %s",nesting,code)
- result = ""
- end
-
- nesting = nesting - 1
-
- return result
- end
-
- function metapost.nofscriptruns()
- return runs
- end
-
- -- writers
-
- local function mpp(value)
- n = n + 1
- local t = type(value)
- if t == "number" then
- buffer[n] = f_numeric(value)
- elseif t == "string" then
- buffer[n] = value
- elseif t == "table" then
- if #t == 6 then
- buffer[n] = "totransform(" .. concat(value,",") .. ")"
- else
- buffer[n] = "(" .. concat(value,",") .. ")"
- end
- else -- boolean or whatever
- buffer[n] = tostring(value)
- end
- end
-
- local function mpprint(first,second,...)
- if second == nil then
- if first ~= nil then
- mpp(first)
- end
- else
- for i=1,select("#",first,second,...) do
- local value = (select(i,first,second,...))
- if value ~= nil then
- mpp(value)
- end
- end
- end
- end
-
- local function mpp(value)
- n = n + 1
- local t = type(value)
- if t == "number" then
- buffer[n] = f_numeric(value)
- elseif t == "string" then
- buffer[n] = lpegmatch(p,value)
- elseif t == "table" then
- if #t > 4 then
- buffer[n] = ""
- else
- buffer[n] = "(" .. concat(value,",") .. ")"
- end
- else -- boolean or whatever
- buffer[n] = tostring(value)
- end
- end
-
- local function mpvprint(first,second,...) -- variable print
- if second == nil then
- if first ~= nil then
- mpp(first)
- end
- else
- for i=1,select("#",first,second,...) do
- local value = (select(i,first,second,...))
- if value ~= nil then
- mpp(value)
- end
- end
- end
- end
-
- local function mpstring(value)
- n = n + 1
- buffer[n] = lpegmatch(p,value)
- end
-
- local function mpboolean(b)
- n = n + 1
- buffer[n] = b and "true" or "false"
- end
-
- local function mpnumeric(f)
- n = n + 1
- if not f or f == 0 then
- buffer[n] = "0"
- else
- buffer[n] = f_numeric(f)
- end
- end
-
- local function mpinteger(i)
- n = n + 1
- -- buffer[n] = i and f_integer(i) or "0"
- buffer[n] = i or "0"
- end
-
- local function mppoints(i)
- n = n + 1
- if not i or i == 0 then
- buffer[n] = "0pt"
- else
- buffer[n] = f_points(i)
- end
- end
-
- local function mppair(x,y)
- n = n + 1
- if type(x) == "table" then
- buffer[n] = f_pair(x[1],x[2])
- else
- buffer[n] = f_pair(x,y)
- end
- end
-
- local function mppairpoints(x,y)
- n = n + 1
- if type(x) == "table" then
- buffer[n] = f_pair_pt(x[1],x[2])
- else
- buffer[n] = f_pair_pt(x,y)
- end
- end
-
- local function mptriplet(x,y,z)
- n = n + 1
- if type(x) == "table" then
- buffer[n] = f_triplet(x[1],x[2],x[3])
- else
- buffer[n] = f_triplet(x,y,z)
- end
- end
-
- local function mptripletpoints(x,y,z)
- n = n + 1
- if type(x) == "table" then
- buffer[n] = f_triplet_pt(x[1],x[2],x[3])
- else
- buffer[n] = f_triplet_pt(x,y,z)
- end
- end
-
- local function mpquadruple(w,x,y,z)
- n = n + 1
- if type(w) == "table" then
- buffer[n] = f_quadruple(w[1],w[2],w[3],w[4])
- else
- buffer[n] = f_quadruple(w,x,y,z)
- end
- end
-
- local function mpquadruplepoints(w,x,y,z)
- n = n + 1
- if type(w) == "table" then
- buffer[n] = f_quadruple_pt(w[1],w[2],w[3],w[4])
- else
- buffer[n] = f_quadruple_pt(w,x,y,z)
- end
- end
-
- local function mptransform(x,y,xx,xy,yx,yy)
- n = n + 1
- if type(x) == "table" then
- buffer[n] = f_transform(x[1],x[2],x[3],x[4],x[5],x[6])
- else
- buffer[n] = f_transform(x,y,xx,xy,yx,yy)
- end
- end
-
- local function mpcolor(c,m,y,k)
- n = n + 1
- if type(c) == "table" then
- local l = #c
- if l == 4 then
- buffer[n] = f_quadruple(c[1],c[2],c[3],c[4])
- elseif l == 3 then
- buffer[n] = f_triplet(c[1],c[2],c[3])
- else
- buffer[n] = f_numeric(c[1])
- end
- else
- if k then
- buffer[n] = f_quadruple(c,m,y,k)
- elseif y then
- buffer[n] = f_triplet(c,m,y)
- else
- buffer[n] = f_numeric(c)
- end
- end
- end
-
- -- we have three kind of connectors:
- --
- -- .. ... -- (true)
-
- local function mp_path(f2,f6,t,connector,cycle)
- if type(t) == "table" then
- local tn = #t
- if tn == 1 then
- local t1 = t[1]
- n = n + 1
- if t.pen then
- buffer[n] = f_pen(unpack(t1))
- else
- buffer[n] = f2(t1[1],t1[2])
- end
- elseif tn > 0 then
- if connector == true or connector == nil then
- connector = ".."
- elseif connector == false then
- connector = "--"
- end
- if cycle == nil then
- cycle = t.cycle
- if cycle == nil then
- cycle = true
- end
- end
- local six = connector == ".." -- otherwise we use whatever gets asked for
- local controls = connector -- whatever
- local a = t[1]
- local b = t[2]
- n = n + 1
- buffer[n] = "("
- n = n + 1
- if six and #a == 6 and #b == 6 then
- buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
- controls = ".."
- else
- buffer[n] = f2(a[1],a[2])
- controls = connector
- end
- for i=2,tn-1 do
- a = b
- b = t[i+1]
- n = n + 1
- buffer[n] = connector
- n = n + 1
- if six and #a == 6 and #b == 6 then
- buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
- controls = ".."
- else
- buffer[n] = f2(a[1],a[2])
- controls = connector
- end
- end
- n = n + 1
- buffer[n] = connector
- a = b
- b = t[1]
- n = n + 1
- if cycle then
- if six and #a == 6 and #b == 6 then
- buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
- controls = ".."
- else
- buffer[n] = f2(a[1],a[2])
- controls = connector
- end
- n = n + 1
- buffer[n] = connector
- n = n + 1
- buffer[n] = "cycle"
- else
- buffer[n] = f2(a[1],a[2])
- end
- n = n + 1
- buffer[n] = ")"
- end
- end
- end
-
- local function mppath(...)
- mp_path(f_pair,f_ctrl,...)
- end
-
- local function mppathpoints(...)
- mp_path(f_pair_pt,f_ctrl_pt,...)
- end
-
- local function mpsize(t)
- n = n + 1
- buffer[n] = type(t) == "table" and f_numeric(#t) or "0"
- end
-
- local replacer = lpeg.replacer("@","%%")
-
- local function mpfprint(fmt,...)
- n = n + 1
- if not find(fmt,"%",1,true) then
- fmt = lpegmatch(replacer,fmt)
- end
- buffer[n] = formatters[fmt](...)
- end
-
- local function mpquoted(fmt,s,...)
- if s then
- n = n + 1
- if not find(fmt,"%",1,true) then
- fmt = lpegmatch(replacer,fmt)
- end
- -- buffer[n] = '"' .. formatters[fmt](s,...) .. '"'
- buffer[n] = lpegmatch(p,formatters[fmt](s,...))
- elseif fmt then
- n = n + 1
- -- buffer[n] = '"' .. fmt .. '"'
- buffer[n] = lpegmatch(p,fmt)
- else
- -- something is wrong
- end
- end
-
- aux.direct = mpdirect1
- aux.direct1 = mpdirect1
- aux.direct2 = mpdirect2
- aux.direct3 = mpdirect3
- aux.direct4 = mpdirect4
- aux.flush = mpflush
-
- aux.print = mpprint
- aux.vprint = mpvprint
- aux.boolean = mpboolean
- aux.string = mpstring
- aux.numeric = mpnumeric
- aux.number = mpnumeric
- aux.integer = mpinteger
- aux.points = mppoints
- aux.pair = mppair
- aux.pairpoints = mppairpoints
- aux.triplet = mptriplet
- aux.tripletpoints = mptripletpoints
- aux.quadruple = mpquadruple
- aux.quadruplepoints = mpquadruplepoints
- aux.path = mppath
- aux.pathpoints = mppathpoints
- aux.size = mpsize
- aux.fprint = mpfprint
- aux.quoted = mpquoted
- aux.transform = mptransform
- aux.color = mpcolor
-
- -- for the moment
-
- local function mpdraw(lines,list) -- n * 4
- if list then
- local c = #lines
- for i=1,c do
- local ci = lines[i]
- local ni = #ci
- n = n + 1 buffer[n] = i < c and "d(" or "D("
- for j=1,ni,2 do
- local l = j + 1
- n = n + 1 buffer[n] = ci[j]
- n = n + 1 buffer[n] = ","
- n = n + 1 buffer[n] = ci[l]
- n = n + 1 buffer[n] = l < ni and ")--(" or ");"
- end
- end
- else
- local l = #lines
- local m = l - 4
- for i=1,l,4 do
- n = n + 1 buffer[n] = i < m and "d(" or "D("
- n = n + 1 buffer[n] = lines[i]
- n = n + 1 buffer[n] = ","
- n = n + 1 buffer[n] = lines[i+1]
- n = n + 1 buffer[n] = ")--("
- n = n + 1 buffer[n] = lines[i+2]
- n = n + 1 buffer[n] = ","
- n = n + 1 buffer[n] = lines[i+3]
- n = n + 1 buffer[n] = ");"
- end
- end
- end
-
- local function mpfill(lines,list)
- if list then
- local c = #lines
- for i=1,c do
- local ci = lines[i]
- local ni = #ci
- n = n + 1 buffer[n] = i < c and "f(" or "F("
- for j=1,ni,2 do
- local l = j + 1
- n = n + 1 buffer[n] = ci[j]
- n = n + 1 buffer[n] = ","
- n = n + 1 buffer[n] = ci[l]
- n = n + 1 buffer[n] = l < ni and ")--(" or ")--C;"
- end
- end
- else
- local l = #lines
- local m = l - 4
- for i=1,l,4 do
- n = n + 1 buffer[n] = i < m and "f(" or "F("
- n = n + 1 buffer[n] = lines[i]
- n = n + 1 buffer[n] = ","
- n = n + 1 buffer[n] = lines[i+1]
- n = n + 1 buffer[n] = ")--("
- n = n + 1 buffer[n] = lines[i+2]
- n = n + 1 buffer[n] = ","
- n = n + 1 buffer[n] = lines[i+3]
- n = n + 1 buffer[n] = ")--C;"
- end
- end
- end
-
- aux.draw = mpdraw
- aux.fill = mpfill
-
- for k, v in next, aux do mp[k] = v end
-
-end
-
-do
-
- -- Another experimental feature:
-
- local mpnumeric = mp.numeric
- local scanstring = scan.string
- local scriptindex = metapost.scriptindex
-
- function mp.mf_script_index(name)
- local index = scriptindex(name)
- -- report_script("method %i, name %a, index %i",1,name,index)
- mpnumeric(index)
- end
-
- -- once bootstrapped ... (needs pushed mpx instances)
-
- metapost.registerscript("scriptindex",function()
- local name = scanstring()
- local index = scriptindex(name)
- -- report_script("method %i, name %a, index %i",2,name,index)
- mpnumeric(index)
- end)
-
-end
-
--- the next will move to mlib-lmp.lua
-
-do
-
- local mpnamedcolor = attributes.colors.mpnamedcolor
- local mpprint = aux.print
- local scanstring = scan.string
-
- mp.mf_named_color = function(str)
- mpprint(mpnamedcolor(str))
- end
-
- -- todo: we can inject but currently we always get a string back so then
- -- we need to deal with it upstream in the color module ... not now
-
- metapost.registerscript("namedcolor",function()
- mpprint(mpnamedcolor(scanstring()))
- end)
+get.numeric = function(s) return get_numeric(currentmpx,s) end
+get.number = function(s) return get_numeric(currentmpx,s) end
+get.integer = function(s) return get_integer(currentmpx,s) end
+get.string = function(s) return get_string (currentmpx,s) end
+get.boolean = function(s) return get_boolean(currentmpx,s) end
+get.path = function(s) return get_path (currentmpx,s) end
+set.path = function(s,t) return set_path (currentmpx,s,t) end -- not working yet
+function metapost.pushscriptrunner(mpx)
+ insert(stack,mpx)
+ currentmpx = mpx
end
-function mp.n(t) -- used ?
- return type(t) == "table" and #t or 0
+function metapost.popscriptrunner()
+ currentmpx = remove(stack,mpx)
end
-do
-
- -- experiment: names can change
-
- local mppath = aux.path
- local mpsize = aux.size
-
- local whitespace = lpegpatterns.whitespace
- local newline = lpegpatterns.newline
- local setsep = newline^2
- local comment = (S("#%") + P("--")) * (1-newline)^0 * (whitespace - setsep)^0
- local value = (1-whitespace)^1 / tonumber
- local entry = Ct( value * whitespace * value)
- local set = Ct((entry * (whitespace-setsep)^0 * comment^0)^1)
- local series = Ct((set * whitespace^0)^1)
-
- local pattern = whitespace^0 * series
-
- local datasets = { }
- mp.datasets = datasets
-
- function mp.dataset(str)
- return lpegmatch(pattern,str)
- end
-
- function datasets.load(tag,filename)
- if not filename then
- tag, filename = file.basename(tag), tag
- end
- local data = lpegmatch(pattern,io.loaddata(filename) or "")
- datasets[tag] = {
- data = data,
- line = function(n) mppath(data[n or 1]) end,
- size = function() mpsize(data) end,
- }
- end
-
- table.setmetatablecall(datasets,function(t,k,f,...)
- local d = datasets[k]
- local t = type(d)
- if t == "table" then
- d = d[f]
- if type(d) == "function" then
- d(...)
- else
- mpvprint(...)
- end
- elseif t == "function" then
- d(f,...)
- end
- end)
-
+function metapost.currentmpx()
+ return currentmpx
end
--- \startluacode
--- local str = [[
--- 10 20 20 20
--- 30 40 40 60
--- 50 10
---
--- 10 10 20 30
--- 30 50 40 50
--- 50 20 -- the last one
---
--- 10 20 % comment
--- 20 10
--- 30 40 # comment
--- 40 20
--- 50 10
--- ]]
---
--- MP.myset = mp.dataset(str)
---
--- inspect(MP.myset)
--- \stopluacode
---
--- \startMPpage
--- color c[] ; c[1] := red ; c[2] := green ; c[3] := blue ;
--- for i=1 upto lua("mp.print(mp.n(MP.myset))") :
--- draw lua("mp.path(MP.myset[" & decimal i & "])") withcolor c[i] ;
--- endfor ;
--- \stopMPpage
-
--- texts:
-
-do
-
- local mptriplet = mp.triplet
-
- local bpfactor = number.dimenfactors.bp
- local textexts = nil
- local mptriplet = mp.triplet
- local nbdimensions = nodes.boxes.dimensions
-
- function mp.mf_tt_initialize(tt)
- textexts = tt
- end
-
- function mp.mf_tt_dimensions(n)
- local box = textexts and textexts[n]
- if box then
- -- could be made faster with nuts but not critical
- mptriplet(box.width*bpfactor,box.height*bpfactor,box.depth*bpfactor)
- else
- mptriplet(0,0,0)
- end
- end
-
- function mp.mf_tb_dimensions(category,name)
- local w, h, d = nbdimensions(category,name)
- mptriplet(w*bpfactor,h*bpfactor,d*bpfactor)
- end
-
- function mp.report(a,b,c,...)
- if c then
- report_message("%s : %s",a,formatters[(gsub(b,"@","%%"))](c,...))
- elseif b then
- report_message("%s : %s",a,b)
- elseif a then
- report_message("%s : %s","message",a)
- end
- end
-
-end
-
-do
-
- local mpprint = aux.print
- local modes = tex.modes
- local systemmodes = tex.systemmodes
-
- function mp.mode(s)
- mpprint(modes[s] and true or false)
- end
-
- function mp.systemmode(s)
- mpprint(systemmodes[s] and true or false)
- end
-
- mp.processingmode = mp.mode
+local status = mplib.status
+function metapost.currentmpxstatus()
+ return status and status(currentmpx) or 0
end
-
--- for alan's nodes:
-
-do
-
- local mpprint = aux.print
- local mpquoted = aux.quoted
-
- function mp.isarray(str)
- mpprint(find(str,"%d") and true or false)
- end
-
- function mp.prefix(str)
- mpquoted(match(str,"^(.-)[%d%[]") or str)
- end
-
- -- function mp.dimension(str)
- -- local n = 0
- -- for s in gmatch(str,"%[?%-?%d+%]?") do --todo: lpeg
- -- n = n + 1
- -- end
- -- mpprint(n)
- -- end
-
- mp.dimension = lpeg.counter(P("[") * lpegpatterns.integer * P("]") + lpegpatterns.integer,mpprint)
-
- -- faster and okay as we don't have many variables but probably only
- -- basename makes sense and even then it's not called that often
-
- -- local hash = table.setmetatableindex(function(t,k)
- -- local v = find(k,"%d") and true or false
- -- t[k] = v
- -- return v
- -- end)
- --
- -- function mp.isarray(str)
- -- mpprint(hash[str])
- -- end
- --
- -- local hash = table.setmetatableindex(function(t,k)
- -- local v = '"' .. (match(k,"^(.-)%d") or k) .. '"'
- -- t[k] = v
- -- return v
- -- end)
- --
- -- function mp.prefix(str)
- -- mpprint(hash[str])
- -- end
-
-end
-
-do
-
- local getmacro = tex.getmacro
- local getdimen = tex.getdimen
- local getcount = tex.getcount
- local gettoks = tex.gettoks
- local setmacro = tex.setmacro
- local setdimen = tex.setdimen
- local setcount = tex.setcount
- local settoks = tex.settoks
-
- local mpprint = mp.print
- local mpquoted = mp.quoted
-
- local bpfactor = number.dimenfactors.bp
-
- -- more helpers
-
- local function getmacro(k) mpprint (getmacro(k)) end
- local function getdimen(k) mpprint (getdimen(k)*bpfactor) end
- local function getcount(k) mpprint (getcount(k)) end
- local function gettoks (k) mpquoted(gettoks (k)) end
-
- local function setmacro(k,v) setmacro(k,v) end
- local function setdimen(k,v) setdimen(k,v/bpfactor) end
- local function setcount(k,v) setcount(k,v) end
- local function settoks (k,v) settoks (k,v) end
-
- -- def foo = lua.mp.foo ... enddef ; % loops due to foo in suffix
-
- mp._get_macro_ = getmacro mp.getmacro = getmacro
- mp._get_dimen_ = getdimen mp.getdimen = getdimen
- mp._get_count_ = getcount mp.getcount = getcount
- mp._get_toks_ = gettoks mp.gettoks = gettoks
-
- mp._set_macro_ = setmacro mp.setmacro = setmacro
- mp._set_dimen_ = setdimen mp.setdimen = setdimen
- mp._set_count_ = setcount mp.setcount = setcount
- mp._set_toks_ = settoks mp.settoks = settoks
-
-end
-
--- position fun
-
-do
-
- local mpprint = mp.print
- local mpfprint = mp.fprint
- local mpquoted = mp.quoted
- local jobpositions = job.positions
- local getwhd = jobpositions.whd
- local getxy = jobpositions.xy
- local getposition = jobpositions.position
- local getpage = jobpositions.page
- local getregion = jobpositions.region
- local getmacro = tokens.getters.macro
-
- function mp.positionpath(name)
- local w, h, d = getwhd(name)
- if w then
- mpfprint("((%p,%p)--(%p,%p)--(%p,%p)--(%p,%p)--cycle)",0,-d,w,-d,w,h,0,h)
- else
- mpprint("(origin--cycle)")
- end
- end
-
- function mp.positioncurve(name)
- local w, h, d = getwhd(name)
- if w then
- mpfprint("((%p,%p)..(%p,%p)..(%p,%p)..(%p,%p)..cycle)",0,-d,w,-d,w,h,0,h)
- else
- mpprint("(origin--cycle)")
- end
- end
-
- function mp.positionbox(name)
- local p, x, y, w, h, d = getposition(name)
- if p then
- mpfprint("((%p,%p)--(%p,%p)--(%p,%p)--(%p,%p)--cycle)",x,y-d,x+w,y-d,x+w,y+h,x,y+h)
- else
- mpprint("(%p,%p)",x,y)
- end
- end
-
- function mp.positionxy(name)
- local x, y = getxy(name)
- if x then
- mpfprint("(%p,%p)",x,y)
- else
- mpprint("origin")
- end
- end
-
- function mp.positionpage(name)
- mpfprint("%i",getpage(name) or 0)
- end
-
- function mp.positionregion(name)
- local r = getregion(name)
- if r then
- mpquoted(r)
- else
- mpquoted("unknown")
- end
- end
-
- function mp.positionwhd(name)
- local w, h, d = getwhd(name)
- if w then
- mpfprint("(%p,%p,%p)",w,h,d)
- else
- mpprint("(0,0,0)")
- end
- end
-
- function mp.positionpxy(name)
- local p, x, y = getposition(name)
- if p then
- mpfprint("(%p,%p,%p)",p,x,y)
- else
- mpprint("(0,0,0)")
- end
- end
-
- function mp.positionanchor()
- mpquoted(getmacro("MPanchorid"))
- end
-
-end
-
-do
-
- local mppair = mp.pair
-
- function mp.textextanchor(s)
- local x, y = match(s,"tx_anchor=(%S+) (%S+)") -- todo: make an lpeg
- if x and y then
- x = tonumber(x)
- y = tonumber(y)
- end
- mppair(x or 0,y or 0)
- end
-
-end
-
-do
-
- local mpprint = mp.print
- local mpquoted = mp.quoted
- local getmacro = tokens.getters.macro
-
- function mp.texvar(name)
- mpprint(getmacro(metapost.namespace .. name))
- end
-
- function mp.texstr(name)
- mpquoted(getmacro(metapost.namespace .. name))
- end
-
-end
-
-do
-
- local mpprint = aux.print
- local mpvprint = aux.vprint
-
- local hashes = { }
-
- function mp.newhash(name)
- if name then
- hashes[name] = { }
- else
- for i=1,#hashes+1 do
- if not hashes[i] then
- hashes[i] = { }
- mpvprint(i)
- return
- end
- end
- end
- end
-
- function mp.disposehash(n)
- if tonumber(n) then
- hashes[n] = false
- else
- hashes[n] = nil
- end
- end
-
- function mp.inhash(n,key)
- local h = hashes[n]
- mpvprint(h and h[key] and true or false)
- end
-
- function mp.tohash(n,key,value)
- local h = hashes[n]
- if h then
- if value == nil then
- h[key] = true
- else
- h[key] = value
- end
- end
- end
-
- function mp.fromhash(n,key)
- local h = hashes[n]
- mpvprint(h and h[key] or false)
- end
-
- interfaces.implement {
- name = "MPfromhash",
- arguments = "2 strings",
- actions = function(name,key)
- local h = hashes[name] or hashes[tonumber(name)]
- if h then
- local v = h[key] or h[tonumber(key)]
- if v then
- context(v)
- end
- end
- end
- }
-
-end
-
-do
-
- -- a bit overkill: just a find(str,"mf_object=") can be enough
- --
- -- todo : share with mlib-pps.lua metapost,isobject
-
- local mpboolean = aux.boolean
-
- local p1 = P("mf_object=")
- local p2 = lpegpatterns.eol * p1
- local pattern = (1-p2)^0 * p2 + p1
-
- function mp.isobject(str)
- mpboolean(pattern and str ~= "" and lpegmatch(pattern,str))
- end
-
-end
-
-function mp.flatten(t)
- local tn = #t
-
- local t1 = t[1]
- local t2 = t[2]
- local t3 = t[3]
- local t4 = t[4]
-
- for i=1,tn-5,2 do
- local t5 = t[i+4]
- local t6 = t[i+5]
- if t1 == t3 and t3 == t5 and ((t2 <= t4 and t4 <= t6) or (t6 <= t4 and t4 <= t2)) then
- t[i+3] = t2
- t4 = t2
- t[i] = false
- t[i+1] = false
- elseif t2 == t4 and t4 == t6 and ((t1 <= t3 and t3 <= t5) or (t5 <= t3 and t3 <= t1)) then
- t[i+2] = t1
- t3 = t1
- t[i] = false
- t[i+1] = false
- end
- t1 = t3
- t2 = t4
- t3 = t5
- t4 = t6
- end
-
- -- remove duplicates
-
- local t1 = t[1]
- local t2 = t[2]
- for i=1,tn-2,2 do
- local t3 = t[i+2]
- local t4 = t[i+3]
- if t1 == t3 and t2 == t4 then
- t[i] = false
- t[i+1] = false
- end
- t1 = t3
- t2 = t4
- end
-
- -- move coordinates
-
- local m = 0
- for i=1,tn,2 do
- if t[i] then
- m = m + 1 t[m] = t[i]
- m = m + 1 t[m] = t[i+1]
- end
- end
-
- -- prune the table (not gc'd)
-
- for i=tn,m+1,-1 do
- t[i] = nil
- end
-
- -- safeguard so that we have at least one segment
-
- if m == 2 then
- t[3] = t[1]
- t[4] = t[2]
- end
-
-end
-
-do
-
- -- if needed we can optimize the sub (cache last split)
-
- local utflen = utf.len
- local utfsub = utf.sub
-
- function mp.utflen(s)
- mpnumeric(utflen(s))
- end
-
- function mp.utfsub(s,f,t)
- mpquoted(utfsub(s,f,t or f))
- end
-
-end
-
diff --git a/tex/context/base/mkiv/mlib-mat.lua b/tex/context/base/mkiv/mlib-mat.lmt
index e5d40319f..e5d40319f 100644
--- a/tex/context/base/mkiv/mlib-mat.lua
+++ b/tex/context/base/mkiv/mlib-mat.lmt
diff --git a/tex/context/base/mkiv/mlib-mpf.lua b/tex/context/base/mkiv/mlib-mpf.lua
new file mode 100644
index 000000000..83a585850
--- /dev/null
+++ b/tex/context/base/mkiv/mlib-mpf.lua
@@ -0,0 +1,1245 @@
+if not modules then modules = { } end modules ['mlib-mpf'] = {
+ version = 1.001,
+ comment = "companion to mlib-ctx.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files",
+}
+
+-- moved from mlib-lua:
+
+local type, tostring, tonumber, select, loadstring = type, tostring, tonumber, select, loadstring
+local find, match, gsub, gmatch = string.find, string.match, string.gsub, string.gmatch
+local concat = table.concat
+
+local formatters = string.formatters
+local lpegmatch = lpeg.match
+local lpegpatterns = lpeg.patterns
+
+local P, S, Ct, Cs, Cc, C = lpeg.P, lpeg.S, lpeg.Ct, lpeg.Cs, lpeg.Cc, lpeg.C
+
+local report_luarun = logs.reporter("metapost","lua")
+local report_script = logs.reporter("metapost","script")
+local report_message = logs.reporter("metapost")
+
+local trace_luarun = false trackers.register("metapost.lua",function(v) trace_luarun = v end)
+
+local be_tolerant = true directives.register("metapost.lua.tolerant", function(v) be_tolerant = v end)
+
+local set = mp.set
+local get = mp.get
+local aux = mp.aux
+local scan = mp.scan
+local inject = mp.inject
+
+do
+
+ local lmtxmode = CONTEXTLMTXMODE > 0 -- just a simple one, no need for separation
+
+ -- serializers
+
+ local f_integer = formatters["%i"]
+ local f_numeric = formatters["%F"]
+
+ -- no %n as that can produce -e notation and that is not so nice for scaled butmaybe we
+ -- should then switch between ... i.e. make a push/pop for the formatters here ... not now.
+
+ local f_integer = formatters["%i"]
+ local f_numeric = formatters["%F"]
+ local f_pair = formatters["(%F,%F)"]
+ local f_ctrl = formatters["(%F,%F) .. controls (%F,%F) and (%F,%F)"]
+ local f_triplet = formatters["(%F,%F,%F)"]
+ local f_quadruple = formatters["(%F,%F,%F,%F)"]
+ local f_transform = formatters["totransform(%F,%F,%F,%F,%F,%F)"]
+ local f_pen = formatters["(pencircle transformed totransform(%F,%F,%F,%F,%F,%F))"]
+
+ local f_points = formatters["%p"]
+ local f_pair_pt = formatters["(%p,%p)"]
+ local f_ctrl_pt = formatters["(%p,%p) .. controls (%p,%p) and (%p,%p)"]
+ local f_triplet_pt = formatters["(%p,%p,%p)"]
+ local f_quadruple_pt = formatters["(%p,%p,%p,%p)"]
+
+ local r = P('%') / "percent"
+ + P('"') / "dquote"
+ + P('\n') / "crlf"
+ -- + P(' ') / "space"
+ local a = Cc("&")
+ local q = Cc('"')
+ local p = Cs(q * (r * a)^-1 * (a * r * (P(-1) + a) + P(1))^0 * q)
+
+ mp.cleaned = function(s) return lpegmatch(p,s) or s end
+
+ -- management
+
+ -- sometimes we gain (e.g. .5 sec on the sync test)
+
+ local cache = table.makeweak()
+
+ local runscripts = { }
+ local runnames = { }
+ local nofscripts = 0
+
+ function metapost.registerscript(name,f)
+ nofscripts = nofscripts + 1
+ if f then
+ runscripts[nofscripts] = f
+ runnames[name] = nofscripts
+ else
+ runscripts[nofscripts] = name
+ end
+ return nofscripts
+ end
+
+ function metapost.scriptindex(name)
+ return runnames[name] or 0
+ end
+
+ -- The gbuffer sharing and such is not really needed now but make a dent when
+ -- we have a high volume of simpel calls (loops) so we keep it around for a
+ -- while.
+
+ local nesting = 0
+ local runs = 0
+ local gbuffer = { }
+ local buffer = gbuffer
+ local n = 0
+
+ local function mpdirect1(a)
+ n = n + 1 buffer[n] = a
+ end
+ local function mpdirect2(a,b)
+ n = n + 1 buffer[n] = a
+ n = n + 1 buffer[n] = b
+ end
+ local function mpdirect3(a,b,c)
+ n = n + 1 buffer[n] = a
+ n = n + 1 buffer[n] = b
+ n = n + 1 buffer[n] = c
+ end
+ local function mpdirect4(a,b,c,d)
+ n = n + 1 buffer[n] = a
+ n = n + 1 buffer[n] = b
+ n = n + 1 buffer[n] = c
+ n = n + 1 buffer[n] = d
+ end
+ local function mpdirect5(a,b,c,d,e)
+ n = n + 1 buffer[n] = a
+ n = n + 1 buffer[n] = b
+ n = n + 1 buffer[n] = c
+ n = n + 1 buffer[n] = d
+ n = n + 1 buffer[n] = e
+ end
+
+ local function mpflush(separator)
+ buffer[1] = concat(buffer,separator or "",1,n)
+ n = 1
+ end
+
+ function metapost.runscript(code)
+ nesting = nesting + 1
+ runs = runs + 1
+
+ local index = type(code) == "number"
+ local f
+ local result
+
+ if index then
+ f = runscripts[code]
+ if not f then
+ report_luarun("%i: bad index: %s",nesting,code)
+ elseif trace_luarun then
+ report_luarun("%i: index: %i",nesting,code)
+ end
+ else
+ if trace_luarun then
+ report_luarun("%i: code: %s",nesting,code)
+ end
+ f = cache[code]
+ if not f then
+ f = loadstring("return " .. code)
+ if f then
+ cache[code] = f
+ elseif be_tolerant then
+ f = loadstring(code)
+ if f then
+ cache[code] = f
+ end
+ end
+ end
+ end
+
+ -- returning nil is more efficient and a signal not to scan in mp
+
+ if f then
+
+ local lbuffer, ln
+
+ if nesting == 1 then
+ buffer = gbuffer
+ n = 0
+ else
+ lbuffer = buffer
+ ln = n
+ buffer = { }
+ n = 0
+ end
+
+ result = f()
+ if result then
+ local t = type(result)
+ if lmtxmode then
+ -- we can consider to use the injector for tables but then we need to
+ -- check of concatination is expected so best keep this!
+ if t == "number" or t == "boolean" then
+ -- native types
+ elseif t == "string" or t == "table" then
+ -- (concatenated) passed to scantokens
+ else
+ -- scantokens
+ result = tostring(result)
+ end
+ else
+ if t == "number" then
+ result = f_numeric(result)
+ elseif t == "table" then
+ result = concat(result) -- no spaces here
+ else
+ result = tostring(result)
+ end
+ end
+ if trace_luarun then
+ report_luarun("%i: %s result: %s",nesting,t,result)
+ end
+ elseif n == 0 then
+ -- result = ""
+ result = nil -- no scantokens done then
+ if trace_luarun then
+ report_luarun("%i: no buffered result",nesting)
+ end
+ elseif n == 1 then
+ result = buffer[1]
+ if trace_luarun then
+ report_luarun("%i: 1 buffered result: %s",nesting,result)
+ end
+ else
+ -- the space is why we sometimes have collectors
+ if nesting == 1 then
+ -- if we had no space we could pass result directly in lmtx
+ result = concat(buffer," ",1,n)
+ if n > 500 or #result > 10000 then
+ gbuffer = { } -- newtable(20,0)
+ lbuffer = gbuffer
+ end
+ else
+ -- if we had no space we could pass result directly in lmtx
+ result = concat(buffer," ")
+ end
+ if trace_luarun then
+ report_luarun("%i: %i buffered results: %s",nesting,n,result)
+ end
+ end
+
+ if nesting == 1 then
+ n = 0
+ else
+ buffer = lbuffer
+ n = ln
+ end
+
+ else
+ report_luarun("%i: no result, invalid code: %s",nesting,code)
+ result = ""
+ end
+
+ nesting = nesting - 1
+
+ return result
+ end
+
+ function metapost.nofscriptruns()
+ return runs
+ end
+
+ -- writers
+
+ local function mpp(value)
+ n = n + 1
+ local t = type(value)
+ if t == "number" then
+ buffer[n] = f_numeric(value)
+ elseif t == "string" then
+ buffer[n] = value
+ elseif t == "table" then
+ if #t == 6 then
+ buffer[n] = "totransform(" .. concat(value,",") .. ")"
+ else
+ buffer[n] = "(" .. concat(value,",") .. ")"
+ end
+ else -- boolean or whatever
+ buffer[n] = tostring(value)
+ end
+ end
+
+ local function mpprint(first,second,...)
+ if second == nil then
+ if first ~= nil then
+ mpp(first)
+ end
+ else
+ for i=1,select("#",first,second,...) do
+ local value = (select(i,first,second,...))
+ if value ~= nil then
+ mpp(value)
+ end
+ end
+ end
+ end
+
+ local function mpp(value)
+ n = n + 1
+ local t = type(value)
+ if t == "number" then
+ buffer[n] = f_numeric(value)
+ elseif t == "string" then
+ buffer[n] = lpegmatch(p,value)
+ elseif t == "table" then
+ if #t > 4 then
+ buffer[n] = ""
+ else
+ buffer[n] = "(" .. concat(value,",") .. ")"
+ end
+ else -- boolean or whatever
+ buffer[n] = tostring(value)
+ end
+ end
+
+ local function mpvprint(first,second,...) -- variable print
+ if second == nil then
+ if first ~= nil then
+ mpp(first)
+ end
+ else
+ for i=1,select("#",first,second,...) do
+ local value = (select(i,first,second,...))
+ if value ~= nil then
+ mpp(value)
+ end
+ end
+ end
+ end
+
+ local function mpstring(value)
+ n = n + 1
+ buffer[n] = lpegmatch(p,value)
+ end
+
+ local function mpboolean(b)
+ n = n + 1
+ buffer[n] = b and "true" or "false"
+ end
+
+ local function mpnumeric(f)
+ n = n + 1
+ if not f or f == 0 then
+ buffer[n] = "0"
+ else
+ buffer[n] = f_numeric(f)
+ end
+ end
+
+ local function mpinteger(i)
+ n = n + 1
+ -- buffer[n] = i and f_integer(i) or "0"
+ buffer[n] = i or "0"
+ end
+
+ local function mppoints(i)
+ n = n + 1
+ if not i or i == 0 then
+ buffer[n] = "0pt"
+ else
+ buffer[n] = f_points(i)
+ end
+ end
+
+ local function mppair(x,y)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_pair(x[1],x[2])
+ else
+ buffer[n] = f_pair(x,y)
+ end
+ end
+
+ local function mppairpoints(x,y)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_pair_pt(x[1],x[2])
+ else
+ buffer[n] = f_pair_pt(x,y)
+ end
+ end
+
+ local function mptriplet(x,y,z)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_triplet(x[1],x[2],x[3])
+ else
+ buffer[n] = f_triplet(x,y,z)
+ end
+ end
+
+ local function mptripletpoints(x,y,z)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_triplet_pt(x[1],x[2],x[3])
+ else
+ buffer[n] = f_triplet_pt(x,y,z)
+ end
+ end
+
+ local function mpquadruple(w,x,y,z)
+ n = n + 1
+ if type(w) == "table" then
+ buffer[n] = f_quadruple(w[1],w[2],w[3],w[4])
+ else
+ buffer[n] = f_quadruple(w,x,y,z)
+ end
+ end
+
+ local function mpquadruplepoints(w,x,y,z)
+ n = n + 1
+ if type(w) == "table" then
+ buffer[n] = f_quadruple_pt(w[1],w[2],w[3],w[4])
+ else
+ buffer[n] = f_quadruple_pt(w,x,y,z)
+ end
+ end
+
+ local function mptransform(x,y,xx,xy,yx,yy)
+ n = n + 1
+ if type(x) == "table" then
+ buffer[n] = f_transform(x[1],x[2],x[3],x[4],x[5],x[6])
+ else
+ buffer[n] = f_transform(x,y,xx,xy,yx,yy)
+ end
+ end
+
+ local function mpcolor(c,m,y,k)
+ n = n + 1
+ if type(c) == "table" then
+ local l = #c
+ if l == 4 then
+ buffer[n] = f_quadruple(c[1],c[2],c[3],c[4])
+ elseif l == 3 then
+ buffer[n] = f_triplet(c[1],c[2],c[3])
+ else
+ buffer[n] = f_numeric(c[1])
+ end
+ else
+ if k then
+ buffer[n] = f_quadruple(c,m,y,k)
+ elseif y then
+ buffer[n] = f_triplet(c,m,y)
+ else
+ buffer[n] = f_numeric(c)
+ end
+ end
+ end
+
+ -- we have three kind of connectors:
+ --
+ -- .. ... -- (true)
+
+ local function mp_path(f2,f6,t,connector,cycle)
+ if type(t) == "table" then
+ local tn = #t
+ if tn == 1 then
+ local t1 = t[1]
+ n = n + 1
+ if t.pen then
+ buffer[n] = f_pen(unpack(t1))
+ else
+ buffer[n] = f2(t1[1],t1[2])
+ end
+ elseif tn > 0 then
+ if connector == true or connector == nil then
+ connector = ".."
+ elseif connector == false then
+ connector = "--"
+ end
+ if cycle == nil then
+ cycle = t.cycle
+ if cycle == nil then
+ cycle = true
+ end
+ end
+ local six = connector == ".." -- otherwise we use whatever gets asked for
+ local controls = connector -- whatever
+ local a = t[1]
+ local b = t[2]
+ n = n + 1
+ buffer[n] = "("
+ n = n + 1
+ if six and #a == 6 and #b == 6 then
+ buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
+ controls = ".."
+ else
+ buffer[n] = f2(a[1],a[2])
+ controls = connector
+ end
+ for i=2,tn-1 do
+ a = b
+ b = t[i+1]
+ n = n + 1
+ buffer[n] = connector
+ n = n + 1
+ if six and #a == 6 and #b == 6 then
+ buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
+ controls = ".."
+ else
+ buffer[n] = f2(a[1],a[2])
+ controls = connector
+ end
+ end
+ n = n + 1
+ buffer[n] = connector
+ a = b
+ b = t[1]
+ n = n + 1
+ if cycle then
+ if six and #a == 6 and #b == 6 then
+ buffer[n] = f6(a[1],a[2],a[5],a[6],b[3],b[4])
+ controls = ".."
+ else
+ buffer[n] = f2(a[1],a[2])
+ controls = connector
+ end
+ n = n + 1
+ buffer[n] = connector
+ n = n + 1
+ buffer[n] = "cycle"
+ else
+ buffer[n] = f2(a[1],a[2])
+ end
+ n = n + 1
+ buffer[n] = ")"
+ end
+ end
+ end
+
+ local function mppath(...)
+ mp_path(f_pair,f_ctrl,...)
+ end
+
+ local function mppathpoints(...)
+ mp_path(f_pair_pt,f_ctrl_pt,...)
+ end
+
+ local function mpsize(t)
+ n = n + 1
+ buffer[n] = type(t) == "table" and f_numeric(#t) or "0"
+ end
+
+ local replacer = lpeg.replacer("@","%%")
+
+ local function mpfprint(fmt,...)
+ n = n + 1
+ if not find(fmt,"%",1,true) then
+ fmt = lpegmatch(replacer,fmt)
+ end
+ buffer[n] = formatters[fmt](...)
+ end
+
+ local function mpquoted(fmt,s,...)
+ if s then
+ n = n + 1
+ if not find(fmt,"%",1,true) then
+ fmt = lpegmatch(replacer,fmt)
+ end
+ -- buffer[n] = '"' .. formatters[fmt](s,...) .. '"'
+ buffer[n] = lpegmatch(p,formatters[fmt](s,...))
+ elseif fmt then
+ n = n + 1
+ -- buffer[n] = '"' .. fmt .. '"'
+ buffer[n] = lpegmatch(p,fmt)
+ else
+ -- something is wrong
+ end
+ end
+
+ aux.direct = mpdirect1
+ aux.direct1 = mpdirect1
+ aux.direct2 = mpdirect2
+ aux.direct3 = mpdirect3
+ aux.direct4 = mpdirect4
+ aux.flush = mpflush
+
+ aux.print = mpprint
+ aux.vprint = mpvprint
+ aux.boolean = mpboolean
+ aux.string = mpstring
+ aux.numeric = mpnumeric
+ aux.number = mpnumeric
+ aux.integer = mpinteger
+ aux.points = mppoints
+ aux.pair = mppair
+ aux.pairpoints = mppairpoints
+ aux.triplet = mptriplet
+ aux.tripletpoints = mptripletpoints
+ aux.quadruple = mpquadruple
+ aux.quadruplepoints = mpquadruplepoints
+ aux.path = mppath
+ aux.pathpoints = mppathpoints
+ aux.size = mpsize
+ aux.fprint = mpfprint
+ aux.quoted = mpquoted
+ aux.transform = mptransform
+ aux.color = mpcolor
+
+ -- for the moment
+
+ local function mpdraw(lines,list) -- n * 4
+ if list then
+ local c = #lines
+ for i=1,c do
+ local ci = lines[i]
+ local ni = #ci
+ n = n + 1 buffer[n] = i < c and "d(" or "D("
+ for j=1,ni,2 do
+ local l = j + 1
+ n = n + 1 buffer[n] = ci[j]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = ci[l]
+ n = n + 1 buffer[n] = l < ni and ")--(" or ");"
+ end
+ end
+ else
+ local l = #lines
+ local m = l - 4
+ for i=1,l,4 do
+ n = n + 1 buffer[n] = i < m and "d(" or "D("
+ n = n + 1 buffer[n] = lines[i]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = lines[i+1]
+ n = n + 1 buffer[n] = ")--("
+ n = n + 1 buffer[n] = lines[i+2]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = lines[i+3]
+ n = n + 1 buffer[n] = ");"
+ end
+ end
+ end
+
+ local function mpfill(lines,list)
+ if list then
+ local c = #lines
+ for i=1,c do
+ local ci = lines[i]
+ local ni = #ci
+ n = n + 1 buffer[n] = i < c and "f(" or "F("
+ for j=1,ni,2 do
+ local l = j + 1
+ n = n + 1 buffer[n] = ci[j]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = ci[l]
+ n = n + 1 buffer[n] = l < ni and ")--(" or ")--C;"
+ end
+ end
+ else
+ local l = #lines
+ local m = l - 4
+ for i=1,l,4 do
+ n = n + 1 buffer[n] = i < m and "f(" or "F("
+ n = n + 1 buffer[n] = lines[i]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = lines[i+1]
+ n = n + 1 buffer[n] = ")--("
+ n = n + 1 buffer[n] = lines[i+2]
+ n = n + 1 buffer[n] = ","
+ n = n + 1 buffer[n] = lines[i+3]
+ n = n + 1 buffer[n] = ")--C;"
+ end
+ end
+ end
+
+ aux.draw = mpdraw
+ aux.fill = mpfill
+
+ for k, v in next, aux do mp[k] = v end
+
+end
+
+do
+
+ -- Another experimental feature:
+
+ local mpnumeric = mp.numeric
+ local scanstring = scan.string
+ local scriptindex = metapost.scriptindex
+
+ function mp.mf_script_index(name)
+ local index = scriptindex(name)
+ -- report_script("method %i, name %a, index %i",1,name,index)
+ mpnumeric(index)
+ end
+
+ -- once bootstrapped ... (needs pushed mpx instances)
+
+ metapost.registerscript("scriptindex",function()
+ local name = scanstring()
+ local index = scriptindex(name)
+ -- report_script("method %i, name %a, index %i",2,name,index)
+ mpnumeric(index)
+ end)
+
+end
+
+-- the next will move to mlib-lmp.lua
+
+do
+
+ local mpnamedcolor = attributes.colors.mpnamedcolor
+ local mpprint = aux.print
+ local scanstring = scan.string
+
+ mp.mf_named_color = function(str)
+ mpprint(mpnamedcolor(str))
+ end
+
+ -- todo: we can inject but currently we always get a string back so then
+ -- we need to deal with it upstream in the color module ... not now
+
+ metapost.registerscript("namedcolor",function()
+ mpprint(mpnamedcolor(scanstring()))
+ end)
+
+end
+
+function mp.n(t) -- used ?
+ return type(t) == "table" and #t or 0
+end
+
+do
+
+ -- experiment: names can change
+
+ local mppath = aux.path
+ local mpsize = aux.size
+
+ local whitespace = lpegpatterns.whitespace
+ local newline = lpegpatterns.newline
+ local setsep = newline^2
+ local comment = (S("#%") + P("--")) * (1-newline)^0 * (whitespace - setsep)^0
+ local value = (1-whitespace)^1 / tonumber
+ local entry = Ct( value * whitespace * value)
+ local set = Ct((entry * (whitespace-setsep)^0 * comment^0)^1)
+ local series = Ct((set * whitespace^0)^1)
+
+ local pattern = whitespace^0 * series
+
+ local datasets = { }
+ mp.datasets = datasets
+
+ function mp.dataset(str)
+ return lpegmatch(pattern,str)
+ end
+
+ function datasets.load(tag,filename)
+ if not filename then
+ tag, filename = file.basename(tag), tag
+ end
+ local data = lpegmatch(pattern,io.loaddata(filename) or "")
+ datasets[tag] = {
+ data = data,
+ line = function(n) mppath(data[n or 1]) end,
+ size = function() mpsize(data) end,
+ }
+ end
+
+ table.setmetatablecall(datasets,function(t,k,f,...)
+ local d = datasets[k]
+ local t = type(d)
+ if t == "table" then
+ d = d[f]
+ if type(d) == "function" then
+ d(...)
+ else
+ mpvprint(...)
+ end
+ elseif t == "function" then
+ d(f,...)
+ end
+ end)
+
+end
+
+-- \startluacode
+-- local str = [[
+-- 10 20 20 20
+-- 30 40 40 60
+-- 50 10
+--
+-- 10 10 20 30
+-- 30 50 40 50
+-- 50 20 -- the last one
+--
+-- 10 20 % comment
+-- 20 10
+-- 30 40 # comment
+-- 40 20
+-- 50 10
+-- ]]
+--
+-- MP.myset = mp.dataset(str)
+--
+-- inspect(MP.myset)
+-- \stopluacode
+--
+-- \startMPpage
+-- color c[] ; c[1] := red ; c[2] := green ; c[3] := blue ;
+-- for i=1 upto lua("mp.print(mp.n(MP.myset))") :
+-- draw lua("mp.path(MP.myset[" & decimal i & "])") withcolor c[i] ;
+-- endfor ;
+-- \stopMPpage
+
+-- texts:
+
+do
+
+ local mptriplet = mp.triplet
+
+ local bpfactor = number.dimenfactors.bp
+ local textexts = nil
+ local mptriplet = mp.triplet
+ local nbdimensions = nodes.boxes.dimensions
+
+ function mp.mf_tt_initialize(tt)
+ textexts = tt
+ end
+
+ function mp.mf_tt_dimensions(n)
+ local box = textexts and textexts[n]
+ if box then
+ -- could be made faster with nuts but not critical
+ mptriplet(box.width*bpfactor,box.height*bpfactor,box.depth*bpfactor)
+ else
+ mptriplet(0,0,0)
+ end
+ end
+
+ function mp.mf_tb_dimensions(category,name)
+ local w, h, d = nbdimensions(category,name)
+ mptriplet(w*bpfactor,h*bpfactor,d*bpfactor)
+ end
+
+ function mp.report(a,b,c,...)
+ if c then
+ report_message("%s : %s",a,formatters[(gsub(b,"@","%%"))](c,...))
+ elseif b then
+ report_message("%s : %s",a,b)
+ elseif a then
+ report_message("%s : %s","message",a)
+ end
+ end
+
+end
+
+do
+
+ local mpprint = aux.print
+ local modes = tex.modes
+ local systemmodes = tex.systemmodes
+
+ function mp.mode(s)
+ mpprint(modes[s] and true or false)
+ end
+
+ function mp.systemmode(s)
+ mpprint(systemmodes[s] and true or false)
+ end
+
+ mp.processingmode = mp.mode
+
+end
+
+-- for alan's nodes:
+
+do
+
+ local mpprint = aux.print
+ local mpquoted = aux.quoted
+
+ function mp.isarray(str)
+ mpprint(find(str,"%d") and true or false)
+ end
+
+ function mp.prefix(str)
+ mpquoted(match(str,"^(.-)[%d%[]") or str)
+ end
+
+ -- function mp.dimension(str)
+ -- local n = 0
+ -- for s in gmatch(str,"%[?%-?%d+%]?") do --todo: lpeg
+ -- n = n + 1
+ -- end
+ -- mpprint(n)
+ -- end
+
+ mp.dimension = lpeg.counter(P("[") * lpegpatterns.integer * P("]") + lpegpatterns.integer,mpprint)
+
+ -- faster and okay as we don't have many variables but probably only
+ -- basename makes sense and even then it's not called that often
+
+ -- local hash = table.setmetatableindex(function(t,k)
+ -- local v = find(k,"%d") and true or false
+ -- t[k] = v
+ -- return v
+ -- end)
+ --
+ -- function mp.isarray(str)
+ -- mpprint(hash[str])
+ -- end
+ --
+ -- local hash = table.setmetatableindex(function(t,k)
+ -- local v = '"' .. (match(k,"^(.-)%d") or k) .. '"'
+ -- t[k] = v
+ -- return v
+ -- end)
+ --
+ -- function mp.prefix(str)
+ -- mpprint(hash[str])
+ -- end
+
+end
+
+do
+
+ local getmacro = tex.getmacro
+ local getdimen = tex.getdimen
+ local getcount = tex.getcount
+ local gettoks = tex.gettoks
+ local setmacro = tex.setmacro
+ local setdimen = tex.setdimen
+ local setcount = tex.setcount
+ local settoks = tex.settoks
+
+ local mpprint = mp.print
+ local mpquoted = mp.quoted
+
+ local bpfactor = number.dimenfactors.bp
+
+ -- more helpers
+
+ local function getmacro(k) mpprint (getmacro(k)) end
+ local function getdimen(k) mpprint (getdimen(k)*bpfactor) end
+ local function getcount(k) mpprint (getcount(k)) end
+ local function gettoks (k) mpquoted(gettoks (k)) end
+
+ local function setmacro(k,v) setmacro(k,v) end
+ local function setdimen(k,v) setdimen(k,v/bpfactor) end
+ local function setcount(k,v) setcount(k,v) end
+ local function settoks (k,v) settoks (k,v) end
+
+ -- def foo = lua.mp.foo ... enddef ; % loops due to foo in suffix
+
+ mp._get_macro_ = getmacro mp.getmacro = getmacro
+ mp._get_dimen_ = getdimen mp.getdimen = getdimen
+ mp._get_count_ = getcount mp.getcount = getcount
+ mp._get_toks_ = gettoks mp.gettoks = gettoks
+
+ mp._set_macro_ = setmacro mp.setmacro = setmacro
+ mp._set_dimen_ = setdimen mp.setdimen = setdimen
+ mp._set_count_ = setcount mp.setcount = setcount
+ mp._set_toks_ = settoks mp.settoks = settoks
+
+end
+
+-- position fun
+
+do
+
+ local mpprint = mp.print
+ local mpfprint = mp.fprint
+ local mpquoted = mp.quoted
+ local jobpositions = job.positions
+ local getwhd = jobpositions.whd
+ local getxy = jobpositions.xy
+ local getposition = jobpositions.position
+ local getpage = jobpositions.page
+ local getregion = jobpositions.region
+ local getmacro = tokens.getters.macro
+
+ function mp.positionpath(name)
+ local w, h, d = getwhd(name)
+ if w then
+ mpfprint("((%p,%p)--(%p,%p)--(%p,%p)--(%p,%p)--cycle)",0,-d,w,-d,w,h,0,h)
+ else
+ mpprint("(origin--cycle)")
+ end
+ end
+
+ function mp.positioncurve(name)
+ local w, h, d = getwhd(name)
+ if w then
+ mpfprint("((%p,%p)..(%p,%p)..(%p,%p)..(%p,%p)..cycle)",0,-d,w,-d,w,h,0,h)
+ else
+ mpprint("(origin--cycle)")
+ end
+ end
+
+ function mp.positionbox(name)
+ local p, x, y, w, h, d = getposition(name)
+ if p then
+ mpfprint("((%p,%p)--(%p,%p)--(%p,%p)--(%p,%p)--cycle)",x,y-d,x+w,y-d,x+w,y+h,x,y+h)
+ else
+ mpprint("(%p,%p)",x,y)
+ end
+ end
+
+ function mp.positionxy(name)
+ local x, y = getxy(name)
+ if x then
+ mpfprint("(%p,%p)",x,y)
+ else
+ mpprint("origin")
+ end
+ end
+
+ function mp.positionpage(name)
+ mpfprint("%i",getpage(name) or 0)
+ end
+
+ function mp.positionregion(name)
+ local r = getregion(name)
+ if r then
+ mpquoted(r)
+ else
+ mpquoted("unknown")
+ end
+ end
+
+ function mp.positionwhd(name)
+ local w, h, d = getwhd(name)
+ if w then
+ mpfprint("(%p,%p,%p)",w,h,d)
+ else
+ mpprint("(0,0,0)")
+ end
+ end
+
+ function mp.positionpxy(name)
+ local p, x, y = getposition(name)
+ if p then
+ mpfprint("(%p,%p,%p)",p,x,y)
+ else
+ mpprint("(0,0,0)")
+ end
+ end
+
+ function mp.positionanchor()
+ mpquoted(getmacro("MPanchorid"))
+ end
+
+end
+
+do
+
+ local mppair = mp.pair
+
+ function mp.textextanchor(s)
+ local x, y = match(s,"tx_anchor=(%S+) (%S+)") -- todo: make an lpeg
+ if x and y then
+ x = tonumber(x)
+ y = tonumber(y)
+ end
+ mppair(x or 0,y or 0)
+ end
+
+end
+
+do
+
+ local mpprint = mp.print
+ local mpquoted = mp.quoted
+ local getmacro = tokens.getters.macro
+
+ function mp.texvar(name)
+ mpprint(getmacro(metapost.namespace .. name))
+ end
+
+ function mp.texstr(name)
+ mpquoted(getmacro(metapost.namespace .. name))
+ end
+
+end
+
+do
+
+ local mpprint = aux.print
+ local mpvprint = aux.vprint
+
+ local hashes = { }
+
+ function mp.newhash(name)
+ if name then
+ hashes[name] = { }
+ else
+ for i=1,#hashes+1 do
+ if not hashes[i] then
+ hashes[i] = { }
+ mpvprint(i)
+ return
+ end
+ end
+ end
+ end
+
+ function mp.disposehash(n)
+ if tonumber(n) then
+ hashes[n] = false
+ else
+ hashes[n] = nil
+ end
+ end
+
+ function mp.inhash(n,key)
+ local h = hashes[n]
+ mpvprint(h and h[key] and true or false)
+ end
+
+ function mp.tohash(n,key,value)
+ local h = hashes[n]
+ if h then
+ if value == nil then
+ h[key] = true
+ else
+ h[key] = value
+ end
+ end
+ end
+
+ function mp.fromhash(n,key)
+ local h = hashes[n]
+ mpvprint(h and h[key] or false)
+ end
+
+ interfaces.implement {
+ name = "MPfromhash",
+ arguments = "2 strings",
+ actions = function(name,key)
+ local h = hashes[name] or hashes[tonumber(name)]
+ if h then
+ local v = h[key] or h[tonumber(key)]
+ if v then
+ context(v)
+ end
+ end
+ end
+ }
+
+end
+
+do
+
+ -- a bit overkill: just a find(str,"mf_object=") can be enough
+ --
+ -- todo : share with mlib-pps.lua metapost,isobject
+
+ local mpboolean = aux.boolean
+
+ local p1 = P("mf_object=")
+ local p2 = lpegpatterns.eol * p1
+ local pattern = (1-p2)^0 * p2 + p1
+
+ function mp.isobject(str)
+ mpboolean(pattern and str ~= "" and lpegmatch(pattern,str))
+ end
+
+end
+
+function mp.flatten(t)
+ local tn = #t
+
+ local t1 = t[1]
+ local t2 = t[2]
+ local t3 = t[3]
+ local t4 = t[4]
+
+ for i=1,tn-5,2 do
+ local t5 = t[i+4]
+ local t6 = t[i+5]
+ if t1 == t3 and t3 == t5 and ((t2 <= t4 and t4 <= t6) or (t6 <= t4 and t4 <= t2)) then
+ t[i+3] = t2
+ t4 = t2
+ t[i] = false
+ t[i+1] = false
+ elseif t2 == t4 and t4 == t6 and ((t1 <= t3 and t3 <= t5) or (t5 <= t3 and t3 <= t1)) then
+ t[i+2] = t1
+ t3 = t1
+ t[i] = false
+ t[i+1] = false
+ end
+ t1 = t3
+ t2 = t4
+ t3 = t5
+ t4 = t6
+ end
+
+ -- remove duplicates
+
+ local t1 = t[1]
+ local t2 = t[2]
+ for i=1,tn-2,2 do
+ local t3 = t[i+2]
+ local t4 = t[i+3]
+ if t1 == t3 and t2 == t4 then
+ t[i] = false
+ t[i+1] = false
+ end
+ t1 = t3
+ t2 = t4
+ end
+
+ -- move coordinates
+
+ local m = 0
+ for i=1,tn,2 do
+ if t[i] then
+ m = m + 1 t[m] = t[i]
+ m = m + 1 t[m] = t[i+1]
+ end
+ end
+
+ -- prune the table (not gc'd)
+
+ for i=tn,m+1,-1 do
+ t[i] = nil
+ end
+
+ -- safeguard so that we have at least one segment
+
+ if m == 2 then
+ t[3] = t[1]
+ t[4] = t[2]
+ end
+
+end
+
+do
+
+ -- if needed we can optimize the sub (cache last split)
+
+ local utflen = utf.len
+ local utfsub = utf.sub
+
+ function mp.utflen(s)
+ mpnumeric(utflen(s))
+ end
+
+ function mp.utfsub(s,f,t)
+ mpquoted(utfsub(s,f,t or f))
+ end
+
+end
+
diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua
index 51491d513..e34bfe5f9 100644
--- a/tex/context/base/mkiv/mlib-pps.lua
+++ b/tex/context/base/mkiv/mlib-pps.lua
@@ -964,8 +964,8 @@ local tx_reset, tx_process do
-- instance in a macro definition (rawtextext (pass back string)) ... of course one
-- should use textext so this is just a catch. When not in lmtx it's never immediate.
- local reported = false
- local awayswrap = CONTEXTLMTXMODE <= 1
+ local reported = false
+ local alwayswrap = false -- CONTEXTLMTXMODE <= 1 -- was always nil due to typo
function metapost.maketext(s,mode)
if not reported then
diff --git a/tex/context/base/mkiv/mlib-ran.lua b/tex/context/base/mkiv/mlib-ran.lmt
index cb8645e8d..cb8645e8d 100644
--- a/tex/context/base/mkiv/mlib-ran.lua
+++ b/tex/context/base/mkiv/mlib-ran.lmt
diff --git a/tex/context/base/mkiv/mlib-run.lua b/tex/context/base/mkiv/mlib-run.lua
index 11bd1a9be..6962340c5 100644
--- a/tex/context/base/mkiv/mlib-run.lua
+++ b/tex/context/base/mkiv/mlib-run.lua
@@ -123,41 +123,7 @@ local mpbasepath = lpeg.instringchecker(P("/metapost/") * (P("context") + P("bas
local realtimelogging do
- local finders = { }
- mplib.finders = finders -- also used in meta-lua.lua
-
- local new_instance = mplib.new
-
- local function validftype(ftype)
- if ftype == "mp" then
- return "mp"
- else
- return nil
- end
- end
-
- finders.file = function(specification,name,mode,ftype)
- return resolvers.findfile(name,validftype(ftype))
- end
-
- -- this will be redone in lmtx
-
- local function i_finder(name,mode,ftype) -- fake message for mpost.map and metafun.mpvi
- local specification = url.hashed(name)
- local finder = finders[specification.scheme] or finders.file
- local found = finder(specification,name,mode,validftype(ftype))
- return found
- end
-
- local function o_finder(name,mode,ftype)
- return name
- end
-
- o_finder = sandbox.register(o_finder,sandbox.filehandlerone,"mplib output finder")
-
- local function finder(name,mode,ftype)
- return (mode == "w" and o_finder or i_finder)(name,mode,validftype(ftype))
- end
+ -- begin of logger code
local report_logger = logs.reporter("metapost log")
local report_error = logs.reporter("metapost error")
@@ -189,121 +155,144 @@ local realtimelogging do
end
end
- -- experiment, todo: per instance, just a push / pop ?
+ -- end of logger code
- local findtexfile = resolvers.findtexfile
- local opentexfile = resolvers.opentexfile
- local splitlines = string.splitlines
+ -- begin of logger code
- local function writetoterminal(terminaldata,maxterm,d)
- local t = type(d)
- local n = 0
- if t == "string" then
- d = splitlines(d)
- n = #d
- for i=1,#d do
- maxterm = maxterm + 1
- terminaldata[maxterm] = d[i]
- end
- elseif t == "table" then
- for i=1,#d do
- local l = d[i]
- if find(l,"[\n\r]") then
- local s = splitlines(l)
- local m = #s
- for i=1,m do
- maxterm = maxterm + 1
- terminaldata[maxterm] = s[i]
- end
- n = n + m
- else
- maxterm = maxterm + 1
- terminaldata[maxterm] = d[i]
- n = 1
- end
- end
- end
- if trace_terminal then
- report_metapost("writing %i lines, in cache %s",n,maxterm)
- end
- return maxterm
- end
+ local finders = { }
+ mplib.finders = finders -- also used in meta-lua.lua
- local function readfromterminal(terminaldata,maxterm,nowterm)
- if nowterm >= maxterm then
- terminaldata[nowterm] = false
- maxterm = 0
- nowterm = 0
- if trace_terminal then
- report_metapost("resetting, maxcache %i",#terminaldata)
- end
- return maxterm, nowterm, nil
+ local new_instance = mplib.new
+
+ local function validftype(ftype)
+ if ftype == "mp" then
+ return "mp"
else
- if nowterm > 0 then
- terminaldata[nowterm] = false
- end
- nowterm = nowterm + 1
- local s = terminaldata[nowterm]
- if trace_terminal then
- report_metapost("reading line %i: %s",nowterm,s)
- end
- return maxterm, nowterm, s
+ return nil
end
end
- local function fileopener()
+ finders.file = function(specification,name,mode,ftype)
+ return resolvers.findfile(name,validftype(ftype))
+ end
- -- these can go into the table itself
+ -- end of finder code
- local terminaldata = { }
- local maxterm = 0
- local nowterm = 0
+ if CONTEXTLMTXMODE > 0 then
- local terminal = {
- name = "terminal",
- close = function()
- -- terminal = { }
- -- maxterm = 0
- -- nowterm = 0
- end,
- reader = function()
- local line
- maxterm, nowterm, line = readfromterminal(terminaldata,maxterm,nowterm)
- return line
- end,
- writer = function(d)
- maxterm = writetoterminal(terminaldata,maxterm,d)
- end,
- }
+ local findtexfile = resolvers.findtexfile
+ local opentexfile = resolvers.opentexfile
+ local splitlines = string.splitlines
+
+ local function writetoterminal(terminaldata,maxterm,d)
+ local t = type(d)
+ local n = 0
+ if t == "string" then
+ d = splitlines(d)
+ n = #d
+ for i=1,#d do
+ maxterm = maxterm + 1
+ terminaldata[maxterm] = d[i]
+ end
+ elseif t == "table" then
+ for i=1,#d do
+ local l = d[i]
+ if find(l,"[\n\r]") then
+ local s = splitlines(l)
+ local m = #s
+ for i=1,m do
+ maxterm = maxterm + 1
+ terminaldata[maxterm] = s[i]
+ end
+ n = n + m
+ else
+ maxterm = maxterm + 1
+ terminaldata[maxterm] = d[i]
+ n = 1
+ end
+ end
+ end
+ if trace_terminal then
+ report_metapost("writing %i lines, in cache %s",n,maxterm)
+ end
+ return maxterm
+ end
- return function(name,mode,kind)
- if name == "terminal" then
- -- report_metapost("opening terminal")
- return terminal
- elseif mode == "w" then
- local f = io.open(name,"wb")
- if f then
- -- report_metapost("opening file %a for writing",full)
- return {
- name = full,
- writer = function(s) return f:write(s) end, -- io.write(f,s)
- close = function() f:close() end,
- }
+ local function readfromterminal(terminaldata,maxterm,nowterm)
+ if nowterm >= maxterm then
+ terminaldata[nowterm] = false
+ maxterm = 0
+ nowterm = 0
+ if trace_terminal then
+ report_metapost("resetting, maxcache %i",#terminaldata)
end
+ return maxterm, nowterm, nil
else
- local full = findtexfile(name,validftype(ftype))
- if full then
- -- report_metapost("opening file %a for reading",full)
- return opentexfile(full)
+ if nowterm > 0 then
+ terminaldata[nowterm] = false
+ end
+ nowterm = nowterm + 1
+ local s = terminaldata[nowterm]
+ if trace_terminal then
+ report_metapost("reading line %i: %s",nowterm,s)
end
+ return maxterm, nowterm, s
end
end
- end
+ local function fileopener()
+
+ -- these can go into the table itself
+
+ local terminaldata = { }
+ local maxterm = 0
+ local nowterm = 0
+
+ local terminal = {
+ name = "terminal",
+ close = function()
+ -- terminal = { }
+ -- maxterm = 0
+ -- nowterm = 0
+ end,
+ reader = function()
+ local line
+ maxterm, nowterm, line = readfromterminal(terminaldata,maxterm,nowterm)
+ return line
+ end,
+ writer = function(d)
+ maxterm = writetoterminal(terminaldata,maxterm,d)
+ end,
+ }
+
+ return function(name,mode,kind)
+ if name == "terminal" then
+ -- report_metapost("opening terminal")
+ return terminal
+ elseif mode == "w" then
+ local f = io.open(name,"wb")
+ if f then
+ -- report_metapost("opening file %a for writing",full)
+ return {
+ name = full,
+ writer = function(s) return f:write(s) end, -- io.write(f,s)
+ close = function() f:close() end,
+ }
+ end
+ else
+ local full = findtexfile(name,validftype(ftype))
+ if full then
+ -- report_metapost("opening file %a for reading",full)
+ return opentexfile(full)
+ end
+ end
+ end
- -- end of experiment
+ end
- if CONTEXTLMTXMODE > 0 then
+ local function finder(name,mode,kind)
+ return findtexfile(name,kind)
+ end
function mplib.new(specification)
local openfile = fileopener()
@@ -317,17 +306,37 @@ local realtimelogging do
return instance
end
+ mplib.finder = finder
+
else
+ local function i_finder(name,mode,ftype) -- fake message for mpost.map and metafun.mpvi
+ local specification = url.hashed(name)
+ local finder = finders[specification.scheme] or finders.file
+ local found = finder(specification,name,mode,validftype(ftype))
+ return found
+ end
+
+ local function o_finder(name,mode,ftype)
+ return name
+ end
+
+ o_finder = sandbox.register(o_finder,sandbox.filehandlerone,"mplib output finder")
+
+ local function finder(name,mode,ftype)
+ return (mode == "w" and o_finder or i_finder)(name,mode,validftype(ftype))
+ end
+
function mplib.new(specification)
specification.find_file = finder
specification.run_logger = logger
return new_instance(specification)
end
+ mplib.finder = finder
+
end
- mplib.finder = finder
end
diff --git a/tex/context/base/mkiv/mlib-scn.lua b/tex/context/base/mkiv/mlib-scn.lmt
index 5655c507d..5655c507d 100644
--- a/tex/context/base/mkiv/mlib-scn.lua
+++ b/tex/context/base/mkiv/mlib-scn.lmt
diff --git a/tex/context/base/mkiv/mlib-svg.lua b/tex/context/base/mkiv/mlib-svg.lmt
index 4c4122476..4c4122476 100644
--- a/tex/context/base/mkiv/mlib-svg.lua
+++ b/tex/context/base/mkiv/mlib-svg.lmt
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index e1d84cd54..9c05f8372 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 1a650ecbf..7f84d7523 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/mkiv/toks-ini.lua b/tex/context/base/mkiv/toks-ini.lua
index 65a7645f4..562e2801a 100644
--- a/tex/context/base/mkiv/toks-ini.lua
+++ b/tex/context/base/mkiv/toks-ini.lua
@@ -219,7 +219,7 @@ tokens.scanners = { -- these expand
tokens.getters = { -- these don't expand
meaning = token.get_meaning,
macro = token.get_macro,
- token = token.scan_next, -- not here, use scanners.next or token
+ token = token.scan_next or token.get_next, -- not here, use scanners.next or token
cstoken = token.get_cstoken,
count = tex.getcount,
dimen = tex.getdimen,
diff --git a/tex/context/interface/mkiv/context-en.xml b/tex/context/interface/mkiv/context-en.xml
index 485ca4a9a..6cf0cfa0f 100644
--- a/tex/context/interface/mkiv/context-en.xml
+++ b/tex/context/interface/mkiv/context-en.xml
@@ -16682,7 +16682,93 @@
</cd:command>
<cd:command begin="push" category="layout" end="pop" file="page-imp.mkiv" level="system" name="arrangedpages" type="environment"/>
</cd:interface>
- <error/>
+ <cd:interface file="i-indent.xml">
+ <cd:command category="whitespace" file="spac-hor.mkiv" level="style" name="defineindenting">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:keywords list="yes">
+ <cd:constant method="none" prefix="cd:sign" type="small"/>
+ <cd:constant method="none" prefix="cd:sign" type="medium"/>
+ <cd:constant method="none" prefix="cd:sign" type="big"/>
+ <cd:constant type="none"/>
+ <cd:constant type="no"/>
+ <cd:constant type="not"/>
+ <cd:constant type="first"/>
+ <cd:constant type="next"/>
+ <cd:constant type="yes"/>
+ <cd:constant type="always"/>
+ <cd:constant type="never"/>
+ <cd:constant type="odd"/>
+ <cd:constant type="even"/>
+ <cd:constant type="normal"/>
+ <cd:constant type="reset"/>
+ <cd:constant type="toggle"/>
+ <cd:constant type="cd:dimension"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-hor.mkiv" level="style" name="setupindenting">
+ <cd:arguments>
+ <cd:keywords list="yes" optional="yes">
+ <cd:constant method="none" prefix="cd:sign" type="small"/>
+ <cd:constant method="none" prefix="cd:sign" type="medium"/>
+ <cd:constant method="none" prefix="cd:sign" type="big"/>
+ <cd:constant type="none"/>
+ <cd:constant type="no"/>
+ <cd:constant type="not"/>
+ <cd:constant type="first"/>
+ <cd:constant type="next"/>
+ <cd:constant type="yes"/>
+ <cd:constant type="always"/>
+ <cd:constant type="never"/>
+ <cd:constant type="odd"/>
+ <cd:constant type="even"/>
+ <cd:constant type="normal"/>
+ <cd:constant type="reset"/>
+ <cd:constant type="toggle"/>
+ <cd:constant type="cd:dimension"/>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-hor.mkiv" level="system" name="synchronizeindenting"/>
+ <cd:command category="whitespace" file="spac-hor.mkiv" level="system" name="useindentingparameter">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" coreprimitive="yes" file="spac-hor.mkiv" level="document" name="indentation"/>
+ <cd:command category="whitespace" coreprimitive="yes" file="spac-hor.mkiv" level="document" name="noindentation"/>
+ <cd:command category="whitespace" coreprimitive="yes" file="spac-hor.mkiv" level="system" name="doindentation"/>
+ <cd:command category="whitespace" file="spac-hor.mkiv" level="system" name="checknextindentation">
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="yes"/>
+ <cd:constant type="no"/>
+ <cd:constant type="auto"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-hor.mkiv" level="system" name="useindentnextparameter">
+ <cd:arguments>
+ <cd:csname/>
+ </cd:arguments>
+ </cd:command>
+ <cd:command category="whitespace" file="spac-hor.mkiv" level="system" name="dorechecknextindentation"/>
+ <cd:command begin="push" category="whitespace" end="pop" file="spac-hor.mkiv" level="system" name="indentation" type="environment"/>
+ <cd:command category="whitespace" file="supp-box.lua" keywords="conditional" level="system" name="doifelseindented">
+ <cd:arguments>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:true"/>
+ </cd:keywords>
+ <cd:keywords delimiters="braces">
+ <cd:constant type="cd:false"/>
+ </cd:keywords>
+ </cd:arguments>
+ </cd:command>
+ </cd:interface>
<cd:interface file="i-indentedtext.xml">
<cd:command category="structure" file="strc-ind.mkiv" level="style" name="defineindentedtext">
<cd:arguments>
@@ -25209,7 +25295,23 @@
</cd:keywords>
</cd:arguments>
<cd:instances>
- <cd:resolve name="instance-mathovertextextensible"/>
+ <cd:constant value="overleftarrow"/>
+ <cd:constant value="overrightarrow"/>
+ <cd:constant value="overleftrightarrow"/>
+ <cd:constant value="overtwoheadleftarrow"/>
+ <cd:constant value="overtwoheadrightarrow"/>
+ <cd:constant value="overleftharpoondown"/>
+ <cd:constant value="overleftharpoonup"/>
+ <cd:constant value="overrightharpoondown"/>
+ <cd:constant value="overrightharpoonup"/>
+ <cd:constant value="overbar"/>
+ <cd:constant value="overbrace"/>
+ <cd:constant value="overparent"/>
+ <cd:constant value="overbracket"/>
+ <cd:constant value="overbartext"/>
+ <cd:constant value="overbracetext"/>
+ <cd:constant value="overparenttext"/>
+ <cd:constant value="overbrackettext"/>
</cd:instances>
</cd:command>
<cd:command category="mathematics" file="math-sty.mkvi" level="system" name="definemathundertextextensible">
@@ -25238,7 +25340,23 @@
</cd:keywords>
</cd:arguments>
<cd:instances>
- <cd:resolve name="instance-mathundertextextensible"/>
+ <cd:constant value="underleftarrow"/>
+ <cd:constant value="underrightarrow"/>
+ <cd:constant value="underleftrightarrow"/>
+ <cd:constant value="undertwoheadleftarrow"/>
+ <cd:constant value="undertwoheadrightarrow"/>
+ <cd:constant value="underleftharpoondown"/>
+ <cd:constant value="underleftharpoonup"/>
+ <cd:constant value="underrightharpoondown"/>
+ <cd:constant value="underrightharpoonup"/>
+ <cd:constant value="underbar"/>
+ <cd:constant value="underbrace"/>
+ <cd:constant value="underparent"/>
+ <cd:constant value="underbracket"/>
+ <cd:constant value="underbartext"/>
+ <cd:constant value="underbracetext"/>
+ <cd:constant value="underparenttext"/>
+ <cd:constant value="underbrackettext"/>
</cd:instances>
</cd:command>
<cd:command category="mathematics" file="math-sty.mkvi" level="system" name="definemathtriplet">
diff --git a/tex/context/interface/mkiv/i-attachment.xml b/tex/context/interface/mkiv/i-attachment.xml
index 6fb25884c..b75a5ac66 100644
--- a/tex/context/interface/mkiv/i-attachment.xml
+++ b/tex/context/interface/mkiv/i-attachment.xml
@@ -138,26 +138,4 @@
<cd:command name="placeattachments" level="document" category="pdf" file="scrn-wid.mkvi"/>
- <!--
-
- <cd:command name="attachment" level="document" category="pdf" file="scrn-wid.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupattachment"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="attachment" type="environment" level="document" category="pdf" file="scrn-wid.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupattachment"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-bar.xml b/tex/context/interface/mkiv/i-bar.xml
index a90e6bfd2..4f9bd9c34 100644
--- a/tex/context/interface/mkiv/i-bar.xml
+++ b/tex/context/interface/mkiv/i-bar.xml
@@ -131,106 +131,6 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="overbar" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbar" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="hiddenbar" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overstrike" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="understrike" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbars" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbars" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overstrikes" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="understrikes" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underrandom" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underrandoms" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underdash" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underdashes" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underdot" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underdots" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="nobar" level="document" category="rules" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="resetbar" level="style" category="rules" file="node-rul.mkiv"/>
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-buffer.xml b/tex/context/interface/mkiv/i-buffer.xml
index b82b17ac5..451c93c7e 100644
--- a/tex/context/interface/mkiv/i-buffer.xml
+++ b/tex/context/interface/mkiv/i-buffer.xml
@@ -117,12 +117,6 @@
</cd:sequence>
</cd:command>
- <!--
-
- <cd:command name="hiding" type="environment" level="document" category="buffer" file="buff-ini.mkiv"/>
-
- -->
-
<cd:command name="processtexbuffer" level="style" category="buffer" file="buff-ini.mkiv">
<cd:sequence>
<cd:string value="processTEXbuffer"/>
diff --git a/tex/context/interface/mkiv/i-columns.xml b/tex/context/interface/mkiv/i-columns.xml
index d112efeb9..72260b820 100644
--- a/tex/context/interface/mkiv/i-columns.xml
+++ b/tex/context/interface/mkiv/i-columns.xml
@@ -102,14 +102,6 @@
</cd:arguments>
</cd:command>
- <cd:command name="simplecolumns" type="environment" level="system" category="columns" file="page-mul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setsimplecolumnshsize"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
-->
<cd:command name="simplecolumns" type="environment" level="system" category="columns" file="page-mul.mkiv">
diff --git a/tex/context/interface/mkiv/i-comment.xml b/tex/context/interface/mkiv/i-comment.xml
index 913b8e152..e7349a69e 100644
--- a/tex/context/interface/mkiv/i-comment.xml
+++ b/tex/context/interface/mkiv/i-comment.xml
@@ -130,27 +130,4 @@
<cd:command name="placecomments" level="document" category="pdf" file="scrn-wid.mkvi"/>
- <!--
-
- <cd:command name="comment" level="document" category="pdf" file="scrn-wid.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-text-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupcomment"/>
- </cd:assignments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="comment" type="environment" level="document" category="pdf" file="scrn-wid.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-text-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupcomment"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-common-instance.xml b/tex/context/interface/mkiv/i-common-instance.xml
index 74d30263a..025dafc4a 100644
--- a/tex/context/interface/mkiv/i-common-instance.xml
+++ b/tex/context/interface/mkiv/i-common-instance.xml
@@ -385,7 +385,7 @@
<cd:constant value="overbracketunderbracket"/>
</cd:define>
- <cd:define name="instance-mathoverextensible">
+ <cd:define name="instance-mathovertextextensible">
<!-- top -->
<cd:constant value="overleftarrow"/>
<cd:constant value="overrightarrow"/>
@@ -408,7 +408,7 @@
<cd:constant value="overbrackettext"/>
</cd:define>
- <cd:define name="instance-mathunderextensible">
+ <cd:define name="instance-mathundertextextensible">
<!-- bottom -->
<cd:constant value="underleftarrow"/>
<cd:constant value="underrightarrow"/>
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 59f603a12..7950faf9f 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-delimitedtext.xml b/tex/context/interface/mkiv/i-delimitedtext.xml
index ce1767b1c..3d881a972 100644
--- a/tex/context/interface/mkiv/i-delimitedtext.xml
+++ b/tex/context/interface/mkiv/i-delimitedtext.xml
@@ -157,86 +157,6 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="quotation" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="quotation" type="environment" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:keywords list="yes" optional="yes">
- <cd:inherit name="startnarrower"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="quote" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="quote" type="environment" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="blockquote" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="blockquote" type="environment" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:keywords list="yes" optional="yes">
- <cd:inherit name="startnarrower"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="speech" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="aside" type="environment" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:keywords list="yes" optional="yes">
- <cd:inherit name="startnarrower"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="aside" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="speech" type="environment" level="document" category="language" file="typo-del.mkiv">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:inherit name="startnarrower"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="setupquotation" level="style" category="language" file="typo-del.mkiv">
<cd:arguments>
<cd:assignments list="yes">
diff --git a/tex/context/interface/mkiv/i-fittingpage.xml b/tex/context/interface/mkiv/i-fittingpage.xml
index ce872a33a..7283ae5ac 100644
--- a/tex/context/interface/mkiv/i-fittingpage.xml
+++ b/tex/context/interface/mkiv/i-fittingpage.xml
@@ -68,26 +68,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="setupTEXpage" level="style" category="layout" keywords="background" file="page-app.mkiv">
- <cd:arguments>
- <cd:assignments list="yes">
- <cd:inherit name="setupfittingpage"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupMPpage" level="style" category="layout" keywords="background metapost" file="meta-fig.mkiv">
- <cd:arguments>
- <cd:assignments list="yes">
- <cd:inherit name="setupfittingpage"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="setupTEXpage" level="style" category="layout" keywords="background" file="page-app.mkiv">
<cd:arguments>
<cd:resolve name="assignment-setupfittingpage"/>
diff --git a/tex/context/interface/mkiv/i-floats.xml b/tex/context/interface/mkiv/i-floats.xml
index 26d20adef..a29fc7b9d 100644
--- a/tex/context/interface/mkiv/i-floats.xml
+++ b/tex/context/interface/mkiv/i-floats.xml
@@ -709,202 +709,6 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="placefigure" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placefigure" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-floatdata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="figuretext" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistoffigures" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistoffigures" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placetable" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placetable" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-floatdata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tabletext" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistoftables" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistoftables" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placegraphic" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placegraphic" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-floatdata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="graphictext" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistofgraphics" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistofgraphics" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placeintermezzo" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placeintermezzo" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-floatdata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="intermezzotext" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistofintermezzi" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistofintermezzi" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placechemical" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-floatlocation-list-optional"/>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placechemical" type="environment" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-floatdata-list-optional"/>
- <cd:resolve name="assignment-userdata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistofchemicals" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistofchemicals" level="document" category="structure" file="strc-flt.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="setuplocalfloats" level="style" category="structure" file="strc-flt.mkvi">
<cd:arguments>
<cd:assignments list="yes">
diff --git a/tex/context/interface/mkiv/i-formula.xml b/tex/context/interface/mkiv/i-formula.xml
index 72693fb6c..2530275c3 100644
--- a/tex/context/interface/mkiv/i-formula.xml
+++ b/tex/context/interface/mkiv/i-formula.xml
@@ -207,34 +207,6 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="spformula" type="environment" level="document" category="mathematics" file="strc-mat.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-formula-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="sdformula" type="environment" level="document" category="mathematics" file="strc-mat.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-formula-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mpformula" type="environment" level="document" category="mathematics" file="strc-mat.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-formula-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mdformula" type="environment" level="document" category="mathematics" file="strc-mat.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-formula-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="defineformulaalternative" level="system" category="mathematics" file="strc-mat.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
diff --git a/tex/context/interface/mkiv/i-fraction.xml b/tex/context/interface/mkiv/i-fraction.xml
index 80eed65d9..6e6a91030 100644
--- a/tex/context/interface/mkiv/i-fraction.xml
+++ b/tex/context/interface/mkiv/i-fraction.xml
@@ -101,73 +101,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="frac" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xfrac" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xxfrac" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tfrac" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="sfrac" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="dfrac" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="binom" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="dbinom" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tbinom" level="document" category="mathematics" file="math-frc.mkiv">
- <cd:arguments>
- <cd:content/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="splitfrac" level="document" category="mathematics" file="math-frc.mkiv">
<cd:arguments>
<cd:content/>
diff --git a/tex/context/interface/mkiv/i-framed.xml b/tex/context/interface/mkiv/i-framed.xml
index 10fbd6c37..d57a66969 100644
--- a/tex/context/interface/mkiv/i-framed.xml
+++ b/tex/context/interface/mkiv/i-framed.xml
@@ -348,19 +348,6 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="unframed" level="document" category="rules" keywords="background" file="pack-rul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="definemathframed" level="style" category="rules" keywords="background mathematics" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
@@ -395,37 +382,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="mframed" level="document" category="rules" keywords="background mathematics" file="pack-rul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inmframed" level="document" category="rules" keywords="background mathematics" file="pack-rul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mcframed" level="document" category="rules" keywords="background mathematics" file="pack-rul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="defineformulaframed" level="style" category="rules" keywords="background mathematics" file="math-for.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
@@ -540,33 +496,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="framedtext" level="document" category="rules" keywords="background" file="pack-rul.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupframedtext"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="framedtext" type="environment" level="document" category="rules" keywords="background" file="pack-rul.mkiv">
- <cd:arguments>
- <cd:keywords optional="yes">
- <cd:constant type="left"/>
- <cd:constant type="right"/>
- <cd:constant type="middle"/>
- <cd:constant type="none"/>
- </cd:keywords>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupframedtext"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="defineframedcontent" level="style" category="rules" keywords="background" file="pack-rul.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
diff --git a/tex/context/interface/mkiv/i-indent.xml b/tex/context/interface/mkiv/i-indent.xml
index cacae0673..0117cbb10 100644
--- a/tex/context/interface/mkiv/i-indent.xml
+++ b/tex/context/interface/mkiv/i-indent.xml
@@ -92,7 +92,7 @@
<cd:arguments>
<cd:resolve name="argument-true"/>
<cd:resolve name="argument-false"/>
- </cd:argument>
+ </cd:arguments>
</cd:command>
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-labeltext.xml b/tex/context/interface/mkiv/i-labeltext.xml
index 47bdd23af..6609f86a9 100644
--- a/tex/context/interface/mkiv/i-labeltext.xml
+++ b/tex/context/interface/mkiv/i-labeltext.xml
@@ -135,389 +135,4 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="setuplabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copylabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="labeltext" type="environment" flevel="style" category="language" ile="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="labellanguage" level="system" category="language" file="lang-lab.mkiv"/>
-
- <cd:command name="labeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="labeltexts" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="leftlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="rightlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupheadtext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetheadtext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copyheadtext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="headtext" type="environment" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="headlanguage" level="system" category="language" file="lang-lab.mkiv"/>
-
- <cd:command name="headtext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="headtexts" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="leftheadtext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="rightheadtext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupmathlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetmathlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copymathlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mathlabeltext" type="environment" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mathlabellanguage" level="system" category="language" file="lang-lab.mkiv"/>
-
- <cd:command name="mathlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mathlabeltexts" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="leftmathlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="rightmathlabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setuptaglabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presettaglabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copytaglabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="taglabeltext" type="environment" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="taglabellanguage" level="system" category="language" file="lang-lab.mkiv"/>
-
- <cd:command name="taglabeltext" level="style" category="language" file="lang-lab.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupunittext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetunittext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copyunittext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="unittext" type="environment" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="unitlanguage" level="system" category="language" file="phys-dim.mkiv"/>
-
- <cd:command name="unittext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupoperatortext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetoperatortext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copyoperatortext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="operatortext" type="environment" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="operatorlanguage" level="system" category="language" file="phys-dim.mkiv"/>
-
- <cd:command name="operatortext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupprefixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetprefixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copyprefixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="prefixtext" type="environment" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="prefixlanguage" level="system" category="language" file="phys-dim.mkiv"/>
-
- <cd:command name="prefixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupsuffixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetsuffixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copysuffixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="suffixtext" type="environment" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="suffixlanguage" level="system" category="language" file="phys-dim.mkiv"/>
-
- <cd:command name="suffixtext" level="style" category="language" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="setupbtxlabeltext" level="style" category="language" file="publ-ini.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="presetbtxlabeltext" level="style" category="language" file="publ-ini.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-userdata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="copybtxlabeltext" level="style" category="language" file="publ-ini.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="assignment-labeldata-list"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="btxlabeltext" type="environment" level="style" category="language" file="publ-ini.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-language-optional"/>
- <cd:resolve name="keyword-key"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="btxlabellanguage" level="system" category="language" file="publ-ini.mkiv"/>
-
- <cd:command name="btxlabeltext" level="style" category="language" file="publ-ini.mkiv">
- <cd:arguments>
- <cd:resolve name="argument-key"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-lines.xml b/tex/context/interface/mkiv/i-lines.xml
index e2bc35605..7b6a76565 100644
--- a/tex/context/interface/mkiv/i-lines.xml
+++ b/tex/context/interface/mkiv/i-lines.xml
@@ -112,18 +112,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="lines" type="environment" level="document" category="structure" file="spac-lin.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplines"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="emptylines" level="document" category="whitespace" file="spac-lin.mkiv">
<cd:arguments>
<cd:resolve name="keyword-number-optional"/>
diff --git a/tex/context/interface/mkiv/i-list.xml b/tex/context/interface/mkiv/i-list.xml
index 08dfa0cde..7b207b323 100644
--- a/tex/context/interface/mkiv/i-list.xml
+++ b/tex/context/interface/mkiv/i-list.xml
@@ -505,34 +505,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="setupcontent" level="style" category="structure" file="strc-lst.mkvi">
- <cd:arguments>
- <cd:assignments list="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placecontent" level="document" category="structure" file="strc-lst.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completecontent" level="document" category="structure" file="strc-lst.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuplist"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="structurelistuservariable" level="style" category="structure" file="strc-lst.mkvi">
<cd:arguments>
<cd:resolve name="argument-key"/>
diff --git a/tex/context/interface/mkiv/i-makeup.xml b/tex/context/interface/mkiv/i-makeup.xml
index 27b80ca01..15c327f6b 100644
--- a/tex/context/interface/mkiv/i-makeup.xml
+++ b/tex/context/interface/mkiv/i-makeup.xml
@@ -137,40 +137,4 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="standardmakeup" type="environment" level="document" category="structure" keywords="layout" file="page-mak.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmakeup"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="textmakeup" type="environment" level="document" category="structure" keywords="layout" file="page-mak.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmakeup"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="pagemakeup" type="environment" level="document" category="structure" keywords="layout" file="page-mak.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmakeup"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="middlemakeup" type="environment" level="document" category="structure" keywords="layout" file="page-mak.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmakeup"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-margindata.xml b/tex/context/interface/mkiv/i-margindata.xml
index cb97090b6..006101afa 100644
--- a/tex/context/interface/mkiv/i-margindata.xml
+++ b/tex/context/interface/mkiv/i-margindata.xml
@@ -165,269 +165,4 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="inleftmargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inrightmargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inoutermargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="ininnermargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inleftedge" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inrightedge" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="ininneredge" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inouteredge" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="atleftmargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="atrightmargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inleft" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inright" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="ininner" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inouter" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inmargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inother" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="margintext" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="marginword" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="margintitle" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="inothermargin" level="document" category="structure" file="typo-mar.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="reference">
- <cd:constant type="cd:reference"/>
- </cd:parameter>
- <cd:inherit name="setupmargindata"/>
- </cd:assignments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmarginframed"/>
- </cd:assignments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-mathalignment.xml b/tex/context/interface/mkiv/i-mathalignment.xml
index 1a1c139a3..725797cfa 100644
--- a/tex/context/interface/mkiv/i-mathalignment.xml
+++ b/tex/context/interface/mkiv/i-mathalignment.xml
@@ -67,24 +67,4 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="mathalignment" type="environment" level="document" category="mathematics" keywords="alignment" file="math-ali.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathalignment"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="align" type="environment" level="document" category="mathematics" keywords="alignment" file="math-ali.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathalignment"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-mathcases.xml b/tex/context/interface/mkiv/i-mathcases.xml
index 7066134cf..1736f09b7 100644
--- a/tex/context/interface/mkiv/i-mathcases.xml
+++ b/tex/context/interface/mkiv/i-mathcases.xml
@@ -55,24 +55,4 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="mathcases" type="environment" level="document" category="mathematics" keywords="alignment" file="math-ali.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathcases"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="cases" type="environment" level="document" category="mathematics" keywords="alignment" file="math-ali.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathcases"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-mathmatrix.xml b/tex/context/interface/mkiv/i-mathmatrix.xml
index f7bf61e93..d22e8141f 100644
--- a/tex/context/interface/mkiv/i-mathmatrix.xml
+++ b/tex/context/interface/mkiv/i-mathmatrix.xml
@@ -70,26 +70,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="mathmatrix" type="environment" level="document" category="mathematics" keywords="tables" file="math-ali.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathmatrix"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="matrix" type="environment" level="document" category="mathematics" keywords="tables" file="math-ali.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmathmatrix"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="mathmatrix" generated="yes" level="document" category="mathematics" keywords="tables" file="math-ali.mkiv">
<cd:sequence>
<cd:variable value="mathmatrix"/>
diff --git a/tex/context/interface/mkiv/i-mathstackers.xml b/tex/context/interface/mkiv/i-mathstackers.xml
index 3875f2c4c..b5adfbc60 100644
--- a/tex/context/interface/mkiv/i-mathstackers.xml
+++ b/tex/context/interface/mkiv/i-mathstackers.xml
@@ -366,844 +366,6 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="xrel" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xequal" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xleftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xLeftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xRightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xLeftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xtwoheadleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xtwoheadrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xmapsto" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xhookleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xhookrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xleftharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xleftharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xrightharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xrightharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xrightoverleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xleftrightharpoons" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xrightleftharpoons" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="xtriplerel" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mrel" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mequal" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mleftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mLeftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mRightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mLeftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mtwoheadleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mtwoheadrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mmapsto" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mhookleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mhookrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mleftharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mleftharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mrightharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mrightharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mrightoverleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mleftrightharpoons" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mrightleftharpoons" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="mtriplerel" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eleftarrowfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="erightarrowfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eleftrightarrowfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="etwoheadrightarrowfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eleftharpoondownfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eleftharpoonupfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="erightharpoondownfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="erightharpoonupfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eoverbarfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eunderbarfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eoverbracefill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eunderbracefill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eoverparentfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eunderparentfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eoverbracketfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="eunderbracketfill" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="trel" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tequal" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tmapsto" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="trightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tleftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tLeftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tRightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tLeftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="ttwoheadleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="ttwoheadrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="thookleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="thookrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tleftharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tleftharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="trightharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="trightharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="trightoverleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tleftrightharpoons" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="trightleftharpoons" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="ttriplerel" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="cleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="crightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="crightoverleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text-optional"/>
- <cd:resolve name="argument-text-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underleftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="undertwoheadleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="undertwoheadrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underleftharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underleftharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underrightharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underrightharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbar" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbrace" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underparent" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbracket" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overleftrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overtwoheadleftarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overtwoheadrightarrow" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overleftharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overleftharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overrightharpoondown" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overrightharpoonup" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbar" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbrace" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overparent" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbracket" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="doublebar" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="doublebrace" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="doubleparent" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="doublebracket" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbarunderbar" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbraceunderbrace" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overparentunderparent" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbracketunderbracket" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbartext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbracetext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overparenttext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="overbrackettext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbartext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbracetext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underparenttext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="underbrackettext" level="document" category="mathematics" file="math-stc.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="singlebond" level="document" category="mathematics" file="math-stc.mkvi"/>
<cd:command name="doublebond" level="document" category="mathematics" file="math-stc.mkvi"/>
diff --git a/tex/context/interface/mkiv/i-mixedcolumns.xml b/tex/context/interface/mkiv/i-mixedcolumns.xml
index 5f727de42..7d888a50f 100644
--- a/tex/context/interface/mkiv/i-mixedcolumns.xml
+++ b/tex/context/interface/mkiv/i-mixedcolumns.xml
@@ -119,18 +119,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="boxedcolumns" type="environment" level="document" category="columns" keywords="structure layout" file="page-mix.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupmixedcolumns"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="setupcolumns" level="style" category="columns" keywords="structure layout" file="page-smp.mkiv">
<cd:arguments>
<cd:assignments list="yes">
diff --git a/tex/context/interface/mkiv/i-note.xml b/tex/context/interface/mkiv/i-note.xml
index 12a6706fa..b76335765 100644
--- a/tex/context/interface/mkiv/i-note.xml
+++ b/tex/context/interface/mkiv/i-note.xml
@@ -518,35 +518,6 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="footnote" type="environment" variant="assignment" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-constructiondata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="footnote" type="environment" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="footnote" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="footnote" variant="assignment" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-constructiondata-list"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="footnotetext" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
<cd:arguments>
<cd:resolve name="keyword-reference-list-optional"/>
@@ -578,35 +549,6 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="endnote" type="environment" variant="assignment" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-constructiondata-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="endnote" type="environment" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="endnote" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-reference-list-optional"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="endnote" variant="assignment" level="document" category="structure" keywords="notes" file="strc-not.mkvi">
- <cd:arguments>
- <cd:resolve name="assignment-constructiondata-list"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="definelinenote" level="style" category="structure" keywords="notes" file="strc-lnt.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
@@ -696,29 +638,6 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="linenote" level="document" category="structure" keywords="notes" file="strc-lnt.mkvi">
- <cd:arguments>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="startlinenote" level="document" category="structure" keywords="notes" file="strc-lnt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-reference"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="stoplinenote" level="document" category="structure" keywords="notes" file="strc-lnt.mkvi">
- <cd:arguments>
- <cd:resolve name="keyword-reference"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="definetextnote" level="style" category="structure" keywords="notes" file="strc-tnt.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
diff --git a/tex/context/interface/mkiv/i-pairedbox.xml b/tex/context/interface/mkiv/i-pairedbox.xml
index 0c9e05346..b7f9b24d8 100644
--- a/tex/context/interface/mkiv/i-pairedbox.xml
+++ b/tex/context/interface/mkiv/i-pairedbox.xml
@@ -137,36 +137,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="setuplegend" level="document" category="tables" file="pack-com.mkiv">
- <cd:arguments>
- <cd:assignments list="yes">
- <cd:inherit name="setuppairedbox"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelegend" level="document" category="tables" file="pack-com.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuppairedbox"/>
- </cd:assignments>
- <cd:content/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelegend" type="environment" level="document" category="tables" file="pack-com.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuppairedbox"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="placeontopofeachother" level="document" category="tables" file="pack-com.mkiv">
<cd:arguments>
<cd:content/>
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 44f939cca..97b40da43 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-script.xml b/tex/context/interface/mkiv/i-script.xml
index 4e5b44a29..89a929024 100644
--- a/tex/context/interface/mkiv/i-script.xml
+++ b/tex/context/interface/mkiv/i-script.xml
@@ -90,22 +90,4 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="hangul" level="document" category="language" file="scrp-ini.mkvi"/>
-
- <cd:command name="hanzi" level="document" category="language" file="scrp-ini.mkvi"/>
-
- <cd:command name="nihongo" level="document" category="language" file="scrp-ini.mkvi"/>
-
- <cd:command name="ethiopic" level="document" category="language" file="scrp-ini.mkvi"/>
-
- <cd:command name="thai" level="document" category="language" file="scrp-ini.mkvi"/>
-
- <cd:command name="latin" level="document" category="language" file="scrp-ini.mkvi"/>
-
- <cd:command name="test" level="document" category="language" file="scrp-ini.mkvi"/>
-
- -->
-
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-sectionblock.xml b/tex/context/interface/mkiv/i-sectionblock.xml
index 3c13ee394..e9622dac8 100644
--- a/tex/context/interface/mkiv/i-sectionblock.xml
+++ b/tex/context/interface/mkiv/i-sectionblock.xml
@@ -81,52 +81,4 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="frontmatter" type="environment" level="document" category="structure" file="strc-sbe.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="bookmark">
- <cd:constant type="cd:text"/>
- </cd:parameter>
- <cd:inherit name="setupsectionblock"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="bodymatter" type="environment" level="document" category="structure" file="strc-sbe.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="bookmark">
- <cd:constant type="cd:text"/>
- </cd:parameter>
- <cd:inherit name="setupsectionblock"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="appendices" type="environment" level="document" category="structure" file="strc-sbe.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="bookmark">
- <cd:constant type="cd:text"/>
- </cd:parameter>
- <cd:inherit name="setupsectionblock"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="backmatter" type="environment" level="document" category="structure" file="strc-sbe.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:parameter name="bookmark">
- <cd:constant type="cd:text"/>
- </cd:parameter>
- <cd:inherit name="setupsectionblock"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-shift.xml b/tex/context/interface/mkiv/i-shift.xml
index 68199337e..2d26f5c51 100644
--- a/tex/context/interface/mkiv/i-shift.xml
+++ b/tex/context/interface/mkiv/i-shift.xml
@@ -73,20 +73,4 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="shiftup" level="document" category="layout" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="shiftdown" level="document" category="layout" file="node-rul.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-sort.xml b/tex/context/interface/mkiv/i-sort.xml
index 1cd8419c0..a5763a4bf 100644
--- a/tex/context/interface/mkiv/i-sort.xml
+++ b/tex/context/interface/mkiv/i-sort.xml
@@ -177,31 +177,4 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="logo" level="document" category="language" file="strc-syn.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistoflogos" level="document" category="language" file="strc-syn.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupsorting"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistoflogos" level="document" category="language" file="strc-syn.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupsorting"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-synonym.xml b/tex/context/interface/mkiv/i-synonym.xml
index 31b4ae36a..ca3053fe4 100644
--- a/tex/context/interface/mkiv/i-synonym.xml
+++ b/tex/context/interface/mkiv/i-synonym.xml
@@ -209,32 +209,4 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="abbreviation" level="document" category="symbols" file="strc-syn.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:resolve name="argument-text"/>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="placelistofabbreviations" level="document" category="symbols" file="strc-syn.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupsynonyms"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="completelistofabbreviations" level="document" category="symbols" file="strc-syn.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setupsynonyms"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- -->
-
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-tabulation.xml b/tex/context/interface/mkiv/i-tabulation.xml
index 09937504f..2c0808769 100644
--- a/tex/context/interface/mkiv/i-tabulation.xml
+++ b/tex/context/interface/mkiv/i-tabulation.xml
@@ -311,24 +311,6 @@
<!--
- <cd:command name="legend" type="environment" level="document" category="tables" file="tabl-tbl.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptabulate"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="fact" type="environment" level="document" category="tables" file="tabl-tbl.mkiv">
- <cd:arguments>
- <cd:resolve name="keyword-name-optional"/>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptabulate"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
<cd:command name="VL" scope="tabulate" level="document" category="tables" file="tabl-tbl.mkiv">
<cd:arguments>
<cd:keywords list="yes" optional="yes">
diff --git a/tex/context/interface/mkiv/i-tooltip.xml b/tex/context/interface/mkiv/i-tooltip.xml
index 99019933b..038324426 100644
--- a/tex/context/interface/mkiv/i-tooltip.xml
+++ b/tex/context/interface/mkiv/i-tooltip.xml
@@ -62,30 +62,4 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="tooltip" level="document" category="pdf" file="scrn-fld.mkvi">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptooltip"/>
- </cd:assignments>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="tooltip" variant="argument" level="document" category="pdf" file="scrn-fld.mkvi">
- <cd:arguments>
- <cd:keywords optional="yes">
- <cd:constant type="left"/>
- <cd:constant type="middle"/>
- <cd:constant type="right"/>
- </cd:keywords>
- <cd:resolve name="argument-text"/>
- <cd:resolve name="argument-text"/>
- </cd:arguments>
- </cd:command>
-
- -->
-
</cd:interface>
diff --git a/tex/context/interface/mkiv/i-unit.xml b/tex/context/interface/mkiv/i-unit.xml
index 247254ec5..c92a3b768 100644
--- a/tex/context/interface/mkiv/i-unit.xml
+++ b/tex/context/interface/mkiv/i-unit.xml
@@ -87,16 +87,6 @@
</cd:instances>
</cd:command>
- <!--
-
- <cd:command name="unit" level="document" category="symbols" file="phys-dim.mkiv">
- <cd:arguments>
- <cd:content/>
- </cd:arguments>
- </cd:command>
-
- -->
-
<cd:command name="installunitsseparator" level="system" category="symbols" file="phys-dim.mkiv">
<cd:arguments>
<cd:resolve name="argument-name"/>
diff --git a/tex/context/interface/mkiv/i-verbatim.xml b/tex/context/interface/mkiv/i-verbatim.xml
index eaeeaac1a..20f1bb873 100644
--- a/tex/context/interface/mkiv/i-verbatim.xml
+++ b/tex/context/interface/mkiv/i-verbatim.xml
@@ -337,107 +337,4 @@
</cd:arguments>
</cd:command>
- <!--
-
- <cd:command name="typing" type="environment" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptyping"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="typing" type="environment" variant="argument" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="continue"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="LUA" type="environment" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptyping"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="LUA" type="environment" variant="argument" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:sequence>
- <cd:variable value="lua"/>
- </cd:sequence>
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="continue"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="MP" type="environment" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptyping"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="MP" type="environment" variant="argument" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="continue"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="XML" type="environment" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptyping"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="XML" type="environment" variant="argument" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="continue"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="PARSEDXML" type="environment" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptyping"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="PARSEDXML" type="environment" variant="argument" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="continue"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="TEX" type="environment" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:assignments list="yes" optional="yes">
- <cd:inherit name="setuptyping"/>
- </cd:assignments>
- </cd:arguments>
- </cd:command>
-
- <cd:command name="TEX" type="environment" variant="argument" level="document" category="verbatim" file="buff-ver.mkiv">
- <cd:arguments>
- <cd:keywords list="yes" optional="yes">
- <cd:constant type="continue"/>
- </cd:keywords>
- </cd:arguments>
- </cd:command>
-
- -->
-
</cd:interface>
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index fea429485..1891e73c6 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 : 2020-07-13 16:23
+-- merge date : 2020-07-13 23:44
do -- begin closure to overcome local limits and interference