AsciiMath - cannot add functions to symbols table
Created by: bhelzer
I used to be able to add functions to the input table by calling:
AM = MathJax.InputJax.AsciiMath.AM;
AM.symbols.push({
func: true,
input: 'asin',
output: 'asin',
tag: 'mi',
tex: null,
type: AM.TOKEN.UNARY
})
It appears that the new library initializes AM.symbols to the symbol table, but then makes copies of it every time somebody modifies it. If I am the first user, I can make the changes I want, but I don't have any control over that.
I could use the define
method, but it doesn't allow we to set the tag, or func attributes, so the parsing is incorrect. Can we make one of to changes:
- (Preferred) Enhance define to allow we to set tag and func, maybe let me pass in the object I want to set. It would be easy enough to detect the difference between 2 strings or an object.
- Or, keep AM.symbols up to date so I can modify it.