There are so many quantum-related posts that do not use the $\LaTeX$ commands for the Bra and Ket in Diract notation.
I see a lot of this: $$ | \psi > , \quad <n|n>, \quad <E_m|H|E_n>,$$ instead of this: $$ | \psi \rangle, \quad \langle n|n \rangle, \quad \langle E_m|H|E_n \rangle.$$

I guess I am the weird one, but when I see stuff like that I get the same feeling as when I see these pictures.

If someone is already using TeX commands to write maths, the use of ">" instead of "$\rangle$", it's either because they're taking a shortcut to avoid typing out the command, or because they don't know it exists. The former could be addressed by introducing a shorthand command like \r for \rangle, while the latter could be addressed by having a warning/suggestion message pop up when the question uses ">" and "<" more than (say) twice in the same row.

  • 1
    $\begingroup$ Note that \left< and \right> are actually slightly nicer than \langle and \rangle, since the former get taller when they enclose complicated expressions. $\endgroup$ – rob May 3 '20 at 4:10
  • 2
    $\begingroup$ @rob What about \left\langle? $\endgroup$ – BioPhysicist May 3 '20 at 12:17
  • $\begingroup$ @AaronStevens What about it? There's more than one way to do request the same output. $\endgroup$ – rob May 3 '20 at 14:04
  • $\begingroup$ @rob Sorry, I didn't know if one was better than the other $\endgroup$ – BioPhysicist May 3 '20 at 14:15
  • 1
    $\begingroup$ @rob I actually had no idea that you could do $\left<$. I was ignorant about it. I guess I was also lazy not to try it out. Self burn. Thanks. That's a game changer. $\endgroup$ – SuperCiocia May 3 '20 at 19:33
  • $\begingroup$ Related: Tutorial for bra-ket $\mathrm{\TeX} .$ $\endgroup$ – Nat May 4 '20 at 12:24
  • $\begingroup$ I'd asked about if built-in bra-ket functions were possible here. $\endgroup$ – Nat May 4 '20 at 12:27
  • $\begingroup$ I hope you don't mind, I edited to change the "laziness or ignorance" wording - the discussion of the word choice seemed to be distracting from the point. $\endgroup$ – Nathaniel May 4 '20 at 12:35
  • $\begingroup$ @Nathaniel I have rolled back to not invalidate parts of existing answers $\endgroup$ – BioPhysicist May 4 '20 at 12:50
  • $\begingroup$ @AaronStevens the parts that would be invalidated are irrelevant to the point and distract from it. That was exactly my reason for the edit. $\endgroup$ – Nathaniel May 4 '20 at 12:53
  • $\begingroup$ Consequently, I will restore my edit, but also edit the answer. $\endgroup$ – Nathaniel May 4 '20 at 12:56

I think most experienced users of this site would agree that things like "$|\psi>$" often look ugly enough for one's eyes to bleed at least a little. But the minor level of annoyance from looking at that text (or the short time it takes to correct it) has to be balanced against the experience presented to new users when the site tells them that they're Not Writing Right, particularly when we're already intimidating enough as it is.

Yes, it does look bad. No, it's not that important.

[people taking shortcuts] could be addressed by introducing a shorthand command like \r for \rangle

This has been addressed several times already on this meta, and the short answer is that there isn't a clear way to do that.

  • Introducing non-standard short commands, like \r, is a pretty noxious thing to do. The site should present and use a standard environment that is as close as possible to standard (bare) LaTeX.
  • Packages in MathJax are not yet at a level where we could just (say) load the physics package and be done with it. MathJax is a re-implementation of (part of) LaTeX into javascript, and any packages need to be reimplemented in javascript from the ground up.

    This could change in the future, but I don't think it's ready yet.

And, in any case, even if we did have a clean shorthand, that still leaves the problem of getting the broader userbase to learn about it.

[people not knowing the commands exist] could be addressed by having a warning/suggestion message pop up when the question uses ">" and "<" more than (say) twice in the same row

This is remarkably hard.

  • For one, it's very hard to write a regex that will really zero in on the relevant cases: you want it to catch the examples you gave, but you don't want it to catch things like $$a>b>c$$ or, say, this question's use of $$|\omega|>\Delta.$$

    If you think this is easy, then I would invite you to write one up and implement it in the Stack Exchange Data Explorer, where it can be used as a way to detect such questions for people who are in a mood to fix posts. Once it's proven itself there (say, with some hard numbers about its performance?), it can be used to activate any warnings on the Ask A Question page.

  • Even if you do have a good regex detector, getting people to notice any advice you're giving them is a hard problem. User myopia is a hard barrier to design around, and we already have a large number of other (frankly, more important) things that we want users to notice and pay attention to before they post.

  • Heck, it's hard enough getting the SE dev team to incorporate any mention of math formatting into the Ask page to begin with. Getting them to add in something which is physics-specific (as opposed to technical-site-specific, as with generic maths) is going to be more of an uphill climb.

  • There's also the MathJax buttons extension, which makes this type of formatting easier to get right, but its maintainer got pulled away from SE and into real-world business quite some time ago. Maybe you want to take that up (or you know somebody who can), so we can be sure it works reliably and consistently in the new Ask page (and will continue to do so in the future), so we can push it to new users or to the SE devs for them to incorporate it?

  • 3
    $\begingroup$ Thanks for all those links. I had no idea that the possibility of adding/changing MathJax commands had already been so thoroughly discussed. And I hadn't even bothered googling it before asking the question. I was ignorant and lazy. $\endgroup$ – SuperCiocia May 3 '20 at 19:40
  • $\begingroup$ There's been a suggestion that the comment discussion here was no longer needed, but I thought it raised some useful questions about policy. So I've moved it to chat to allow it to continue without distracting from the main point of this question and answer. $\endgroup$ – David Z May 4 '20 at 22:22
  • kerning, noun: in typesetting, the horizontal distance between symbols
  • keming, noun: poor-quality kerning

I've had many mentors who knew less about typesetting than I did. I put them in the same category as people whose accents are hard to understand: whether I learn from them has more to do with me than with them. Different people can have different interests and skill sets for entirely healthy reasons.

For instance, I get a little niggling annoyance when I read

$$\langle\frac ab\rangle$$

rather than

$$\left< \frac ab \right\rangle %% Don't make them match, editor. Do a good deed elsewhere instead. $$

But I've taught enough people about the auto-sizing feature of \left and \right that I know there's not an easy path to it in usual TeX-ish documentation.

Angle brackets are buried in the "parentheses" section of the SE MathJax tutorial, but there isn't any specific advice about how to make bras and kets. Maybe there should be.

  • $\begingroup$ I understand why "lazy" isn't appropriate, but why is "ignorant" not appropriate? Why is it bad to acknowledge that someone doesn't know about something? Before I learned about it I was ignorant of it. $\endgroup$ – BioPhysicist May 3 '20 at 16:03
  • $\begingroup$ @AaronStevens "ignorant" is every bit as (negatively) value-loaded as "lazy". There's plenty of ways to describe "a fraction of the userbase is unaware of X feature" without calling people ignorant. $\endgroup$ – Emilio Pisanty May 3 '20 at 16:08
  • 1
    $\begingroup$ @EmilioPisanty I agree that calling someone generally ignorant is bad. But I don't think it is bad to say someone was ignorant of some specific piece of information. I guess it just depends on how you interpret the meaning of things. I will agree that better language could be used regardless though. $\endgroup$ – BioPhysicist May 3 '20 at 16:11
  • 5
    $\begingroup$ Yes I could have spent more words to sugarcoat "laziness" and "ignorance" so as for the ensuing sentence to have the same meaning but a (potentially) less derogatory connotation. I didn't do it because of limited time and because I did not have that negative connotation in mind when I wrote those words (I was lazy and ignorant). $\endgroup$ – SuperCiocia May 3 '20 at 19:39
  • $\begingroup$ I hope you don't mind, I edited the question to remove the pejorative language, and hence also edited your answer to remove the comment about the language - I think the discussion is better without that distraction. $\endgroup$ – Nathaniel May 4 '20 at 12:59

You must log in to answer this question.

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