MathML Conformance

AH Formatter V7.1 enables to render Mathematical Markup Language (MathML) Version 3.0 2nd Edition (PDF version) defined by W3C utilizing its originally developed engine. For that reason it's possible to render high resolution images in PDF. See also Graphics to learn how to utilize MathML. See also Option Setting File.

AH Formatter V7.1 Lite customers must purchase “AH Formatter MathML Option” to render MathML originally. For more details, see also Antenna House website.

The below table shows the implemented MathML elements and attributes.

  • [yes] in the list means that the element or property is implemented.
  • [partial] means that the element or property is partially implemented.
  • [no] means not implemented.

Presentation Markup

ElementAttributeConditionComments
2.1.6 id yesEvaluates the following CSS properties:
  • font-family
  • font-weight
  • font-style
  • font-size
  • color
  • background-color
As for id and class, external CSS settings will be reflected. The setting takes precedence over the setting by mathvariant, fontfamily, etc. that are specified within the same tag. In CSS, the CSS property specified to <math> is evaluated as a property of the image even if it's not listed above.
class yes
style yes
href yesA hyperlink does not work.
xref no
other no [deprecated attribute]
2.2 <math> yes xmlns="http://www.w3.org/1998/Math/MathML"
display yesThe default value can be changed in the Option Setting File.
maxwidth yes
overflow partialImplements linebreak only. Except for linebreak, the automatic line breaking does not occur but the line overflows. It has been extended to accept the value of none. This does not output an error message.
altimg noIgnored.
altimg-width noIgnored.
altimg-height noIgnored.
altimg-valign noIgnored.
alttext yes
cdgroup no
macros no [deprecated attribute]
mode yes [deprecated attribute] The setting by display takes precedence.
3.1.10 mathcolor yes
mathbackground yes
3.2.1.2 <mglyph> yes
src yesSupports only to raster images, such as JPEG or PNG.
width yes
height yes
valign yes
alt yes
fontfamily yes [deprecated attribute] Invalid when src is specified.
index yes [deprecated attribute] Invalid when src is specified. The value of index is considered GlyphID.
3.2.2 mathvariant partial initial, tailed, looped and stretched are not supported.
mathsize yes
dir yes
fontfamily yes [deprecated attribute] When mathvariant is used together, the effect is not guaranteed.
fontweight yes [deprecated attribute] When mathvariant is used together, the effect is not guaranteed.
fontstyle yes [deprecated attribute] When mathvariant is used together, the effect is not guaranteed.
fontsize yes [deprecated attribute] When mathsize is used together, the effect is not guaranteed.
color yes [deprecated attribute] When mathcolor is used together, the effect is not guaranteed.
background yes [deprecated attribute] When mathbackground is used together, the effect is not guaranteed.
3.2.3 <mi> yesAlthough it is not written in the specification that a number, such as <mi>3</mi> is not made italic, the number does not become italic after the model of lots of implementations. This restriction can be adjusted in the Option Setting File.
3.2.4 <mn> yes
3.2.5 <mo> yes
form yes
lspace yesThe default value can be changed in the Option Setting File when it's not registered to the operator dictionary.
rspace yesThe default value can be changed in the Option Setting File when it's not registered to the operator dictionary.
fence yes
separator noIgnored.
stretchy yes The extension was made so that the signed length can be specified with a value like stretchy="-0.2em". Note that an unsigned length cannot be specified. Specifying a signed length also means true. Normally a character is stretched by keeping the original width, etc. By specifying a positive length for stretchy, the character is stretched to both left and right (or upwards and downwards) to the specified length. On the other hand, by specifying a negative length for stretchy, the character will be shrunk to the specified length. This length is affected by the restrictions of minsize and maxsize.
symmetric yes
maxsize yes
minsize yesThe default value can be changed in the Option Setting File.
largeop yes
movablelimits yes
accent yes
linebreak yes
lineleading yesThe default value is 0. The default value can be changed in the Option Setting File.
linebreakstyle yes
linebreakmultchar yes
indentalign yes
indentshift yes
indenttarget yesThe effect is not guaranteed when the id referenced by the attribute is behind the attribute or is in a position that does not allow for reference.
indentalignfirst yes
indentshiftfirst yes
indentalignlast yes
indentshiftlast yes
3.2.6 <mtext> yes
3.2.7 <mspace> yes mathvariant, mathcolor are invalid.
width yes
height yes
depth yes
linebreak yes indentingnewline was abolished. Although it's considered newline, the amount of indents can be specified in the Option Setting File. That value will be added to the value of indentshift.
indentalign yes
indentshift yes
indenttarget yesThe effect is not guaranteed when the id referenced by the attribute is behind the attribute or is in a position that does not allow for reference.
indentalignfirst yes
indentshiftfirst yes
indentalignlast yes
indentshiftlast yes
3.2.8 <ms> yesAn escape character can be changed in the Option Setting File. The escape processing is not performed when lquote and rquote are empty.
lquote yes
rquote yes
3.3.1 <mrow> yes
dir yes
3.3.2 <mfrac> yes
linethickness yes
numalign yes
denomalign yes
bevelled yes
3.3.3 <msqrt> yes
3.3.3 <mroot> yes
3.3.4 <mstyle> yes
scriptlevel yesApplicable to <math>.
displaystyle yesApplicable to <math>.
scriptsizemultiplier yesApplicable to <math>. The default value can be changed in the Option Setting File.
scriptminsize yesApplicable to <math>. The default value can be changed in the Option Setting File.
infixlinebreakstyle yesApplicable to <math>.
decimalpoint yesApplicable to <math>.
any attributes yesApplicable to <math>. Accepts the following:
accent accentunder align alignmentscope bevelled charalign charspacing close columnalign columnlines columnspacing columnspan columnwidth crossout denomalign depth dir edge equalcolumns equalrows fence form frame framespacing groupalign height indentalign indentalignfirst indentalignlast indentshift indentshiftfirst indentshiftlast indenttarget largeop leftoverhang length linebreak linebreakmultchar linebreakstyle lineleading linethickness location longdivstyle lquote lspace mathsize mathvariant maxsize minlabelspacing minsize movablelimits mslinethickness notation numalign open position rightoverhang rowalign rowlines rowspacing rowspan rquote rspace selection separator separators shift side stackalign stretchy subscriptshift superscriptshift symmetric valign width
These are default values of the associated attributes that belong to the internal elements.
veryverythinmathspace yes [deprecated attribute]
verythinmathspace yes [deprecated attribute]
thinmathspace yes [deprecated attribute]
mediummathspace yes [deprecated attribute]
thickmathspace yes [deprecated attribute]
verythickmathspace yes [deprecated attribute]
veryverythickmathspace yes [deprecated attribute]
fontfamily yes [deprecated attribute]
fontweight yes [deprecated attribute]
fontstyle yes [deprecated attribute]
fontsize yes [deprecated attribute]
color yes [deprecated attribute]
background yes [deprecated attribute]
3.3.5 <merror> yes The display style can be specified in the Option Setting File.
3.3.6 <mpadded> yes
width yes
height yes
depth yes
lspace yes
voffset yes
3.3.7 <mphantom> yes
3.3.8 <mfenced> yes
open yes
close yes
separators yes
3.3.9 <menclose> yes
notation partial *arrow and madruwb are not implemented. A circle will be inscribed against the boundary rectangle. This can be changed so circle can be circumscribed with Option Setting File. The extension was made so that a circumscribed circle can be explicitly expressed with circumscribed-circle and an inscribed circle can be explicitly expressed with inscribed-circle.
3.4.1 <msub> yes
subscriptshift yes
3.4.2 <msup> yes
superscriptshift yes
3.4.3 <msubsup> yes
subscriptshift yes
superscriptshift yes
3.4.4 <munder> yes
accentunder yes
align yes
3.4.5 <mover> yes
accent yes
align yes
3.4.6 <munderover> yes
accent yes
accentunder yes
align yes
3.4.7 <mmultiscripts> yes
3.4.7 <mprescripts> yes
3.4.7 <none> yes
3.5.1 <mtable> yes
align yes
rowalign yes
columnalign yes
groupalign yes
alignmentscope no
columnwidth yes
width yes
rowspacing yes The default value can be changed in the Option Setting File.
columnspacing yes The default value can be changed in the Option Setting File.
rowlines yes
columnlines yes
frame yes
framespacing yes The extension was made so that three lengths of the frame spacing can be specified. The third length can be omitted, and when specified, it shows the spacing of left/right where frame="none" is specified. The default value can be changed in the Option Setting File.
equalrows yes
equalcolumns yes
displaystyle yes
side partial leftoverlap and rightoverlap are respectively considered left and right.
minlabelspacing yes
3.5.2 <mtr> yes
rowalign yes
columnalign yes
groupalign yes
3.5.3 <mlabeledtr> yes
3.5.4 <mtd> yes
rowspan yes
columnspan yesIf a cell has columnspan greater than 1, <maligngroup> will be ignored.
rowalign yes
columnalign yes
groupalign yes
3.5.5 <maligngroup> yesIf <maligngroup> is not inside <mtd>, <maligngroup> will be ignored.
groupalign yes
3.5.5 <malignmark> yesIf <malignmark> is not inside <mtd>, <malignmark> will be ignored.
edge yes
3.6.1 <mstack> yes
align yes
stackalign yes
charalign yes
charspacing yesThe space corresponding to tight, medium, and loose can be specified in the Option Setting File. The automatic adjustment of the space is not performed.
3.6.2 <mlongdiv> yesWhen <msrow> is not contained in the divisor or the result, it is considered an error. It is also possible to apply <mscarries> to the divisor, the dividend, and the result.
longdivstyle yes
3.6.3 <msgroup> yes
position yes position is ignored with the divisor of <mlongdiv>. Also position is ignored with the result of <mlongdiv> when it is not positioned on a dividend.
shift yes
3.6.4 <msrow> yes
position yes position is ignored with the divisor of <mlongdiv>. Also position is ignored with the result of <mlongdiv> when it is not positioned on a dividend.
3.6.5 <mscarries> yesWhen <msrow> does not follow <mscarries>, it is considered an error.
position yes
location partial Corresponds to n, ne and nw. Others are considered n.
crossout yes
scriptsizemultiplier yes
3.6.6 <mscarry> yes
location partial Corresponds to n, ne and nw. Others are considered n.
crossout yes
3.6.7 <msline> yes
position yes
length yes
leftoverhang yes
rightoverhang yes
mslinethickness yes
3.7.1 <maction> yes
actiontype yesWhen actiontype="toggle" is specified, the element specified to selection is displayed, in other cases, only the first element is displayed.
selection yes

Content Markup

It's impossible to change the appearance with reference to the external Content Dictionary dynamically. It is not necessarily displayed similarly as the illustration of MathML3 specifications.

ElementAttributeConditionComments
4.2 encoding no
definitionURL no
4.2.1 <cn> yes
type yes
base yes
4.2.1 <sep> yes
4.2.2 <ci> yes
type noIgnored.
4.2.3 <csymbol> partial
type no
cd no
4.2.4 <cs> yes
4.2.5 <apply> yesAs for the shortage and excess of an operand corresponding to an operator, the appearance can be adjusted by enclosing the operand with parentheses and applying <merror>.
4.2.6 <bind> yes
4.2.6 <bvar> yes
4.2.7 <share> yesSupports to the reference only to itself, href="#id".
src no
4.2.9 <cerror> yes
4.2.10 <cbytes> yes
4.3.3.1 <domainofapplication> yes
4.3.3.1 <condition> yes
4.3.3.1 <lowlimit> yes
4.3.3.1 <uplimit> yes
4.3.3.2 <degree> yes
4.3.3.3 <momentabout> yes
4.3.3.3 <logbase> yes
4.4.1.1 <interval> yes
4.4.1.2 <inverse> yes
4.4.1.3 <lambda> yes
4.4.1.4 <compose> yes
4.4.1.5 <ident> yes
4.4.1.6 <domain> yes
4.4.1.7 <codomain> yes
4.4.1.8 <image> yes
4.4.1.9 <piecewise> yes
4.4.1.9 <piece> yes
4.4.1.9 <otherwise> yes
4.4.2.1 <quotient> yes
4.4.2.2 <factorial> yes
4.4.2.3 <divide> yes
4.4.2.4 <max> yes
4.4.2.5 <min> yes
4.4.2.6 <minus> yes
4.4.2.7 <plus> yesAlthough there is no unary “+” in the specification, the following way of writing is allowed:
<apply>
 <plus/>
 <ci>x</ci>
</apply>
4.4.2.8 <power> yes
4.4.2.9 <rem> yes
4.4.2.10 <times> yesUsually, U+2062 (&InvisibleTimes;) is used, however when a second operand is <cn>, U+00D7 (&times;) is used as follow:
<apply>
 <times/>
 <cn>1</cn>
 <cn>7</cn>
</apply>
4.4.2.11 <root> yes
4.4.2.12 <gcd> yes
4.4.2.13 <and> yes
4.4.2.14 <or> yes
4.4.2.15 <xor> yes
4.4.2.16 <not> yes
4.4.2.17 <implies> yes
4.4.2.18 <forall> yes
4.4.2.19 <exists> yes
4.4.2.20 <abs> yes
4.4.2.21 <conjugate> yes
4.4.2.22 <arg> yes
4.4.2.23 <real> yes
4.4.2.24 <imaginary> yes
4.4.2.25 <lcm> yes
4.4.2.26 <floor> yes
4.4.2.27 <ceiling> yes
4.4.3.1 <eq> yes
4.4.3.2 <neq> yes
4.4.3.3 <gt> yes
4.4.3.4 <lt> yes
4.4.3.5 <geq> yes
4.4.3.6 <leq> yes
4.4.3.7 <equivalent> yes
4.4.3.8 <approx> yesU+2248 (&TildeTilde;) is used as specified in MathML2 specifications or TeX, although U+2243 (&TildeEqual;) is used in MathML3 specifications.
4.4.3.9 <factorof> yes
4.4.4.1 <int> yes
4.4.4.2 <diff> yes
4.4.4.3 <partialdiff> yes
4.4.4.4 <divergence> yes
4.4.4.5 <grad> yes
4.4.4.6 <curl> yes
4.4.4.7 <laplacian> yes
4.4.5.1 <set> yes
type noIgnored.
4.4.5.2 <list> yes
order noIgnored.
4.4.5.3 <union> yes
4.4.5.4 <intersect> yes
4.4.5.5 <in> yes
4.4.5.6 <notin> yes
4.4.5.7 <subset> yes
4.4.5.8 <prsubset> yes
4.4.5.9 <notsubset> yes
4.4.5.10 <notprsubset> yes
4.4.5.11 <setdiff> yes
4.4.5.12 <card> yes
4.4.5.13 <cartesianproduct> yes
4.4.6.1 <sum> yes
4.4.6.2 <product> yes
4.4.6.3 <limit> yes
4.4.6.4 <tendsto> yes
type yes
4.4.7.1 <sin> yes
4.4.7.1 <cos> yes
4.4.7.1 <tan> yes
4.4.7.1 <sec> yes
4.4.7.1 <csc> yes
4.4.7.1 <cot> yes
4.4.7.1 <sinh> yes
4.4.7.1 <cosh> yes
4.4.7.1 <tanh> yes
4.4.7.1 <sech> yes
4.4.7.1 <csch> yes
4.4.7.1 <coth> yes
4.4.7.1 <arcsin> yes
4.4.7.1 <arccos> yes
4.4.7.1 <arctan> yes
4.4.7.1 <arccosh> yes
4.4.7.1 <arccot> yes
4.4.7.1 <arccoth> yes
4.4.7.1 <arccsc> yes
4.4.7.1 <arccsch> yes
4.4.7.1 <arcsec> yes
4.4.7.1 <arcsech> yes
4.4.7.1 <arcsinh> yes
4.4.7.1 <arctanh> yes
4.4.7.2 <exp> yes
4.4.7.3 <ln> yes
4.4.7.4 <log> yes
4.4.8.1 <mean> yes
4.4.8.2 <sdev> yes
4.4.8.3 <variance> yes
4.4.8.4 <median> yes
4.4.8.5 <mode> yes
4.4.8.6 <moment> yes
4.4.9.1 <vector> yes
4.4.9.2 <matrix> yes
4.4.9.3 <matrixrow> yes
4.4.9.4 <determinant> yes
4.4.9.5 <transpose> yes
4.4.9.6 <selector> yes
4.4.9.7 <vectorproduct> yes
4.4.9.8 <scalarproduct> yes
4.4.9.9 <outerproduct> yes
4.4.10.1 <integers> yes
4.4.10.2 <reals> yes
4.4.10.3 <rationals> yes
4.4.10.4 <naturalnumbers> yes
4.4.10.5 <complexes> yes
4.4.10.6 <primes> yes
4.4.10.7 <exponentiale> yes
4.4.10.8 <imaginaryi> yes
4.4.10.9 <notanumber> yes
4.4.10.10 <true> yes
4.4.10.11 <false> yes
4.4.10.12 <emptyset> yes
4.4.10.13 <pi> yes
4.4.10.14 <eulergamma> yes
4.4.10.15 <infinity> yes
4.5.1 <declare> no [deprecated element] Ignored.
<reln> yes [deprecated element]
<fn> yes [deprecated element]

Mixing Markup

ElementAttributeConditionComments
5.2.1 <semantics> partialThe <semantics> tag itself is ignored.
5.2.2 <annotation> noIgnored.
5.2.3 <annotation-xml> noIgnored.

Operator Dictionary

What is written in the MathML 3.0 2nd Edition is implemented as is in the operator dictionary. However, the following operators are added:

CharacterGlyphNameformprioritylspacerspacePropertiesRemark
U+FE37presentation form for vertical left curly bracketpostfix88000stretchy, accentrecommend to use U+23DE
U+FE38presentation form for vertical right curly bracketpostfix88000stretchy, accentrecommend to use U+23DF

The contents of the operator dictionary can be adjusted with the Option Setting File. There are the following restrictions:

  • priority is not supported.
  • separator is ignored.

The default operator dictionary which can be used with the Option Setting File is stored in OperatorDictionary.xml. AH Formatter V7.1 does not refer to this file. It is recommended to extract and use the portion of an operator you want to change.

DTD of the operator dictionary is as follows:

<!ELEMENT operator-dictionary entry*>
<!ELEMENT entry EMPTY>
<!ATTLIST entry operator       CDATA #REQUIRED>
<!ATTLIST entry form           (prefix|infix|postfix) #REQUIRED>
<!ATTLIST entry priority       %integer; "0">
<!ATTLIST entry lspace         (0|1|2|3|4|5|6|7) "5">
<!ATTLIST entry rspace         (0|1|2|3|4|5|6|7) "5">
<!ATTLIST entry minsize        %length; #IMPLIED>
<!ATTLIST entry maxsize        %length: #IMPLIED>
<!ATTLIST entry accent         (false|true) "false">
<!ATTLIST entry fence          (false|true) "false">
<!ATTLIST entry separator      (false|true) "false">
<!ATTLIST entry stretchy       (false|true) "false">
<!ATTLIST entry symmetric      (false|true) "false">
<!ATTLIST entry largeop        (false|true) "false">
<!ATTLIST entry movablelimits  (false|true) "false">
<!ATTLIST entry linebreakstyle (before|after|duplicate) "before">

Character Substitutions

With MathML, some inputted characters will be substituted for processing. In case of AH Formatter V7.1, characters are substituted as below.

  • The characters inside <mi>, <mn> and <mo> are substituted. For instance:
    1. U+0027 U+0027 U+0027 U+0027 is substituted with U+2057
    2. U+0027 U+0027 U+0027 is substituted with U+2034
    3. U+0027 U+0027 is substituted with U+2033
    4. U+0027 is substituted with U+2032
    5. U+002D is substituted with U+2212
    each.
  • For the characters inside the other tags like <mtext>, U+002D is substituted with U+2010.

You can make the substitution invalid with Option Setting File.

Character Entity References

Restrictions

  • The line breaking does not occur within the elements below.
    • <mfrac>
    • <menclose>
    • <msub>
    • <msup>
    • <msubsup>
    • <munder>
    • <mover>
    • <munderover>
    • <mmultiscripts>
    • <msqrt>
    • <mroot>
    • <mstack>
    • <mlongdiv>
  • The automatic line breaking does not occur within the elements below.
    • <mtable>
  • Complicated scripts, such as Arabic, are not supported.
  • When dir="rtl" is specified, although horizontal reverse processing of a region is performed, a root sign or Σ, etc. will not be mirrored.
  • Many of <csymbol> are not implemented.
  • Many of <bvar> includes unknown implementation method.