diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/x-mml.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/x-mml.mkiv | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/x-mml.mkiv b/Master/texmf-dist/tex/context/base/x-mml.mkiv new file mode 100644 index 00000000000..d2dd91a0900 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/x-mml.mkiv @@ -0,0 +1,49 @@ +%D \module +%D [ file=x-mml, +%D version=2007.09.04, +%D title=\CONTEXT\ XML Modules, +%D subtitle=MathML Renderer, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This is a first version of the \MKIV\ \MATHML\ processor using +%D the \type {lxml} helper functions. The implementation is yet +%D incomplete but I needed a quick hack for a project where I wanted +%D to use the new \MKIV\ \XML\ handler. It's also a nice testcase. + +\startxmlsetups xml:mml:process + \xmlgrab {\xmldocument} {mml:*} {*} +\stopxmlsetups + +\xmlregistersetup{xml:mml:process} + +\xmlregisterns{mml}{mathml} + +\def\setupMMLappearance[#1]{\dodoubleargument\getparameters[@@MML#1]} + +\def\MMLhack{\let\MMLpar\par \let\par\relax \everyvbox{\let\par\MMLpar}} + +\startxmlsetups mml:math + \automathematics {\MMLhack\xmlflush{#1}} +\stopxmlsetups + +\startxmlsetups mml:imath + \inlinemathematics{\MMLhack\xmlflush{#1}} +\stopxmlsetups + +\startxmlsetups mml:dmath + \displaymathematics{\MMLhack\xmlflush{#1}} +\stopxmlsetups + +% -- we need a new entity mapper (also covering unicode) + +\loadmarkfile{x-mmb} % common code +\loadmarkfile{x-mmp} % presentation mathml +\loadmarkfile{x-mmc} % content mathml + +\endinput |