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 "!<=" and "!>=".

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 !<= b !>= c\` produces `a !<= b !>= c`

To add a symbol to the LaTeX commands, use the following alternate syntax:

<script type="text/javascript">

Now \$a \nle b \nge c\$ produces $a \nle b \nge 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.