Comments (4)
I don't think \mod
works differently for MathJax than for TeX. Note that \mod
requires a parameter, in both LaTeX and MathJax, so \mod
by itself doesn't work in either case, but a \mod b
is fine. (Actually, $\mod$
is OK is LaTeX, because \mod
reads the dollar sign as its argument, and then inserts it back during the substitution of its definition, and when the dollar is read again, it closes math mode. This is a difference in how TeX reads its file compared to MathJax. MathJax determines the extent of the math before processing it, whereas TeX enters math mode when it sees a dollar, continues processing, and then leaves math mode when it sees another dollar. So the fact that LaTeX will process $\mod$
while MathJax doesn't has little to do with \mod
itself and everything to do with how the two determine what is inside math mode.)
As for the others, it depends on the document class in some cases, and also sometimes the macros involved, so it is not always as clear cut as we might like. Since this is not an intentional difference, some testing would need to be done in order to come up with this list. In general, however, MathJax requires braces whenever an argument to a macro consists of more than one token. It is TeX that is not consistent about this, so it is TeX that needs to be investigated to find out when this is not the case. It frequently has to do with whether the control sequence is actually a macro or is a TeX primitive, but that is not the only factor involved.
For example in TeX \vec \bf x
is OK but \vec \mathbf x
is not (neither is valid in MathJax). This is an interaction between \vec
and \bf
or \mathbf
, and the way that TeX collects the argument for a macro compared to that for a primitive. On the other hand, neither \sqrt \bf x
nor \sqrt \mathbf x
is valid (in TeX or MathJax).
So unless you want to document pairs of macros, I'm not sure how to do this. My own feeling is that the best way to handle it is simply to say that MathJax requires braces around any argument that is more than one token, even when TeX does not.
from mathjax-docs.
Thanks for the clarification, Davide!
from mathjax-docs.
Related: mathjax/MathJax#694
from mathjax-docs.
This is ancient history and today's docs are much better.
from mathjax-docs.
Related Issues (20)
- Bad links in docs.mathjax.org HOT 1
- MathJax.typesetPromise() HOT 1
- Wrong link to configuration pages
- Dead link in math editors wiki page HOT 1
- MathJax version in page title about lazy typesetting HOT 1
- MathJax CDN doesn't have some environments such as empheq HOT 3
- Typesetting and Converting Mathematics - errors in the code() example HOT 3
- Getting started documentation of of date HOT 2
- Problem with using lazy typesetting of mathjax HOT 1
- Circular link in documentation? Regarding configuration HOT 1
- input/tex/macros - link packages to their docs page HOT 4
- The style `border-spacing` of parent element affects how fractions are rendered
- More description needed for option `mathmlSpacing` HOT 1
- Hope give a funtion list for mathjax HOT 1
- [tagformat] correct way to disable id generation entirely HOT 2
- Is there any way to overwrite MathJax font family for math equation to apply font families like Arial, Tahoma, Courier New etc. HOT 2
- Can we migrated to MathJax.v3.2 version from V2 HOT 1
- Interfacing MathJax with PyScript and SymPy and Quarto
- Broken link on the 'Fonts q&a' page
- remove polyfill.io references HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mathjax-docs.