pmathmlcss.xsl

Presentation MathML Stylesheet
This stylesheet transforms Presentation MathML to XHTML + CSS + Javascript, so rendering MathML (to somewhat variable quality) in a standard HTML browser without any extra plugin. In addition to its use as a fall back option in these client side transformations, this stylesheet could be used as a server based transformation to produce something acceptable on browsers without any XSLT or MathML support. (Currently the javascript has a Microsoft Bias, but this can hopefully be removed in future versions.)
Author:
ibirrer (modified by antonysigma :P)
Copyright:
Copyright David Carlisle 2001, 2002. Use and distribution of this code are permitted under the terms of the W3C Software Notice and License.
CVS Id:
pmathmlcss.xsl,v 1.1 2002/03/20 12:20:57 mf Exp

Variables Summary

string opdict - source
Dictionary

Match Templates Summary

Handling of mathvariant attribute
Handling of mathvariant attribute
Handling of mathvariant attribute
Handling of mathvariant attribute
Handling of mathvariant attribute
Handling of mathvariant attribute
Handling of mathvariant attribute
Handling of mathvariant attribute
Handling of mathvariant attribute
h:* (mode: css) - source
HTML elements
h:body (mode: css) - source
No short description available
h:head (mode: css) - source
Head element
m:* (mode: css) - source
Unimplemented MathML elements
m:*/text() (param: xmode: css) - source
No short description available
yellow background when moveover, restore when mouseout
Display comment in the status line when mouseover
No short description available
No short description available
m:maligngroup (mode: css) - source
No short description available
m:math (mode: css) - source
No short description available
m:menclose (mode: css) - source
No short description available
No short description available
No short description available
m:merror (mode: css) - source
display items one by one when clicked
m:mfenced (mode: css) - source
No short description available
m:mfrac (param: fullmode: css) - source
No short description available
m:mglyph (mode: css) - source
mglyph
m:mi (mode: css) - source
mi
m:mmultiscripts (mode: css) - source
No short description available
m:mn (mode: css) - source
mn: a simple span
m:mo (mode: css) - source
mo
m:mover (mode: css) - source
mover: Currently only supports overline
m:mphantom (mode: css) - source
No short description available
m:mroot (mode: css) - source
No short description available
m:mrow (mode: css) - source
Simple span, changed to mfenced if contain brackets
m:ms (mode: css) - source
ms: a simple span with left and right character added to the content
m:mspace (mode: css) - source
No short description available
m:msqrt (mode: css) - source
No short description available
m:mstyle (mode: css) - source
mstyle: not many attributes currently supported
m:msub (mode: css) - source
Use JavaScript to shift index downwards
m:msubsup (mode: css) - source
No short description available
m:msup (mode: css) - source
Use JavaScript to shift index upwards
m:mtable (mode: css) - source
No short description available
m:mtd (mode: css) - source
No short description available
m:mtext (mode: css) - source
mtext: a simple span
m:mtr (mode: css) - source
No short description available
m:munder (mode: css) - source
munder: Currently only supports underline
m:munderover (mode: css) - source
munderover
m:none (mode: css) - source
Display nothing
m:padded (mode: css) - source
No short description available

Named Templates Summary

m:mrow (mode: css) - source
Simple span, changed to mfenced if contain brackets
m:*/text() (param: xmode: css) - source
No short description available

Variables Detail

string opdict - source
Dictionary
The following elements in the x: namespace form an implementation of an "Operator Dictionary" for this MathML Implementation. In the case of stretch operators, the element specifies the symbol parts via the latin-1 equivalent character based on the encoding in the symbol font. It is a clear "failure to comply to the spec" that using latin 1 characters (or numeric character references) in the latin 1 range access glyphs in teh symbol font via font position, however most of these character parts are not in Unicode (until 3.2), so there is no standard way to access these characters.

Match Templates Detail

Handling of mathvariant attribute
The choice of font families here (currently) avoids math-specific fonts but does use several fionts coming with windows 9.x and/or office 2000.
Attributes:
style: font-weight: bold; font-style: upright
Handling of mathvariant attribute
The choice of font families here (currently) avoids math-specific fonts but does use several fionts coming with windows 9.x and/or office 2000.
Attributes:
style: font-style: upright; font-weight: bold; font-style: italic;
Handling of mathvariant attribute
The choice of font families here (currently) avoids math-specific fonts but does use several fionts coming with windows 9.x and/or office 2000.
Attributes:
style: font-family: sans-serif; font-weight: bold;
Handling of mathvariant attribute
The choice of font families here (currently) avoids math-specific fonts but does use several fionts coming with windows 9.x and/or office 2000.
Attributes:
class: doublestruck
Handling of mathvariant attribute
The choice of font families here (currently) avoids math-specific fonts but does use several fionts coming with windows 9.x and/or office 2000.
Attributes:
style: font-family: old english text mt
class:
Handling of mathvariant attribute
The choice of font families here (currently) avoids math-specific fonts but does use several fionts coming with windows 9.x and/or office 2000.
Attributes:
style: font-style: italic;
Handling of mathvariant attribute
The choice of font families here (currently) avoids math-specific fonts but does use several fionts coming with windows 9.x and/or office 2000.
Attributes:
style: font-family: monospace;
Handling of mathvariant attribute
The choice of font families here (currently) avoids math-specific fonts but does use several fionts coming with windows 9.x and/or office 2000.
Attributes:
style: font-family: sans-serif;
Handling of mathvariant attribute
The choice of font families here (currently) avoids math-specific fonts but does use several fionts coming with windows 9.x and/or office 2000.
Attributes:
style: font-family: brush script mt italic
class:
h:* (mode: css) - source
HTML elements
XHTML elements get passed straight through, sans namespace prefix.
h:body (mode: css) - source
No short description available
h:head (mode: css) - source
Head element
Template for the head element copies the original content, and in addition adds a script element and CSS style element that implement the core of the MathML renderer.
m:* (mode: css) - source
Unimplemented MathML elements
Unimplemented MathML elements get copied literally, in red, mainly as a debugging aid.
m:*/text() (param: xmode: css) - source
No short description available
Parameters:
x -
yellow background when moveover, restore when mouseout
Display comment in the status line when mouseover
No short description available
No short description available
m:maligngroup (mode: css) - source
No short description available
m:math (mode: css) - source
No short description available
m:menclose (mode: css) - source
No short description available
No short description available
No short description available
m:merror (mode: css) - source
display items one by one when clicked
m:mfenced (mode: css) - source
No short description available
m:mfrac (param: fullmode: css) - source
No short description available
Parameters:
full -
m:mglyph (mode: css) - source
mglyph
Uses disable output escaping to construct a numeric character reference. Uses IE's non conforming behaviour of using this number to access the font encoding rather than unicode.
m:mi (mode: css) - source
mi
Set default font based on string length, otherwise behaviour based on entries in the operator dictionary if one exists, or content is copied through to the output unchanged.
m:mmultiscripts (mode: css) - source
No short description available
m:mn (mode: css) - source
mn: a simple span
m:mo (mode: css) - source
mo
Generate a unique ID so that a script at the end of any surrounding mrow may replace the conent by a suitably stretched operator if need be.
m:mover (mode: css) - source
mover: Currently only supports overline
m:mphantom (mode: css) - source
No short description available
m:mroot (mode: css) - source
No short description available
m:mrow (mode: css) - source
Simple span, changed to mfenced if contain brackets
m:ms (mode: css) - source
ms: a simple span with left and right character added to the content
m:mspace (mode: css) - source
No short description available
m:msqrt (mode: css) - source
No short description available
m:mstyle (mode: css) - source
mstyle: not many attributes currently supported
m:msub (mode: css) - source
Use JavaScript to shift index downwards
m:msubsup (mode: css) - source
No short description available
m:msup (mode: css) - source
Use JavaScript to shift index upwards
m:mtable (mode: css) - source
No short description available
m:mtd (mode: css) - source
No short description available
m:mtext (mode: css) - source
mtext: a simple span
m:mtr (mode: css) - source
No short description available
m:munder (mode: css) - source
munder: Currently only supports underline
m:munderover (mode: css) - source
munderover
m:none (mode: css) - source
Display nothing
m:padded (mode: css) - source
No short description available

Named Templates Detail

m:mrow (mode: css) - source
Simple span, changed to mfenced if contain brackets
m:*/text() (param: xmode: css) - source
No short description available
Parameters:
x -