After having to add dollar signs and format SI units countless times in the review section on Physics, I finally got fed up and wrote a script.{*}

It basically adds buttons/keyboard shortcuts to enclose the selected text in dollar symbols and \mathrm SI unit formatting.

For you chemistry guys, there's an extra button that encloses stuff in $\ce{...}$

It's pretty useful in /review, and also a good shortcut when writing your own posts.

Here's the userscript. Installation instructions are there. (also bugs/feature reqs/whatever)

*With some urging from chem.SE.people, otherwise it was going to be indefinitely in my todo list :P

share
    
any way to do it in opera? –  Ashu Jul 6 '12 at 17:19
    
@Ashu yep. Installn instructions for all major browsers here:stackapps.com/tags/script/info . Its pretty easy for opera. –  ManishEarth Jul 6 '12 at 17:39
    
@ManishEarth Could you add another button for \begin{aligned}...\end{aligned}, pretty please. –  Martin May 27 at 3:29
    
@Martin yes, I can. (issue filed )Any suggestions for the icon? $=$? –  ManishEarth May 27 at 15:38
    
Maybe &= would be appropriate, as this is the alignment char. –  Martin May 28 at 3:26
    
I might be the only one who thinks this... I noticed that the $\ce{O2}$ button will insert $\ce{...]$ which is quite handy when you write a whole equation. It is hindering if you want to add something like pH=-\ln[\ce{H+}] or more complicated you will always need to clean the extra $. I also noticed that SI always inserts a \: type space, while ~ might be more appropriate, if even necessary. (Is this the right place to ask or should I go to stackapps next time.) –  Martin May 28 at 12:13
    
@Martin stackapps is better, GitHub is the best. I might change the behavior of $\ce{O2}$ later, since Alt-M ($) already inserts a pair of dollar signs. I'll change the space, too. –  ManishEarth May 28 at 12:53

2 Answers 2

Note to users who installed it before 5/5/12 (3:51 PM UTC):

The script no longer needs to be updated (most updates include the addition of more sites/buttons and tweaks like tooltips). It auto-fetches the updates now.

I suggest you uninstall/reinstall it to run this one-time update

How to uninstall:

  • Chrome: Settings>Tools>Extensions. Find the script and delete it
  • Firefox: Open the GM settings and remove the script

Then re-install normally (click here)

share
    
Does this script work with IE 11.0? –  ron May 26 at 19:30
    
@ron never tried it, not going to, getting userscripts to run on IE is hard since there's no native support. –  ManishEarth May 26 at 20:14

It does not work. I can't figure out where does it crash but it does:
controls are gone

It also creepily installed some Auto-Review comments script I didn't ask for...
my userscripts

share
    
This is autoreviewcomments, but MathJax Buttons doesn't install it. Hm. stackapps.com/questions/2116/… –  ManishEarth Sep 21 at 22:16
    
I'll try to fix this. Browser? –  ManishEarth Sep 21 at 22:16
    
Firefox. Up to date I guess. –  Tomáš Zato Sep 21 at 23:00
    
Well, sorry. Ihave instaled this myself and totally forgotten it. –  Tomáš Zato Sep 21 at 23:01

You must log in to answer this question.

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