Adds some math/science buttons to the editor on science SE sites. These buttons are useful for converting selected text to math, formatting SI units, and formatting chemical equations. **There are also keyboard shortcuts for them**, which are IMO more useful than the buttons themselves.

(The SI units and chem buttons are only enabled on certain sites)

Currently, it runs on the SE sites listed [here][1], which have an "implemented" next to them. I'll make a proper list once I finish screening the sites.


There also is an **exit-math-mode hotkey** (<kbd>Alt</kbd>-<kbd>Z</kbd>). This one moves the cursor just after the next instance of `$$` or `$`. It's useful if you want to keep the flow of typing. For example, on Chem.SE, formatting H<sub>2</sub>O becomes <kbd>Alt</kbd>-<kbd>C</kbd>+`type H2O`+<kbd>Alt</kbd>-<kbd>Z</kbd> and you can immediately continue typing(no need to rightarrow-out of math mode). On CStheory/CS, typing "I like NP-complete problems!", where "NP" is sansserif, becomes: `type 'I like' `+<kbd>Alt</kbd>-<kbd>S</kbd>+`type NP`+<kbd>Alt</kbd>-<kbd>Z</kbd>+`type '-complete problems!'`. Once you're used to the shortcut, typing math fluidly becomes much easier!



**If you want your mathjax-enabled SE site to be supported, please let me know!**


My long term goal is to make [this script][2] a part of it (I'm still working on that script, though--so it will be a while)

##Installation##

 - [Click here to install][3]. Will only work in Chrome or Firefox (the latter requires Greasemonkey).

 - [Source][4]


## Buttons supported##


###Dollarify (`$`)
 - Encloses selection in `$...$`
 - Enabled on all supported sites
 - Keyboard shortcut: <kbd>Alt</kbd>-<kbd>M</kbd>

###Double Dollarify (`$$`)
 - Encloses selection in `$$...$$`
 - Enabled on all supported sites
 - Keyboard shortcut: _None_ (use <kbd>Alt</kbd>-<kbd>M</kbd> twice, that should do the trick)

###SI-ify (`SI`)
 - Encloses selection in `\:\mathrm{...}` (upright text with an extra separator space for SI units) 
 - Enabled on Physics,Chemistry, and Biology
 - Keyboard shortcut: <kbd>Alt</kbd>-<kbd>S</kbd>

###chem-ify (`O`<sub>`2`</sub>)
 - Encloses selection in `$\ce{...}$` (mhchem chemical equation formatter)
 - Use the `$` button on the `\ce`'d text to make this a block element (use <kbd>Alt</kbd>-<kbd>M</kbd>)
 - Enabled on Chemistry only
 - Keyboard shortcut: <kbd>Alt</kbd>-<kbd>C</kbd>

(Full button list [below][5] for more site-specific buttons)

##Screenshots

###Chem

Before:

![enter image description here][6]
After:
![enter image description here][7]

###Dollarify

Before:

![enter image description here][8]

After:
![enter image description here][9]

###SI-ify
Before:

![enter image description here][10]

After (first dollarifying, then SI-ifying)


After:
![enter image description here][11]


  [1]: http://stackapps.com/a/3379/10098
  [2]: http://toolserver.org/~manishearth/DynamicWithTeXConvert.htm
  [3]: https://github.com/Manishearth/Manish-Codes/raw/master/StackExchange/MathJaxButtons.user.js
  [4]: https://github.com/Manishearth/Manish-Codes/blob/master/StackExchange/MathJaxButtons.user.js
  [5]: http://stackapps.com/a/3383/10098
  [6]: https://i.sstatic.net/wGt6G.png
  [7]: https://i.sstatic.net/Ft39v.png
  [8]: https://i.sstatic.net/WKtjw.png
  [9]: https://i.sstatic.net/d3MVi.png
  [10]: https://i.sstatic.net/11gaF.png
  [11]: https://i.sstatic.net/JvXZ4.png