# New commands for the equation environment

I'm trying to define a bra-ket command so that I can easily build things like:

\langle e^+ | \gamma^\mu | e^-\rangle


At the moment I have this:

\newcommand{\brak}[3]{
\langle #1 \| \gamma^{#2} \| #3 \rangle
}


but, when I have \brak(e^+, \mu, e^-) in an equation I get:

⟨e−,μ,e+∥γ
∥equation⟩


Any ideas?

• There is the braket package which might save you some trouble – clemens Jun 14 '13 at 10:35
• you could also use the physics-package which has \bra{} and \ket{} commands (and other useful stuff). – Peater de Xel Jun 14 '13 at 10:44

You should use

\brak{e^+}{\mu}{e^-}


There're 3 different arguments, you can't separate them by commas.

• Ah great - my head was still in c++ mode! – JMzance Jun 14 '13 at 10:42

Just to show a version with build in scaling:

\documentclass[a4paper]{memoir}
\usepackage{mathtools}
\DeclarePairedDelimiterX\brak[3]\langle\rangle{%
#1 \delimsize\vert #2 \delimsize\vert #3}
\begin{document}

$\brak{e^+}{\mu}{e^-} \qquad \brak*{e^+}{\frac{\mu}{\sqrt{2}}}{e^-} \qquad \brak[\Big]{e^+}{\sum_i \mu_i }{e^-}$

\end{document}