# Poll for MathJax macros that should be automatically loaded

Prompted by Geoff in comments to this question, I thought of creating a poll of sorts where we can propose macros/extensions that should be automatically loaded for our MathJax installation here. Unfortunately I don't know where to get a list of the macros that are supported but not autoloaded by the beta MathJax, so maybe some kind soul could edit this question to include them.

The idea here is to post one answer for every macro/extension wished for, and then let the net amount of votes (up minus down) decide if autoloading should be considered by Geoff and the other devs.

Edit (W.W.): Since there are only seven sets of macros that are not automatically loaded, I've gone ahead and posted a stub for each of them (except for the chemistry specific one and cancel which J.M. already mentioned). See Davide Cervone's answer for what commands are offered by each of the macros, and links to the relevant MathJax documentation.

• Can you provide some linkage to a list of all macros and what they do?
– Asaf Karagila Mod
Feb 18 '12 at 16:52
• @Asaf You can find the extensions for 2.0 in this directory and its subdirectories. It's just source files for now, but the documentation inside of those files seems pretty good. Feb 18 '12 at 17:54
• The list of macros in version 2.0 includes which extension they are in, and whether that macro autoloads the extension or not. Feb 25 '12 at 17:55
• I wonder if there's a chance of any of these ever getting auto-loaded... Aug 14 '12 at 11:05

Vote on this answer if you'd like to see the color macro loaded.

Vote on this answer if you'd like the begingroup macro to be loaded.

• see here and here for details Oct 25 '13 at 8:12

To start off:

I wish for the cancel extension to be automatically loaded.

The extensions that are not autoloaded, plus the macros they define are

• action: \mathtip, \texttip, \toggle

• begingroup: \begingroup, \endgroup, \gdef, \global

• cancel: \cancel, \bcancel, \xcancel, \cancelto

• color: \color, colorbox, fcolorbox, \DefineColor

• enclose: \enclose,

• extpfeil: \Newextarrow, \xlongequal, \xmapsto, \xtofrom, \xtwoheadleftarrow, \xtwoheadrightarrow

• mhchem: \ce, \cee, \cf

There are also a bunch of macros in the AMSmath and AMSsymbols extensions that aren't autoloaded, but the configuration used here already includes those, so I don't list them here.

Some of these are non-standard (e.g., the action and enclose extensions, which give you access to the underlying MathML elements). These are documented in the TeX support documentation.

I expect that SO and SE will eventually include the begingroup extension so that they can isolate definitions to the question/answer/comment that defines them (it was because of that need that I added the begingroup extension in the first place). So that doesn't leave too many that aren't available.

Finally, there is a new extension, autoload-all, that will pre-define all the macros that are defined in any extension to autoload that extension, so if SO and SE include that extension, it will make all the macros available in one step (without having to load all the extension files, as they will be loaded only when they are actually needed). That extension was added in response to this discussion.

Hope that helps.

• heh, seeing that there are only 7 macros not loaded in the SO/SE, this question is now a little silly. Anyway, I'm posting below (in addition to J.M's wish for cancel) an answer for each of the macros (except for mhchem which I guess is more useful on a chemistry stackexchange), so people can vote on them if they choose. Feb 26 '12 at 16:53
• I agree wholly with Willie. I am very much against mhchem, since I often define \cf in my posts.
– Asaf Karagila Mod
Feb 26 '12 at 20:27
• What would be cool would be if every post (answer and question, not necessarily comments) is automatically enclosed in a \begingroup block and each registered user gets to set a set of personal favourite macros in the math.se profile to be autoloaded for his/her posts. Feb 27 '12 at 10:16

Vote on this answer if you'd like the extpfeil macro loaded.

(This macro is for extensible arrows.)

Vote on this answer if you'd like the enclose macro be loaded.

Vote on this answer if you'd like the action macro loaded.

Note this only applies to unstarred environments such as \begin{align} and as suggested elsewhere all currently existing unstarred environments should be autoconverted into starred ones so no numbers suddenly appear where they have not been intended to be.

• I am against the auto-numbering and in favor of begingroup (which I think should include the comments to the post). Since you posted them together, the stronger preference took my vote and I voted down.
– Asaf Karagila Mod
Oct 25 '13 at 8:45
• Also, Willie already posted an answer for the begin/endgroup. So it really makes no sense putting it up again.
– Asaf Karagila Mod
Oct 25 '13 at 8:46
• In order to avoid confusing re-numbering when answers change order, either begingroup / endgroup should be put around each post or a per-post prefix be added Oct 25 '13 at 8:47
• @AsafKaragila Ok, edited. Especially note that this only would apply to new equations in unstarred environments, usual math blocks in $..$ and $$..$$ would not be influenced by this Oct 25 '13 at 8:50
• I don't understand why people are so against this. I don't see any downside except for typing one character more if you don't want automatic equation numbering. Having this as a habit wouldn't be that bad as latex also works in this way. Nov 8 '13 at 9:44
• @Kasper I don't know. But I can't write the disclaimer in ALL-CAPS just to get people to actually read it before voting... Nov 8 '13 at 9:49

I really wish AMSMath \substack worked. It is really useful when we write optimization problems. But I guess it is a problem with MathJax...

• I believe the command is \substack not \substacks, and MathJax does support that, e.g., X_{\substack{a=1\\b=2}} produces $X_{\substack{a=1\\b=2}}$ Jan 19 '14 at 21:21
• MathJax does support \substack, as illustrated in my previous comment. So I'm not sure what the problem is that you are having. Perhaps you can give an example of what you are doing that doesn't seem to work? Jan 21 '14 at 16:13