4
$\begingroup$

I don't know if you know the package physics in LaTeX but it is a really good one especially if one writes something about physics. e.g. I hate writing |\Psi\rangle\ which is as simple as \ket(\Psi) in this package or \left( \right) which is just \qty(). I know that we are using MathJax and not LaTeX while rendering stuff in the answers or questions but I thought that it would be good to give it a shot if it is at all possible to implement these features in MathJax.

$\endgroup$
  • 1
    $\begingroup$ Tip: It is possible to use $\newcommand$ in MathJaX. $\endgroup$ – ACuriousMind Mar 18 '15 at 10:30
  • $\begingroup$ That is true but this package covers a lot more than you can write with \newcommand $\endgroup$ – Gonenc Mar 18 '15 at 10:31
  • $\begingroup$ Yeah, I was just pointing it out for people who are unaware :) $\endgroup$ – ACuriousMind Mar 18 '15 at 10:32
  • $\begingroup$ I think something like this is a good idea. @gonec I think the package might be mostly newcommands? $\endgroup$ – innisfree Mar 18 '15 at 21:27
3
$\begingroup$

It's probably technically possible, but nobody has bothered to do so yet because it would (presumably) be quite difficult. But all it really needs is for someone to undertake the work of porting the package, and then to convince either the SE dev team or the MathJax developers to include it.

$\endgroup$
  • $\begingroup$ I don't think it would be tricky; the package is almost entirely macros (not \newcommands, \DeclareDocumentCommand, but very similar). I think the SE team could maybe easily incorporate a long list of macros, including bras, kets, SI units... $\endgroup$ – innisfree Mar 18 '15 at 21:32
  • $\begingroup$ @innisfree the tricky part would be the brace recognition and automatic sizing. I don't know how well MathJax supports that. Regardless, it would be a lot of work for the SE team, even if it is straightforward, and they have better things to do. Someone else would have to get it implemented. $\endgroup$ – David Z Mar 19 '15 at 4:17
  • $\begingroup$ Only if I knew how to do these stuff... $\endgroup$ – Gonenc Mar 19 '15 at 7:03
  • 7
    $\begingroup$ Peter from the MathJax team here. There's actually a very recent attempt, see github.com/mathjax/MathJax-third-party-extensions/pull/16. I'm sure the developer would not mind additional support. From the MathJax end, the ideal process for this kind of thing is to start out as a third party extension (which are mirrored to the CDN for general use) and have it mature there. When things are stable, they can move into the core MathJax distribution. (That would still leave the Stackexchange end of course. ) $\endgroup$ – Peter Krautzberger Mar 20 '15 at 16:02
  • $\begingroup$ Good to know @PeterKrautzberger. If anyone here seems interested in contributing to this effort I'll point them to that link. $\endgroup$ – David Z Mar 23 '15 at 16:04
  • $\begingroup$ @PeterKrautzberger I saw the example, but after 5 mins looking at it can't figure out what is spiffy, and how is that pointing to the MathJax-third-party-extensions, lazy to try more, would be good to explain in an answer :-) $\endgroup$ – Ciro Santilli 新疆改造中心996ICU六四事件 Jul 25 at 18:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .