I'm using the braket-package for using the braket notation. It works fine, but I've got some problems by using the package for writing a tensor product.
There is always a big gap between the ket and the bra by writing \ket{x}\bra{x}
. So I want to have it like |x><x|
and not like |x> <x|
. Does anyone know this problem and perhaps also a solution for it?
Example:
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{braket}
\begin{document}
\begin{align*}
\ket{x}\bra{x}
\end{align*}
\end{document}
Best Answer
It's “by design”. The definitions of
\bra
and\ket
areand
\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
However, the sidebearings of
\langle
and\rangle
will still leave a hole.You might check whether a
\bra
immediately follows a\ket
: