Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Quantum mechanics in LaTeX

846 views
Skip to first unread message

Anders Blom

unread,
Nov 23, 1998, 3:00:00 AM11/23/98
to
Trying to typeset a "ket" and a "bra" and a matrix element like this:
\langle x | V | y \rangle
where V is an operator. This looks fine (almost), but when the operator
(or argument) is extended vertically, like
\langle x | \frac{V}{\hbar} | y \rangle
the \rangle and \langle remain the same size as before (I know how to
extend the vertical bars).

Q: How to extend the \rl-angles? I don't want to increase the font size
of the angles, since this makes them bolder.
Is there a command to stretch characters? And if so, how to extract
information how much to stretch, since this depends on the argument.

Thomas Ruedas

unread,
Nov 23, 1998, 3:00:00 AM11/23/98
to bl...@lufysik.fysik.lu.se
\left\langle x | \frac{V}{\hbar} | y \right\rangle
The \left and its matching \right in conjunction with bracketing symbols
as bra and ket should adjust the size correctly.
--
--------------------------------------------
Thomas Ruedas
Institute of Meteorology and Geophysics,
J.W. Goethe University Frankfurt/Main
Feldbergstrasse 47 D-60323 Frankfurt/Main, Germany
Phone:+49-(0)69-798-24949 Fax:+49-(0)69-798-23280
e-mail: rue...@geophysik.uni-frankfurt.de
http://www.geophysik.uni-frankfurt.de/~ruedas/
--------------------------------------------

Antoine Lejay

unread,
Nov 23, 1998, 3:00:00 AM11/23/98
to
In article <365945...@geophysik.uni-frankfurt.de> Thomas Ruedas <rue...@geophysik.uni-frankfurt.de> writes:

> From: Thomas Ruedas <rue...@geophysik.uni-frankfurt.de>

>
> \left\langle x | \frac{V}{\hbar} | y \right\rangle
> The \left and its matching \right in conjunction with bracketing symbols
> as bra and ket should adjust the size correctly.
> --

Maybe it is better to define
\newcommand{\braket}[3]{\left\langle #1\;\vrule\; #2 \;\vrule\; #3\right\rangle}

and use \braket{x}{\frac{V}{\hbar}}{y}.

(I'm that the name of the command is the good name).

The \vrule will adjust the vertical bar at the good size, and
the \; is used to add some small spaces between the bars and
the arguments.

----
Antoine Lejay
Projet SYSDYS (INRIA/LATP)
Marseille (France)

Donald Arseneau

unread,
Nov 23, 1998, 3:00:00 AM11/23/98
to
In article <36593D...@lufysik.fysik.lu.se>, bl...@lufysik.fysik.lu.se writes...

>\langle x | \frac{V}{\hbar} | y \rangle
>the \rangle and \langle remain the same size as before (I know how to
>extend the vertical bars).

\left\langle and \right\rangle of course. How did you extend
the vertical bars?

To my mind, the vertical bars are the tricky bits. I use:

% The comments are more "implementation notes" than instructions, but
% they probably don't need instructions.

% Here are the definitions for typical bra, ket, braket applications, but
% not for ketbra (projection operators, because they are ugly). The \vrule
% avoids a \mathchoice in making the inner vertical lines. A \mathchoice
% *is* necessary for an inner >< for a ket-bra. Note that \right>, prints
% the same as \right\rangle but is faster. There are two defs for each of
% \bra, \ket, and \braket. The lowercase version is regular size and the
% capitalized version is variable size.
%
% Use \Braket{\phi | \frac{\partial^2}{\partial t^2} | \psi}
%

\def\bra#1{\mathinner{\langle{#1}|}}
\def\ket#1{\mathinner{|{#1}\rangle}}
\def\braket#1{\mathinner{\langle{#1}\rangle}}
\def\Bra#1{\left<#1\right|}
\def\Ket#1{\left|#1\right>}
{\catcode`\|=\active
\gdef\Braket#1{\left<\mathcode`\|"8000\let|\bravert {#1}\right>}}
\def\bravert{\egroup\,\vrule\,\bgroup}


Ryurick M. Hristev

unread,
Dec 1, 1998, 3:00:00 AM12/1/98
to
as...@reg.triumf.ca (Donald Arseneau) writes:

> In article <36593D...@lufysik.fysik.lu.se>, bl...@lufysik.fysik.lu.se writes...
> >\langle x | \frac{V}{\hbar} | y \rangle
> >the \rangle and \langle remain the same size as before (I know how to
> >extend the vertical bars).
>
> \left\langle and \right\rangle of course. How did you extend
> the vertical bars?

Sometimes the \left and \right don't get the right looking size.
For this reason AmSTeX defines some fixed size (various types of) brackets

As for the vertical bar you could use \left. <whatever> \right|
(or the other way around).

So, IMHO I would define 3 macros: \Bra, \Ket (with one argument each)
and \Braket (with 2 arguments). This shall be enough for any situation.

Cheers,
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GS/GM d- s+:+ a C++++>$ UL++(+++) P+ L+++ E++ W+(++) N+(++) o K-
w-- O- M- V- PS PE Y+ PGP+(++) t-- 5? X- R tv- b++(+++) DI D-- G
e+++ h--- r+++ y?
------END GEEK CODE BLOCK------

0 new messages