<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[parskip=half, pagesize=auto, version=last]{scrartcl}

\usepackage{fixltx2e}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{array}
\usepackage{braket}
\usepackage{microtype}

\addtokomafont{title}{\rmfamily}

\title{The \textsf{braket} package}
\subtitle{Macros for Dirac bra--ket $\langle\mid\rangle$ notation and sets $\lbrace\mid\rbrace$}
\author{Donald Arseneau\\\texttt{asnd@triumf.ca}}
\date{12--Sept--2006}


\begin{document}

\maketitle

Commands defined are:

\begin{tabular}{@{}*{4}{&gt;{\ttfamily\textbackslash}c&lt;{\{~\}}}&gt;{(}l&lt;{~versions)}@{}}
  bra &amp; ket &amp; braket &amp; set &amp; small \\
  Bra &amp; Ket &amp; Braket &amp; Set &amp; expanding
\end{tabular}

The ``small versions'' use fixed-size brackets independent of their
contents, whereas the ``expanding versions'' make the brackets and 
vertical lines expand to envelop their contents (internally using 
the \verb+\left+ and \verb+\right+ commands).  You should use the vertical bar
character ``\verb+|+'' to input any extra vertical lines.  In \verb+\Braket+ these
vertical lines will expand to match the arguments, and in \verb+\Set+ the
first vertical will expand.  E.\,g.,

\begingroup
\renewcommand*{\arraystretch}{1.7}
\setlength{\tabcolsep}{10pt}
\begin{tabular}{@{}&gt;{\footnotesize}r&gt;{$\displaystyle}l&lt;{$}@{}}
  \verb+\Braket{ \phi | \frac{\partial^2}{\partial t^2} | \psi }+ &amp; \Braket{ \phi | \frac{\partial^2}{\partial t^2} | \psi } \\
  \verb+\Set{ x\in\mathbf{R}^2 | 0&lt;{|x|}&lt;5 }+                     &amp; \Set{ x\in\mathbf{R}^2 | 0&lt;{|x|}&lt;5 }                    \\
\end{tabular}
\endgroup

Likewise, you may make an expandable double-bar using either
the ``\verb+\|+'' command or its local alias ``\verb+||+''.

NOT defined is ``\verb+\ketbra+'' (for projection operators) because I prefer
\verb+\ket{ } \bra{ }+.

Because each definition is so small, it makes no sense to have a 
complicated generic version for many bracket styles.  Instead, 
you can just copy the definitions and change \verb+\langle+ or \verb+\rangle+,
to what you like.

\end{document}
</pre></body></html>