Skip to content
MathML and extensions
NeoMath

MathML and extensions

The MathML elements and attributes NeoMath draws, the neo:tamanho, neo:dx and neo:dy extensions and the rules for tables, large operators and arrows.

On this page

MathML is NeoMath’s central format: the editor, LaTeX and Word all go through it. This page lists what NeoMath draws beyond the basics and its own extensions. The internal unit is 1/32 of a point.

Normalization#

Before drawing, the normalizer (optional, on by default) cleans MathML coming from Word and the web: manual spaces, thousands separator, multiplication dot and pairs of parentheses, which become stretchy delimiters. Use --sem-normalizar on the command line or "normalizar": false in the options to turn it off.

Large operators#

  • Treated as large: ∑ ∏ ∫ ∐ (when they have limits or indices) and, always, ∬ ∭ ∮ ∯ ∰ ⋃ ⋂ ⋀ ⋁ ⨁ ⨂ ⨀. largeop="false" turns it off.
  • Sign size: the preferences’ symbol size (150% by default); inside indices, subsymbol.
  • munder, mover and munderover stack the limits; msub, msup and msubsup put them beside.

Sizes#

mathsize and neo:tamanho work on any element and propagate to children.

Attribute Values
mathsize absolute (12pt, 16px, 1in, 5mm, 1cm, 1pc), relative (150%, 1.5em, 1.5) and names (small, normal, big, tiny, huge…)
neo:tamanho cheio, indice, subindice, simbolo, subsimbolo, livre1, livre2 (read from preferences) or a measure

An element with an explicit size becomes the full size of its subtree: indices inside it use the index proportions over the new size. If both attributes appear, neo:tamanho wins.

Fine offset#

neo:dx and neo:dy move only the drawing of any element, in points (or in mathsize units). Positive dx goes right; positive dy goes up. Advance, box and neighbor spacing do not change.

XML
<math><mi>x</mi><mo neo:dy="1.5">′</mo></math>

Tables#

A simple mtable uses the usual path. With any attribute below, it uses the extended path:

Attribute Effect
columnspan, rowspan merge cells
columnalign (on the table, the row or the cell) left, right, center
rowalign baseline, axis, top, bottom, center
columnwidth absolute minimum width (60pt, 2em) or auto
equalrows, equalcolumns rows or columns of the same size
rowlines, columnlines, frame none, solid or dashed strokes
mlabeledtr with side equation labels on the right or left
maligngroup, malignmark, neo:alinhar="igual" aligning equations on the relation sign

Labeled arrows and horizontal braces#

  • An arrow (→ ← ↔ ⇒ ⇐ ⇔ ⇌ ↦ and the long ones) as the base of mover, munder or munderover becomes a labeled arrow, which grows with the label: max(1.2 em, label + 0.6 em).
  • mover(base, ⎴) and munder(base, ⎵) draw horizontal brackets, with an optional label on the other side.

Alphabets#

  • mathvariant on mi, mn, mtext and ms: bold, italic, bold-italic, script, bold-script, fraktur, bold-fraktur, double-struck, sans-serif (and bold and italic) and monospace.
  • Characters from the Unicode mathematical alphanumeric block (U+1D400 to U+1D7FF) equal the plain letter with the matching variant.
  • double-struck has only uppercase; script has uppercase and digits. What the font lacks comes out with the error symbol, without breaking the layout.

Double brackets and other enclosures#

  • ⟦ ⟧ (also 〚 〛), by mfenced or by a loose pair of mo, drawn with the single bracket and an inner stroke.
  • menclose with the notations box, roundedbox, circle, longdiv, actuarial, updiagonalstrike, downdiagonalstrike, horizontalstrike, top, bottom and combinations.
  • mphantom, mpadded, mmultiscripts, ms, semantics and maction are also accepted.

Color#

mathcolor accepts #RRGGBB, names and device-cmyk(C% M% Y% K%). See Color in RGB and CMYK.