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

How to typeset Wick's contraction and Feynman graphs as Peskin did?

443 views
Skip to first unread message

Fei

unread,
Nov 5, 2001, 1:16:03 AM11/5/01
to
Peskin's Quantum Field Theory book is very impressive as to typeset Wick's
contraction and Feynman graphs neatly. I know a couple of LaTex packages to
draw Feynam graphs, but they are not as good. I have no idea at all about
how to typeset those contractions. Would somebody give me a hand? Thanks in
advance.


Siew-Ann Cheong

unread,
Nov 5, 2001, 8:33:54 AM11/5/01
to
Fei (mhw...@yahoo.com) wrote:
: Peskin's Quantum Field Theory book is very impressive as to typeset Wick's

To typeset Feynman diagrams, take a look at the FeynMF (or FeynMP, the
MetaPost equivalent) package.

Years ago, somebody posted a macro that does Wick contraction. I don't
remember who the author is already, but here's the code:

\makeatletter
\newcommand{\contraction}[5][1ex]{%
\mathchoice
{\contraction@\displaystyle{#2}{#3}{#4}{#5}{#1}}%
{\contraction@\textstyle{#2}{#3}{#4}{#5}{#1}}%
{\contraction@\scriptstyle{#2}{#3}{#4}{#5}{#1}}%
{\contraction@\scriptscriptstyle{#2}{#3}{#4}{#5}{#1}}}%
\newcommand{\contraction@}[6]{%
\setbox0=\hbox{$#1#2$}%
\setbox2=\hbox{$#1#3$}%
\setbox4=\hbox{$#1#4$}%
\setbox6=\hbox{$#1#5$}%
\dimen0=\wd2%
\advance\dimen0 by \wd6%
\divide\dimen0 by 2%
\advance\dimen0 by \wd4%
\vbox{%
\hbox to 0pt{%
\kern \wd0%
\kern 0.5\wd2%
\contraction@@{\dimen0}{#6}%
\hss}%
\vskip 0.2ex%
\vskip\ht2}}
\newcommand{\contracted}[5][1ex]{%
\contraction[#1]{#2}{#3}{#4}{#5}\ensuremath{#2#3#4#5}}
\newcommand{\contraction@@}[3][0.06em]{%
\hbox{%
\vrule width #1 height 0pt depth #3%
\vrule width #2 height 0pt depth #1%
\vrule width #1 height 0pt depth #3%
\relax}}
\makeatother

and an example showing how to use it would be:

\begin{equation}
\contraction[2ex]{}{A}{(x)B(y)}{C}
\contraction{A(x)}{B}{(y)C(z)}{D}
A(x)B(y)C(z)D(w)
\end{equation}

Wick contraction can also be done using PSTricks, too.


Cheong Siew Ann

0 new messages