Typing expectation value in LyX

In quantum mechanics it is often needed to write the expectation value of an observable:

How do I type such in LyX? I can write a bra using \left\langle ___ \right| and a ket with \left| ___ \right\rangle or simply with "Insert delimiters", but I have no idea how to insert a third, middle object between a bra and a ket.

• Do you know how to load the braket package? If so, you could type \braket{\psi|A|\psi}. – Mico Dec 13 '16 at 17:48
• No, I don't. Actually am not familiar with the "behind the scenes" stuff. But I guess you can guide me and I will make it through. – E Be Dec 13 '16 at 17:51
• Do learn about ERTs ("Evil Red Tags"). They are lyx's way to allow users to enter LaTeX code directly into a document. – Mico Dec 13 '16 at 18:02
• See if tex.stackexchange.com/questions/48031/… helps. – Torbjørn T. Dec 13 '16 at 21:31

\left\langle \psi \middle| A \middle| \psi \right\rangle