the mathjax does not support the necessary packages
This isn't true - MathJax has full support for the \langle
, |
and \rangle
commands, as well as the combination \left< \right>
, which are all you need to typeset bras and kets.
However, that said
Is it possible to add the necessary requirement to the MathJax system so that we can use the bra & ket notation easily
yes, that's a nontrivial point. As mentioned in the comments, MathJax isn't LaTeX ─ it's a fully parallel system with completely different internals ─ and adding LaTeX packages isn't generally possible. As it happens, there is a specific extension that does this kind of thing, and whether to enable it or not is a narrower discussion which it's better to have in a dedicated thread (but the short answer is likely that the extension is too buggy to use at present, even if it were a good idea to enable it if it did work).
Outside of that, if what you want is ease of access, then the MathJax Buttons browser extension is an extremely convenient way to get seamless access to Dirac notation on the site's text editor.
Personally, I have modified the software end of my keyboard to have clean access to the unicode versions of the angled brackets (specifically, the ⟩
and ⟨
characters), and those compile just fine with the unicode support in MathJax, so that e.g. $|x⟩⟨x|$
produces the output $|x⟩⟨x|$, with the benefit of single-keypress access as well as a vastly more readable source.
|x\rangle
and\langle x|
for $|x\rangle$ and $\langle x|$ respectively. $\endgroup$