Conversion of MathML to SVG via XSLT: pMML2SVG

Developer Documentation

Justus H Piater

Professor
Université de Liège
Faculty of Applied Sciences
Department of Electrical Engineering and Computer Science

Table of Contents

I. Main stylesheet
svgMasterUnit
initSize
minSize
delimPart
delimScale
thin
medium
thick
rowElement
getMiddle — Determines the space between the baseline and the middle of the line. This middle is the horizontal bar of the plus operator.
computeSize
computeSizeMult — Compute the factor that will multiply (or divide) the initial size in the computeSize function.
unitInPx
getSpaceLiteral
chooseAttribute — Selects the best value between the three paramaters.
getFontNameVariant — Computes the variant of the font name with respect to the style parameters.
setStyle — Computes a CSS style rule for an element with respect to all style attributes.
stringWidth — Function that simply calls the stringWidth template.
stringWidth
math:math — Root element of the transformation.
II. Formatting mode
math:mi|math:mn|math:mtext|math:ms (in formatting mode) — Formatting a token element.
math:mspace (in formatting mode) — Formatting a space.
math:mo[not(@t:stretchVertical) or @t:stretchVertical != true()] (in formatting mode) — Formatting an operator.
math:mo[@t:stretchVertical = true()] (in formatting mode) — Correcting mode for an operator element.
chooseEntry — Chooses best entry in Operator Dictionary with respect to specification rules.
math:math|math:mrow|math:merror|math:mphantom|math:menclose|math:mstyle (in formatting mode) — Formatting a box element.
subMrow
alignChild
getStretchyEmbellished
getNonStretchyEmbellished
isEmbellished — Checks if an element is an embellished operator that has to stretch vertically, horizontally or both.
math:maction (in formatting mode) — Represents an action that reacts at a user sollicitation.
math:mfenced (in formatting mode) — Represents an expression enclosed by fences and separated by operators.
mfencedCompose
isPrime — Checks if an element is a prime token.
math:msup (in formatting mode) — Formatting a superscript.
math:msub (in formatting mode) — Formatting a subscript.
math:msubsup (in formatting mode) — Formatting both a superscript and a subscript.
math:mover (in formatting mode) — Formatting an overscript.
math:munder (in formatting mode) — Formatting an underscript.
math:munderover (in formatting mode) — Formatting both an underscript and an overscript.
math:mfrac (in formatting mode) — Formatting a fraction.
math:msqrt (in formatting mode) — Formatting a square root.
math:mroot (in formatting mode) — Formatting a n-ary root.
math:mtable (in formatting mode) — Formatting a table.
computeStretch
mtableWidth
mtableShiftY
mtableShiftX
math:mtr (in formatting mode) — This element represent a row of a table.
alignRow
math:mtd (in formatting mode) — This element represents a cell in a row. It has the same behaviour as a row element.
stretchRows
math:mtr (in stretch mode) — Correct width and height on a row.
stretchCols
math:mtd (in stretch mode) — Correct width and height on a cell.
III. Drawing mode
math:mi|math:mn|math:mtext|math:ms (in draw mode) — Drawing a token.
math:mspace (in draw mode) — Drawing a space.
math:mo (in draw mode) — Drawing an operator.
math:math|math:mrow|math:merror|math:mphantom|math:menclose|math:mstyle (in draw mode) — Drawing a box.
drawEnclose
math:msup (in draw mode) — Drawing a superscript.
math:msub (in draw mode) — Drawing a subscript.
math:msubsup (in draw mode) — Drawing both a superscript and a subscript.
math:mover (in draw mode) — Drawing an overscript.
math:munder (in draw mode) — Drawing an underscript.
math:munderover (in draw mode) — Drawing both an overscript and an underscript.
math:mfrac (in draw mode) — Drawing a fraction.
math:msqrt (in draw mode) — Drawing a square root.
math:mroot (in draw mode) — Drawing a n-ary root.
math:mtable (in draw mode) — Drawing a table.
drawRows
math:mtr (in draw mode) — Drawing a row in a table.
drawCols
math:mtd (in draw mode) — Drawing a cell of a table.
drawVerticalDelimiter
drawVerticalExtenser
drawHorizontalDelimiter
drawHorizontalExtenser
findBestSize — Finds a round number of extensers that will cover a space with a font size as near as possible to the initial font size.
IV. Font metrics stylesheet
findFont — Finds an existing font metrics file for a font name with respect to variants (italic, bold, etc.)
findWidth — Find the width of a character from a list of fonts. The first font of the list that contains the character will be used.
findWidthFile — Find the width of a character from a font metrics file.
findBbox — Find the bounding box of a character from a list of fonts. The first font of the list containing the character will be used.
findBbox — Finds the bounding box of a character from a list of font. The first font of the list that contains the character will be used.
findBboxFile — Finds the bounding box of a character from a font metrics file.
findHeight — Finds height and depth of a string from a list of font by using the bounding box (from metrics) of each character in the string. The first font of the list containing the character will be used.
findHeightAlt — Finds height and depth of a string from a list of font by using the bounding box (from metrics) of each character in the string. The first font of the list containing the character will be used.

List of Figures

1. Box for a token element

List of Examples

1. Bracket parts
2. Floor parts
3. Arrow parts
4. Curly Bracket parts
5. mfenced: original code
6. mfenced: replacement code
7. mfenced: renderer

List of Equations