This script is designed to improve the user experience while editing posts that include mathematical notation using MathJax. The editing code has not kept up with updates to MathJax, and so a number of new features of MathJax have caused issues that degrade the performance of the editor. This script brings the editor up to date again.
What it does
This script:
Disables the fast-preview after the page is first typeset so that its does not slow down the refresh of the preview while you are editing.
Removes a delay that allows the screen to refresh between MathJax's input and output processing phases, but which also causes some of the visual jitter during typesetting.
Resets the
\label
data so that you don't have problems with multiply-defined labels as in the past.Disables the
noErrors
MathJax extension during editing so that the TeX errors are displayed rather than just boxed raw TeX. (This only affects the actual editing; once posted, errors will be the usual boxed TeX commands.) That should make it easier to tell what went wrong if your math contains errors.Adds two checkboxes to the editor interface, one for disabling MathJax so that you can turn it off if you prefer to edit without typesetting the math, and one that controls whether the TeX error messages (from item 4 above) are shown or not.
Installing
This is a Greasemonkey script, which means you need to have Greasemonkey or a work-alike installed in your browser.
- Firefox: Greasemonkey
- Chrome: Tampermonkey
- Safari: Tampermonkey
Opera: Tampermonkey
Internet Explorer: Maybe Trixie WPF4.5 would work? (I haven't tested it.)
- Edge: Doesn't yet support user scripts (but should real soon now).
Once you have one of those installed, click the button below:
You should get a message from Greasemonkey or Tampermonkey asking if you want to install the script. After it is installed, it should work automatically on StackExchange sites that use MathJax. You can tell whether it is working because you will see the new checkboxes in the editor when it is.