Open scruel opened 2 years ago
This is outside the scope of MathJax's mission. MathJax doesn't implement the low-level looping and flow-control macros of TeX and LaTeX. This is partly to avoid code bloat for control sequences that are going to be rarely used, but also because MathJax is written in javascript (which already has such control structures), and you can implement your own control sequences with javascript definitions. How that is done depends on which version of MathJax you are using, but there are certainly examples in the issues here and in the MathJax user's forum.
If you are really keen on having such macros, you could write a TeX input jax extension that implements them. That would be a nice project, and a useful contribution to MathJax.
Also, I think \foreach
is a TikZ command, not a regular LaTeX command, but I'm not certain about that. And is the dollar sign in your example supposed to be an ampersand?
Ok, I should have some time to do this after I completed docsify-latex repo. Ignore the example, I just write it without thinking carefully. :)
I was looking at issues with the tag "good first contribution" and found this issue. If the feature is outside the scope of the MathJax vision, how can this be seen as a "good first contribution"? I thought "outside scope" meant that a contribution in that direction is not likely to be accepted.
@soegaard, sorry for the confusion on this. When I say that something is outside the scope of MathJax's mission, that means that either we don't have the resources to do it (either time or money), or that the design of MathJax precludes it. For an example of the latter, we don't support TeX's concept of catcodes, and it would be very difficult to add that in without some major redesign.
The request here, however, could be done, but is not something we have the time or funding to do. But someone interested in contributing to MathJax could write a third-party extension that implements it, and we would consider including that in a collection of contributed extensions. That is why I listed it as a good first contribution. Perhaps a better label for third-party contribution is needed.
Thanks for the clarification.
I want to simulate some commands which supported by amsmath package, but without logic control, it won't be possible, so I wonder is there any way to do this, or will you add this feature?
Syntax might like this:
Invoke
\hdotsfor{3}
will get: $$ \cdots & \cdots & \cdots $$