New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No access to AMprocessNode, newcommand, etc. #22
Comments
Definitely 2! |
Is there any particular benefit, downside, or preference to using ASCIIMATH vs AM as the global object name? I'm guessing we'll just comment out these lines in the MathJax ASCIIMath input jax, so probably doesn't matter in relation to that. |
AM seems like it might be more likely to conflict with other usage, so I'd recommend the longer ASCIIMATH as being far less likely to be a problem. If someone wants to alias AM to ASCIIMATH for brevity, that would be a choice she could make. |
Actually I'd write it all lowercase (and the long version) as it's not supposed to be instantiated and best practice in Javascript is to write only instantiable functions capital case. |
The closure in ASCIIMathML.js blocks access to translate(), AMprocessNode(), newcommand(), etc.
Access to some of these functions are required for a dynamic website to operate effectively. The question is how we want to address this:
Expose the functions: window.translate = translate, etc. The upside is that any existing dynamic applications will just work with the new version, no retooling necessary. The downside is that we're invading the global namespace with some fairly generic function names.
Create a global ASCIIMATH object (or AM or AMML), and attach the functions to that object. That way we're only adding one new global object to the namespace. Existing apps will need to be retooled.
The text was updated successfully, but these errors were encountered: