ASCIIMathML.js: Extending the symbol table

The standard symbol table of ASCIIMathML.js does not contain many symbols. It can be extended by adding additional symbols on any webpage that requires them. This is done by adding a few lines of JavaScript code.

For example, suppose we want to add symbols for "not less or equal" and "not greater or equal".

We first have to find the four-digit hexadecimal Unicode value for these symbols by looking them up at, say,

Next we have to decide what input strings we want to associate with these symbols, say "!le" and "!ge".

Finally we add the following lines to the head or body of our HTML file:

<script type="text/javascript">

Here we test the modified symbol table:

`a !le b !ge c`
produces `a !le b !ge c`

If you know the numeric entity reference of the symbol you want to use on an ASCIIMathML webpage, you can also refer to the symbol directly by using that reference. E.g \`&#x2270;\` produces `≰`. If a symbol is only used occasionally, this is certainly the simplest way to include it.