Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.
+1 as well. This is certainly possible with MathJax... I have been meaning to ask for this feature, but I was undecided since everyone has their favourite macros -- I certainly have mine -- and chances are they are all different. So it's not clear what is bestter: keep typing \mathbb{Z} or having to get used to some other non-canonical abbreviation. (Mine, for the record, is \ZZ.)
\bf, \cal, \bb, \frak, \scr?
Also, could we have an alias for \operatorname? Every time I type it, my soul is crushed a little more.
I think this maybe a good idea, but if our benevolent overlords decide to do this, can they also please document the short-hands in the FAQ? Like Jose said, everyone has his favourite abbreviations. I use \Intgr \Nat \Real for what Kevin would probably call \Z, \N, and \R.
Also +1 Harry's suggestion, as long as those don't collide with something already defined. (\bf of course is problematic in plain LaTeX, but maybe okay within the limited confines of MathJax?)
And one more +1. It's funny that it took more than a year to get to this point!
Here's the relevant MathJax documentation page: http://www.mathjax.org/resources/docs/?options/TeX.html#configure-tex
The instructions for doing so are here. It seems we can write simple macros easily enough.
I'm happy enough with Harry's suggestion. Another possiblity is to define whole alphabets of abbreviations, e.g. \bbA for a blackboard bold A, \cB for a caligraphic B, etc.
If we decide to define macros for letters one at a time, maybe we should have a poll on which one we choose?
In this particular case, another question would be what to output: \mathbf{Z} or \mathbb{Z} (I use \Z for \mathbb{Z}). Maybe only shortening the commands, as per Harry's suggestion, would be fairer - neither \mathbf nor \mathbb would be given preference by having the macro use it.
Also: \opn for \operatorname ?
How about \Z for \mathbf{Z} and \ZZ for \mathbb{Z}, etc... ?
Actually, since I use Chrome with the "Edit with Emacs" extension most of the time, I could do this client-side as well, as suggested by Gerald Edgar above. So, whereas selfishly I would like to push my own macros, in reality I'm happy for any (short) macros to be implemented.
I never liked whole alphabets of abbreviations, but I do think it makes sense to define at least a handful of standard macros.
In addition to that, I'll let you in on a secret: you can define your own macros within a post. For example, if you're typing a lot of \mathbb{Z}'s in a given question/answer, you can do it like this:
$\newcommand{\Z}{\mathbb{Z}}$ Now I can type things like $\Z$ and $\Z/p\Z$ easily!
Is that new with MathJax? If I remember correctly, that wasn't possible in jsMath.
@Kevin: Regarding number four on your list, that's about right.
I was suggesting shorthand names for the fonts (which are essentially the same as before, just without the math- prefix). I think I got most of the important ones, but if I remember correctly, for some reason, we don't have rsfs installed (I think Andrew Stacey complained when we discussed it because it might increase loading times or something). Could we also have rsfs, Anton?
Okay, sorry, to clarify the points above:
As Anton points out, you can just use \newcommand{} as you please, at a per post level. Beyond that, we can install macros in a magic configuration file (that is, when the HTML that we serve tells your browser to load the MathJax library, we can pass it some configuration information, including new macros).
Now, there are I think three main proposals for what those macros should be:
Some comments:
One advantage of 2) over 3) is that you can see type \bb{AB}, whereas for 3) you'd have to type \bbA\bbB.
Nevertheless, 3) is my preferred option, mostly because it's what I'm used to at home! :-)
I vote for a mixture of 1) and 2), but against 3).
@Kevin: I heard the story before -- but I just happen to like blackboard bold!
@Kevin: Didn't Weil or Dieudonné say something similar (and that's why Bourbaki uses boldface instead)?
@Kevin, Harry: I don't believe that there is anything 'canonical' about \mathbf{R} for the real numbers. This choice might simply be a reflection of the available technology: perhaps it was easier to use \mathbf{R} than \mathbb{R} in the days before computer typography simply because bold face fonts existed, whereas blackboard bold fonts did not. (Recall that fonts then were pieces of metal, not computer files!)
I see no reason to remain faithful to compromises made because of inadequate technology. It's enough that I have to type on a QWERTY keyboard :)
Unless it will slow down page loading times, I vote for 3 on the grounds of principle of least surprise. Think how annoying it will be if you've successfully typed \bbZ, \bbQ, \bbC and \bbN, only to discover that our admins thought \bbA wouldn't be needed.
@José: I'm saying that I read that Bourbaki was opposed (for the reason Kevin Buzzard noted) to writing \bf{R} as \bb{R} in print. It wasn't at all a matter of technology.
On another matter, is it correct that those of us who never made the transition from Plain TeX to LaTeX can use \def where it has been suggested to use \newcommand?
Nope, \def
won't work. The preview is accurate, so you should be able to determine what will work before actually posting.
Lenstra is certainly right about the historical origin of mathbb, but I don't think \mathbf{R} was ever really standard for the reals. I've seen a number of old texts and papers that denoted them by (italic) R, E^1, or even X.
Incidentally, it seems we've already moved past any suggestion of defining meanings for all of \A,...,\Z, but in case it comes up it should be pointed out that some of those (\P and \L for at least) are already defined in LaTeX.
Mark, Bourbaki used \bf{R} for the reals in 1930-something. That's standard enough for me!
Thanks, AgCl! That's really useful to know, actually.
+1 AgCl!
Also, agree with #3 for David's reason.
My name was invoked and, like the incantation, draws me hence.
I'd like a speed test before the decision between 2 and 3 is made. I suspect that either possible implementation of 3 (that Scott mentions) will be significantly slower than 2. MathJaX is not so fast that it is unnoticeable, I still load a page, watch all the squiggles disappear, and slowly reappear as rendered mathematics. If the shortcuts significantly add to the page load, I would argue against them. Assuming that MathJaX behaves like LaTeX and that braces are not required except for grouping (can someone confirm that this is indeed the case? And point to the relevant piece of MathJaX documentation? Apologies to AgCl for doubting, but given that I doubt he/she was named "Silver Chloride" then I would like more evidence than anon's word.), then there is hardly any difference between \bb Z
and \bbZ
. One could avoid the confusion over \bf
by defining it to be \mbf
, but I wouldn't worry about the confusion too much as there are enough differences between what one types here and normal LaTeX that everyone should be on their guard for discrepancies. It's not as if you can take an answer here and send it straight to tex
without any post-processing.
(Not that typing braces should be of any discombobulation. Doesn't everyone have their keyboard configured to make TeX easier to type?)
As to the debate between 𝑹 and ℝ, I find the latter much easier to distinguish from surrounding text. It is much easier for me to see that ℝ is something special, especially if I want to emphasise that it is the reals 𝑹 and not the integers 𝒁 (compare with: reals ℝ and not the integers ℤ.)
If we go for #3, I think I'd prefer the \ZZ
style for blackboard bold, since it mimics the way we write these. (I have recently switched from \bbZ
in my own writing.)
I'd still like to have something from the official documentation since (unlikely though this is) if it's undocumented then it might disappear in a future version.
I am pretty sure I have been typing stuff like \frac 1n
on MO without thinking much about it. And I suspect that enough people are used to such shortcuts that for mathjax to ignore this aspect of TeX's macro argument parsing would border on the perverse. Any documentation on mathjax should focus on the differences between mathjax and latex, not the similarities.
To second Harald's remark: while I've never typed \mathbb
without braces, I've always typed \frac1p
without the braces. And also usually $\hat\alpha$ etc when it comes to Greek letters. So at least anecdotally the MathJax behaviour reflects normal LaTeX usage.
I do think Andrew's point about speed is a very valid one. Every once in a while MathJax hangs so long that Firefox wonders aloud whether the script has stopped responding; I really don't want it to happen even more often.
(I'm going to have a look at the MathJaX documentation before commenting any further. It depends on whether the documentation is, as Harald suggests, focussed on the differences between MJ and LaTeX, or is purely about MathJaX as a standalone application. I freely admit that I know very little about MathJaX, being convinced that the best solutions are server-side, not client-side - one of the reasons being that feature-creap (such as adding extra macros) makes a big difference when done client-side but almost no difference server-side.)
Doesn't everyone have their keyboard configured to make TeX easier to type?
The problem is not configuring the keyboard, but reconfiguring the neural synapses after years of using QWERTY keyboards. Having said that, Emacs makes it virtually painless to type (LaTeX) code and luckily I have emacs hardwired in the brain :)
Well, having emacs hardwired in the brain is not that difficult, you just need to hit C-x M-c M-cybernetic_implant
...
@Willie: I would link to the obligatory xkcd comic now, but I think that particular comic has been "overlinked" already...
Since xkcd is unlinkable, I'll go to the opposite extreme and link to this tex.SX question just in case anyone seriously wants to know about reconfiguring their keyboard more appropriately for TeX. And I would say that Jose's comment about QWERTY-synapses isn't so relevant as most reconfigurations don't touch the letter keys, just the numbers and symbols which (I found) aren't so hard-wired into the brain.