<!-- Thumbnail: https://i.sstatic.net/8YVVXm.png --> <!-- Excerpt: Mathjax Buttons adds convenient buttons and keyboard shortcuts for those who use MathJax on SE --> 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 [on the site matrix here][1]. There also is an **exit-inline-math-mode hotkey** (<kbd>Alt</kbd>-<kbd>Z</kbd>). This one moves the cursor just after the next instance of `$`. 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] (requires Greasemonkey on Firefox). If you have trouble installing (like the Chrome blocking), please see [here][4] for full step-by-step instructions on installation. - [Source][5] ## 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: <kbd>Alt</kbd>-<kbd>D</kbd> ###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][6] for more site-specific buttons) ##Screenshots ###Chem Before: ![enter image description here][7] After: ![enter image description here][8] ###Dollarify Before: ![enter image description here][9] After: ![enter image description here][10] ###SI-ify Before: ![enter image description here][11] After (first dollarifying, then SI-ifying) After: ![enter image description here][12] [1]: https://github.com/Manishearth/Manish-Codes/wiki/MathJax-Buttons-site-matrix [2]: http://toolserver.org/~manishearth/DynamicWithTeXConvert.htm [3]: https://github.com/Manishearth/Manish-Codes/raw/master/StackExchange/MathJaxButtons.user.js [4]: http://stackapps.com/tags/script/info [5]: https://github.com/Manishearth/Manish-Codes/blob/master/StackExchange/MathJaxButtons.user.js [6]: http://stackapps.com/a/3383/10098 [7]: https://i.sstatic.net/wGt6G.png [8]: https://i.sstatic.net/Ft39v.png [9]: https://i.sstatic.net/WKtjw.png [10]: https://i.sstatic.net/d3MVi.png [11]: https://i.sstatic.net/11gaF.png [12]: https://i.sstatic.net/JvXZ4.png