summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cjw/cjwphys.tex
blob: e436df69364a66e603097b5eff4e3eda27f97e0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
%%
%% This is file `cjwphys.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% cjw-latex.dtx  (with options: `phys')
%% 
%%     Copyright (C) 1997 by:  Colin J. Wynne <cwynne@mts.jhu.edu>
%% 
%% This file is part of cjw-latex, a collection of package files for
%% LaTeX2e, written by Colin J. Wynne.  It may be freely distributed in
%% any form---electronic, physical, or otherwise---so long as the
%% distributor provides this file in its entirety (including this
%% copyright announcement) and charges no fee (except for reasonable
%% recompense for the duplication process).  Fair 'nough?
%% 
%% I would also prefer that the entire source file `cjw-latex.dtx',
%% together with `cjw-latex.ins', be propagated instead of any one
%% subfile.
%% 
%% Please feel free to improve on or alter any code herein as suits your
%% needs, and by all means notify me of any suggestions, improvements, or
%% requests.
%% 
%% This file is beer-ware.  If you use it and like it, then you should
%% buy me a beer if you ever meet me. :-)
%% 
%% RCS: $Id: cjw-latex.ins,v 1.3 1998/04/10 14:30:18 cwynne Exp $
%% 
\def\RCSinfo{$Id: cjw-latex.dtx,v 0.13 1998/09/01 15:54:20 cwynne Exp $}

\def\RCSsplit $#1: #2,v #3 #4 #5 #6 #7${
  \gdef\filename   {#2}
  \gdef\fileversion{#3}
  \gdef\filedate   {#4}
  \gdef\filetime   {#5}
  \gdef\fileauthor {#6}
  \gdef\filelocker {#7}}

\expandafter\RCSsplit\RCSinfo
%%
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{cjwphys.tex}
    [\filedate\space v\fileversion\space
     Physics macros for cjwmath.sty---CJW]
\newcommand{\bra}[1]{\left\langle #1 \right|\,}
\newcommand{\ket}[1]{\,\left| #1 \right\rangle}

\newcommand{\braket}[2]{%
  \newdimen\@tempdimd%
  \setbox0=\mathbox{#1}\@tempdima=\ht0 \@tempdimb=\dp0%
  \setbox0=\mathbox{#2}\@tempdimc=\ht0 \@tempdimd=\dp0%
  \ifdim\@tempdimc > \@tempdima
    \@tempdima=\@tempdimc
  \fi
  \ifdim\@tempdimd > \@tempdimb
    \@tempdimb=\@tempdimb
  \fi
  \def\@tempa{\vrule width0pt height\@tempdima depth\@tempdimb}
  \left.\left\langle \@tempa{#1} \,\right|\,{#2} \right\rangle }
\endinput
%%
%% End of file `cjwphys.tex'.