%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