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 Stack 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 Stack 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 ;)
$\mathrm{}$
, the combination (Ctrl+Alt+R
) creates a small $_\circ$ near the}
which disappears when I backspace once. This screenshot might be helpful. Is this intentional? Or if possible, could you fix it? $\endgroup$Alt
combinations work well, however, now I found multiple issues with theCtrl+Alt
commands. Please see this screenshot. The same issues exist even when I perform these commands in an InPrivate window. Sorry for the disturbance. $\endgroup$