Why are bra and ket defined in the official package braket.sty
in two different ways (\bra
, \Bra
and \ket
, \Ket
)?
I do not understand why there exists the command \bra
with non-scalable delimiters. For stylistic reasons, I intuitively used the capital letter versions. Were you ever confronted with the second non-scalable version?
See the short example for bra:
\documentclass{article}
\usepackage{amsmath}
\usepackage{braket}
\begin{document}
\begin{align*}
\Bra{\frac{1}{\sqrt{2}}\left(\uparrow + \downarrow\right)}
&=\frac{1}{\sqrt{2}}\left(\Bra{\uparrow}+\Bra{\downarrow}\right)\\
\bra{\frac{1}{\sqrt{2}}\left(\uparrow + \downarrow\right)}
&=\frac{1}{\sqrt{2}}\left(\bra{\uparrow}+\bra{\downarrow}\right)\\
&=2 222 22\\
&=2\mathinner{222}22
\end{align*}
\end{document}
Understanding of the package's definition
For amsmath noobs like myself, the last two lines in the align environment review what \mathinner
does (if you look at the braket.sty
's package source code). The package defined the commands the following way:
\def\bra#1{\mathinner{\langle{#1}|}}
\def\ket#1{\mathinner{|{#1}\rangle}}
\def\Bra#1{\left\langle#1\right|}
\def\Ket#1{\left|#1\right\rangle}
Best Answer
The macros with uppercase initial are "self-expanding" based on the contents, as the documentation says. Just like it's not good to always use
\left
and\right
, it's also good to choose with care between\Bra
and\bra
.As far as the additional spacing is concerned, a solution is to load
mleftright
: