# Personal MathJax Macros/Shortcuts? [duplicate]

I think it would be beneficial if in our profile, we had the option to define some MathJax shortcuts, much like how we define LaTeX shortcuts in the headers of our LaTeX-Documents. This would save users time in writing answers.

For example, I would like to save shortcuts similar to these for my account, so I don't have to waste time typing:

\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}


I think this would be reasonably easy to implement, and it should be welcomed esp. by our more dedicated users.

• Alternatively, if there were a foreseen problem with saving JaX shortcuts to an account, as accounts occasionally get deleted while the posts stay behind, being able to paste your own \newcommand set in header would be nifty. – J. W. Perry Dec 21 '13 at 4:40
• @J.W.Perry That problem would be resolved if the MathJax script simply converts your macro to 'normal MathJax' upon posting. I think there are many ways to easily resolve that issue. – Newb Dec 21 '13 at 4:42
• Ahh quite so! That would be nifty squared. – J. W. Perry Dec 21 '13 at 4:43
• – Martin Sleziak Dec 21 '13 at 5:01
• If this isn't possible, I'd like to note that it's more convenient sometimes to simply write \Bbb Z, say, for $\Bbb Z$. Shorter and no need for brackets. – user98602 Dec 21 '13 at 5:01
• I like this suggestion, since it neatly addresses those issues I felt were problems with previous similar proposals. I wonder if it might not be possible to do something like this user-side (via for example a browser extension or similar). – Tobias Kildetoft Dec 21 '13 at 11:57
• @TobiasKildetoft Well, I think that should be easy. If you would have a browser plugin that would allow you to 'replace all' (just like in for instance Microsoft Word) so that you could replace all occurences of for instance '\z' by '\mathbb{z}' that would be just as efficient as the suggestion in the OP. – dreamer Dec 21 '13 at 13:02
• These could be useful for that purpose. For Firefox: addons.mozilla.org/en-US/firefox/addon/foxreplace and for Chrome: chrome.google.com/webstore/detail/search-and-replace/… – dreamer Dec 21 '13 at 13:04
• @901301 those are pretty useful, thanks – Newb Dec 22 '13 at 3:40
• Another possibility is to edit your OS keyboard shortcuts, for example: CTRL+z displays: \Bbb Z – user93957 Dec 23 '13 at 19:51
• I have asked about solutions which could serve as a workaround if this is not implemented: Is there some way to include some default text quickly in a post? And also there is a recent feature request on Meta Stack Exchange: Enable blackboard bold TeX macros \N, \Z, \Q, \R, \C for ℕ, ℤ, ℚ, ℝ, ℂ () in MathJax configuration. – Martin Sleziak Feb 14 at 16:20