-
Notifications
You must be signed in to change notification settings - Fork 31
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
Mimicking LaTeX Physics Package #16
Conversation
Very cool! This is an awesome addition and looks good to me. There's only a small, formal problem: you should add licensing information to both the packed and the unpacked extension. Otherwise, your code has no actual license :-( You might want to compare how the other extensions do it. |
Thanks! This is the first time I submitted anything open source so I missed that. I thought the license.txt is enough. I also want to ask a question: in the Physics package in LaTeX, some commands are defined with optional arguments.
Are there a way to write MathJax Macro like this too? Thanks! |
Sorry for the delay, I was travelling. Thanks for updating the PR. Regarding the questions,
|
Thanks for the reply. I tried to follow the first link and write something like: |
Hm. I'm not sure what's happening. @dpvc could you help out? |
Macro names in TeX are either a single character (like What I notice that a number of the macros in the physics package allow arguments in parentheses as well as braces. For that, you would need to do something like the At some point, you will probably need to produce the internal MathML rather than just do string substitutions. You should look at the functions in the TeX input jax, like Frac, and the others nearby for examples of how that is done. See also the Extension Authoring wiki page for some more details. It would be great to have some more good examples of this, so if you want to extend the functionality of your physics extension, that would be great. You can ask questions here, or on the MathJax Development Forum. |
@kolencheung did you want to work on this some more or should I merge it? |
In LaTeX, when you
\usepackage{physics}
, you used the LaTeX Physics Package.This extension is to mimick that in MathJax.