Skip to content
Metanorma
On this page

AsciiMath support

Metanorma uses the Plurimath to process AsciiMath, converting it to MathML for Metanorma processing.

For rendering in HTML, the MathML generated is processed by MathJax for browser compatibility.

For rendering in Word, the MathML is converted to OOML (the math format of Office Open XML (OOXML)).

Note
AsciiMath only recognises decimal points and not decimal commas. Any attempt to use a decimal comma (e.g. 3,4) will be processed as an operator, and will end up treating the integer and fractional parts of the number as two separate numerals, separated by a space as well as a comma. This applies to all versions of Asciimath.

Plurimath AsciiMath

The version of AsciiMath supported by Plurimath parser is slightly different to other variants of AsciiMath. The following are differences between Plurimath and the version of AsciiMath documented on asciimath.org:

Miscellaneous symbols

Plurimath adds the following as distinct symbols:

dx
dx identifier
dy
dy identifier
dz
dz identifier
dt
dt identifier

...:: ... operator

”\ “
non-breaking space
qquad
four non-breaking spaces (just as quad is processed as two non-breaking spaces)
lim
lim operator
Lim
Lim operator
’`
prime operator, ′
:'
∵
/_\
△
frown
⌢

Relation symbols

Plurimath adds the following as distinct symbols:

:=
:= operator

Operation symbols

setminus:: divide:: ÷

:|:
| as operator

Logical symbols

No difference.

Grouping brackets

Plurimath adds the following as distinct brackets:

|:
| as left bracket
:|
| as right bracket

Arrows

No difference.

Accents

The following operators are currently missing from Plurimath:

  • color(red)(x)
  • cancel(x)

Plurimath adds the following as distinct accents

tilde
~
overarc
⏜

Greek letters

Plurimath supports several capital letter symbols, which are not named in asciimath.org:

Alpha
Alpha
Beta
Beta
Epsilon
Epsilon
Zeta
Zeta
Eta
Eta
Iota
Iota
Kappa
Kappa
Mu
Mu
Nu
Nu
Rho
Rho
Tau
Tau
Upsilon
Upsilon
Chi
Chi

Standard functions

No difference.

Font commands

The following are font commands supported by Plurimath, in addition to those named in Asciimath.org.

ii
italic font
bii
bold italic font
bcc
bold script font
bfr
bold fraktur font
bsf
bold sans serif font
sfi
italic sans serif font
sfbi
sans serif bold italic font

Conversion to Word OOXML

AsciiMath and MathJax processors are tolerant of loose syntax in mathematical expressions.

Currently the conversion of MathML to OOXML is not as tolerant: if a mathematical operator takes a single argument, the OOXML expects to find that argument brackets as a single entity. If that does not happen, Word displays a dotted square where it would expect the single argument to appear. To remedy this, you will need to bracket the argument of the operator in invisible brackets ({:, :}).

For example, the following AsciiMath displays correctly in HTML under MathJax:

[stem]
++++
bar X' = (1)/(v) sum_(i = 1)^v t_i
++++

However, it displays incorrectly in Word with an extraneous “square”:

That is because the sum operator expects to find a single expression as its argument, but t_i is processed as two tokens. To get this expression processed correctly for Word, you will need to bracket t_i:

[stem]
++++
bar X' = (1)/(v) sum_(i = 1)^v {:t_i:}
++++

and it should display correctly as:

Edit this page on GitHub →