Need to write down complicated equations spanning several lines? Try the amsmath package.
Want to draw some Feynman diagrams? Then look into the feynmf package, it does a really good job in this area. There seems to be a little error in the Perl script feynmf.pl that does the cumbersome calls of Metafont. You can download a fixed file/patch that worked for me.
There is a rather advanced LaTeX macro wick.sty available at its
author's
web-site. Unfortunately, when I tried drawing contractions above
accented characters (for instance $\bar\chi$) I ended up with
the following error,
TeX capacity exceeded, sorry [parameter stack size=500].
Tweaking texmf.cnf and (re)generating latex.fmt with initex did not help. Further investigation suggests that this behavior is possibly triggered by a bad interaction of wick.sty with amsmath package – for a simple source file I can get contraction above accents without problems, after amsmath is included the LaTeX complains about an undefined control sequence. For a large source file that calls amsmath I keep getting the capacity-exceeded error shown above.
Another possibility is a simpler package simplewick available at CTAN (or as a part of TeX Live or MiKTeX distributions, or locally). It can draw contractions above as well as below expressions in math mode. As far as I know, simplewick co-exists with amsmath without problems. The figure shown earlier on this page (source) demonstrates capabilities of the package.
Usage and implementation details are described in a PDF manual. Alternatively, here is a quick-start guide: A double contraction like
+-------+
+---|---+ |
| | | |
A B C D
is generated via a command sequence (entered in the math mode)
\contraction{}{A}{B}{C}
\contraction[2ex]{A}{B}{C}{D}
ABCD
The parameters of the macro \contraction[]{}{}{}{} are as follows.
Note that the macro itself draws only the contraction and rewinds back to allow for multiple contractions. Therefore, the expression to appear below the contractions has to be repeated once more when you are finished with all contractions.
The TeX macros used to typeset Wick contraction in their textbook An Introduction to Quantum Field Theory can be downloaded from Daniel Schroeder's website (look at the bottom of that page).