Inserting Mathjax and making posts look nice is rewarding, but it can often be, well, repetitive and boring :( Well, not any more. I have been testing and improving this userscript for quite some time now, and here it is in its first release! :D
Markdown Shortcuts for StackExchangeStack Exchange
Because textual descriptions are boring, here's a video demo of the ninja capabilities: Video demo. In short:
- Alt-your choice => insert LaTeX command (
text
=>\mathrm{text}
)- prepend Ctrl (Ctrl-Alt-your choice) => inserts LaTeX command with
$
surrounded ($\mathrm{text}$
)
- prepend Ctrl (Ctrl-Alt-your choice) => inserts LaTeX command with
- Alt-Z => dollar-ifying (
text
=>$text$
) - Alt-C => double dollar-ifying (
text
=>$$text$$
) - Alt-S => frac-ify (
A/B
=>\frac{A}{B}
) - Alt-A => align-ify (image demo)
All the commands (hotkeys, insertions) are completely customizable. It supports wrapping and unwrapping text, as well as custom caret positioning via the pipe character. If this wasn't enough, this also works in comment boxes and in chat! :D
If you're interested in detail in the ninja editor capabilities, here's the detailed StackAppsStack Apps entry for this userscript.
One-click install userscript
(read this page to know how to install userscripts in your browser)
List of default LaTeX commands
Keycode Command
Alt-I \pi
Alt-R \mathrm{}
Alt-E \ce{}
Alt-W \pu{}
Alt-T \text{}
Alt-Z dollarify
Alt-C double dollarify
Alt-S frac-ify
Alt-A align-ify
Finally, your feedback is encouraged! What more additional features or improvements would you like to see incorporated in the userscript, to make editing even easier? Remember, this is a userscript, almost everything is possible, so feel free to ask ;)