It's “by design”. The definitions of \bra
and \ket
are
% braket.sty, line 31:
\def\bra#1{\mathinner{\langle{#1}|}}
% braket.sty, line 32:
\def\ket#1{\mathinner{|{#1}\rangle}}
and \mathinner
adds a thin space on either side of the construction.
If you want to remove those additional thin spaces (which is not a bad idea, by the way), you can redefine them like
\renewcommand\bra[1]{{\langle{#1}|}}
\renewcommand\ket[1]{{|{#1}\rangle}}
However, the sidebearings of \langle
and \rangle
will still leave a hole.
\documentclass[10pt,a4paper]{article}
\usepackage{braket}
\renewcommand\bra[1]{{\langle{#1}|}}
\renewcommand\ket[1]{{|{#1}\rangle}}
\begin{document}
\[
\ket{x}\bra{x}
\]
\[
\ket{x}\!\bra{x}
\]
\end{document}
You might check whether a \bra
immediately follows a \ket
:
\documentclass[10pt,a4paper]{article}
\usepackage{braket}
\renewcommand\bra[1]{{\langle{#1}|}}
\makeatletter
\renewcommand\ket[1]{%
\@ifnextchar\bra{\k@t{#1}\!}{\k@t{#1}}%
}
\newcommand\k@t[1]{{|{#1}\rangle}}
\makeatother
\begin{document}
\[
\ket{x}\bra{x}
\]
\end{document}
Best Answer
this is not an answer, but a demonstration of possibilities.
the code shown in the question doesn't exhibit the described result, namely that the left angle bracket is larger than the right one.
edit: since the request was for a smaller set of brakets, i've added examples showing that the shapes used around the q are the smallest default size. to get smaller ones, one has to go to ridiculous lengths, explicitly specifying a different (and inappropriate) size.
note that the coding here isn't good style -- never use multiple adjacent
equation
environments. and i've also taken liberties with spacing, since it's not really clear what is wanted.edit:
it has come to my attention (by way of a comment on Increase in bracket sizes due to power symbol) that the
physics
package also supports the\bra
\ket
notation, and according totexdoc physics
you can apply a*
to suppress automatic sizing (see page 6).