16
$\begingroup$

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.

$\endgroup$
  • 1
    $\begingroup$ Can you provide some linkage to a list of all macros and what they do? $\endgroup$ – Asaf Karagila Feb 18 '12 at 16:52
  • 1
    $\begingroup$ @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. $\endgroup$ – Dylan Moreland Feb 18 '12 at 17:54
  • 2
    $\begingroup$ The list of macros in version 2.0 includes which extension they are in, and whether that macro autoloads the extension or not. $\endgroup$ – Davide Cervone Feb 25 '12 at 17:55
  • $\begingroup$ I wonder if there's a chance of any of these ever getting auto-loaded... $\endgroup$ – J. M. is a poor mathematician Aug 14 '12 at 11:05
13
$\begingroup$

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

$\endgroup$
13
$\begingroup$

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

$\endgroup$
12
$\begingroup$

To start off:

I wish for the cancel extension to be automatically loaded.

$\endgroup$
10
$\begingroup$

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.

$\endgroup$
  • 2
    $\begingroup$ 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. $\endgroup$ – Willie Wong Feb 26 '12 at 16:53
  • $\begingroup$ I agree wholly with Willie. I am very much against mhchem, since I often define \cf in my posts. $\endgroup$ – Asaf Karagila Feb 26 '12 at 20:27
  • 8
    $\begingroup$ 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. $\endgroup$ – Willie Wong Feb 27 '12 at 10:16
6
$\begingroup$

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

(This macro is for extensible arrows.)

$\endgroup$
4
$\begingroup$

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

$\endgroup$
1
$\begingroup$

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

$\endgroup$
-1
$\begingroup$

Automatic equation numbering via autoNumber: "AMS".

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.

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Asaf Karagila Oct 25 '13 at 8:45
  • $\begingroup$ Also, Willie already posted an answer for the begin/endgroup. So it really makes no sense putting it up again. $\endgroup$ – Asaf Karagila Oct 25 '13 at 8:46
  • $\begingroup$ 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 $\endgroup$ – Tobias Kienzler Oct 25 '13 at 8:47
  • $\begingroup$ @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 $\endgroup$ – Tobias Kienzler Oct 25 '13 at 8:50
  • 1
    $\begingroup$ 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. $\endgroup$ – Kasper Nov 8 '13 at 9:44
  • 1
    $\begingroup$ @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... $\endgroup$ – Tobias Kienzler Nov 8 '13 at 9:49
-2
$\begingroup$

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

$\endgroup$
  • 6
    $\begingroup$ 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}}$ $\endgroup$ – Davide Cervone Jan 19 '14 at 21:21
  • $\begingroup$ 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? $\endgroup$ – Davide Cervone Jan 21 '14 at 16:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .