%interface=en % EuroTeX 2001 Kerkrade % Using MATHML for paper and web publishing % Tobias Burnus \usemodule[pre-fuzzy] \usemodule[abr-pseudocaps] \usemodule[mathml] \def\MATHML{MathML} \starttext \StartTitlePage {\small Euro\TeX2001 Kerkrade} \blank Usage of \MATHML\ for paper and web publishing \blank \small Tobias Burnus \StopTitlePage \Topic{The pre-\MATHML\ situation} \Subject{\TeX} This is the method used by the most (all) of those sitting here. {\bf Good:} \startitemize \item Easy to type in \item Wide spread \item Optimal quality \item Can be easily shared as \PDF \stopitemize {\bf Bad:} \startitemize \item The \TEX\ code is not very standardised due to different packages and \LATEXTE\ vs. \CONTEXT \item Can't be validated \stopitemize {\bf Ugly:} \startitemize \item \TEX\ to \HTML\ output using Images creates big, unreadable and not postprocessable files \stopitemize \Subject{Word processors and DTP programs} {\bf Good:} \startitemize \item WYSIWG (well, nearly) \item If you like clicking it is easy to create (or you have to learn yet another math language as in OpenOffice) \stopitemize {\bf Bad:} \startitemize \item You cannot pre- or postprocess it due to changing, binary and proprrietorial format \stopitemize {\bf Ugly:} \startitemize \item Frequently sub-optimal quality \item Web output has the same problems as \TEX\ (if there exists an converter) \stopitemize \Topic{The brave new world} \Subject{Promises} The World Wide Web Consortium says that those goals are met by \MATHML\ (excerpt): \startitemize \item Encode mathematical material suitable for teaching and scientific communication at all levels. \item Encode both mathematical notation and mathematical meaning. \item Facilitate conversion to and from other mathematical formats, both presentational and semantic. \item Be well suited to template and other mathematics editing techniques. \item Be human legible, and simple for software to generate and process. \stopitemize But how does a language defined in such a way look like \dots \page \subject{\MATHML\ tiny sample} Let's show how a simple formula in written in \MATHML. {\it We} \TeX{}ies write a mathematical formula as: \startbuffer \int_a^b f(x)\,{\rm d}x = F(b)-F(a) \stopbuffer \typebuffer The mathematicians write it in these strange hieroglyphs: \placeformula[-] \startformula \getbuffer \stopformula And in \MATHML\ \dots \page \Subject{Presentational \MATHML} In presentation markup of \MATHML it looks like this: \startbuffer ab f (x) d x = F (b) - F (a) \stopbuffer \typebuffer \processXMLbuffer In a more structured way \dots \page \Subject{Content \MATHML} More beautiful the content markup: \startbuffer x a b fx Fb Fa \stopbuffer \typebuffer \processXMLbuffer \Topic{Why content markup is that cool} \Subject{Directives to change the layout} The nice part of the encoding of meaning is that one can change the layout easily. Let's take this long fraction: \startbuffer[sin-fraction] x x 1 11 \stopbuffer \typebuffer[sin-fraction] Which looks as reasonable default: % (this is not 1 by default) % \processXMLbuffer[sin-fraction] You can also display it as: \startbuffer[directive-sin-fraction] \stopbuffer \processXMLbuffer[directive-sin-fraction,sin-fraction] This is done by \typebuffer[directive-sin-fraction] \Topic{Usage} \Subject{Why is presentational \MATHML\ used?} Almost all programs which can write \MATHML\ files use presentational \MATHML. \blank This brings us to the question who produces \MATHML: \startitemize \item Mathematica. I tried 4.0 and it produces a wild \HTML+\MATHML\ mixture (4.01 should be better) \item Maple 6 / Maple 7 (untried, Maple V R5.5 doesn't) \item OpenOffice/StarOffice 6: Not very well but you guess that it will work in the final release \item $\Omega$mega. This is the natural way to produce \MATHML\ files which then will be processed by \TeX \stopitemize \Subject{Other \MATHML\ renderers: Mozilla} From the list on the \MATHML\ page at the World Wide Web Consortium you can see that there are not many programs which can render \MATHML, the number of those creating it is much higher. \MATHML\ impressions: \startitemize \item For \HTML+\MATHML\ you need a special header (DOCTYPE) which is not standard conform and crashes some other \MATHML\ renderers \item It is not enabled by default in Mozilla \item Is has font problems: You need to have certain fonts installed \item It has still some problems with Content \MATHML \stopitemize \Topic{Conclusions} \Subject{The Good} \startitemize \item It is becoming a standard and \TeX\ can use it \item Content markup allows you to setup the rendering in a consistent way \item Presentational markup is very easy to create by a software \item You can include literal \TeX\ using annotations \stopitemize \Subject{The Bad} \startitemize \item The documentation: It is not very clear and has some bugs in it \item The presentation markup is frequently rather complicated and long \item You need (and can $\Rightarrow$ good) intermix the content and presentation module \item Viewers and editors are not widely spread \stopitemize \Subject{The Ugly} \startitemize \item The test cases on W3C are not only frequently contradictionual to the specification but also to other test cases in the same group -- That is not only ugly but also really BAD. \stopitemize \stoptext