summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/context/documents/general/manuals/mmlexamp.pdf (renamed from doc/context/documents/general/mathml/mmlexamp.pdf)bin136092 -> 136092 bytes
-rw-r--r--doc/context/documents/general/manuals/mmlprime.pdf (renamed from doc/context/documents/general/mathml/mmlprime.pdf)bin772848 -> 772848 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-cs.pdfbin798719 -> 798848 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-de.pdfbin800118 -> 800258 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-en.pdfbin803574 -> 803714 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-fr.pdfbin797020 -> 797145 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-it.pdfbin799918 -> 800067 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-nl.pdfbin795081 -> 795212 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-ro.pdfbin794957 -> 795091 bytes
-rw-r--r--doc/context/sources/general/fonts/fonts/fonts-features.tex273
-rw-r--r--doc/context/sources/general/fonts/fonts/fonts-lookups.tex63
-rw-r--r--doc/context/sources/general/magazines/mag-0000-mkiv.tex (renamed from doc/context/sources/general/magazines/magazines/mag-0000-mkiv.tex)0
-rw-r--r--doc/context/sources/general/magazines/mag-0002-mkiv.tex (renamed from doc/context/sources/general/magazines/magazines/mag-0002-mkiv.tex)0
-rw-r--r--doc/context/sources/general/magazines/mag-0006-mkiv.tex (renamed from doc/context/sources/general/magazines/magazines/mag-0006-mkiv.tex)0
-rw-r--r--doc/context/sources/general/magazines/mag-0007-mkiv.tex (renamed from doc/context/sources/general/magazines/magazines/mag-0007-mkiv.tex)0
-rw-r--r--doc/context/sources/general/magazines/mag-0010-mkiv.tex (renamed from doc/context/sources/general/magazines/magazines/mag-0010-mkiv.tex)0
-rw-r--r--doc/context/sources/general/magazines/mag-1101-mkiv.tex (renamed from doc/context/sources/general/magazines/magazines/mag-1101-mkiv.tex)0
-rw-r--r--doc/context/sources/general/magazines/mag-1102-mkiv.tex (renamed from doc/context/sources/general/magazines/magazines/mag-1102-mkiv.tex)0
-rw-r--r--doc/context/sources/general/magazines/mag-1103-mkiv.tex (renamed from doc/context/sources/general/magazines/magazines/mag-1103-mkiv.tex)0
-rw-r--r--doc/context/sources/general/manuals/math/math-combining.tex58
-rw-r--r--doc/context/sources/general/manuals/math/math-contents.tex11
-rw-r--r--doc/context/sources/general/manuals/math/math-features.tex127
-rw-r--r--doc/context/sources/general/manuals/math/math-framing.tex232
-rw-r--r--doc/context/sources/general/manuals/math/math-introduction.tex20
-rw-r--r--doc/context/sources/general/manuals/math/math-layout.tex59
-rw-r--r--doc/context/sources/general/manuals/math/math-numbering.tex74
-rw-r--r--doc/context/sources/general/manuals/math/math-spacing.tex378
-rw-r--r--doc/context/sources/general/manuals/math/math-titlepage.tex29
-rw-r--r--doc/context/sources/general/manuals/mathml/envexamp.tex (renamed from doc/context/sources/general/mathml/mathml/envexamp.tex)0
-rw-r--r--doc/context/sources/general/manuals/mathml/mmlexamp.tex (renamed from doc/context/sources/general/mathml/mathml/mmlexamp.tex)0
-rw-r--r--doc/context/sources/general/manuals/mathml/mmlprime.tex (renamed from doc/context/sources/general/mathml/mathml/mmlprime.tex)2
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-d-001.xml (renamed from doc/context/sources/general/mathml/mathml/pc-d-001.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-d-002.xml (renamed from doc/context/sources/general/mathml/mathml/pc-d-002.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-d-003.xml (renamed from doc/context/sources/general/mathml/mathml/pc-d-003.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-d-004.xml (renamed from doc/context/sources/general/mathml/mathml/pc-d-004.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-d-005.xml (renamed from doc/context/sources/general/mathml/mathml/pc-d-005.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-d-006.xml (renamed from doc/context/sources/general/mathml/mathml/pc-d-006.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-d-007.xml (renamed from doc/context/sources/general/mathml/mathml/pc-d-007.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-d-008.xml (renamed from doc/context/sources/general/mathml/mathml/pc-d-008.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-d-009.xml (renamed from doc/context/sources/general/mathml/mathml/pc-d-009.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-d-010.xml (renamed from doc/context/sources/general/mathml/mathml/pc-d-010.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-d-011.xml (renamed from doc/context/sources/general/mathml/mathml/pc-d-011.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-d-043.xml (renamed from doc/context/sources/general/mathml/mathml/pc-d-043.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-d-051.xml (renamed from doc/context/sources/general/mathml/mathml/pc-d-051.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-i-022.xml (renamed from doc/context/sources/general/mathml/mathml/pc-i-022.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-i-380.xml (renamed from doc/context/sources/general/mathml/mathml/pc-i-380.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-s-001.xml (renamed from doc/context/sources/general/mathml/mathml/pc-s-001.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-s-002.xml (renamed from doc/context/sources/general/mathml/mathml/pc-s-002.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/pc-s-003.xml (renamed from doc/context/sources/general/mathml/mathml/pc-s-003.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-001.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-001.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-002.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-002.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-003.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-003.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-004.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-004.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-005.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-005.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-006.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-006.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-007.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-007.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-008.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-008.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-009.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-009.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-010.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-010.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-011.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-011.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-012.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-012.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-013.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-013.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-014.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-014.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-015.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-015.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-g-016.xml (renamed from doc/context/sources/general/mathml/mathml/wh-g-016.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-l-001.xml (renamed from doc/context/sources/general/mathml/mathml/wh-l-001.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-l-002.xml (renamed from doc/context/sources/general/mathml/mathml/wh-l-002.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-l-003.xml (renamed from doc/context/sources/general/mathml/mathml/wh-l-003.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-l-004.xml (renamed from doc/context/sources/general/mathml/mathml/wh-l-004.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-s-001.xml (renamed from doc/context/sources/general/mathml/mathml/wh-s-001.xml)0
-rw-r--r--doc/context/sources/general/manuals/mathml/wh-s-002.xml (renamed from doc/context/sources/general/mathml/mathml/wh-s-002.xml)0
-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/char-def.lua40
-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/math-fen.mkiv23
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25618 -> 25603 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin368575 -> 368575 bytes
-rw-r--r--tex/context/fonts/mkiv/type-imp-stix.mkiv64
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin803574 -> 803714 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60766 -> 60767 bytes
-rw-r--r--tex/context/modules/mkiv/x-mathml.mkiv6
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
84 files changed, 1326 insertions, 143 deletions
diff --git a/doc/context/documents/general/mathml/mmlexamp.pdf b/doc/context/documents/general/manuals/mmlexamp.pdf
index d86238a5a..d86238a5a 100644
--- a/doc/context/documents/general/mathml/mmlexamp.pdf
+++ b/doc/context/documents/general/manuals/mmlexamp.pdf
Binary files differ
diff --git a/doc/context/documents/general/mathml/mmlprime.pdf b/doc/context/documents/general/manuals/mmlprime.pdf
index 0d48394c0..0d48394c0 100644
--- a/doc/context/documents/general/mathml/mmlprime.pdf
+++ b/doc/context/documents/general/manuals/mmlprime.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf
index 88f54b7f9..b3fdde322 100644
--- a/doc/context/documents/general/qrcs/setup-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf
index a6076aa5b..74db2a056 100644
--- a/doc/context/documents/general/qrcs/setup-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf
index f915404b9..e3dd2d9ed 100644
--- a/doc/context/documents/general/qrcs/setup-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf
index a76b2a0ff..cd89a82b6 100644
--- a/doc/context/documents/general/qrcs/setup-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf
index 3904b0d69..f8167100a 100644
--- a/doc/context/documents/general/qrcs/setup-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf
index 630a9c2fe..47f745afe 100644
--- a/doc/context/documents/general/qrcs/setup-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf
index 74b255263..ae2fdcc67 100644
--- a/doc/context/documents/general/qrcs/setup-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-ro.pdf
Binary files differ
diff --git a/doc/context/sources/general/fonts/fonts/fonts-features.tex b/doc/context/sources/general/fonts/fonts/fonts-features.tex
index 4514f209a..c0b7538ab 100644
--- a/doc/context/sources/general/fonts/fonts/fonts-features.tex
+++ b/doc/context/sources/general/fonts/fonts/fonts-features.tex
@@ -4,6 +4,9 @@
\environment fonts-environment
+% windows: seguiemj.ttf (windows 10)
+% public : emojionecolor-svginot.ttf (https://github.com/eosrei/emojione-color-font)
+
\startMPextensions
vardef MyRectangle(expr n, w, h, x, y, c) =
image (
@@ -824,141 +827,141 @@ results might differ a bit.
\stopsubsection
-\startsubsection[title=Color]
-
-% TODO: use emojionecolor-svginot-archived.ttf
-
-A recent new (and evolving) addition to \OPENTYPE\ is colored glyphs. One variant
-(by \MICROSOFT) uses overlays and this method is quite efficient.
-
-\startbuffer
-\definefontfeature[colored][colr=yes]
-\definefontsynonym[Emoji][file:seguiemj.ttf*default,colored]
-
-\definesymbol[bug][\getglyphdirect{Emoji}{\char"1F41B}]
-\definesymbol[ant][\getglyphdirect{Emoji}{\char"1F41C}]
-\definesymbol[bee][\getglyphdirect{Emoji}{\char"1F41D}]
-\stopbuffer
-
-\typebuffer \getbuffer
-
-Here we see a \symbol[bug], \symbol[ant] and \symbol[bee], and they come in
-color! Once \UNICODE\ started adding such symbols (and more get added) the
-distinction between characters and symbols get even fuzzier. Of course one
-can argue that we communicate in pictograms but even then, given that
-mankind lasts a while, the \UNICODE\ repertoire will explode.
-
-\startplacefigure[title={A few emojis from \type {seguiemj.ttf}}]
- \startcombination [3*1]
- {\scale[width=.3\textwidth]{\symbol[bug]}} {\type{U+1F41B}: bug}
- {\scale[width=.3\textwidth]{\symbol[ant]}} {\type{U+1F41C}: ant}
- {\scale[width=.3\textwidth]{\symbol[bee]}} {\type{U+1F41D}: bee}
- \stopcombination
-\stopplacefigure
-
-Here we use \type {seguiemj.ttf}, a font that comes with \MSWINDOWS. Colors are
-achieved by combining glyphs rendered in different colors. A variant that uses
-\SVG\ instead of overlays is \type {emojionecolor-svginot.ttf}:
-
-\startbuffer
-\definefontfeature[svg][svg=yes]
-\definefontsynonym[Emoji][file:emojionecolor-svginot.ttf*default,svg]
-\stopbuffer
-
-\typebuffer \getbuffer
-
-This time we get \symbol[bug], \symbol[ant] and \symbol[bee] and they look
-quite different. Both fonts also have ligatures and you can wonder what sense
-that makes. It makes it impossible to swap fonts and as there is no standard
-one never knows what to expect.
-
-\startplacefigure[title={A few emojis from \type {emojionecolor-svginot.ttf}}]
- \startcombination [3*1]
- {\scale[width=.3\textwidth]{\symbol[bug]}} {\type{U+1F41B}: bug}
- {\scale[width=.3\textwidth]{\symbol[ant]}} {\type{U+1F41C}: ant}
- {\scale[width=.3\textwidth]{\symbol[bee]}} {\type{U+1F41D}: bee}
- \stopcombination
-\stopplacefigure
-
-\definefont[emoji][file:emojionecolor-svginot.ttf*default,svg]
-
-\def\FourFaces{\char128104\zwj\char128105\zwj\char128102\zwj\char128102\relax}
-
-\def\Man {\char"1F468\relax}
-\def\Woman{\char"1F469\relax}
-\def\Boy {\char"1F466\relax}
-\def\Girl {\char"1F467\relax}
-
-How do we know what faces add up to the ligature {\emoji\Man \zwj \Woman \zwj
-\Girl \zwj \Boy} and how are we supposed to know that there should {\darkgray
-\type {zwj}} in between? When we input four faces separated by zero width
-joiners, we get a four face symbol instead. The reason for having the joiners in
-between is probably to avoid unexpected ligatures. The sequence \type {man},
-\type {woman}, \type {boy}, \type {boy} gives \type {family}:
-%
-{\emoji\Man} + {\darkgray \type {zwj}}
-{\emoji\Woman} + {\darkgray \type {zwj}}
-{\emoji\Boy} + {\darkgray \type {zwj}}
-{\emoji\Boy} = {\emoji\Man \zwj \Woman \zwj \Boy \zwj \Boy},
-%
-but two girls also work:
-%
-{\emoji\Man} + {\darkgray \type {zwj}}
-{\emoji\Woman} + {\darkgray \type {zwj}}
-{\emoji\Girl} + {\darkgray \type {zwj}}
-{\emoji\Girl} = {\emoji\Man \zwj \Woman \zwj \Girl \zwj \Girl},
-%
-so does a mixture of kids:
-%
-{\emoji\Man} + {\darkgray \type {zwj}}
-{\emoji\Woman} + {\darkgray \type {zwj}}
-{\emoji\Girl} + {\darkgray \type {zwj}}
-{\emoji\Boy} = {\emoji\Man \zwj \Woman \zwj \Girl \zwj \Boy},
-%
-although (at least currently):
-%
-{\emoji\Man} + {\darkgray \type {zwj}}
-{\emoji\Woman} + {\darkgray \type {zwj}}
-{\emoji\Boy} + {\darkgray \type {zwj}}
-{\emoji\Girl} = {\emoji\Man \zwj \Woman \zwj \Boy \zwj \Girl},
-%
-gives twin boys. Of course the real family emoj is {\emoji\char"1F46A}.
-
-In our times for sure many combinations are possible, so:
-%
-{\emoji\Man} + {\darkgray \type {zwj}}
-{\emoji\Man} + {\darkgray \type {zwj}}
-{\emoji\Girl} + {\darkgray \type {zwj}}
-{\emoji\Girl} = {\emoji\Man \zwj \Man \zwj \Girl \zwj \Girl},
-%
-indeed gives a family, but I wonder at what point cultural bias will creep into
-font design. One can even wonder how clothing and haircut will demand frequent
-font updates: {\emoji\char"1F46B}, {\emoji\char"1F46C}, {\emoji\char"1F46D}.
-
-In the math alphabets we have a couple of annoying holes because some characters
-were already present in \UNICODE. The bad thing here is that we now always have
-to deal with these exceptions. But not so with emojis because here eventually all
-variants will show up. Where a character \type {A} in red or blue uses the same
-code point, a white telephone {\emoji\char"1F57E} and black telephone
-{\emoji\char"1F57F} have their own. And because obsolete scripts are already
-supported in \UNICODE\ and more get added, we can expect old artifacts also
-showing up at some time. Soon the joystick {\emoji\char"1F579} will be an unknown
-item to most of us, while the \MICROSOFT\ hololens migth get its slot.
-
-\startplacefigure[title={Will all animals come in stages of development?}]
- \startcombination [3*1]
- {\scale[width=.3\textwidth]{\emoji\char"1F423}} {\type{U+1F423}: hatching chick}
- {\scale[width=.3\textwidth]{\emoji\char"1F424}} {\type{U+1F424}: baby chick}
- {\scale[width=.3\textwidth]{\emoji\char"1F425}} {\type{U+1F425}: front-facing baby chick}
- \stopcombination
-\stopplacefigure
-
-For sure these mechanisms will evolve and to what extent we support them depends
-on what users want. At least we have the basics implemented.
-
-\stopsubsection
-
-\stopsection
+ \startsubsection[title=Color]
+
+ % TODO: use emojionecolor-svginot-archived.ttf
+
+ A recent new (and evolving) addition to \OPENTYPE\ is colored glyphs. One variant
+ (by \MICROSOFT) uses overlays and this method is quite efficient.
+
+ \startbuffer
+ \definefontfeature[colored][colr=yes]
+ \definefontsynonym[Emoji][file:seguiemj.ttf*default,colored]
+
+ \definesymbol[bug][\getglyphdirect{Emoji}{\char"1F41B}]
+ \definesymbol[ant][\getglyphdirect{Emoji}{\char"1F41C}]
+ \definesymbol[bee][\getglyphdirect{Emoji}{\char"1F41D}]
+ \stopbuffer
+
+ \typebuffer \getbuffer
+
+ Here we see a \symbol[bug], \symbol[ant] and \symbol[bee], and they come in
+ color! Once \UNICODE\ started adding such symbols (and more get added) the
+ distinction between characters and symbols get even fuzzier. Of course one
+ can argue that we communicate in pictograms but even then, given that
+ mankind lasts a while, the \UNICODE\ repertoire will explode.
+
+ \startplacefigure[title={A few emojis from \type {seguiemj.ttf}}]
+ \startcombination [3*1]
+ {\scale[width=.3\textwidth]{\symbol[bug]}} {\type{U+1F41B}: bug}
+ {\scale[width=.3\textwidth]{\symbol[ant]}} {\type{U+1F41C}: ant}
+ {\scale[width=.3\textwidth]{\symbol[bee]}} {\type{U+1F41D}: bee}
+ \stopcombination
+ \stopplacefigure
+
+ Here we use \type {seguiemj.ttf}, a font that comes with \MSWINDOWS. Colors are
+ achieved by combining glyphs rendered in different colors. A variant that uses
+ \SVG\ instead of overlays is \type {emojionecolor-svginot.ttf}:
+
+ \startbuffer
+ \definefontfeature[svg][svg=yes]
+ \definefontsynonym[Emoji][file:emojionecolor-svginot.ttf*default,svg]
+ \stopbuffer
+
+ \typebuffer \getbuffer
+
+ This time we get \symbol[bug], \symbol[ant] and \symbol[bee] and they look
+ quite different. Both fonts also have ligatures and you can wonder what sense
+ that makes. It makes it impossible to swap fonts and as there is no standard
+ one never knows what to expect.
+
+ \startplacefigure[title={A few emojis from \type {emojionecolor-svginot.ttf}}]
+ \startcombination [3*1]
+ {\scale[width=.3\textwidth]{\symbol[bug]}} {\type{U+1F41B}: bug}
+ {\scale[width=.3\textwidth]{\symbol[ant]}} {\type{U+1F41C}: ant}
+ {\scale[width=.3\textwidth]{\symbol[bee]}} {\type{U+1F41D}: bee}
+ \stopcombination
+ \stopplacefigure
+
+ \definefont[emoji][file:emojionecolor-svginot.ttf*default,svg]
+
+ \def\FourFaces{\char128104\zwj\char128105\zwj\char128102\zwj\char128102\relax}
+
+ \def\Man {\char"1F468\relax}
+ \def\Woman{\char"1F469\relax}
+ \def\Boy {\char"1F466\relax}
+ \def\Girl {\char"1F467\relax}
+
+ How do we know what faces add up to the ligature {\emoji\Man \zwj \Woman \zwj
+ \Girl \zwj \Boy} and how are we supposed to know that there should {\darkgray
+ \type {zwj}} in between? When we input four faces separated by zero width
+ joiners, we get a four face symbol instead. The reason for having the joiners in
+ between is probably to avoid unexpected ligatures. The sequence \type {man},
+ \type {woman}, \type {boy}, \type {boy} gives \type {family}:
+ %
+ {\emoji\Man} + {\darkgray \type {zwj}}
+ {\emoji\Woman} + {\darkgray \type {zwj}}
+ {\emoji\Boy} + {\darkgray \type {zwj}}
+ {\emoji\Boy} = {\emoji\Man \zwj \Woman \zwj \Boy \zwj \Boy},
+ %
+ but two girls also work:
+ %
+ {\emoji\Man} + {\darkgray \type {zwj}}
+ {\emoji\Woman} + {\darkgray \type {zwj}}
+ {\emoji\Girl} + {\darkgray \type {zwj}}
+ {\emoji\Girl} = {\emoji\Man \zwj \Woman \zwj \Girl \zwj \Girl},
+ %
+ so does a mixture of kids:
+ %
+ {\emoji\Man} + {\darkgray \type {zwj}}
+ {\emoji\Woman} + {\darkgray \type {zwj}}
+ {\emoji\Girl} + {\darkgray \type {zwj}}
+ {\emoji\Boy} = {\emoji\Man \zwj \Woman \zwj \Girl \zwj \Boy},
+ %
+ although (at least currently):
+ %
+ {\emoji\Man} + {\darkgray \type {zwj}}
+ {\emoji\Woman} + {\darkgray \type {zwj}}
+ {\emoji\Boy} + {\darkgray \type {zwj}}
+ {\emoji\Girl} = {\emoji\Man \zwj \Woman \zwj \Boy \zwj \Girl},
+ %
+ gives twin boys. Of course the real family emoj is {\emoji\char"1F46A}.
+
+ In our times for sure many combinations are possible, so:
+ %
+ {\emoji\Man} + {\darkgray \type {zwj}}
+ {\emoji\Man} + {\darkgray \type {zwj}}
+ {\emoji\Girl} + {\darkgray \type {zwj}}
+ {\emoji\Girl} = {\emoji\Man \zwj \Man \zwj \Girl \zwj \Girl},
+ %
+ indeed gives a family, but I wonder at what point cultural bias will creep into
+ font design. One can even wonder how clothing and haircut will demand frequent
+ font updates: {\emoji\char"1F46B}, {\emoji\char"1F46C}, {\emoji\char"1F46D}.
+
+ In the math alphabets we have a couple of annoying holes because some characters
+ were already present in \UNICODE. The bad thing here is that we now always have
+ to deal with these exceptions. But not so with emojis because here eventually all
+ variants will show up. Where a character \type {A} in red or blue uses the same
+ code point, a white telephone {\emoji\char"1F57E} and black telephone
+ {\emoji\char"1F57F} have their own. And because obsolete scripts are already
+ supported in \UNICODE\ and more get added, we can expect old artifacts also
+ showing up at some time. Soon the joystick {\emoji\char"1F579} will be an unknown
+ item to most of us, while the \MICROSOFT\ hololens migth get its slot.
+
+ \startplacefigure[title={Will all animals come in stages of development?}]
+ \startcombination [3*1]
+ {\scale[width=.3\textwidth]{\emoji\char"1F423}} {\type{U+1F423}: hatching chick}
+ {\scale[width=.3\textwidth]{\emoji\char"1F424}} {\type{U+1F424}: baby chick}
+ {\scale[width=.3\textwidth]{\emoji\char"1F425}} {\type{U+1F425}: front-facing baby chick}
+ \stopcombination
+ \stopplacefigure
+
+ For sure these mechanisms will evolve and to what extent we support them depends
+ on what users want. At least we have the basics implemented.
+
+ \stopsubsection
+
+ \stopsection
\startsection[title=Extras]
diff --git a/doc/context/sources/general/fonts/fonts/fonts-lookups.tex b/doc/context/sources/general/fonts/fonts/fonts-lookups.tex
index 7f1128302..e9448b884 100644
--- a/doc/context/sources/general/fonts/fonts/fonts-lookups.tex
+++ b/doc/context/sources/general/fonts/fonts/fonts-lookups.tex
@@ -342,6 +342,69 @@ properties.
\stopsection
+\startsection[title=Selectfont]
+
+The selectfont interface by Wolfgang Schuster can be used to define fonts
+by name. For a long term project workflow you probably want to use filenames
+but for average use names do well:
+
+\starttyping
+\definefontfamily [mainface] [serif] [DejaVu Serif]
+\definefontfamily [mainface] [sans] [DejaVu Sans]
+\definefontfamily [mainface] [mono] [DejaVu Sans Mono] [features=none]
+\definefontfamily [mainface] [math] [Dejavu Math]
+\stoptyping
+
+This setup is triggered in the usual way:
+
+\starttyping
+\setupbodyfont[mainface]
+\stoptyping
+
+When you combine different designs you may need to apply a relative scale:
+
+\starttyping
+\definefontfamily [mainface] [math] [XITS Math] [rscale=1.1]
+\stoptyping
+
+Some fonts come in designsizes, like Latin Modern:
+
+\starttyping
+\definefontfamily
+ [mainface]
+ [serif]
+ [Latin Modern Roman]
+ [designsize=auto]
+\stoptyping
+
+You can define fallbacks, for example:
+
+\starttyping
+\definefallbackfamily
+ [mainface]
+ [serif]
+ [DejaVu Serif]
+ [range=cyrillic]
+
+\definefontfamily [mainface] [serif] [TeX Gyre Pagella]
+\stoptyping
+
+Here Pagella is used with missing characters taken from Dejavu. The ranges
+are defined with:
+
+\starttyping
+\definefontfamilypreset
+ [range:cyrillic]
+ [range={cyrillic,
+ cyrillicextendeda,
+ cyrillicextendedb,
+ cyrillicsupplement}]
+\stoptyping
+
+For more details you can consult the wiki and the source file \type {font-sel.mkvi}.
+
+\stopsection
+
\stopchapter
\stopcomponent
diff --git a/doc/context/sources/general/magazines/magazines/mag-0000-mkiv.tex b/doc/context/sources/general/magazines/mag-0000-mkiv.tex
index c24d4c4ad..c24d4c4ad 100644
--- a/doc/context/sources/general/magazines/magazines/mag-0000-mkiv.tex
+++ b/doc/context/sources/general/magazines/mag-0000-mkiv.tex
diff --git a/doc/context/sources/general/magazines/magazines/mag-0002-mkiv.tex b/doc/context/sources/general/magazines/mag-0002-mkiv.tex
index cbc49ac82..cbc49ac82 100644
--- a/doc/context/sources/general/magazines/magazines/mag-0002-mkiv.tex
+++ b/doc/context/sources/general/magazines/mag-0002-mkiv.tex
diff --git a/doc/context/sources/general/magazines/magazines/mag-0006-mkiv.tex b/doc/context/sources/general/magazines/mag-0006-mkiv.tex
index 8baa5e003..8baa5e003 100644
--- a/doc/context/sources/general/magazines/magazines/mag-0006-mkiv.tex
+++ b/doc/context/sources/general/magazines/mag-0006-mkiv.tex
diff --git a/doc/context/sources/general/magazines/magazines/mag-0007-mkiv.tex b/doc/context/sources/general/magazines/mag-0007-mkiv.tex
index 885d3cb14..885d3cb14 100644
--- a/doc/context/sources/general/magazines/magazines/mag-0007-mkiv.tex
+++ b/doc/context/sources/general/magazines/mag-0007-mkiv.tex
diff --git a/doc/context/sources/general/magazines/magazines/mag-0010-mkiv.tex b/doc/context/sources/general/magazines/mag-0010-mkiv.tex
index 65c20180c..65c20180c 100644
--- a/doc/context/sources/general/magazines/magazines/mag-0010-mkiv.tex
+++ b/doc/context/sources/general/magazines/mag-0010-mkiv.tex
diff --git a/doc/context/sources/general/magazines/magazines/mag-1101-mkiv.tex b/doc/context/sources/general/magazines/mag-1101-mkiv.tex
index f56dbfe39..f56dbfe39 100644
--- a/doc/context/sources/general/magazines/magazines/mag-1101-mkiv.tex
+++ b/doc/context/sources/general/magazines/mag-1101-mkiv.tex
diff --git a/doc/context/sources/general/magazines/magazines/mag-1102-mkiv.tex b/doc/context/sources/general/magazines/mag-1102-mkiv.tex
index ad9dcc5f9..ad9dcc5f9 100644
--- a/doc/context/sources/general/magazines/magazines/mag-1102-mkiv.tex
+++ b/doc/context/sources/general/magazines/mag-1102-mkiv.tex
diff --git a/doc/context/sources/general/magazines/magazines/mag-1103-mkiv.tex b/doc/context/sources/general/magazines/mag-1103-mkiv.tex
index 90a5f0848..90a5f0848 100644
--- a/doc/context/sources/general/magazines/magazines/mag-1103-mkiv.tex
+++ b/doc/context/sources/general/magazines/mag-1103-mkiv.tex
diff --git a/doc/context/sources/general/manuals/math/math-combining.tex b/doc/context/sources/general/manuals/math/math-combining.tex
new file mode 100644
index 000000000..5cd2ccb9b
--- /dev/null
+++ b/doc/context/sources/general/manuals/math/math-combining.tex
@@ -0,0 +1,58 @@
+\environment math-layout
+
+\startcomponent math-combining
+
+\startchapter[title=Combining formulas]
+
+Multiple formulas can be combined by wrapping them:
+
+\startbuffer
+
+\fakewords{20}{30}
+
+\startformula
+ a + b = c
+\stopformula
+
+\fakewords{20}{30}
+
+\startformulas
+ \startformula
+ a + b = c
+ \stopformula
+ \startformula
+ d - e = f
+ \stopformula
+\stopformulas
+
+\fakewords{20}{30}
+
+\startformulas
+ \startformula
+ \frac{\frac{x}{y}}{b} = c
+ \stopformula
+ \startformula
+ d - e = f
+ \stopformula
+\stopformulas
+
+\fakewords{20}{30}
+\stopbuffer
+
+\typebuffer
+
+When we bump the space around formulas to \type {big} we get this:
+
+\start
+ \setupformulas[spacebefore=big,spaceafter=big]
+ \appendtoks\showmakeup[reset]\to\everymath
+ \showboxes
+ \getbuffer
+\stop
+
+The formulas get aligned on the baselline which in turn relates to the
+math axis of the formula.
+
+\stopchapter
+
+\stopcomponent
diff --git a/doc/context/sources/general/manuals/math/math-contents.tex b/doc/context/sources/general/manuals/math/math-contents.tex
new file mode 100644
index 000000000..7d8fb05c7
--- /dev/null
+++ b/doc/context/sources/general/manuals/math/math-contents.tex
@@ -0,0 +1,11 @@
+\environment math-layout
+
+\startcomponent math-contents
+
+\starttitle[title=Contents]
+
+\placelist[chapter]
+
+\stoptitle
+
+\stopcomponent
diff --git a/doc/context/sources/general/manuals/math/math-features.tex b/doc/context/sources/general/manuals/math/math-features.tex
new file mode 100644
index 000000000..3869c575e
--- /dev/null
+++ b/doc/context/sources/general/manuals/math/math-features.tex
@@ -0,0 +1,127 @@
+\environment math-layout
+
+\usemodule[fonts-features]
+
+\startcomponent math-features
+
+\startchapter[title=Features]
+
+\startsection[title=Default features]
+
+Math fonts are loaded in so called basemode, which gives them a traditional
+treatment in the engine. However, we do support features in basemode too, so
+setting them can influence what gets passed to \TEX. Also, in math mode, some
+font features (like \type {dtls} and stylistic alternates) are applied
+dynamically.
+
+The default \type {mathematics} feature set is as follows:
+
+\showfeatureset[name=mathematics]
+
+We don't discuss the exact meaning of these options here because normally you
+don't have to deal with them. If a math font demands something special, the place
+to deal with it is the related font goodie file.
+
+This feature set is the parent of two other sets: \type {mathematics-l2r} and
+\type {mathematics-r2l}:
+
+\showfeatureset[name=mathematics-l2r]
+
+This one is the same as the parent but the right|-|to|-|left variant is
+different:
+
+\showfeatureset[name=mathematics-r2l]
+
+Eventually we need size related feature sets and again we define a parent and
+direction specific ones: \type {math-text}, \type {math-script} and \type
+{math-scriptscript}.
+
+\showfeatureset[name=math-text]
+\showfeatureset[name=math-script]
+\showfeatureset[name=math-scriptscript]
+
+The left|-|to|-|right sets \type {math-*-l2r} are:
+
+\showfeatureset[name=math-text-l2r]
+\showfeatureset[name=math-script-l2r]
+\showfeatureset[name=math-scriptscript-l2r]
+
+The right|-|to|-|left sets \type {math-*-r2l} are:
+
+\showfeatureset[name=math-text-r2l]
+\showfeatureset[name=math-script-r2l]
+\showfeatureset[name=math-scriptscript-r2l]
+
+There are a few extra sets defined but these are meant for testing or virtual
+math fonts. The reason for showing these sets is to make clear that the number of
+features is minimal and that math is a real script indeed.
+
+The \type {kern} features is questionable. In traditional \TEX\ there are kerns
+indeed but in \OPENTYPE\ math kerns are not used that way because a more advanced
+kerning feature is present (and that one is currently always enabled). We used to
+set the following but these make no sense.
+
+\starttyping
+liga=yes, % (traditional) ligatures
+tlig=yes, % tex ligatures, like -- and ---
+trep=yes, % tex replacements, like the ' quote
+\stoptyping
+
+Math fonts normally have no ligatures and supporting the \TEX\ specific ones can
+actually be annoying. So, in todays \CONTEXT\ these are no longer enabled. Just
+consider the following:
+
+\startbuffer
+$- \kern0pt - \kern 0pt \mathchar"2D$
+$- \kern0pt -- \kern 0pt \mathchar"2D \mathchar"2D$
+$- \kern0pt --- \kern 0pt \mathchar"2D \mathchar"2D \mathchar"2D$
+\stopbuffer
+
+\typebuffer
+
+The \type {-} is mapped onto a minus sign and therefore several in succession
+become multiple minus signs. The \type {\mathchar"2D} will remain the character
+with that slot in the font so there we will see a hyphen. If we would enable the
+\type {tlig} feature several such characters would be combined into an endash or
+emdash. So how do we get these than? Because getting a hyphen directly involves a
+command, the same is true for its longer relatives: \type {\endash} and \type
+{\emdash}.
+
+\startlines
+\getbuffer
+\stoplines
+
+As convenience we have defined a special \type {\mathhyphen} command. Watch the
+fact that a text hyphen in math mode is a minus in math! As comparison we also
+show the plus sign.
+
+\starttabulate[||c|c|]
+\BC command \BC math \BC text \NC \NR
+\TB
+\NC \type{\mathhyphen} \NC $\mathhyphen$ \NC \mathhyphen \NC \NR
+\NC \type{\texthyphen} \NC $\texthyphen$ \NC \texthyphen \NC \NR
+\NC \type{-} \NC $-$ \NC - \NC \NR
+\NC \type{+} \NC $+$ \NC + \NC \NR
+\NC \type{\endash} \NC $\endash$ \NC \endash \NC \NR
+\NC \type{\emdash} \NC $\emdash$ \NC \emdash \NC \NR
+\stoptabulate
+
+\stoptabulate
+
+\stopsection
+
+\startsection[title=Stylistic alternates]
+
+ {\em todo}
+
+\stopsection
+
+\startsection[title=Dotless variants]
+
+ {\em todo}
+
+\stopsection
+
+\stopchapter
+
+\stopcomponent
diff --git a/doc/context/sources/general/manuals/math/math-framing.tex b/doc/context/sources/general/manuals/math/math-framing.tex
new file mode 100644
index 000000000..b93d57f49
--- /dev/null
+++ b/doc/context/sources/general/manuals/math/math-framing.tex
@@ -0,0 +1,232 @@
+\environment math-layout
+
+\startcomponent math-framing
+
+\startchapter[title=Framing]
+
+The \type {\framed} macro is one of the core constructors in \CONTEXT\ and it's
+used all over the place. This macro is unlikely to change its behaviour and as it
+has evolved over years it comes with quite some options and some can interfere
+with the expectations one has. In general using this macro works out well but you
+need to keep an eye on using struts and alignment.
+
+\startbuffer
+\framed{$e=mc^2$}
+\stopbuffer
+
+\typebuffer
+
+The outcome of this is:
+
+\startlinecorrection \getbuffer \stoplinecorrection
+
+There is a bit of offset (that you can set) but also struts are added as can be
+seen when we visualize them:
+
+\startlinecorrection \showstruts \getbuffer \stoplinecorrection
+
+These struts can be disabled:
+
+\startbuffer
+\framed[strut=no]{$e=mc^2$}
+\stopbuffer
+
+\typebuffer
+
+Now the result is more tight.
+
+\startlinecorrection \showstruts \getbuffer \stoplinecorrection
+
+These struts are the way to get a consistent look and feel and are used
+frequently in \CONTEXT. We mention these struts because they get in the way when
+we frame a display formula. Let's first look at what happens when we
+just package a formula in a box:
+
+\startbuffer
+\vbox\bgroup
+ \startformula
+ e = mc^2
+ \stopformula
+\egroup
+\stopbuffer
+
+\typebuffer
+
+We get:
+
+\startlinecorrection \start \showmakeup \getbuffer \stop \stoplinecorrection
+
+Now there are a few properties of displaymath that one needs to keep in mind when
+messing around with them this way. First of all display math is meant to be used
+as part of the page stream. This means that spacing above and below is adapted to
+what comes before and after. It also means that, because formulas can be numbered,
+we have some settings that relate to horizontal placement.
+
+The default vertical spacing is easy to get rid of:
+
+\startbuffer
+\vbox\bgroup
+ \startformula[packed]
+ e = mc^2
+ \stopformula
+\egroup
+\stopbuffer
+
+\typebuffer
+
+This gives:
+
+\startlinecorrection \start \showmakeup \getbuffer \stop \stoplinecorrection
+
+Another handy keyword is \type {tight}:
+
+\startbuffer
+\vbox\bgroup
+ \startformula[tight]
+ e = mc^2
+ \stopformula
+\egroup
+\stopbuffer
+
+\typebuffer
+
+This gives:
+
+\startlinecorrection \start \showmakeup \getbuffer \stop \stoplinecorrection
+
+We can combine these two:
+
+\startbuffer
+\vbox\bgroup
+ \startformula[packed,tight]
+ e = mc^2
+ \stopformula
+\egroup
+\stopbuffer
+
+\typebuffer
+
+This gives:
+
+\startlinecorrection \start \showmakeup \getbuffer \stop \stoplinecorrection
+
+Just in case you wonder why we need to go through these troubles: keep in mind
+that we are wrapping something (math) that normally goes in a vertical list with
+text above and below.
+
+The \type {packed} and \type {tight} options can help when we want to wrap
+a formula in a frame:
+
+\startbuffer
+\framed
+ [strut=no]
+ {
+ \startformula[packed,tight]
+ e = mc^2
+ \stopformula
+ }
+\stopbuffer
+
+\typebuffer
+
+which renders as:
+
+\startlinecorrection \getbuffer \stoplinecorrection
+
+There is a dedicated math framed instance that is tuned to give better results
+and automatically switches to math mode:
+
+\startbuffer
+\mframed {
+ e = mc^2
+}
+\stopbuffer
+
+\typebuffer
+
+becomes:
+
+\startlinecorrection \getbuffer \stoplinecorrection
+
+Framing a formula is also supported as a option, where the full power of framed can
+be applied to the formula. We will illustrate this in detail on the next pages. For this
+we use the following sample:
+
+\typefile{math-framing-001.tex}
+
+In \in {figure} [framing-flushleft], \in [framing-middle] \in {and}
+[framing-flushright] you see some combinations. You can run this example on your
+machine and see the details.
+
+\startplacefigure[location=page,reference=framing-flushleft,title={Framed formulas flushed left.}]
+ \startcombination[2*2]
+ {\typesetfile[math-framing-001.tex][page=01,height=.45\textheight]} {\tttf right + flushleft}
+ {\typesetfile[math-framing-001.tex][page=02,height=.45\textheight]} {\tttf right + flushleft}
+ {\typesetfile[math-framing-001.tex][page=07,height=.45\textheight]} {\tttf left + flushleft + tight}
+ {\typesetfile[math-framing-001.tex][page=08,height=.45\textheight]} {\tttf left + flushleft + tight}
+ \stopcombination
+\stopplacefigure
+
+\startplacefigure[location=page,reference=framing-middle,title={Framed formulas centered.}]
+ \startcombination[2*2]
+ {\typesetfile[math-framing-001.tex][page=03,height=.45\textheight]} {\tttf right + middle}
+ {\typesetfile[math-framing-001.tex][page=04,height=.45\textheight]} {\tttf right + middle}
+ {\typesetfile[math-framing-001.tex][page=09,height=.45\textheight]} {\tttf left + middle + tight}
+ {\typesetfile[math-framing-001.tex][page=10,height=.45\textheight]} {\tttf left + middle + tight}
+ \stopcombination
+\stopplacefigure
+
+\startplacefigure[location=page,reference=framing-flushright,title={Framed formulas flushed right.}]
+ \startcombination[2*2]
+ {\typesetfile[math-framing-001.tex][page=05,height=.45\textheight]} {\tttf right + flushright}
+ {\typesetfile[math-framing-001.tex][page=06,height=.45\textheight]} {\tttf right + flushright}
+ {\typesetfile[math-framing-001.tex][page=11,height=.45\textheight]} {\tttf left + flushright + tight}
+ {\typesetfile[math-framing-001.tex][page=12,height=.45\textheight]} {\tttf left + flushright + tight}
+ \stopcombination
+\stopplacefigure
+
+With each formula class a framed variants is automatically created:
+
+\startbuffer
+\defineformula
+ [foo]
+
+\setupformulaframed
+ [foo]
+ [frame=on,
+ framecolor=red]
+
+\startfooformula[frame]
+ e=mc^2
+\stopfooformula
+\stopbuffer
+
+\typebuffer
+
+This time you get a red frame:
+
+\getbuffer
+
+You can also frame the number, as in:
+
+\startbuffer
+\setupformulaframed[framecolor=red,frame=on,offset=1ex]
+\setupformula[option=frame,color=blue]
+\setupformula[numbercommand={\inframed[framecolor=green]}]
+
+\startplaceformula
+ \startformula
+ 2 + 2 = 2x
+ \stopformula
+\stopplaceformula
+\stopbuffer
+
+\typebuffer
+
+The boxes get properly aligned:
+
+\start \showboxes \getbuffer \stop
+
+\stopchapter
+
+\stopcomponent
diff --git a/doc/context/sources/general/manuals/math/math-introduction.tex b/doc/context/sources/general/manuals/math/math-introduction.tex
new file mode 100644
index 000000000..f5d241004
--- /dev/null
+++ b/doc/context/sources/general/manuals/math/math-introduction.tex
@@ -0,0 +1,20 @@
+\environment math-layout
+
+\startcomponent math-introduction
+
+\startchapter[title=Introduction]
+
+This manual is not a systematic discussion about math in \CONTEXT\ but more a
+collection of wrap|-|ups. The file also serves as testcase. The content can
+change over time and can also serve as a trigger for discussions on the mailing
+list. Suggestions are welcome.
+
+\startlines
+Hans Hagen
+Hasselt NL
+% May 2016
+\stoplines
+
+\stopchapter
+
+\stopcomponent
diff --git a/doc/context/sources/general/manuals/math/math-layout.tex b/doc/context/sources/general/manuals/math/math-layout.tex
new file mode 100644
index 000000000..92ced8f22
--- /dev/null
+++ b/doc/context/sources/general/manuals/math/math-layout.tex
@@ -0,0 +1,59 @@
+\startenvironment math-layout
+
+\switchtobodyfont [modern]
+\switchtobodyfont [dejavu]
+\switchtobodyfont [cambria]
+\switchtobodyfont[lucidaot]
+\switchtobodyfont [xits]
+
+\setupbodyfont
+ [pagella]
+
+\setupwhitespace
+ [big]
+
+\setuppagenumbering
+ [alternative=doublesided]
+
+\setuplayout
+ [backspace=2cm,
+ width=middle,
+ cutspace=2cm,
+ topspace=2cm,
+ header=2cm,
+ height=middle,
+ footer=0pt,
+ bottomspace=2cm]
+
+\setuplayout
+ [backspace=2cm,
+ topspace=2cm,
+ header=2cm,
+ height=middle,
+ width=middle]
+
+\setuphead
+ [chapter]
+ [header=high,
+ style=\bfc,
+ color=darkmagenta]
+
+\setuphead
+ [section]
+ [style=\bfb,
+ color=darkmagenta]
+
+\setuphead
+ [subsection]
+ [style=\bfa,
+ color=darkmagenta]
+
+\usemodule[abr-02]
+
+\usemodule[x][setups-basics]
+
+\usemodule[visual]
+
+\loadsetups[i-context]
+
+\stopenvironment
diff --git a/doc/context/sources/general/manuals/math/math-numbering.tex b/doc/context/sources/general/manuals/math/math-numbering.tex
new file mode 100644
index 000000000..64f766628
--- /dev/null
+++ b/doc/context/sources/general/manuals/math/math-numbering.tex
@@ -0,0 +1,74 @@
+\environment math-layout
+
+\startcomponent math-numbering
+
+\startchapter[title=Numbering]
+
+Numbering equations can be a bit of a mess. Formuals can be unnumbers, numbered,
+numbered with an associated reference. Numbers can go on the while formula and on
+the rows in an alignment. Combine that with positioning left or right and left or
+righ taligned formulas and the picture gets complicated. When something turns out
+wrong, just let me know and the respective branch in the code can be adapted. Here
+are some examples:
+
+\startbuffer
+\startplaceformula[a]
+ \startformula
+ (1)
+ \stopformula
+\stopplaceformula
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startplaceformula[b]
+ \startformula
+ \startalignment
+ \NC 1 \NC = \NR
+ \NC 2 \NC = (2) \NR
+ \NC 3 \NC = \NR
+ \stopalignment
+ \stopformula
+\stopplaceformula
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startplaceformula[c]
+ \startformula
+ \startalignment
+ \NC 1 \NC = (3) \NR[x]
+ \NC 2 \NC = \NR
+ \NC 3 \NC = (4) \NR[y]
+ \stopalignment
+ \stopformula
+\stopplaceformula
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startplaceformula[d]
+ \startformula
+ (5)
+ \stopformula
+\stopplaceformula
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startbuffer
+\startplaceformula[e]
+ \startformula
+ (6)
+ \stopformula
+\stopplaceformula
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\stopchapter
+
+\stopcomponent
diff --git a/doc/context/sources/general/manuals/math/math-spacing.tex b/doc/context/sources/general/manuals/math/math-spacing.tex
new file mode 100644
index 000000000..0acd07b33
--- /dev/null
+++ b/doc/context/sources/general/manuals/math/math-spacing.tex
@@ -0,0 +1,378 @@
+\environment math-layout
+
+\startcomponent math-spacing
+
+\startchapter[title=Vertical spacing]
+
+The low level way to input inline math in \TEX\ is
+
+\starttyping
+$ e = mc^2 $
+\stoptyping
+
+while display math can be entered like:
+
+\starttyping
+$$ e = mc^2 $$
+\stoptyping
+
+The inline method is still valid, but for display math the \type {$$} method
+should not be used. This has to do with the fact that we want to control spacing
+in a consistent way. In \CONTEXT\ the vertical spacing model is rather stable
+although in \MKIV\ the implementation is quite different. It has always been a
+challenge to let this mechanism work well with space round display formulas. This
+has to do with the fact that (in the kind of documents that we have to produce)
+interaction with already present spacing is somewhat tricky.
+
+Of course much can be achieved in \TEX\ but in \CONTEXT\ we need to have control
+over the many mechanisms that can interact. Given the way \TEX\ handles space
+around display math there is no real robust solution possible that gives visually
+consistent space in all cases so that is why we basically disable the existing
+spacing model. Disabling is easier in \LUATEX\ and recent versions of \MKIV\ have
+been adapted to that.
+
+In pure \TEX\ what happens is this:
+
+\startbuffer
+$$ x $$
+\stopbuffer
+
+\typebuffer \par \start \showboxes \getbuffer \par \stop
+
+A horizontal box (visualized by the thin rule on its baseline) get added which
+triggers a baselineskip. Then the formula is put below it. We can get rid of that
+box with \type {\noindent}:
+
+\startbuffer
+\noindent $$ x $$
+\stopbuffer
+
+\typebuffer \par \start \showboxes \getbuffer \par \stop
+
+In addition (not shown here) vertical space is added before and after the formula
+and left- and rightskip on the edges. In fact typesetting display math goes like this:
+
+\startitemize[packed]
+ \startitem
+ typeset the formula using display mode and wrap it in a box
+ \stopitem
+ \startitem
+ add an equation number, if possible in the same line, otherwise on a line
+ below
+ \stopitem
+ \startitem
+ in the process center the formula using the available display width and
+ required display indentation
+ \stopitem
+ \startitem
+ add vertical space above and below (depending also in displays being
+ short in relation to the previous line
+ \stopitem
+ \startitem
+ at the same time also add penalties that determine the break across
+ pages
+ \stopitem
+\stopitemize
+
+Apart from the spacing around the formula and the equation number, typesetting is
+not different from:
+
+\starttyping
+\hbox {$ \displaystyle x $}
+\stoptyping
+
+So this is what we will use by default in \CONTEXT\ in order to better control
+spacing as spacing around math is a sensitive issue. Because math itself can have
+a narrow band, for instance a lone $x$, or relative much depth, as with $y$, or
+both depth and height as in $(1,2)$ and $x^2 + y_2$ and because a preceding line
+can have no or little depth and a following line little height, the visual
+appearance can become inconsistent. The default approach is to force consistent
+spacing, but when needed we can implement variants.
+
+Spacing around display math is set up with \type {\setupformulas}:
+
+\starttyping
+ \setupformulas
+ [spacebefore=big,
+ spaceafter=big]
+\stoptyping
+
+When the whitespace is larger that setting wins because as usual the larger
+of blanks or whitespace wins.
+
+% \showdefinition[setupformula]
+% \showdefinition[setupmathematics]
+
+In \in {figures} [whitespace-no], \in {figures} [whitespace-medium] \in {and}
+[whitespace-big] we see how things interact. We show lines with and without
+maximum line height and depth (enforced by struts) alongside.
+
+% no whitespace
+
+\startbuffer[demo-1]
+\disablemode[with-struts]
+\showmakeup
+\setupformulas[spacebefore=none,spaceafter=none]
+\setupwhitespace[none]
+\input math-spacing-001.tex
+\stopbuffer
+
+\startbuffer[demo-2]
+\enablemode[with-struts]
+\showmakeup
+\setupformulas[spacebefore=none,spaceafter=none]
+\setupwhitespace[none]
+\input math-spacing-001.tex
+\stopbuffer
+
+\startbuffer[demo-3]
+\disablemode[with-struts]
+\showmakeup
+\setupformulas[spacebefore=medium,spaceafter=medium]
+\setupwhitespace[none]
+\input math-spacing-001.tex
+\stopbuffer
+
+\startbuffer[demo-4]
+\enablemode[with-struts]
+\showmakeup
+\setupformulas[spacebefore=medium,spaceafter=medium]
+\setupwhitespace[none]
+\input math-spacing-001.tex
+\stopbuffer
+
+\startplacefigure[location=page,reference=whitespace-no,title={No whitespace.}]
+ \startcombination[2*2]
+ {\typesetbuffer[demo-1][height=.45\textheight]} {\tttf natural + none + ws none}
+ {\typesetbuffer[demo-2][height=.45\textheight]} {\tttf strut + none + ws none}
+ {\typesetbuffer[demo-3][height=.45\textheight]} {\tttf natural + medium + ws none}
+ {\typesetbuffer[demo-4][height=.45\textheight]} {\tttf strut + medium + ws none}
+ \stopcombination
+\stopplacefigure
+
+% whitespace medium same as medium spacing around math
+
+\startbuffer[demo-1]
+\disablemode[with-struts]
+\showmakeup
+\setupformulas[spacebefore=none,spaceafter=none]
+\setupwhitespace[medium]
+\input math-spacing-001.tex
+\stopbuffer
+
+\startbuffer[demo-2]
+\enablemode[with-struts]
+\showmakeup
+\setupformulas[spacebefore=none,spaceafter=none]
+\setupwhitespace[medium]
+\input math-spacing-001.tex
+\stopbuffer
+
+\startbuffer[demo-3]
+\disablemode[with-struts]
+\showmakeup
+\setupformulas[spacebefore=medium,spaceafter=medium]
+\setupwhitespace[medium]
+\input math-spacing-001.tex
+\stopbuffer
+
+\startbuffer[demo-4]
+\enablemode[with-struts]
+\showmakeup
+\setupformulas[spacebefore=medium,spaceafter=medium]
+\setupwhitespace[medium]
+\input math-spacing-001.tex
+\stopbuffer
+
+\startplacefigure[location=page,reference=whitespace-medium,title={Whitespace the same as display spacing.}]
+ \startcombination[2*2]
+ {\typesetbuffer[demo-1][height=.45\textheight]} {\tttf natural + none + ws medium}
+ {\typesetbuffer[demo-2][height=.45\textheight]} {\tttf strut + none + ws medium}
+ {\typesetbuffer[demo-3][height=.45\textheight]} {\tttf natural + medium + ws medium}
+ {\typesetbuffer[demo-4][height=.45\textheight]} {\tttf strut + medium + ws medium}
+ \stopcombination
+\stopplacefigure
+
+% whitespace big wins from medium spacing around math
+
+\startbuffer[demo-1]
+\disablemode[with-struts]
+\showmakeup
+\setupformulas[spacebefore=none,spaceafter=none]
+\setupwhitespace[big]
+\input math-spacing-001.tex
+\stopbuffer
+
+\startbuffer[demo-2]
+\enablemode[with-struts]
+\showmakeup
+\setupformulas[spacebefore=none,spaceafter=none]
+\setupwhitespace[big]
+\input math-spacing-001.tex
+\stopbuffer
+
+\startbuffer[demo-3]
+\disablemode[with-struts]
+\showmakeup
+\setupformulas[spacebefore=medium,spaceafter=medium]
+\setupwhitespace[big]
+\input math-spacing-001.tex
+\stopbuffer
+
+\startbuffer[demo-4]
+\enablemode[with-struts]
+\showmakeup
+\setupformulas[spacebefore=medium,spaceafter=medium]
+\setupwhitespace[big]
+\input math-spacing-001.tex
+\stopbuffer
+
+\startplacefigure[location=page,reference=whitespace-big,title={Whitespace larger than display spacing.}]
+ \startcombination[2*2]
+ {\typesetbuffer[demo-1][height=.45\textheight]} {\tttf natural + none + ws big}
+ {\typesetbuffer[demo-2][height=.45\textheight]} {\tttf strut + none + ws big}
+ {\typesetbuffer[demo-3][height=.45\textheight]} {\tttf natural + medium + ws big}
+ {\typesetbuffer[demo-4][height=.45\textheight]} {\tttf strut + medium + ws big}
+ \stopcombination
+\stopplacefigure
+
+Because we want to have control over the placement of the formula number but also
+want to be able to align the formula with the left or right edge of the text
+area, we don't use the native display handler by default. We still have a way to
+force this, but this is only for testing purposes. By default a formula is placed
+centered relative to the current text, including left and right margins.
+
+\startbuffer
+\fakewords{20}{40}
+
+\startitemize
+ \startitem
+ \fakewords{20}{40}
+ \placeformula
+ \startformula
+ \fakeformula
+ \stopformula
+ \stopitem
+ \startitem
+ \fakewords{20}{40}
+ \stopitem
+\stopitemize
+
+\fakewords{20}{40}\epar
+\stopbuffer
+
+\typebuffer
+
+\start \getbuffer \stop
+
+In the next examples we explicitly align formulas to the left (\type
+{flushleft}), center (\type {middle}) and right (\type {flushright}):
+
+\startbuffer[demo]
+\setupformulas[align=flushleft]
+\startformula\fakeformula\stopformula
+\setupformulas[align=middle]
+\startformula\fakeformula\stopformula
+\setupformulas[align=flushright]
+\startformula\fakeformula\stopformula
+\stopbuffer
+
+\typebuffer[demo]
+
+The three cases show up as:
+
+\start \getbuffer[demo] \stop
+
+You can also set a left and|/|or right margin:
+
+\startbuffer[setting]
+\setupformulas
+ [leftmargin=3cm,
+ rightmargin=3cm]
+\stopbuffer
+
+\start \getbuffer[setting] \getbuffer[demo] \stop
+
+With formula numbers these formulas look as follows:
+
+\startbuffer[demo]
+\setupformulas[align=flushleft]
+\placeformula \startformula\fakeformula\stopformula
+\setupformulas[align=middle]
+\placeformula \startformula\fakeformula\stopformula
+\setupformulas[align=flushright]
+\placeformula \startformula\fakeformula\stopformula
+\stopbuffer
+
+\start \getbuffer[demo] \stop
+
+and the same with margins:
+
+\start \getbuffer[setting] \getbuffer[demo] \stop
+
+\page
+
+When the \type {margin} option is set to \type {standard} or \type {yes} the
+current indentation (when set) or left skip is added to the left side.
+
+\startbuffer
+\setupformulas[align=flushleft]
+\startformula \fakeformula \stopformula
+\placeformula \startformula \fakeformula \stopformula
+\stopbuffer
+
+\typebuffer \start \getbuffer \stop
+
+\startbuffer
+\setupformulas[align=flushleft,margin=standard]
+\startformula \fakeformula \stopformula
+\placeformula \startformula \fakeformula \stopformula
+\stopbuffer
+
+\typebuffer \start \getbuffer \stop
+
+The distance between the formula and the number is only applied when the formula
+is left or right aligned.
+
+\startbuffer
+\setupformulas[align=flushright,distance=0pt]
+\startformula \fakeformula \stopformula
+\placeformula \startformula \fakeformula \stopformula
+\stopbuffer
+
+\typebuffer \start \getbuffer \stop
+
+\startbuffer
+\setupformulas[align=flushright,distance=2em]
+\startformula \fakeformula \stopformula
+\placeformula \startformula \fakeformula \stopformula
+\stopbuffer
+
+\typebuffer \start \getbuffer \stop
+
+\stopsection
+
+\startsection[title=Scripts]
+
+Spacing is a trade off because there is no way to predict all usage. Of course a
+font can be very detailed in where italic correction is to be applied and how
+advanced stepwise kerns are used, but not many fonts have extensive information.
+Here are some differences in rendering. In \OPENTYPE\ the super- and subscript of
+an integral are moved right and left half of the italic correction.
+
+\startlinecorrection
+ \startcombination[6*1]
+ {\switchtobodyfont [modern]\math{F_j = \int\nolimits _a^b}} {Latin Modern}
+ {\switchtobodyfont [pagella]\math{F_j = \int\nolimits _a^b}} {Pagella}
+ {\switchtobodyfont [dejavu]\math{F_j = \int\nolimits _a^b}} {Dejavu}
+ {\switchtobodyfont [cambria]\math{F_j = \int\nolimits _a^b}} {Cambria}
+ {\switchtobodyfont[lucidaot]\math{F_j = \int\nolimits _a^b}} {Lucida OT}
+ {\switchtobodyfont [xits]\math{F_j = \int\nolimits _a^b}} {Xits}
+ \stopcombination
+\stoplinecorrection
+
+\stopsection
+
+\stopchapter
+
+\stopcomponent
diff --git a/doc/context/sources/general/manuals/math/math-titlepage.tex b/doc/context/sources/general/manuals/math/math-titlepage.tex
new file mode 100644
index 000000000..1d1ac306a
--- /dev/null
+++ b/doc/context/sources/general/manuals/math/math-titlepage.tex
@@ -0,0 +1,29 @@
+\startcomponent math-titlepage
+
+\startMPpage
+
+ StartPage;
+ fill Page withcolor .35magenta ;
+ picture p ; p := image ( draw outlinetext.b
+ ("\textdollar")
+ (withcolor .35green)
+ (withcolor .5yellow withpen pencircle scaled .1) ;
+ ) ;
+ p := p xysized(PaperWidth - 20pt,PaperHeight - 20pt ) ;
+ p := p shifted - llcorner p shifted (10pt,10pt) ;
+ draw p ;
+ picture p ; p := image ( draw outlinetext.b
+ ("math")
+ (withcolor .35green)
+ (withcolor .5yellow withpen pencircle scaled .2) ;
+ ) ;
+ p := p xsized(PaperWidth/2 - 40pt) ;
+ p := p shifted - llcorner p shifted (10pt,10pt) ;
+ draw p shifted (PaperWidth/2 + 20pt,20pt);
+ StopPage;
+
+\stopMPpage
+
+\page[empty] \setuppagenumber[number=1]
+
+\stopcomponent
diff --git a/doc/context/sources/general/mathml/mathml/envexamp.tex b/doc/context/sources/general/manuals/mathml/envexamp.tex
index 99bc72b8a..99bc72b8a 100644
--- a/doc/context/sources/general/mathml/mathml/envexamp.tex
+++ b/doc/context/sources/general/manuals/mathml/envexamp.tex
diff --git a/doc/context/sources/general/mathml/mathml/mmlexamp.tex b/doc/context/sources/general/manuals/mathml/mmlexamp.tex
index 0beb211ad..0beb211ad 100644
--- a/doc/context/sources/general/mathml/mathml/mmlexamp.tex
+++ b/doc/context/sources/general/manuals/mathml/mmlexamp.tex
diff --git a/doc/context/sources/general/mathml/mathml/mmlprime.tex b/doc/context/sources/general/manuals/mathml/mmlprime.tex
index fdcb6aaf5..811ba376b 100644
--- a/doc/context/sources/general/mathml/mathml/mmlprime.tex
+++ b/doc/context/sources/general/manuals/mathml/mmlprime.tex
@@ -432,7 +432,7 @@
\NC \NC mathbackground \NC -- \NC \NC\NR
\NC \NC mathcolor \NC -- \NC \NC\NR
\NC \NC notation \NC + \NC A list of notations, separated by white space, to apply to the child elements. The symbols are each drawn as if the others are not present, and therefore may overlap. Supported values are:
- longdiv, actuarial, radiacal, box downdiagonalstrike, roundedbox updiagonalstrike, circle verticalstrike horizontalstrike, right bottom horizontalstrike, etc. \NC\NR
+ longdiv, actuarial, radiacal, rule ({\em private}), box downdiagonalstrike, roundedbox updiagonalstrike, circle verticalstrike horizontalstrike, right bottom horizontalstrike, etc. \NC\NR
\stopmathmlattributes
\stopbuffer
diff --git a/doc/context/sources/general/mathml/mathml/pc-d-001.xml b/doc/context/sources/general/manuals/mathml/pc-d-001.xml
index d7997f5fd..d7997f5fd 100644
--- a/doc/context/sources/general/mathml/mathml/pc-d-001.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-d-001.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-d-002.xml b/doc/context/sources/general/manuals/mathml/pc-d-002.xml
index 1d93d97bc..1d93d97bc 100644
--- a/doc/context/sources/general/mathml/mathml/pc-d-002.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-d-002.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-d-003.xml b/doc/context/sources/general/manuals/mathml/pc-d-003.xml
index 9e2b391fe..9e2b391fe 100644
--- a/doc/context/sources/general/mathml/mathml/pc-d-003.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-d-003.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-d-004.xml b/doc/context/sources/general/manuals/mathml/pc-d-004.xml
index ef2d5490e..ef2d5490e 100644
--- a/doc/context/sources/general/mathml/mathml/pc-d-004.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-d-004.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-d-005.xml b/doc/context/sources/general/manuals/mathml/pc-d-005.xml
index 1e1fc90ca..1e1fc90ca 100644
--- a/doc/context/sources/general/mathml/mathml/pc-d-005.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-d-005.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-d-006.xml b/doc/context/sources/general/manuals/mathml/pc-d-006.xml
index aaaf2c082..aaaf2c082 100644
--- a/doc/context/sources/general/mathml/mathml/pc-d-006.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-d-006.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-d-007.xml b/doc/context/sources/general/manuals/mathml/pc-d-007.xml
index b1b3617e1..b1b3617e1 100644
--- a/doc/context/sources/general/mathml/mathml/pc-d-007.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-d-007.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-d-008.xml b/doc/context/sources/general/manuals/mathml/pc-d-008.xml
index 9c0b36aed..9c0b36aed 100644
--- a/doc/context/sources/general/mathml/mathml/pc-d-008.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-d-008.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-d-009.xml b/doc/context/sources/general/manuals/mathml/pc-d-009.xml
index 63fcc3c09..63fcc3c09 100644
--- a/doc/context/sources/general/mathml/mathml/pc-d-009.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-d-009.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-d-010.xml b/doc/context/sources/general/manuals/mathml/pc-d-010.xml
index b4d50b2ae..b4d50b2ae 100644
--- a/doc/context/sources/general/mathml/mathml/pc-d-010.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-d-010.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-d-011.xml b/doc/context/sources/general/manuals/mathml/pc-d-011.xml
index 9b1b99068..9b1b99068 100644
--- a/doc/context/sources/general/mathml/mathml/pc-d-011.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-d-011.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-d-043.xml b/doc/context/sources/general/manuals/mathml/pc-d-043.xml
index 4e9920ad3..4e9920ad3 100644
--- a/doc/context/sources/general/mathml/mathml/pc-d-043.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-d-043.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-d-051.xml b/doc/context/sources/general/manuals/mathml/pc-d-051.xml
index e7cc25f1b..e7cc25f1b 100644
--- a/doc/context/sources/general/mathml/mathml/pc-d-051.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-d-051.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-i-022.xml b/doc/context/sources/general/manuals/mathml/pc-i-022.xml
index 115d8ddc8..115d8ddc8 100644
--- a/doc/context/sources/general/mathml/mathml/pc-i-022.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-i-022.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-i-380.xml b/doc/context/sources/general/manuals/mathml/pc-i-380.xml
index ae6493b9c..ae6493b9c 100644
--- a/doc/context/sources/general/mathml/mathml/pc-i-380.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-i-380.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-s-001.xml b/doc/context/sources/general/manuals/mathml/pc-s-001.xml
index ec4f890f0..ec4f890f0 100644
--- a/doc/context/sources/general/mathml/mathml/pc-s-001.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-s-001.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-s-002.xml b/doc/context/sources/general/manuals/mathml/pc-s-002.xml
index 86c2368b9..86c2368b9 100644
--- a/doc/context/sources/general/mathml/mathml/pc-s-002.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-s-002.xml
diff --git a/doc/context/sources/general/mathml/mathml/pc-s-003.xml b/doc/context/sources/general/manuals/mathml/pc-s-003.xml
index fbe38e40f..fbe38e40f 100644
--- a/doc/context/sources/general/mathml/mathml/pc-s-003.xml
+++ b/doc/context/sources/general/manuals/mathml/pc-s-003.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-001.xml b/doc/context/sources/general/manuals/mathml/wh-g-001.xml
index bd8935150..bd8935150 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-001.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-001.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-002.xml b/doc/context/sources/general/manuals/mathml/wh-g-002.xml
index cfa3cf1a8..cfa3cf1a8 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-002.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-002.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-003.xml b/doc/context/sources/general/manuals/mathml/wh-g-003.xml
index 4ed5bdddf..4ed5bdddf 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-003.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-003.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-004.xml b/doc/context/sources/general/manuals/mathml/wh-g-004.xml
index a981decdb..a981decdb 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-004.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-004.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-005.xml b/doc/context/sources/general/manuals/mathml/wh-g-005.xml
index 3618ae4fe..3618ae4fe 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-005.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-005.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-006.xml b/doc/context/sources/general/manuals/mathml/wh-g-006.xml
index 7438cc96d..7438cc96d 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-006.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-006.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-007.xml b/doc/context/sources/general/manuals/mathml/wh-g-007.xml
index 98050709f..98050709f 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-007.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-007.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-008.xml b/doc/context/sources/general/manuals/mathml/wh-g-008.xml
index 3696b239b..3696b239b 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-008.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-008.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-009.xml b/doc/context/sources/general/manuals/mathml/wh-g-009.xml
index a27329902..a27329902 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-009.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-009.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-010.xml b/doc/context/sources/general/manuals/mathml/wh-g-010.xml
index 4860ed243..4860ed243 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-010.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-010.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-011.xml b/doc/context/sources/general/manuals/mathml/wh-g-011.xml
index d3452b32a..d3452b32a 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-011.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-011.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-012.xml b/doc/context/sources/general/manuals/mathml/wh-g-012.xml
index 55b1be31e..55b1be31e 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-012.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-012.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-013.xml b/doc/context/sources/general/manuals/mathml/wh-g-013.xml
index 25048092b..25048092b 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-013.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-013.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-014.xml b/doc/context/sources/general/manuals/mathml/wh-g-014.xml
index 196271fbe..196271fbe 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-014.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-014.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-015.xml b/doc/context/sources/general/manuals/mathml/wh-g-015.xml
index 1b146e640..1b146e640 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-015.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-015.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-g-016.xml b/doc/context/sources/general/manuals/mathml/wh-g-016.xml
index deae671b5..deae671b5 100644
--- a/doc/context/sources/general/mathml/mathml/wh-g-016.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-g-016.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-l-001.xml b/doc/context/sources/general/manuals/mathml/wh-l-001.xml
index 00ea756c6..00ea756c6 100644
--- a/doc/context/sources/general/mathml/mathml/wh-l-001.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-l-001.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-l-002.xml b/doc/context/sources/general/manuals/mathml/wh-l-002.xml
index 5afc5f164..5afc5f164 100644
--- a/doc/context/sources/general/mathml/mathml/wh-l-002.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-l-002.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-l-003.xml b/doc/context/sources/general/manuals/mathml/wh-l-003.xml
index 673ca36aa..673ca36aa 100644
--- a/doc/context/sources/general/mathml/mathml/wh-l-003.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-l-003.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-l-004.xml b/doc/context/sources/general/manuals/mathml/wh-l-004.xml
index bf4e51c0c..bf4e51c0c 100644
--- a/doc/context/sources/general/mathml/mathml/wh-l-004.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-l-004.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-s-001.xml b/doc/context/sources/general/manuals/mathml/wh-s-001.xml
index b149c7079..b149c7079 100644
--- a/doc/context/sources/general/mathml/mathml/wh-s-001.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-s-001.xml
diff --git a/doc/context/sources/general/mathml/mathml/wh-s-002.xml b/doc/context/sources/general/manuals/mathml/wh-s-002.xml
index ca8583753..ca8583753 100644
--- a/doc/context/sources/general/mathml/mathml/wh-s-002.xml
+++ b/doc/context/sources/general/manuals/mathml/wh-s-002.xml
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index aadba04f8..a439529d3 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{2016.12.02 10:13}
+\newcontextversion{2016.12.05 14: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 6a800c93c..14b60ec69 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{2016.12.02 10:13}
+\edef\contextversion{2016.12.05 14:44}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/char-def.lua b/tex/context/base/mkiv/char-def.lua
index 72c868105..6a1b04e01 100644
--- a/tex/context/base/mkiv/char-def.lua
+++ b/tex/context/base/mkiv/char-def.lua
@@ -78926,16 +78926,54 @@ characters.data={
description="LEFT BLACK TORTOISE SHELL BRACKET",
direction="on",
linebreak="op",
+ mathspec={
+ {
+ class="open",
+ name="linterval",
+ },
+ {
+ class="close",
+ name="rointerval",
+ },
+ {
+ class="open",
+ name="rlointerval",
+ },
+ {
+ class="close",
+ name="rlointerval",
+ },
+ },
mirror=0x2998,
unicodeslot=0x2997,
+ textclass="open",
},
[0x2998]={
category="pe",
description="RIGHT BLACK TORTOISE SHELL BRACKET",
direction="on",
linebreak="cl",
+ mathspec={
+ {
+ class="close",
+ name="rinterval",
+ },
+ {
+ class="open",
+ name="lointerval",
+ },
+ {
+ class="open",
+ name="lrointerval",
+ },
+ {
+ class="close",
+ name="rrointerval",
+ },
+ },
mirror=0x2997,
unicodeslot=0x2998,
+ textclass="close",
},
[0x2999]={
category="sm",
@@ -238342,4 +238380,4 @@ characters.data={
linebreak="cm",
unicodeslot=0xE007F,
},
-} \ No newline at end of file
+}
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 6b1defa95..5751a60da 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2016.12.02 10:13}
+\newcontextversion{2016.12.05 14:44}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 554d63830..b338d3c43 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -39,7 +39,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2016.12.02 10:13}
+\edef\contextversion{2016.12.05 14:44}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/math-fen.mkiv b/tex/context/base/mkiv/math-fen.mkiv
index 3dfaa7f33..c26827cf1 100644
--- a/tex/context/base/mkiv/math-fen.mkiv
+++ b/tex/context/base/mkiv/math-fen.mkiv
@@ -223,6 +223,21 @@
\unexpanded\def\Lopenbracketmirrored {\math_fenced_fenced_stop {mirroredopenbracket}} \unexpanded\def\Ropenbracketmirrored {\math_fenced_fenced_start{mirroredopenbracket}}
\unexpanded\def\Lnothingmirrored {\math_fenced_fenced_stop {mirrorednothing}} \unexpanded\def\Rnothingmirrored {\math_fenced_fenced_start{mirrorednothing}}
+\definemathfence [interval] [\c!left="2997,\c!right="2998]
+\definemathfence [openinterval] [interval] [\c!left="2998,\c!right="2998]
+\definemathfence [leftopeninterval] [interval] [\c!left="2997,\c!right="2997]
+\definemathfence [rightopeninterval] [interval] [\c!left="2998,\c!right="2998]
+
+\unexpanded\def\Linterval {\math_fenced_fenced_start{interval}}
+\unexpanded\def\Lointerval {\math_fenced_fenced_start{openinterval}}
+\unexpanded\def\Llointerval {\math_fenced_fenced_start{leftopeninterval}}
+\unexpanded\def\Lrointerval {\math_fenced_fenced_start{rightopeninterval}}
+
+\unexpanded\def\Rinterval {\math_fenced_fenced_stop {interval}}
+\unexpanded\def\Rointerval {\math_fenced_fenced_stop {openinterval}}
+\unexpanded\def\Rlointerval {\math_fenced_fenced_stop {leftopeninterval}}
+\unexpanded\def\Rrointerval {\math_fenced_fenced_stop {rightopeninterval}}
+
% \startformula
% \left{ \frac{1}{a} \right}
% \left[ \frac{1}{b} \right]
@@ -392,6 +407,8 @@
% \installmathfencepair { \Lbrace } \Rbrace
% \installmathfencepair } \Rbracemirrored { \Lbracemirrored
+\installmathfencepair ⦗ \Linterv ⦘ \Rinterv
+
\appendtoks
\ignorediscretionaries % so $\mtext{a|b}$ works, this is ok because it's an \hbox
\to \everymathematics
@@ -440,6 +457,12 @@
\installmathfencepair \llbracket \Lopenbracket \rrbracket \Ropenbracket
\installmathfencepair \lgroup \Lgroup \rgroup \Rgroup
+\installmathfencepair \linterval \Linterval \rinterval \Rinterval
+%installmathfencepair \linterv \Linterval \rinterv \Rinterval
+\installmathfencepair \lointerval \Linterval \rointerval \Rinterval
+\installmathfencepair \llointerval \Llointerval \rlointerval \Rlointerval
+\installmathfencepair \lrointerval \Lrointerval \rrointerval \Rrointerval
+
\let\textlbar\lbar \let\mathlbar\Lbar
\let\textrbar\lbar \let\mathrbar\Rbar
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index e53b08be3..8f0dca563 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 ecc21a8c9..79290af72 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/fonts/mkiv/type-imp-stix.mkiv b/tex/context/fonts/mkiv/type-imp-stix.mkiv
new file mode 100644
index 000000000..697037b43
--- /dev/null
+++ b/tex/context/fonts/mkiv/type-imp-stix.mkiv
@@ -0,0 +1,64 @@
+%D \module
+%D [ file=type-otf,
+%D version=2007.07.30,
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=Stix,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D We provide typescripts for version one and two of the stix fonts. There is a
+%D xits variant based on the first (not opentype) release that also provides
+%D bidirectional math.
+
+\definefontfeature
+ [stixtwomath]
+ [ss02=yes] % otherwise weird (non italic) g
+
+\starttypescriptcollection[stix]
+
+ % version one
+
+ \starttypescript [\s!math] [stix] [\s!name]
+ \definefontsynonym[MathRoman][\s!file:stixmath-regular.otf] [\s!features={\s!math\mathsizesuffix,mathextra}]
+ \stoptypescript
+
+ \starttypescript [\s!serif] [stix] [\s!name]
+ \setups[\s!font:\s!fallback:\s!serif]
+ \definefontsynonym[\s!Serif] [\s!file:stix-regular.otf] [\s!features=\s!default]
+ \definefontsynonym[\s!SerifBold] [\s!file:stix-bold.otf] [\s!features=\s!default]
+ \definefontsynonym[\s!SerifItalic] [\s!file:stix-italic.otf] [\s!features=\s!default]
+ \definefontsynonym[\s!SerifBoldItalic][\s!file:stix-bolditalic.otf][\s!features=\s!default]
+ \stoptypescript
+
+ \starttypescript[stix]
+ \definetypeface [stix] [\s!rm] [\s!serif] [stix] [\s!default]
+ \definetypeface [stix] [\s!mm] [\s!math] [stix] [\s!default]
+ \stoptypescript
+
+ % version two
+
+ \starttypescript [\s!math] [stixtwo] [\s!name]
+ \definefontsynonym[MathRoman][\s!file:stix2math.otf] [\s!features={\s!math\mathsizesuffix,stixtwomath,mathextra},\s!goodies=stix-two-math]
+ \stoptypescript
+
+ \starttypescript [\s!serif] [stixtwo] [\s!name]
+ \setups[\s!font:\s!fallback:\s!serif]
+ \definefontsynonym[\s!Serif] [\s!file:stix2text-regular.otf] [\s!features=\s!default]
+ \definefontsynonym[\s!SerifBold] [\s!file:stix2text-bold.otf] [\s!features=\s!default]
+ \definefontsynonym[\s!SerifItalic] [\s!file:stix2text-italic.otf] [\s!features=\s!default]
+ \definefontsynonym[\s!SerifBoldItalic][\s!file:stix2text-bolditalic.otf][\s!features=\s!default]
+ \stoptypescript
+
+ \starttypescript[stixtwo]
+ \definetypeface [\typescriptone] [\s!rm] [\s!serif] [stixtwo] [\s!default]
+ \definetypeface [\typescriptone] [\s!ss] [\s!serif] [stixtwo] [\s!default]
+ \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.895]
+ \definetypeface [\typescriptone] [\s!mm] [\s!math] [stixtwo] [\s!default]
+ \stoptypescript
+
+\stoptypescriptcollection
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index f915404b9..e3dd2d9ed 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-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index d67885e35..4d81dd35b 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/modules/mkiv/x-mathml.mkiv b/tex/context/modules/mkiv/x-mathml.mkiv
index 5a9c4fdd2..7ed1b4322 100644
--- a/tex/context/modules/mkiv/x-mathml.mkiv
+++ b/tex/context/modules/mkiv/x-mathml.mkiv
@@ -2036,7 +2036,11 @@
\expanded{\doifelseinset {mml:enclose:radical} {\mmlmenclosenotation}} {
\sqrt{\xmlflush{#1}}
} {
- \xmlflush{#1}
+ \expanded{\doifelseinset {mml:enclose:rule} {\mmlmenclosenotation}} {
+ \overline{\strut\xmlflush{#1}}
+ } {
+ \xmlflush{#1}
+ }
}
}
}
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index f6060cfce..9ce686896 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 : 12/02/16 10:13:47
+-- merge date : 12/05/16 14:44:50
do -- begin closure to overcome local limits and interference