| 1 |
% \iffalse |
| 2 |
% This is feyn.dtx, which manages the use of the feyn Metafont |
| 3 |
% |
| 4 |
%% This software is copyright 1991, 1994, 2001-2, 2005, 2008-17, Norman Gray. |
| 5 |
%% It is distributed under the terms of the 2-clause BSD Licence; |
| 6 |
%% see the file LICENCE for details. |
| 7 |
% |
| 8 |
%<+package|driver>%% VCS Info: Mercurial revision 0a471f8ed572, 2022-07-20 11:23 +0100, tag 0.4.3 + 0 |
| 9 |
%<+package>\NeedsTeXFormat{LaTeX2e} |
| 10 |
%<+package>\ProvidesPackage{feyn}[2022/07/20 0.4.3] |
| 11 |
%<+package>\typeout{Package: `feyn' 0.4.3 <2022/07/20>} |
| 12 |
% |
| 13 |
%<*driver> |
| 14 |
\documentclass{ltxdoc} |
| 15 |
\usepackage{feyn} |
| 16 |
\title{The feyn font} |
| 17 |
\author{Norman Gray\\(\texttt{https://nxg.me.uk})} |
| 18 |
\date{Version 0.4.3, 2022 July 20} |
| 19 |
\newcommand\Lopt[1]{\textsf {#1}} |
| 20 |
\newcommand\file[1]{\texttt {#1}} |
| 21 |
\newcommand\Lcount[1]{\textsl {\small#1}} |
| 22 |
\newcommand\pstyle[1]{\textsl {#1}} |
| 23 |
%% \url macro (url.sty does this better) |
| 24 |
\def\setpathdots{\discretionary{.}{}{.}} |
| 25 |
\def\setpathslash{\discretionary{/}{}{/}} |
| 26 |
{\catcode`\.=\active |
| 27 |
\catcode`\/=\active |
| 28 |
\gdef\pathcats{% |
| 29 |
\catcode`\%=12 \catcode`\~=12 |
| 30 |
\catcode`\.=\active \let.\setpathdots |
| 31 |
\catcode`\/=\active \let/\setpathslash |
| 32 |
\catcode`\#=12 \catcode`\_=12}% |
| 33 |
} |
| 34 |
\def\setpath#1{\ttfamily <\nobreak #1\nobreak>\endgroup} |
| 35 |
\def\url{\begingroup\pathcats\setpath} |
| 36 |
%\RecordChanges |
| 37 |
\OnlyDescription |
| 38 |
\parskip=\medskipamount |
| 39 |
\parindent=0pt |
| 40 |
\begin{document} |
| 41 |
\maketitle |
| 42 |
\DocInput{feyn.dtx} |
| 43 |
\end{document} |
| 44 |
%</driver> |
| 45 |
% |
| 46 |
% \fi |
| 47 |
% |
| 48 |
% |
| 49 |
% |
| 50 |
%% \CharacterTable |
| 51 |
%% {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 |
| 52 |
%% 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 |
| 53 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 54 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 55 |
%% Dollar \$ Percent \% Ampersand \& |
| 56 |
%% Acute accent \' Left paren \( Right paren \) |
| 57 |
%% Asterisk \* Plus \+ Comma \, |
| 58 |
%% Minus \- Point \. Solidus \/ |
| 59 |
%% Colon \: Semicolon \; Less than \< |
| 60 |
%% Equals \= Greater than \> Question mark \? |
| 61 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 62 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 63 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 64 |
%% Right brace \} Tilde \~} |
| 65 |
% |
| 66 |
% \CheckSum{680} |
| 67 |
% |
| 68 |
% |
| 69 |
% |
| 70 |
% |
| 71 |
% \newcommand{\pslash}{p\llap{/\kern-0.3pt}} |
| 72 |
% \newcommand{\feynx}{\pstyle{feyn}} |
| 73 |
% \newcommand{\metafont}{Metafont} |
| 74 |
% |
| 75 |
% |
| 76 |
% |
| 77 |
% This document describes the font \feynx, which can be used to produce relatively |
| 78 |
% simple Feynman diagrams within equations in a \LaTeX\ document. The |
| 79 |
% package and font aims to be capable of producing all of the diagrams |
| 80 |
% of one- and two-loop QED and QCD, plus $\phi^4$ theory. |
| 81 |
% |
| 82 |
% The other Feynman diagram package which exists is Thorsten Ohl's |
| 83 |
% \textsl{feynmf}/\textsl{feynmp} package. That |
| 84 |
% works by creating \metafont\ or MetaPost figures using a preprocessor. |
| 85 |
% It's more general than this package, but is at its best when |
| 86 |
% creating relatively large diagrams, for figures. |
| 87 |
% In contrast, the present system consists of a carefully-designed font |
| 88 |
% with which you can easily write simple diagrams, within equations or within text, |
| 89 |
% in a size matching the surrounding text size. |
| 90 |
% |
| 91 |
% \iftrue |
| 92 |
% \textbf{Contents:} |
| 93 |
% \def\numberline#1{\space\emph{\S#1}~} |
| 94 |
% \def\contentsline#1#2#3{#2,~p#3;} |
| 95 |
% \makeatletter \@starttoc{toc} \makeatother |
| 96 |
% \fi |
| 97 |
% |
| 98 |
% \subsection*{Status} |
| 99 |
% |
| 100 |
% The propagators and vertices which are implemented are those of one- |
| 101 |
% and two-loop QED and QCD, plus $\phi^4$ theory, plus a few extras |
| 102 |
% which commonly appear in non-figure displays (the practical |
| 103 |
% definition of `commonly appear' is: `which I wanted' or `which |
| 104 |
% people asked me for'). I'd be delighted to add others which folk |
| 105 |
% feel would be useful, as long as they're still in the rather simple |
| 106 |
% scope of the font. |
| 107 |
% |
| 108 |
% \newpage |
| 109 |
% \section{Description} |
| 110 |
% |
| 111 |
% You use the font by including the package \texttt{feyn.sty}, as in |
| 112 |
% \begin{verbatim} |
| 113 |
% \usepackage{feyn} |
| 114 |
% \end{verbatim} |
| 115 |
% If you use the `amsmath' package, you should load that before |
| 116 |
% loading the `feyn' package.\footnote{Because of a slight peculiarity |
| 117 |
% of the amsmath package, the active~`!' command described below will |
| 118 |
% not work properly within amsmath |{align}| or |{align*}| |
| 119 |
% environments unless the~`!' is made active globally. This is done |
| 120 |
% by default if the `amsmath' package is loaded first, and not done by |
| 121 |
% default otherwise. If you have to override this behaviour for some |
| 122 |
% very arcane reason, then you can force the global or local declaration |
| 123 |
% of~`!' using the \Lopt{globalbang} and \Lopt{noglobalbang} options |
| 124 |
% to the \texttt{$\backslash$usepackage\{feyn\}} command.} |
| 125 |
% |
| 126 |
% You write Feynman diagrams in text by writing a sequence of letters |
| 127 |
% in the maths-mode \feynx\ font, selected with |\Feyn{...}| in text |
| 128 |
% style and |\feyn{...}| in displays. Most of the characters in the |
| 129 |
% font are selected using ligatures, so that |\feyn{f}| produces a |
| 130 |
% fermion propagator, $\feyn{f}$., but |\feyn{fs}| produces a short |
| 131 |
% fermion, $\feyn{fs}$ and |\feyn{fA}| produces an arrowed one, |
| 132 |
% $\feyn{fA}$. See below for more detailed description of how to use |
| 133 |
% the font. |
| 134 |
% |
| 135 |
% \makeatletter |
| 136 |
% \def\refptcirc{\lower\feyn@maxis \hbox to 0pt{\hss$\circ$\hss}} |
| 137 |
% \makeatother |
| 138 |
% \begin{table} |
| 139 |
% \def\tableskip{\noalign{\smallskip}} |
| 140 |
% \halign{$\refptcirc\Feyn{#}$% |
| 141 |
% \hfil\quad & $#$\hfil\quad & # \hfil\qquad && # \cr |
| 142 |
% \omit Character & \omit & Name & Width & Height & Depth \cr |
| 143 |
% \noalign{\smallskip\hrule\smallskip} |
| 144 |
% f & f & fermion$^{\dag}$ |
| 145 |
% & 2 & 0 & 0 \cr \tableskip |
| 146 |
% fs & fs & short fermion |
| 147 |
% & 1 & 0 & 0 \cr \tableskip |
| 148 |
% fl & fl & fermion loop$^{\dag\ddag}$ |
| 149 |
% & 0 & $2-$ & 0 \cr \tableskip |
| 150 |
% flS & flS & fermion loop (small)$^{\dag\ddag}$ |
| 151 |
% & 0 & 1 & 0 \cr \tableskip |
| 152 |
% flo & flo & fermion loop (for $\phi^4$ theory)$^{\dag}$ |
| 153 |
% & 0 & 2 & 0 \cr \tableskip |
| 154 |
% fu & fu & upward fermion$^\dag$ (45$^\circ$) |
| 155 |
% & $\sqrt2$ & $\sqrt2$ & 0 \cr \tableskip |
| 156 |
% fd & fd & downward fermion$^\dag$ |
| 157 |
% & $\sqrt2$ & $\sqrt2$ & 0 \cr \tableskip |
| 158 |
% fv & fv & vertical fermion$^\dag$ |
| 159 |
% & 0 & 2 & 0 \cr \tableskip |
| 160 |
% f0 & f0 & spacer |
| 161 |
% & 2 & 0 & 0 \cr \tableskip |
| 162 |
% fs0 & fs0 & short spacer |
| 163 |
% & 1 & 0 & 0 \cr \tableskip |
| 164 |
% g & g & gluon/photon$^{\dag}$ |
| 165 |
% & 2 & 0 & 0 \cr \tableskip |
| 166 |
% gl & gl & gluon loop$^{\dag\ddag}$ |
| 167 |
% & 0 & $2-$ & 0 \cr \tableskip |
| 168 |
% glB & glB & gluon loop (big)$^{\dag}$ |
| 169 |
% & 0 & 2.67 & 0 \cr \tableskip |
| 170 |
% glS & glS & gluon loop (small)$^{\dag}$ |
| 171 |
% & 0 & 1.33 & 0 \cr \tableskip |
| 172 |
% g1\quad g2 & g1, g2 & gluon loop, 1st \& 2nd quadrants$^{\dag}$ |
| 173 |
% & 0 & 2 & 0 \cr \tableskip |
| 174 |
% g4\quad g3 & g4, g3 & gluon loop, 4th \& 3rd quadrants$^{\dag}$ |
| 175 |
% & 0 & 0 & -2 \cr \tableskip |
| 176 |
% gu & gu & upward gluon$^\dag$ (45$^\circ$) |
| 177 |
% & $\sqrt2$ & $\sqrt2$ & 0 \cr \tableskip |
| 178 |
% gd & gd & downward gluon$^\dag$ |
| 179 |
% & $\sqrt2$ & $\sqrt2$ & 0 \cr \tableskip |
| 180 |
% gv & gv & vertical gluon$^\dag$ |
| 181 |
% & 0 & 2 & 0 \cr \tableskip |
| 182 |
% m & m & massive fermion$^{\dag}$ |
| 183 |
% & 2 & 0 & 0 \cr \tableskip |
| 184 |
% ms & ms & short massive fermion |
| 185 |
% & 1 & 0 & 0 \cr \tableskip |
| 186 |
% h & h & ghost$^{\dag}$ |
| 187 |
% & 2 & 0 & 0 \cr \tableskip |
| 188 |
% hs & hs & short ghost |
| 189 |
% & 1 & 0 & 0 \cr \tableskip |
| 190 |
% hu & hu & upward ghost$^{\dag}$ (45$^\circ$) |
| 191 |
% & $\sqrt2$ & $\sqrt2$ & 0 \cr \tableskip |
| 192 |
% hd & hd & downward ghost$^{\dag}$ |
| 193 |
% & $\sqrt2$ & $\sqrt2$ & 0 \cr \tableskip |
| 194 |
% hl & hl & ghost loop$^{\dag\ddag}$ |
| 195 |
% & 0 & $2-$ & 0 \cr\tableskip |
| 196 |
% x & x & counterterm vertex & 0 & $a$ & $-a$ \cr \tableskip |
| 197 |
% p & p & proper vertex & - & - & - \cr \tableskip |
| 198 |
% P & P & proper vertex (variant) & - & - & - \cr \tableskip |
| 199 |
% c & c & complete vertex & - & - & - \cr \tableskip |
| 200 |
% a & a & arrow$^\dag$ & 0 & 0 & 0 \cr |
| 201 |
% } |
| 202 |
% \caption{\label{chars} The characters in font \feynx, and their |
| 203 |
% reference points, marked with circles. Characters |
| 204 |
% marked~$\dag$ have arrowed variants indicated with~`A' and~`V' suffixes; |
| 205 |
% and characters marked~$\ddag$ have an upside-down variant |
| 206 |
% indicated with a `u' suffix. The `u' must come before the `A' or |
| 207 |
% `V'. Character `a' has an `arrowed variant' in the sense that `aV' |
| 208 |
% produces a backward arrow. A length of `$2-$' indicates a length |
| 209 |
% slightly less than two units, for aesthetic reasons.} |
| 210 |
% \end{table} |
| 211 |
% |
| 212 |
% The characters in the font are shown in table~\ref{chars}. |
| 213 |
% These are shown in textstyle size, but all characters are also available in |
| 214 |
% displaystyle size. |
| 215 |
% All of the displaystyle characters are additionally offset vertically |
| 216 |
% up to the math axis, which has height~$a$. |
| 217 |
% All the dimensions are shown as multiples of the |
| 218 |
% length of a module which is the length of the short fermion. |
| 219 |
% The~$\circ$ shows the reference point of each character. |
| 220 |
% The proper vertex and the complete vertex are specified |
| 221 |
% in terms of a `blob-radius' which is about half a module. |
| 222 |
% They have a width of 2~radii, and a height and depth of 1~radius. |
| 223 |
% |
| 224 |
% Each of the characters marked with a~$\dag$ in the table has two |
| 225 |
% arrowed variants, so that |\feyn{fA + gV}| produces $\feyn{fA + |
| 226 |
% gV}$. The `A' variants produce arrows pointing rightwards or |
| 227 |
% upwards, and the `V' variants arrows pointing leftwards or |
| 228 |
% downwards. The characters marked with a~$\ddag$ also have an |
| 229 |
% upside-down variant, thus `flu' is an upside-down variant of the |
| 230 |
% fermion loop, and `fluV' an arrowed variant. |
| 231 |
% |
| 232 |
% Note that the fermion, gluon and ghost half-loop characters are |
| 233 |
% slightly shorter than the height you might expect. These characters |
| 234 |
% are deliberately slightly squashed partly because that makes them |
| 235 |
% look slightly better (in my opinion!) in a one-loop self-energy |
| 236 |
% diagram, but also so that the `gl glu' or `fl flu' loop in a |
| 237 |
% two-loop diagram looks better. The loop formed by the pair of `g1 |
| 238 |
% g2' is the size you might expect. See section~\ref{s:examples} below |
| 239 |
% for some illustrations of this. |
| 240 |
% |
| 241 |
% The unnassigned positions in the \feynx\ font are filled |
| 242 |
% with an obviously wrong dummy character, so that |$\feyn{A}$|, for example, |
| 243 |
% produces $\feyn{fs0Afs0}$. This should help at least some |
| 244 |
% mistypings stand out. |
| 245 |
% |
| 246 |
% If you were to print out a font table, you would discover that many |
| 247 |
% of the glyphs in the font can be obtained using single |
| 248 |
% characters, rather than the ligatures mentioned in the table. Do |
| 249 |
% not be tempted to use this as a shortcut, since the assignment of |
| 250 |
% glyphs to character positions may be changed without warning from release to |
| 251 |
% release, as long as the ligature maps remain valid. |
| 252 |
% |
| 253 |
% The file \file{feyn.sty} additionally defines a number of macros, |
| 254 |
% described here. |
| 255 |
% \begin{description} |
| 256 |
% \item[\cs{feyn}] Selects the diagram font, in display style -- that |
| 257 |
% is, suitable for a displayed equation. This must be used |
| 258 |
% within math mode. \cs{Feyn} selects the textstyle diagram font. |
| 259 |
% \item[\cs{momentum}\{ch\}\{text\}] sets the character |
| 260 |
% `ch', which may be a ligature, and puts the given text at the recommended |
| 261 |
% annotation position for that character. |\momentum[pos]{ch}{text}| |
| 262 |
% is the same, except that the optional argument indicates the |
| 263 |
% position relative to the annotation position. It must be one of |
| 264 |
% `top', `urt', `lrt', `bot', `llft' or `ulft'. This is rarely |
| 265 |
% used as such, since the |\feyn| and |\Feyn| |
| 266 |
% commands make~`!' a temporarily active character, and define it |
| 267 |
% to be |\momentum|. See section~\ref{s:examples} for |
| 268 |
% examples and further discussion. |
| 269 |
% \item[\cs{belowl\{\}}] A common pattern in diagrams is to have a pair |
| 270 |
% of incoming or outgoing propagators. If the lower one of this |
| 271 |
% pair is enclosed within |\belowl{...}|, then it is set so that it |
| 272 |
% occupies zero horizontal space, and moved leftwards and |
| 273 |
% downwards, to fit under the upper of the pair of propagators. |
| 274 |
% The command |\belowr{...}| is the same, except that the argument |
| 275 |
% is moved rightwards. |
| 276 |
% See examples below. |
| 277 |
% \item[\cs{Diagram\{\}}] This is for building more complicated diagrams. It |
| 278 |
% takes one argument, which is like the contents of an \texttt{\{array\}} |
| 279 |
% environment---a series of formulae separated by \&'s and \verb-\\-. See |
| 280 |
% below for an example. The result is a box on the math-axis. |
| 281 |
% \item[\cs{maxis}] Raises a formula to the math-axis, which is |
| 282 |
% occasionally useful within in-text equations: eg |
| 283 |
% |$\Feyn{fglf} - \maxis{\Feyn{faf}}$| produces |
| 284 |
% $\Feyn{fglf} - \maxis{\Feyn{faf}}$. |
| 285 |
% \item[\cs{vertexlabel\{p\}\{text\}}] Allows you to label a vertex. If |
| 286 |
% the first parameter~$p$ is~$\wedge$, the~\emph{text} is placed above the |
| 287 |
% point at which the command is given, if it is~\texttt{\_}, it is |
| 288 |
% placed below. For example, |$\feyn{f\vertexlabel^{a}}$| produces |
| 289 |
% $\feyn{f\vertexlabel^{a}}$. More often used within |\Diagram| |
| 290 |
% than elsewhere. |
| 291 |
% \item[\cs{feynstrut\{h\}\{d\}}] For use within an (eqn)array environment, or |
| 292 |
% the like. It modifies the control sequence \verb-\strut- to be a strut of |
| 293 |
% height~$h$ and depth~$d$ modules, which can therefore be used to |
| 294 |
% space the array out. Note that it modifies |\strut|, rather |
| 295 |
% than being the strut itself. |
| 296 |
% \item[\cs{annotate\{x\}\{y\}\{text\}}] Puts the \emph{text}, between dollars, |
| 297 |
% in a zero width box at offset~$(x,y)$ modules from the position of the |
| 298 |
% |\annotate| command (which is generally the first command(s) after |
| 299 |
% entering math-mode). Because the \emph{text} is in math-mode, anything |
| 300 |
% that is not maths should be in an |\mbox|. You will probably |
| 301 |
% use this only rarely, as the |\momentum| command supports most |
| 302 |
% of the annotation you will need. |
| 303 |
% \end{description} |
| 304 |
% |
| 305 |
% The \feynx\ font is modular, in the sense that all the |
| 306 |
% dimensions are in terms of a module of 10pt, and all sizes given |
| 307 |
% below are in units of modules. As well as 10pt, the font has |
| 308 |
% versions for 11pt, 12pt, 18pt and 24pt text, and the most |
| 309 |
% appropriate one is selected depending on the text size declared (or |
| 310 |
% defaulted) in the |\documentclass| command. This range of sizes |
| 311 |
% seems to be appropriate for the sizes required, but the author would |
| 312 |
% welcome comments on this. The distribution |
| 313 |
% contains a sample file using the 18pt \feynx\ font in a |
| 314 |
% \texttt{foiltex} document. |
| 315 |
% |
| 316 |
% You draw a diagram by going into math-mode (between \$\dots\$), and selecting |
| 317 |
% the diagrams font by the font-changing command \verb-\feyn{}- |
| 318 |
% (exactly as you might use \verb-\mathrm- in math-mode). With a couple of |
| 319 |
% exceptions, all the characters are obtained by typing a single |
| 320 |
% letter, or a couple of letters which form a ligature, so that the |
| 321 |
% letter~$f$ in the diagrams font (\verb-$\feyn{f}$-) produces a |
| 322 |
% fermion of length~2 (modules), and~$fs$ produces a short fermion of |
| 323 |
% length~1. As usual in maths mode, space characters are ignored, so |
| 324 |
% you can add whitespace as required to make the expressions more |
| 325 |
% legible. Some of the more heavily used characters are available in |
| 326 |
% both display size and text size, with the text-size version invoked |
| 327 |
% by |\Feyn{...}|, so that |\feyn{fglf}| gives $\feyn{fglf}$ and |
| 328 |
% |\Feyn{fglf}| gives $\Feyn{fglf}$. The displaystyle characters |
| 329 |
% are all on the math-axis, the textstyle ones are on the text line. |
| 330 |
% |
| 331 |
% The display and text sizes of diagrams (that is, as produced by |
| 332 |
% |\feyn| and |\Feyn| respectively) are intended to be used |
| 333 |
% within equations, and they are sized accordingly. When diagrams |
| 334 |
% have significantly complicated annotation, however, this size can |
| 335 |
% look unhelpfully cramped, and it is for this case that there is an |
| 336 |
% `extended' set of diagram characters, which are approximately double |
| 337 |
% the size, and are available, in |\displaystyle| only, with the |
| 338 |
% |\FEYN| and |\DIAGRAM| macros. These are used exactly like the |
| 339 |
% |\feyn| and |\Diagram| macros. Note |
| 340 |
% that the line width, the module used by the (rare) |\annotate| command, and the math |
| 341 |
% axis, do not change from the sizes they have for the |\feyn| |
| 342 |
% command. That is, this font is \emph{not} the appropriate one to |
| 343 |
% use if you simply want a larger font size -- in that case, simply |
| 344 |
% increase the \LaTeX\ font size and the \feynx\ font will change in |
| 345 |
% size accordingly. See below for an example of the use of |\FEYN|. |
| 346 |
% |
| 347 |
% \subsection{More complicated diagrams} |
| 348 |
% |
| 349 |
% \newdimen\halftextwidth |
| 350 |
% \halftextwidth=\textwidth |
| 351 |
% \advance\halftextwidth by -\tabcolsep |
| 352 |
% \advance\halftextwidth by -\arrayrulewidth |
| 353 |
% \divide\halftextwidth by 2 |
| 354 |
% \newenvironment{codeexample} |
| 355 |
% {\vskip\medskipamount |
| 356 |
% \def\Becomes{\cr |
| 357 |
% \noalign{\vrule width \arrayrulewidth \hskip\tabcolsep}} |
| 358 |
% \valign\bgroup |
| 359 |
% \hrule height 0pt depth 0pt width \halftextwidth |
| 360 |
% \hsize=\halftextwidth |
| 361 |
% \vfil ## \vfil \cr} |
| 362 |
% {\crcr\egroup |
| 363 |
% \vskip\medskipamount} |
| 364 |
% \newenvironment{examplerhs}{\begin{minipage}[t]{\halftextwidth}} |
| 365 |
% {\\ \end{minipage}} |
| 366 |
% |
| 367 |
% |
| 368 |
% The \feynx\ font is designed so that simple diagrams are simple to |
| 369 |
% produce, and are as far as possible writable as a single line of |
| 370 |
% characters. There are a couple of more complicated diagrams which |
| 371 |
% are drawable without too much effort. |
| 372 |
% |
| 373 |
% A common pattern in diagrams is to have a pair |
| 374 |
% of incoming or outgoing propagators. If the lower one of this |
| 375 |
% pair is enclosed within |\belowl{...}|, then it is set so that it |
| 376 |
% occupies zero horizontal space, and moved leftwards and |
| 377 |
% downwards, to fit under the upper of the pair of propagators. For |
| 378 |
% example the sequence |\feyn{f gu \belowl{fd}}| would put the downward |
| 379 |
% fermion directly below the upward gauge boson. See below for this |
| 380 |
% and other examples. |
| 381 |
% |
| 382 |
% The second way of composing more complicated diagrams is to use the |
| 383 |
% |\Diagram| macro. This allows you to lay out a diagram in an |
| 384 |
% array-like environment, each cell of which is set within a |
| 385 |
% |\feyn{...}| macro. On the right is the same diagram drawn with |
| 386 |
% lines indicating the boundaries between the cells. |
| 387 |
% \begin{codeexample} |
| 388 |
% \begin{verbatim} |
| 389 |
% \Diagram{ & x \\ |
| 390 |
% fs & gv f & gu \\ |
| 391 |
% & & fd } |
| 392 |
% \end{verbatim} |
| 393 |
% \Becomes |
| 394 |
% \begin{examplerhs}$ |
| 395 |
% \Diagram{ & x \\ |
| 396 |
% fs & gv f & gu \\ |
| 397 |
% & & fd } |
| 398 |
% \qquad\left(\quad |
| 399 |
% \makeatletter |
| 400 |
% \Diagram{ &\vrule x &\vrule height \feyn@maxis \\ |
| 401 |
% \hline fs &\vrule gv f &\vrule height \feyn@module gu \\ |
| 402 |
% \hline &\vrule height 0.7\feyn@module &\vrule fd \\ |
| 403 |
% \iffalse \hline &\vrule height \feyn@module &\vrule\fi |
| 404 |
% } |
| 405 |
% \quad\right) |
| 406 |
% $\end{examplerhs} |
| 407 |
% \end{codeexample} |
| 408 |
% |
| 409 |
% The |\Diagram| and |\DIAGRAM| macros take an optional argument of |
| 410 |
% either `centre' or `bottom': with `centre', the diagram is centred |
| 411 |
% on the math axis, with `bottom' the reference point of the diagram |
| 412 |
% is the reference point of the bottom-most row of the array. The |
| 413 |
% default is `centre'. |
| 414 |
% |
| 415 |
% Before the introduction of the |\belowl| macro in \feynx~v0.4, this |
| 416 |
% was the only way to produce this pair of angled propagators one on |
| 417 |
% top of the other. With |\belowl|, however, an alternative way of |
| 418 |
% producing this diagram is as shown below. |
| 419 |
% \begin{codeexample} |
| 420 |
% \begin{verbatim} |
| 421 |
% \feyn{fs |
| 422 |
% \Diagram[bottom]{x\\gv} |
| 423 |
% f gu\belowl{fd}} |
| 424 |
% \end{verbatim} |
| 425 |
% \Becomes |
| 426 |
% \begin{examplerhs}$ |
| 427 |
% \feyn{fs |
| 428 |
% \Diagram[bottom]{x\\gv} |
| 429 |
% f gu\belowl{fd}} |
| 430 |
% $\end{examplerhs} |
| 431 |
% \end{codeexample} |
| 432 |
% |
| 433 |
% Diagrams much more complicated than this are probably better dealt |
| 434 |
% with using Thorsten Ohl's \textsl{feynmf/feynmp} package. |
| 435 |
% |
| 436 |
% \section{Examples} |
| 437 |
% \label{s:examples} |
| 438 |
% |
| 439 |
% A simple propagator: |
| 440 |
% \begin{codeexample} |
| 441 |
% \begin{verbatim} |
| 442 |
% \feyn{\vertexlabel^a |
| 443 |
% !{fA}p \vertexlabel^b} |
| 444 |
% = \displaystyle |
| 445 |
% \frac{i\delta^{ab}} |
| 446 |
% {\pslash-m_0}} |
| 447 |
% \end{verbatim} |
| 448 |
% \Becomes |
| 449 |
% \begin{examplerhs}$ |
| 450 |
% \feyn{\vertexlabel^a |
| 451 |
% !{fA}p \vertexlabel^b} |
| 452 |
% = \displaystyle |
| 453 |
% \frac{i\delta^{ab}}{\pslash-m_0} |
| 454 |
% $\end{examplerhs} |
| 455 |
% \end{codeexample} |
| 456 |
% |
| 457 |
% The |\Diagram| command lays out its arguments as an array. |
| 458 |
% \begin{codeexample} |
| 459 |
% \begin{verbatim} |
| 460 |
% \Diagram{\vertexlabel^a \\ |
| 461 |
% fd \\ |
| 462 |
% & g\vertexlabel_{\mu,c} \\ |
| 463 |
% \vertexlabel_b fu\\ |
| 464 |
% } |
| 465 |
% = ig\gamma_\mu (T^c)_{ab} |
| 466 |
% \end{verbatim} |
| 467 |
% \Becomes |
| 468 |
% \begin{examplerhs}$ |
| 469 |
% \Diagram{\vertexlabel^a \\ |
| 470 |
% fd \\ |
| 471 |
% & g\vertexlabel_{\mu,c} \\ |
| 472 |
% \vertexlabel_b fu\\ |
| 473 |
% } |
| 474 |
% = ig\gamma_\mu (T^c)_{ab} |
| 475 |
% $\end{examplerhs} |
| 476 |
% \end{codeexample} |
| 477 |
% The |\Diagram| is here necessary only for the vertex labels. |
| 478 |
% Without those, it would be as simple as: |
| 479 |
% \begin{codeexample} |
| 480 |
% \begin{verbatim} |
| 481 |
% \feyn{fd \belowl{fu} g |
| 482 |
% = ig\gamma_\mu (T^c)_{ab}} |
| 483 |
% \end{verbatim} |
| 484 |
% \Becomes |
| 485 |
% \begin{examplerhs}$ |
| 486 |
% \feyn{fd \belowl{fu} g} = ig\gamma_\mu (T^c)_{ab} |
| 487 |
% $\end{examplerhs} |
| 488 |
% \end{codeexample} |
| 489 |
% |
| 490 |
% An assortment of two-loop diagrams: |
| 491 |
% \begin{codeexample} |
| 492 |
% \begin{verbatim} |
| 493 |
% \feyn{fs f gl f glu f fs} |
| 494 |
% \end{verbatim} |
| 495 |
% \Becomes |
| 496 |
% $\feyn{fs f gl f glu f fs}$ |
| 497 |
% \end{codeexample} |
| 498 |
% This is a ``short-fermion fermion gluon-loop fermion |
| 499 |
% gluon-loop-upsidedown fermion short-fermion''. |
| 500 |
% |
| 501 |
% We can include vertical gluons: |
| 502 |
% \begin{codeexample} |
| 503 |
% \begin{verbatim} |
| 504 |
% \feyn{ms mA g1 gv g2 ms x f} |
| 505 |
% \end{verbatim} |
| 506 |
% \Becomes |
| 507 |
% $\feyn{ms mA g1 gv g2 ms x f}$ |
| 508 |
% \end{codeexample} |
| 509 |
% Note, in this example, that the gluon loop is formed by a pair of |
| 510 |
% `g1 g2' characters. This is because the `gl' half-loop character is |
| 511 |
% deliberately slightly squashed, and wouldn't meet the vertical gluon |
| 512 |
% properly. The half-loop character is squashed (as are |
| 513 |
% the fermion and ghost half-loops) partly because it looks |
| 514 |
% slightly better in a one-loop self-energy diagram, but also so that |
| 515 |
% the `gl glu' two-gluon loop in a two-loop diagram looks better: |
| 516 |
% \begin{codeexample} |
| 517 |
% \begin{verbatim} |
| 518 |
% \Diagram{&gl glu\\ |
| 519 |
% fsf g1 f&f g2 ffs \\} |
| 520 |
% \end{verbatim} |
| 521 |
% \Becomes |
| 522 |
% \begin{examplerhs}$ |
| 523 |
% \Diagram{&gl glu\\ |
| 524 |
% fsf g1 f&f g2 ffs \\} |
| 525 |
% $\end{examplerhs} |
| 526 |
% \end{codeexample} |
| 527 |
% The diagrams for `hl hlu' or `flA fluV', for example, are very similar. |
| 528 |
% |
| 529 |
% The |\momentum| command (more usually called with simply the~`!' |
| 530 |
% character) allows you to annotate a propagator with a momentum or a |
| 531 |
% particle label. For example |
| 532 |
% \begin{codeexample} |
| 533 |
% \begin{verbatim} |
| 534 |
% \feyn{fA + !{fA}{p} + ![bot]{fA}{p}} |
| 535 |
% \end{verbatim} |
| 536 |
% \Becomes |
| 537 |
% \begin{examplerhs}$ |
| 538 |
% \feyn{fA + !{fA}{p} + ![bot]{fA}{p}} |
| 539 |
% $\end{examplerhs} |
| 540 |
% \end{codeexample} |
| 541 |
% |
| 542 |
% \begin{codeexample} |
| 543 |
% \begin{verbatim} |
| 544 |
% \feyn{f !{g1A}1 !{g2V}2 |
| 545 |
% !{g3A}3 !{g4V}4 f}, |
| 546 |
% \feyn{fs f !{flA}{p} |
| 547 |
% !{fluV}{k} f fs} |
| 548 |
% \end{verbatim} |
| 549 |
% \Becomes |
| 550 |
% \begin{examplerhs}$ |
| 551 |
% \feyn{f !{g1A}1 !{g2V}2 |
| 552 |
% !{g3A}3 !{g4V}4 f}, |
| 553 |
% \feyn{fs f !{flA}{p} |
| 554 |
% !{fluV}{k} f fs} |
| 555 |
% $\end{examplerhs} |
| 556 |
% \end{codeexample} |
| 557 |
% |
| 558 |
% \begin{codeexample} |
| 559 |
% \begin{verbatim} |
| 560 |
% \feyn{!{fA}p |
| 561 |
% f!{glBV}k !{glSA}l |
| 562 |
% a\vertexlabel_{p+k-l} ff} |
| 563 |
% \end{verbatim} |
| 564 |
% \Becomes |
| 565 |
% \begin{examplerhs}$ |
| 566 |
% \feyn{!{fA}p |
| 567 |
% f!{glBV}k !{glSA}l |
| 568 |
% a\vertexlabel_{p+k-l} ff} |
| 569 |
% $\end{examplerhs} |
| 570 |
% \end{codeexample} |
| 571 |
% |
| 572 |
% \newenvironment{bigdisplay}[1] |
| 573 |
% {\endgraf |
| 574 |
% \penalty 50 \vskip 0.5\baselineskip plus 0.5\textheight |
| 575 |
% \vbox\bgroup |
| 576 |
% #1\endgraf \smallskip |
| 577 |
% \vbox{\hrule\hbox to \textwidth{\vrule height 1.5ex\hfil\vrule}}% |
| 578 |
% \parskip0pt} |
| 579 |
% {\vbox{\hbox to \textwidth{\vrule height 1.5ex \hfil\vrule}\hrule} |
| 580 |
% \egroup} |
| 581 |
% |
| 582 |
% \begin{bigdisplay}{Bremsstrahlung:} |
| 583 |
% \begin{verbatim} |
| 584 |
% \[ |
| 585 |
% \Diagram{ & x \\ |
| 586 |
% & ![ulft]{gvV}{q=p'+k-p} & !{guA}k \\ |
| 587 |
% ![bot]{fA}p & ![bot]{fA}{p'+k} & ![lrt]{fA}{p'} \\ |
| 588 |
% } |
| 589 |
% + |
| 590 |
% \Diagram{ & !{guA}k \\ |
| 591 |
% !{fA}p & ![bot]{fA}{p-k} fs & !{fA}{p'} \\ |
| 592 |
% & & ![lrt]{gvA}{q=p'+k-p} \\ |
| 593 |
% & & x\\ |
| 594 |
% } |
| 595 |
% \] |
| 596 |
% \end{verbatim} |
| 597 |
% \hrule |
| 598 |
% \[ |
| 599 |
% \Diagram{ & x \\ |
| 600 |
% & ![ulft]{gvV}{q=p'+k-p} & !{guA}k \\ |
| 601 |
% ![bot]{fA}p & ![bot]{fA}{p'+k} & ![lrt]{fA}{p'} \\ |
| 602 |
% } |
| 603 |
% + |
| 604 |
% \Diagram{ & !{guA}k \\ |
| 605 |
% !{fA}p & ![bot]{fA}{p-k} fs & !{fA}{p'} \\ |
| 606 |
% & & ![lrt]{gvA}{q=p'+k-p} \\ |
| 607 |
% & & x\\ |
| 608 |
% } |
| 609 |
% \] |
| 610 |
% \end{bigdisplay} |
| 611 |
% |
| 612 |
% \begin{bigdisplay}{And now the same, with |
| 613 |
% \texttt{\textbackslash belowl} and \texttt{\textbackslash belowr}:} |
| 614 |
% \begin{verbatim} |
| 615 |
% \[ |
| 616 |
% \def\stack#1#2{\Diagram[bottom]{#1\\#2}} |
| 617 |
% \feyn{ |
| 618 |
% !{fA}p |
| 619 |
% \stack{x}{![ulft]{gvV}{q=p'+k-p}} |
| 620 |
% ![bot]{fA}{p'+k} |
| 621 |
% \stack{!{guA}k}{![lrt]{fA}{p'}} |
| 622 |
% + |
| 623 |
% !{fA}p |
| 624 |
% \belowr{![llft]{gdA}k} !{fA}{p-k} |
| 625 |
% fs |
| 626 |
% \stack x{!{gvV}{q=p'+k-p}} !{fA}{p'}} |
| 627 |
% \] |
| 628 |
% \end{verbatim} |
| 629 |
% \hrule |
| 630 |
% \[ |
| 631 |
% \def\stack#1#2{\Diagram[bottom]{#1\\#2}} |
| 632 |
% \feyn{ |
| 633 |
% !{fA}p |
| 634 |
% \stack{x}{![ulft]{gvV}{q=p'+k-p}} |
| 635 |
% ![bot]{fA}{p'+k} |
| 636 |
% \stack{!{guA}k}{![lrt]{fA}{p'}} |
| 637 |
% + |
| 638 |
% !{fA}p |
| 639 |
% \belowr{![llft]{gdA}k} !{fA}{p-k} |
| 640 |
% fs |
| 641 |
% \stack x{!{gvV}{q=p'+k-p}} !{fA}{p'}} |
| 642 |
% \] |
| 643 |
% \end{bigdisplay} |
| 644 |
% |
| 645 |
% The |\stack| macro isn't defined by the \feynx\ package, but |
| 646 |
% it is useful enough that you might want to define it as one of your |
| 647 |
% own macros. |
| 648 |
% |
| 649 |
% \iffalse |
| 650 |
% We can also have diagrams in the text, like~$\Feyn{fsfglffs}$, and we can |
| 651 |
% annotate the diagrams |
| 652 |
% \begin{codeexample} |
| 653 |
% \begin{verbatim} |
| 654 |
% \annotate{2}{-0.5} |
| 655 |
% {\mbox{counterterm}} |
| 656 |
% \feyn{ms m gl ![llft]{gv}l |
| 657 |
% ms x f} |
| 658 |
% \end{verbatim} |
| 659 |
% \Becomes |
| 660 |
% \begin{examplerhs} $ |
| 661 |
% \annotate{2}{-0.5} |
| 662 |
% {\mbox{counterterm}} |
| 663 |
% \feyn{ms m gl ![llft]{gv}l |
| 664 |
% ms x f} |
| 665 |
% $\end{examplerhs} |
| 666 |
% \end{codeexample} |
| 667 |
% This is a ``short-massive massive gluon-loop gluon-vertical |
| 668 |
% short-massive counterterm fermion''. |
| 669 |
% \fi |
| 670 |
% |
| 671 |
% \begin{bigdisplay}{The expression for the heavy-fermion self-energy in the \textsc{ope} is:} |
| 672 |
% \begin{verbatim} |
| 673 |
% \def\bracket#1{\langle #1 \rangle} |
| 674 |
% \def\stack#1#2{\Diagram[bottom]{#1\\#2}} |
| 675 |
% \begin{eqnarray*} |
| 676 |
% -i\Sigma_{\rm ope} &=& |
| 677 |
% \left[ \feyn{faf + fsfglffs + \cdots} \right] 1 |
| 678 |
% \feynstrut{1}{1}\strut \\ |
| 679 |
% && \quad{}+ \left[ \feyn{ fxfs0glfs0xf + \cdots} \right] |
| 680 |
% \bracket{\overline\psi M \psi} \\ |
| 681 |
% && \quad{}+ \left[ |
| 682 |
% \feyn{fs \stack x{gv} fs \stack x{gv} fs} + \cdots |
| 683 |
% \right] |
| 684 |
% \bracket{G_{\mu\nu}^a G_{\mu\nu}^a}\\ |
| 685 |
% \end{eqnarray*} |
| 686 |
% \end{verbatim} |
| 687 |
% \hrule |
| 688 |
% \def\bracket#1{\langle #1 \rangle} |
| 689 |
% \def\stack#1#2{\Diagram[bottom]{#1\\#2}} |
| 690 |
% \begin{eqnarray*} |
| 691 |
% -i\Sigma_{\rm ope} &=& |
| 692 |
% \left[ \feyn{faf + fsfglffs + \cdots} \right] 1 |
| 693 |
% \feynstrut{1}{1}\strut \\ |
| 694 |
% && \quad{}+ \left[ \feyn{ fxfs0glfs0xf + \cdots} \right] |
| 695 |
% \bracket{\overline\psi M \psi} \\ |
| 696 |
% && \quad{}+ \left[ |
| 697 |
% \feyn{fs \stack x{gv} fs \stack x{gv} fs} + \cdots |
| 698 |
% \right] |
| 699 |
% \bracket{G_{\mu\nu}^a G_{\mu\nu}^a}\\ |
| 700 |
% \end{eqnarray*} |
| 701 |
% \end{bigdisplay} |
| 702 |
% |
| 703 |
% Now for two examples using |\FEYN|: |
| 704 |
% \begin{codeexample} |
| 705 |
% \begin{verbatim} |
| 706 |
% \feyn{f gu \belowl{fd}} |
| 707 |
% \end{verbatim} |
| 708 |
% \Becomes |
| 709 |
% \begin{examplerhs}$ |
| 710 |
% \feyn{f gu \belowl{fd}} |
| 711 |
% $\end{examplerhs} |
| 712 |
% \end{codeexample} |
| 713 |
% \begin{codeexample} |
| 714 |
% \begin{verbatim} |
| 715 |
% \FEYN{ |
| 716 |
% !{fA}s !{gu}{W^-_\mu} |
| 717 |
% \belowl{!{fdA}u} |
| 718 |
% } |
| 719 |
% \end{verbatim} |
| 720 |
% \Becomes |
| 721 |
% \begin{examplerhs}$ |
| 722 |
% \FEYN{ |
| 723 |
% !{fA}s !{gu}{W^-_\mu} \belowl{!{fdA}u} |
| 724 |
% } |
| 725 |
% $\end{examplerhs} |
| 726 |
% \end{codeexample} |
| 727 |
% \begin{codeexample} |
| 728 |
% \begin{verbatim} |
| 729 |
% \DIAGRAM{ |
| 730 |
% !{fA}s &!{gu}{W^-_\mu}\\ |
| 731 |
% & !{fdA}u |
| 732 |
% } |
| 733 |
% \end{verbatim} |
| 734 |
% \Becomes |
| 735 |
% \begin{examplerhs}$ |
| 736 |
% \DIAGRAM{!{fA}s &!{gu}{W^-_\mu}\\ & !{fdA}u} |
| 737 |
% $\end{examplerhs} |
| 738 |
% \end{codeexample} |
| 739 |
% |
| 740 |
% \begin{bigdisplay}{The Feynman Rules are as follows:} |
| 741 |
% \begin{verbatim} |
| 742 |
% \def\arraystretch{3} \arraycolsep=0.2cm |
| 743 |
% \[ \begin{array}{rcl} |
| 744 |
% \feyn{\vertexlabel^a !{fA}p \vertexlabel^b} % quark prop |
| 745 |
% &=& \displaystyle |
| 746 |
% {i\delta^{ab} \over \pslash- m_0} \\ |
| 747 |
% |
| 748 |
% \Diagram{\vertexlabel^a \\ fd \\ & g\vertexlabel_{\mu,c} \\ |
| 749 |
% \vertexlabel_b fu\\} % 3-point vertex |
| 750 |
% &=& \displaystyle |
| 751 |
% ig\gamma_\mu (t^c)_{ab} \\ |
| 752 |
% |
| 753 |
% \feyn{\vertexlabel_{\mu, a} !{gA}k \vertexlabel_{\nu, b}} % gluon prop |
| 754 |
% &=& \displaystyle |
| 755 |
% {-i\over k^2} \left[g_{\mu\nu} + (a_0 - 1) {k_\mu k_\nu \over k^2}\right] |
| 756 |
% \delta^{ab} \\ |
| 757 |
% |
| 758 |
% \Diagram{\vertexlabel^{\alpha,a} \\ |
| 759 |
% !{gdA}p \\ |
| 760 |
% & !{gA}r \vertexlabel_{\gamma,c} \\ |
| 761 |
% !{guA}q \\ |
| 762 |
% \vertexlabel_{\beta,b} |
| 763 |
% } % 3-gluon vertex |
| 764 |
% &=& \displaystyle |
| 765 |
% -g f^{abc} ( |
| 766 |
% g_{\beta\gamma} (q-r)_\alpha + |
| 767 |
% g_{\gamma\alpha} (r-p)_\beta + |
| 768 |
% g_{\alpha\beta} (p-q)_\gamma |
| 769 |
% ) \\ |
| 770 |
% |
| 771 |
% \feyn{\vertexlabel^a !hp \vertexlabel^b} % ghost prop |
| 772 |
% &=& \displaystyle |
| 773 |
% {i \over p^2} \delta_{ab} \\ |
| 774 |
% |
| 775 |
% \Diagram{\vertexlabel^b \\ hd \\ & g\vertexlabel^{\mu,a} \\ |
| 776 |
% \vertexlabel_c hu\\} % ghost-gluon vertex |
| 777 |
% &=& \displaystyle |
| 778 |
% -g f^{abc}p_\mu |
| 779 |
% \quad\raise 1ex\hbox{\vtop{\hsize=15em |
| 780 |
% where $p$ is the momentum of the outgoing positive energy |
| 781 |
% ghost\par}} |
| 782 |
% \end{array} \] |
| 783 |
% \end{verbatim} |
| 784 |
% \end{bigdisplay} |
| 785 |
% |
| 786 |
% \begin{bigdisplay}{\dots giving:} |
| 787 |
% \def\arraystretch{3} \arraycolsep=0.2cm |
| 788 |
% \[ \begin{array}{rcl} |
| 789 |
% \feyn{\vertexlabel^a !{fA}p \vertexlabel^b} |
| 790 |
% &=& \displaystyle |
| 791 |
% {i\delta^{ab} \over \pslash- m_0} \\ |
| 792 |
% |
| 793 |
% \Diagram{\vertexlabel^a \\ fd \\ & g\vertexlabel_{\mu,c} \\ |
| 794 |
% \vertexlabel_b fu\\} |
| 795 |
% &=& \displaystyle |
| 796 |
% ig\gamma_\mu (t^c)_{ab} \\ |
| 797 |
% |
| 798 |
% \feyn{\vertexlabel_{\mu, a} !{gA}k \vertexlabel_{\nu, b}} |
| 799 |
% &=& \displaystyle |
| 800 |
% {-i\over k^2} \left[g_{\mu\nu} + (a_0 - 1) {k_\mu k_\nu \over k^2}\right] |
| 801 |
% \delta^{ab} \\ |
| 802 |
% |
| 803 |
% \Diagram{\vertexlabel^{\alpha,a} \\ |
| 804 |
% !{gdA}p \\ |
| 805 |
% & !{gA}r \vertexlabel_{\gamma,c} \\ |
| 806 |
% !{guA}q \\ |
| 807 |
% \vertexlabel_{\beta,b} |
| 808 |
% } |
| 809 |
% &=& \displaystyle |
| 810 |
% -g f^{abc} ( |
| 811 |
% g_{\beta\gamma} (q-r)_\alpha + |
| 812 |
% g_{\gamma\alpha} (r-p)_\beta + |
| 813 |
% g_{\alpha\beta} (p-q)_\gamma |
| 814 |
% ) \\ |
| 815 |
% |
| 816 |
% \feyn{\vertexlabel^a !hp \vertexlabel^b} |
| 817 |
% &=& \displaystyle |
| 818 |
% {i \over p^2} \delta_{ab} \\ |
| 819 |
% |
| 820 |
% \Diagram{\vertexlabel^b \\ hd \\ & g\vertexlabel^{\mu,a} \\ |
| 821 |
% \vertexlabel_c hu\\} |
| 822 |
% &=& \displaystyle |
| 823 |
% -g f^{abc}p_\mu |
| 824 |
% \quad\raise 1ex\hbox{\vtop{\hsize=15em |
| 825 |
% where $p$ is the momentum of the outgoing positive energy |
| 826 |
% ghost\par}} |
| 827 |
% \end{array} \] |
| 828 |
% \end{bigdisplay} |
| 829 |
% |
| 830 |
% \begin{bigdisplay}{The diagrams can very naturally appear as parts of equations |
| 831 |
% (as is perhaps by now obvious):} |
| 832 |
% \begin{verbatim} |
| 833 |
% \begin{eqnarray} |
| 834 |
% \feyn{fcf} &=& \feyn{faf + fpf + fpfpf + \cdots} \\ |
| 835 |
% &=& \sum_{n=0}^\infty \feyn{fsafs ( pfsafs)}^n \\ |
| 836 |
% &=& \feyn{\frac{fsafs}{1-(pfsafs)}}. |
| 837 |
% \end{eqnarray} |
| 838 |
% \end{verbatim} |
| 839 |
% \hrule |
| 840 |
% \begin{eqnarray} |
| 841 |
% \feyn{fcf} &=& \feyn{faf + fpf + fpfpf + \cdots} \\ |
| 842 |
% &=& \sum_{n=0}^\infty \feyn{fsafs ( pfsafs)}^n \\ |
| 843 |
% &=& \feyn{\frac{fsafs}{1-(pfsafs)}}. |
| 844 |
% \end{eqnarray} |
| 845 |
% \end{bigdisplay} |
| 846 |
% |
| 847 |
% \section{Installation} |
| 848 |
% |
| 849 |
% The nominal distribution point for the Feyn package is CTAN, |
| 850 |
% under \texttt{fonts/feyn}\footnote{\url{https://ctan.org/pkg/feyn}}. |
| 851 |
% |
| 852 |
% The feyn package is included in the TeXLive distribution\footnote{\url{https://www.tug.org/texlive/}}, so |
| 853 |
% you may have it on your machine already. If not, or if you need a |
| 854 |
% more up-to-date version, read on. |
| 855 |
% |
| 856 |
% Since the package is on CTAN, it should be easily installed and |
| 857 |
% updated using the tools which support this in your TeX distribution. |
| 858 |
% For TeXLive, that's |
| 859 |
% `tlmgr'\footnote{\url{https://www.tug.org/texlive/tlmgr.html}}, and |
| 860 |
% for MikTeX see the maintenance section of the |
| 861 |
% manual\footnote{\url{https://docs.miktex.org/}}. |
| 862 |
% |
| 863 |
% \subsection{Installing by hand} |
| 864 |
% |
| 865 |
% If, for some reason, you need to install the package by hand, then |
| 866 |
% you should be able to find generic instructions for installing |
| 867 |
% \LaTeX\ files at \url{https://texfaq.org/#installing}. |
| 868 |
% |
| 869 |
% In brief: If you have not done so already, you need to extract the package |
| 870 |
% file from the distribution file using |latex feyn.ins|. The |
| 871 |
% resulting \file{feyn.sty} should be installed in the usual location |
| 872 |
% for style files -- that is, something like |
| 873 |
% \file{texmf.local/tex/latex/feyn.sty}. The \metafont\ source files |
| 874 |
% \file{*.mf} should be installed in a directory with a location such as |
| 875 |
% \file{texmf.local/fonts/source/feyn/}. That should be all you need |
| 876 |
% to do as regards the installation of the fonts -- if your \TeX\ |
| 877 |
% setup is installed correctly, then the usual font-generation |
| 878 |
% commands (such as \file{mktexpk} for example) should work as normal, |
| 879 |
% and these will usually be invoked by default when \LaTeX\ or |
| 880 |
% pdf\LaTeX\ is run. |
| 881 |
% |
| 882 |
% If you are using a \TeX\ system based on TeXLive (which is true of most Unix |
| 883 |
% installations, and most macOS installations), then you can |
| 884 |
% determine the style-file and \metafont\ search paths using the commands |
| 885 |
% \begin{verbatim} |
| 886 |
% % kpsepath tex |
| 887 |
% % kpsepath mf |
| 888 |
% \end{verbatim} |
| 889 |
% respectively. After you have installed them, you will probably need |
| 890 |
% to give the command \texttt{mktexlsr} to rebuild the paths database, |
| 891 |
% and you can confirm that the files are findable with the commands |
| 892 |
% \texttt{kpsewhich feyn.sty} and \texttt{kpsewhich feyn10.mf}. |
| 893 |
% |
| 894 |
% \section{Licence} |
| 895 |
% |
| 896 |
% The following is the text of the BSD 2-clause licence. |
| 897 |
% |
| 898 |
% All rights reserved. |
| 899 |
% |
| 900 |
% Redistribution and use in source and binary forms, with or without |
| 901 |
% modification, are permitted provided that the following conditions are |
| 902 |
% met: |
| 903 |
% |
| 904 |
% 1. Redistributions of source code must retain the above copyright |
| 905 |
% notice, this list of conditions and the following disclaimer. |
| 906 |
% |
| 907 |
% 2. Redistributions in binary form must reproduce the above copyright |
| 908 |
% notice, this list of conditions and the following disclaimer in the |
| 909 |
% documentation and/or other materials provided with the distribution. |
| 910 |
% |
| 911 |
% This software is provided by the copyright holders and contributors |
| 912 |
% ``as is'' and any express or implied warranties, including, but not |
| 913 |
% limited to, the implied warranties of merchantability and fitness for |
| 914 |
% a particular purpose are disclaimed. in no event shall the copyright |
| 915 |
% holder or contributors be liable for any direct, indirect, incidental, |
| 916 |
% special, exemplary, or consequential damages (including, but not |
| 917 |
% limited to, procurement of substitute goods or services; loss of use, |
| 918 |
% data, or profits; or business interruption) however caused and on any |
| 919 |
% theory of liability, whether in contract, strict liability, or tort |
| 920 |
% (including negligence or otherwise) arising in any way out of the use |
| 921 |
% of this software, even if advised of the possibility of such damage. |
| 922 |
% |
| 923 |
% |
| 924 |
% \subsection*{Acknowledgements} |
| 925 |
% |
| 926 |
% Thanks to Purnendu Chakraborty, Fabio Correa, Bryan Chen, Hoang |
| 927 |
% Nghia Nguyen and Luciano Pandola for |
| 928 |
% suggestions and testing (and encouragement) at various times. |
| 929 |
% |
| 930 |
% |
| 931 |
% \StopEventually{} |
| 932 |
% |
| 933 |
% \section{Implementation} |
| 934 |
% \begin{macrocode} |
| 935 |
%<*package> |
| 936 |
% \end{macrocode} |
| 937 |
% |
| 938 |
% Start off with the available options. |
| 939 |
% |
| 940 |
% A wrinkle is that the |{align}| environment, which is defined |
| 941 |
% in the amsmath package, reads its contents before processing them, |
| 942 |
% which means that a `!' within the environment has its catcode fixed |
| 943 |
% before it can be changed by |\feyn| or |\diagram|. To handle this |
| 944 |
% situation, we support \Lopt{globalbang} and \Lopt{noglobalbang} |
| 945 |
% options, which cause the `!' character to be redefined globally or |
| 946 |
% not. The default depends on whether the amsmath package was loaded |
| 947 |
% before this one was. |
| 948 |
% \begin{macrocode} |
| 949 |
\newif\ifFeyn@globalbang |
| 950 |
\@ifpackageloaded{amsmath}{\Feyn@globalbangtrue}{\Feyn@globalbangfalse} |
| 951 |
\DeclareOption{globalbang}{\Feyn@globalbangtrue} |
| 952 |
\DeclareOption{noglobalbang}{\Feyn@globalbangfalse} |
| 953 |
% \end{macrocode} |
| 954 |
% |
| 955 |
% Now process the options specified in the package command. |
| 956 |
% \begin{macrocode} |
| 957 |
\ProcessOptions |
| 958 |
% \end{macrocode} |
| 959 |
% |
| 960 |
% Declare the feyn math font family. The |\skewchar| for this font |
| 961 |
% (see the \TeX book, p431) can be set to zero, since it's a |
| 962 |
% completely upright maths font (the least of its peculiarities). We |
| 963 |
% don't have the font in much of a range of sizes. |
| 964 |
% \begin{macrocode} |
| 965 |
\DeclareFontFamily{OMS}{feyn}{\skewchar\font'000} |
| 966 |
\DeclareFontShape{OMS}{feyn}{m}{n}{% |
| 967 |
<-10.5>feyn10% |
| 968 |
<10.5-11.5>feyn11% |
| 969 |
<11.5-15>feyn12% |
| 970 |
<15-21>feyn18% |
| 971 |
<21->feyn24% |
| 972 |
}{} |
| 973 |
% \end{macrocode} |
| 974 |
% |
| 975 |
% Now do the same for the text-size fonts, declaring the textfeyn math |
| 976 |
% font family. |
| 977 |
% \begin{macrocode} |
| 978 |
\DeclareFontFamily{OMS}{textfeyn}{\skewchar\font'000} |
| 979 |
\DeclareFontShape{OMS}{textfeyn}{m}{n}{% |
| 980 |
<-10.5>feyntext10% |
| 981 |
<10.5-11.5>feyntext11% |
| 982 |
<11.5-15>feyntext12% |
| 983 |
<15-21>feyntext18% |
| 984 |
<21->feyntext24% |
| 985 |
}{} |
| 986 |
% \end{macrocode} |
| 987 |
% |
| 988 |
% Finally, do the same for the extended-size fonts, declaring the |
| 989 |
% feynx math font family. |
| 990 |
% \begin{macrocode} |
| 991 |
\DeclareFontFamily{OMS}{feynx}{\skewchar\font'000} |
| 992 |
\DeclareFontShape{OMS}{feynx}{m}{n}{% |
| 993 |
<-10.5>feynx10% |
| 994 |
<10.5-11.5>feynx11% |
| 995 |
<11.5-15>feynx12% |
| 996 |
<15-21>feynx18% |
| 997 |
<21->feynx24% |
| 998 |
}{} |
| 999 |
% \end{macrocode} |
| 1000 |
% |
| 1001 |
% XXX It would be nice to arrange things so that superscripts in |
| 1002 |
% the feyn font were drawn from cmmi7, or something. The original |
| 1003 |
% feyn.sty arranged this with |\scriptfont\diagramfam=\ninmi|, but |
| 1004 |
% it's not clear what the analogue in the FSS is. |
| 1005 |
% |
| 1006 |
% Now declare the `feynman' symbol font, and make the command |\feyn| |
| 1007 |
% set its argument in that font. Similarly have |\Feyn| invoke the |
| 1008 |
% feynman symbol font for the text sizes. |
| 1009 |
% \begin{macrocode} |
| 1010 |
\DeclareSymbolFont{feynman}{OMS}{feyn}{m}{n} |
| 1011 |
\DeclareSymbolFontAlphabet{\feyn@alphabet}{feynman} |
| 1012 |
\DeclareSymbolFont{textfeynman}{OMS}{textfeyn}{m}{n} |
| 1013 |
\DeclareSymbolFontAlphabet{\Feyn@alphabet}{textfeynman} |
| 1014 |
\DeclareSymbolFont{feynmanextended}{OMS}{feynx}{m}{n} |
| 1015 |
\DeclareSymbolFontAlphabet{\FEYN@alphabet}{feynmanextended} |
| 1016 |
% \end{macrocode} |
| 1017 |
% |
| 1018 |
% Now use these font-setting commands, defining |\feyn| and |\Feyn| to |
| 1019 |
% switch to the given alphabets, defining ! as a shortcut for |
| 1020 |
% |\momentum| (so that |!{x}{y}| is interpreted as |\momentum{x}{y}|). |
| 1021 |
% We have to make sure that the `!' character produces that character |
| 1022 |
% everywhere except within |\feyn| or |\Feyn|. How we do this depends |
| 1023 |
% on the value of the |\ifFeyn@globalbang| switch. |
| 1024 |
% \begin{macro}{\feyn} |
| 1025 |
% \begin{macrocode} |
| 1026 |
\ifFeyn@globalbang |
| 1027 |
\catcode`\!=\active |
| 1028 |
\def!{\char`\!} % ! produces this character everywhere |
| 1029 |
\def\feyn{\begingroup |
| 1030 |
\let!\momentum % ...except within \feyn |
| 1031 |
\feyn@} |
| 1032 |
\def\Feyn{\begingroup |
| 1033 |
\let!\momentum % ...or \Feyn |
| 1034 |
\Feyn@} |
| 1035 |
\def\FEYN{\begingroup |
| 1036 |
\let!\momentum % ...or \FEYN |
| 1037 |
\FEYN@} |
| 1038 |
\else |
| 1039 |
{\catcode`\!=\active % only make ! active within \feyn |
| 1040 |
\gdef\feyn{% |
| 1041 |
\begingroup % ends in \feyn@ |
| 1042 |
\catcode`\!=\active |
| 1043 |
\let!=\momentum |
| 1044 |
\feyn@} |
| 1045 |
\gdef\Feyn{% |
| 1046 |
\begingroup % ends in \Feyn@ |
| 1047 |
\catcode`\!=\active |
| 1048 |
\let!=\momentum |
| 1049 |
\Feyn@} |
| 1050 |
\gdef\FEYN{% |
| 1051 |
\begingroup % ends in \FEYN@ |
| 1052 |
\catcode`\!=\active |
| 1053 |
\let!=\momentum |
| 1054 |
\FEYN@}} |
| 1055 |
\fi |
| 1056 |
\def\feyn@#1{\let\feyn@mfmodule\feyn@mfbasemodule |
| 1057 |
\feyn@alphabet{#1}\endgroup} |
| 1058 |
\def\Feyn@#1{\let\feyn@mfmodule\feyn@mfbasemodule |
| 1059 |
\Feyn@alphabet{#1}\endgroup} |
| 1060 |
\def\FEYN@#1{\let\feyn@mfmodule\feyn@mfextendedmodule |
| 1061 |
\FEYN@alphabet{#1}\endgroup} |
| 1062 |
% \end{macrocode} |
| 1063 |
% \end{macro} |
| 1064 |
% |
| 1065 |
% |
| 1066 |
% Now get the size of the `module' (the length of the fermion), and the |
| 1067 |
% height of the math-axis, from the font. You might think that the |
| 1068 |
% math-axis is obtainable from |\fontdimen22| of the font, but we do |
| 1069 |
% not load it as an |{operator}| font when we invoke |
| 1070 |
% |\DeclareSymbolFont|, so it does not have all 22 parameters that a |
| 1071 |
% symbol font (as the \TeX book uses the term, rather than \LaTeXe's |
| 1072 |
% NFSS). I confess I don't \emph{really} understand the ins and outs |
| 1073 |
% of this, but this route is robust and not wrong. |
| 1074 |
% |
| 1075 |
% The character |"20| in the feyn font is a dummy charcter, with width |
| 1076 |
% |module#| and height |a#| (using the dimensions of the font |
| 1077 |
% file). Use this to set the |\feyn@module| and |\feyn@maxis|. Note |
| 1078 |
% that the `module' used in this package file is twice the module used |
| 1079 |
% in the \metafont\ files themselves. |
| 1080 |
% \begin{macro}{\feyn@module} |
| 1081 |
% \begin{macro}{\feyn@maxis} |
| 1082 |
% \begin{macrocode} |
| 1083 |
\DeclareMathSymbol{\FeynSpaceChar}{\mathord}{feynman}{"20} |
| 1084 |
\setbox0=\hbox{$\FeynSpaceChar$} |
| 1085 |
\newdimen\feyn@mfbasemodule \feyn@mfbasemodule=\wd0 |
| 1086 |
\newdimen\feyn@module \feyn@module=2\wd0 |
| 1087 |
\newdimen\feyn@maxis \feyn@maxis=\ht0 |
| 1088 |
\DeclareMathSymbol{\FeynxSpaceChar}{\mathord}{feynmanextended}{"20} |
| 1089 |
\setbox0=\hbox{$\FeynxSpaceChar$} |
| 1090 |
\newdimen\feyn@mfextendedmodule \feyn@mfextendedmodule=\wd0 |
| 1091 |
% \end{macrocode} |
| 1092 |
% \end{macro} |
| 1093 |
% \end{macro} |
| 1094 |
% |
| 1095 |
% \begin{macro}{\Diagram} |
| 1096 |
% Define the |\Diagram| macro, which lays out a semi-complicated |
| 1097 |
% diagram in 2-d. The macro takes an optional argument which can be |
| 1098 |
% either |[bottom]| or |[centre]| |
| 1099 |
% \begin{macrocode} |
| 1100 |
{\catcode`\!=\active |
| 1101 |
\gdef\Diagram{% |
| 1102 |
\begingroup % ends in \Diagram@ |
| 1103 |
\catcode`\!=\active |
| 1104 |
\let!\momentum |
| 1105 |
% \Diagram@ |
| 1106 |
\@ifnextchar[\Diagram@{\Diagram@[centre]}%] |
| 1107 |
}} |
| 1108 |
\let\Diagram@pos@centre\vcenter |
| 1109 |
\let\Diagram@pos@center\vcenter %for Webster fans |
| 1110 |
\let\Diagram@pos@bottom\relax |
| 1111 |
\def\Diagram@[#1]#2{\setbox0=\hbox{\vbox{\offinterlineskip \let\\\cr |
| 1112 |
\halign{&$\displaystyle\feyn{##}$\cr #2\crcr}}}% |
| 1113 |
% \end{macrocode} |
| 1114 |
% At this point, |\box0| has zero depth. It must be an hbox, because |
| 1115 |
% we're fiddling with its height within a enclosing |\vbox|. See the |
| 1116 |
% \TeX book pp 388--389. This takes advantage of appx G, rule 8 to |
| 1117 |
% move box0 down by the height of the math axis. The construction |
| 1118 |
% |\dp0 = -2\fontdimen22 \textfont2| also works, in the sense of |
| 1119 |
% moving the box onto the math axis, but makes the box too small, |
| 1120 |
% which means that surrounding text can encroach. |
| 1121 |
% \begin{macrocode} |
| 1122 |
\@tempdima=\ht0 |
| 1123 |
\advance\@tempdima by 2\feyn@maxis \ht0=\@tempdima |
| 1124 |
% no error checking -- unrecognised placement specifiers just expand to \relax |
| 1125 |
\csname Diagram@pos@#1\endcsname{\box0}% |
| 1126 |
\endgroup}% end group begun in \Diagram |
| 1127 |
% \end{macrocode} |
| 1128 |
% \end{macro} |
| 1129 |
% |
| 1130 |
% Define |\DIAGRAM| identically, except for using |\FEYN| rather than |\feyn|. |
| 1131 |
% \begin{macrocode} |
| 1132 |
{\catcode`\!=\active |
| 1133 |
\gdef\DIAGRAM{% |
| 1134 |
\begingroup % ends in \Diagram@ |
| 1135 |
\catcode`\!=\active |
| 1136 |
\let!\momentum |
| 1137 |
% \DIAGRAM@ |
| 1138 |
\@ifnextchar[\DIAGRAM@{\DIAGRAM@[centre]}%] |
| 1139 |
}} |
| 1140 |
\def\DIAGRAM@[#1]#2{\setbox0=\hbox{\vbox{\offinterlineskip \let\\\cr |
| 1141 |
\halign{&$\displaystyle\FEYN{##}$\cr #2\crcr}}}% |
| 1142 |
\@tempdima=\ht0 |
| 1143 |
\advance\@tempdima by 2\feyn@maxis \ht0=\@tempdima |
| 1144 |
\csname Diagram@pos@#1\endcsname{\box0}% |
| 1145 |
\endgroup}% end group begun in \Diagram |
| 1146 |
% \end{macrocode} |
| 1147 |
% |
| 1148 |
% \begin{macro}{\maxis} |
| 1149 |
% Raise the argument to the math axis. |
| 1150 |
% \begin{macrocode} |
| 1151 |
\def\maxis#1{\raise\feyn@maxis \hbox{$#1$}} |
| 1152 |
% \end{macrocode} |
| 1153 |
% \end{macro} |
| 1154 |
% |
| 1155 |
% \iffalse |
| 1156 |
% I feel that something like the following is surely somehow useful, |
| 1157 |
% but the spacing doesn't quite work out with what I've got here. |
| 1158 |
% \def\fstack#1{\vbox{\baselineskip=0pt \@fstack#1,,}} |
| 1159 |
% \def\@fstack#1,{% |
| 1160 |
% \def\@tempa{#1}% |
| 1161 |
% \ifx\@tempa\@empty |
| 1162 |
% \let\@next\relax |
| 1163 |
% \else |
| 1164 |
% \hbox{$\feyn{#1}$}% |
| 1165 |
% \let\@next\@fstack |
| 1166 |
% \fi |
| 1167 |
% \@next |
| 1168 |
% } |
| 1169 |
% \[ |
| 1170 |
% \feyn{fsfg1\fstack{f0 gl,f0 glu,gv,ff}g2ffs \showlists} |
| 1171 |
% \] |
| 1172 |
% \fi |
| 1173 |
% |
| 1174 |
% \begin{macro}{\belowl} |
| 1175 |
% The argument of the |\belowl| macro is a string of characters in the |
| 1176 |
% \feynx\ font. They are set in a box, and then moved so that the box |
| 1177 |
% takes up zero horizontal width, and is moved downwards by its height |
| 1178 |
% -- that is, it is moved diagonally downwards and leftwards. It |
| 1179 |
% means that the bottom half of a pair of incoming or outgoing |
| 1180 |
% propagators can be set immediately belowl the upper half, without |
| 1181 |
% having to use the |\Diagram| macro. |
| 1182 |
% \begin{macrocode} |
| 1183 |
\def\belowl#1{% |
| 1184 |
\ifdim\feyn@mfmodule=\feyn@mfbasemodule |
| 1185 |
\let\@next\feyn |
| 1186 |
\else |
| 1187 |
\let\@next\FEYN |
| 1188 |
\fi |
| 1189 |
\setbox0\hbox{$\@next{#1}$}% |
| 1190 |
\hskip-\wd0 \lower\ht0\box0 |
| 1191 |
} |
| 1192 |
% \end{macrocode} |
| 1193 |
% \end{macro} |
| 1194 |
% \begin{macro}{\belowr} |
| 1195 |
% The |\belowr| macro is almost exactly the same, except that the |
| 1196 |
% argument is shifted rightwards, which is sometimes more natural to |
| 1197 |
% express. |
| 1198 |
% \begin{macrocode} |
| 1199 |
\def\belowr#1{% |
| 1200 |
\ifdim\feyn@mfmodule=\feyn@mfbasemodule |
| 1201 |
\let\@next\feyn |
| 1202 |
\else |
| 1203 |
\let\@next\FEYN |
| 1204 |
\fi |
| 1205 |
\setbox0\hbox{$\@next{#1}$}% |
| 1206 |
\@tempdima=\wd0 |
| 1207 |
\lower\ht0\box0 |
| 1208 |
\hskip-\@tempdima |
| 1209 |
} |
| 1210 |
% \end{macrocode} |
| 1211 |
% \end{macro} |
| 1212 |
% |
| 1213 |
% \begin{macro}{\momentum} |
| 1214 |
% Manages annotation of characters. |\momentum{ch}{text}| sets the character |
| 1215 |
% ch, which may be a ligature, and puts the given text at the recommended |
| 1216 |
% annotation position for that character. |\momentum[pos]{ch}{text}| |
| 1217 |
% is the same, except that the optional argument indicates the |
| 1218 |
% position relative to the annotation position. It must be one of |
| 1219 |
% `top', `urt', `lrt', `bot', `llft' or `ulft'. |
| 1220 |
% |
| 1221 |
% First, some support macros. |
| 1222 |
% |
| 1223 |
% |\feyn@nudge| is a small amount |
| 1224 |
% which is added to the annotation positions, to keep them clear of the |
| 1225 |
% point they're annotating. |
| 1226 |
% \begin{macrocode} |
| 1227 |
\newdimen\feyn@nudge |
| 1228 |
\feyn@nudge=\feyn@mfbasemodule \divide\feyn@nudge by 3 |
| 1229 |
% \end{macrocode} |
| 1230 |
% |
| 1231 |
% The various |\feyn@pos@<x>| macros position their third argument |
| 1232 |
% adjacent to a point offset by an amount |(#1,#2)| from the current |
| 1233 |
% position. The macro |\feyn@pos@top| has the third argument adjacent |
| 1234 |
% and above the point, |\feyn@pos@urt| has it to the upper-right, and |
| 1235 |
% so on. |
| 1236 |
% \begin{macrocode} |
| 1237 |
\def\feyn@pos@top#1#2#3{% top |
| 1238 |
\leavevmode |
| 1239 |
\@tempdima=#2\feyn@mfmodule \advance\@tempdima\feyn@nudge |
| 1240 |
\setbox1=\hbox{\raise \@tempdima\hbox to 0pt{% |
| 1241 |
\hskip #1\feyn@mfmodule |
| 1242 |
\hbox to 0pt{\hss$\scriptstyle #3$\hss}\hss}}% |
| 1243 |
\ht1=0pt \dp1=0pt \box1} |
| 1244 |
\def\feyn@pos@urt#1#2#3{% urt |
| 1245 |
\leavevmode |
| 1246 |
\@tempdima=#2\feyn@mfmodule \advance\@tempdima\feyn@nudge |
| 1247 |
\setbox1=\hbox{\raise \@tempdima\hbox to 0pt{% |
| 1248 |
\hskip #1\feyn@mfmodule \hskip\feyn@nudge $\scriptstyle #3$\hss}}% |
| 1249 |
\ht1=0pt \dp1=0pt \box1} |
| 1250 |
\def\feyn@pos@lrt#1#2#3{% lrt |
| 1251 |
\leavevmode |
| 1252 |
\setbox0=\hbox to 0pt{\hskip\feyn@nudge $\scriptstyle #3$\hss}% |
| 1253 |
\@tempdima=#2\feyn@mfmodule |
| 1254 |
\advance\@tempdima -\ht0 |
| 1255 |
\advance\@tempdima-\feyn@nudge |
| 1256 |
\setbox1=\hbox{\raise \@tempdima\hbox to 0pt{% |
| 1257 |
\hskip #1\feyn@mfmodule \box0\hss}}% |
| 1258 |
\ht1=0pt \dp1=0pt \box1} |
| 1259 |
\def\feyn@pos@bot#1#2#3{% bot |
| 1260 |
\leavevmode |
| 1261 |
\setbox0=\hbox to 0pt{\hss$\scriptstyle #3$\hss}% |
| 1262 |
\@tempdima=#2\feyn@mfmodule |
| 1263 |
\advance\@tempdima -\ht0 |
| 1264 |
\advance\@tempdima-\feyn@nudge |
| 1265 |
\setbox1=\hbox{\raise \@tempdima\hbox to 0pt{% |
| 1266 |
\hskip #1\feyn@mfmodule \box0\hss}}% |
| 1267 |
\ht1=0pt \dp1=0pt \box1} |
| 1268 |
\def\feyn@pos@llft#1#2#3{% llft |
| 1269 |
\leavevmode |
| 1270 |
\setbox0=\hbox to 0pt{\hss$\scriptstyle #3$\hskip\feyn@nudge}% |
| 1271 |
\@tempdima=#2\feyn@mfmodule |
| 1272 |
\advance\@tempdima -\ht0 |
| 1273 |
\advance\@tempdima-\feyn@nudge |
| 1274 |
\setbox1=\hbox{\raise \@tempdima\hbox to 0pt{% |
| 1275 |
\hskip #1\feyn@mfmodule \box0\hss}}% |
| 1276 |
\ht1=0pt \dp1=0pt \box1} |
| 1277 |
\def\feyn@pos@ulft#1#2#3{% ulft |
| 1278 |
\leavevmode |
| 1279 |
\@tempdima=#2\feyn@mfmodule \advance\@tempdima\feyn@nudge |
| 1280 |
\setbox1=\hbox{\raise \@tempdima\hbox to 0pt{% |
| 1281 |
\hskip #1\feyn@mfmodule |
| 1282 |
\hbox to 0pt{\hss$\scriptstyle #3$\hskip\feyn@nudge}\hss}}% |
| 1283 |
\ht1=0pt \dp1=0pt \box1} |
| 1284 |
% \end{macrocode} |
| 1285 |
% |
| 1286 |
% Now include the definitions of the annotation positions, as extracted |
| 1287 |
% from the Metafont file. These define macros |\feyn@ann@#1|, |
| 1288 |
% where argument |#1| is a given character (or ligature) at the |
| 1289 |
% position |(#2,#3)|, using the various |\feyn@pos@<x>| macros. The |
| 1290 |
% |<x>| is either the value of argument |#4|, or the contents of |
| 1291 |
% |\@tempa| if that has been set non-empty by |\momentum@|. |
| 1292 |
% \begin{macrocode} |
| 1293 |
\def\feyn@annotation#1#2#3#4{% |
| 1294 |
\expandafter\def\csname feyn@ann@#1\endcsname##1{% |
| 1295 |
\csname feyn@pos@\ifx\@tempa\@empty #4\else\@tempa\fi\endcsname |
| 1296 |
{#2}{#3}{##1}% |
| 1297 |
#1}} |
| 1298 |
% \end{macrocode} |
| 1299 |
% Now read in the collection of annotation positions. These are |
| 1300 |
% generated by the \texttt{./parse-ligtables} script, and inserted |
| 1301 |
% into this file by the Makefile when \file{feyn.dtx} is generated. |
| 1302 |
% \begin{macrocode} |
| 1303 |
% @FEYNANNOTATIONS@ |
| 1304 |
% commands generated by parse-ligtables... |
| 1305 |
\feyn@annotation{f}{0.99974}{0.35}{top}% 102 = "f" |
| 1306 |
\feyn@annotation{fA}{0.99974}{0.35}{top}% 70 = "F" |
| 1307 |
\feyn@annotation{fV}{0.99974}{0.35}{top}% 6 = 6 |
| 1308 |
\feyn@annotation{flo}{0}{2.25}{top}% 107 = "k" |
| 1309 |
\feyn@annotation{floA}{0}{2.25}{top}% 75 = "K" |
| 1310 |
\feyn@annotation{floV}{0}{2.25}{top}% 11 = 11 |
| 1311 |
\feyn@annotation{fu}{0.70692}{0.95692}{ulft}% 101 = "e" |
| 1312 |
\feyn@annotation{fuA}{0.70692}{0.95692}{ulft}% 69 = "E" |
| 1313 |
\feyn@annotation{fuV}{0.70692}{0.95692}{ulft}% 5 = 5 |
| 1314 |
\feyn@annotation{fd}{0.70692}{0.95692}{urt}% 100 = "d" |
| 1315 |
\feyn@annotation{fdA}{0.70692}{0.95692}{urt}% 68 = "D" |
| 1316 |
\feyn@annotation{fdV}{0.70692}{0.95692}{urt}% 4 = 4 |
| 1317 |
\feyn@annotation{fv}{0}{1.24974}{urt}% 98 = "b" |
| 1318 |
\feyn@annotation{fvA}{0}{1.24974}{urt}% 66 = "B" |
| 1319 |
\feyn@annotation{fvV}{0}{1.24974}{urt}% 2 = 2 |
| 1320 |
\feyn@annotation{m}{0.99974}{0.32802}{top}% 109 = "m" |
| 1321 |
\feyn@annotation{mA}{0.99974}{0.32802}{top}% 77 = "M" |
| 1322 |
\feyn@annotation{mV}{0.99974}{0.32802}{top}% 13 = 13 |
| 1323 |
\feyn@annotation{ms}{0.49986}{0.32802}{top}% 35 = "#" |
| 1324 |
\feyn@annotation{fl}{0}{1.75}{top}% 108 = "l" |
| 1325 |
\feyn@annotation{flA}{0}{1.75}{top}% 76 = "L" |
| 1326 |
\feyn@annotation{flV}{0}{1.75}{top}% 12 = 12 |
| 1327 |
\feyn@annotation{flu}{0}{-1.25}{bot}% 110 = "n" |
| 1328 |
\feyn@annotation{fluA}{0}{-1.25}{bot}% 78 = "N" |
| 1329 |
\feyn@annotation{fluV}{0}{-1.25}{bot}% 14 = 14 |
| 1330 |
\feyn@annotation{flS}{0}{1.16667}{top}% 111 = "o" |
| 1331 |
\feyn@annotation{flSA}{0}{1.16667}{top}% 79 = "O" |
| 1332 |
\feyn@annotation{flSV}{0}{1.16667}{top}% 15 = 15 |
| 1333 |
\feyn@annotation{flSu}{0}{-0.83334}{bot}% 119 = "w" |
| 1334 |
\feyn@annotation{flSuA}{0}{-0.83334}{bot}% 87 = "W" |
| 1335 |
\feyn@annotation{flSuV}{0}{-0.83334}{bot}% 23 = 23 |
| 1336 |
\feyn@annotation{g}{0.99974}{0.45}{top}% 103 = "g" |
| 1337 |
\feyn@annotation{gA}{0.99974}{0.45}{top}% 71 = "G" |
| 1338 |
\feyn@annotation{gV}{0.99974}{0.45}{top}% 7 = 7 |
| 1339 |
\feyn@annotation{gu}{0.70692}{0.95692}{ulft}% 117 = "u" |
| 1340 |
\feyn@annotation{guA}{0.70692}{0.95692}{ulft}% 85 = "U" |
| 1341 |
\feyn@annotation{guV}{0.70692}{0.95692}{ulft}% 21 = 21 |
| 1342 |
\feyn@annotation{gd}{0.70692}{0.95692}{urt}% 118 = "v" |
| 1343 |
\feyn@annotation{gdA}{0.70692}{0.95692}{urt}% 86 = "V" |
| 1344 |
\feyn@annotation{gdV}{0.70692}{0.95692}{urt}% 22 = 22 |
| 1345 |
\feyn@annotation{gv}{0}{1.24974}{urt}% 125 = "}" |
| 1346 |
\feyn@annotation{gvA}{0}{1.24974}{urt}% 93 = "]" |
| 1347 |
\feyn@annotation{gvV}{0}{1.24974}{urt}% 29 = 29 |
| 1348 |
\feyn@annotation{g1}{-1}{1.98206}{ulft}% 113 = "q" |
| 1349 |
\feyn@annotation{g1A}{-1}{1.98206}{ulft}% 81 = "Q" |
| 1350 |
\feyn@annotation{g1V}{-1}{1.98206}{ulft}% 17 = 17 |
| 1351 |
\feyn@annotation{g2}{1.41422}{1.66422}{urt}% 114 = "r" |
| 1352 |
\feyn@annotation{g2A}{1.41422}{1.66422}{urt}% 82 = "R" |
| 1353 |
\feyn@annotation{g2V}{1.41422}{1.66422}{urt}% 18 = 18 |
| 1354 |
\feyn@annotation{g3}{1.41422}{-1.16422}{lrt}% 115 = "s" |
| 1355 |
\feyn@annotation{g3A}{1.41422}{-1.16422}{lrt}% 83 = "S" |
| 1356 |
\feyn@annotation{g3V}{1.41422}{-1.16422}{lrt}% 19 = 19 |
| 1357 |
\feyn@annotation{g4}{-1}{-1.48206}{llft}% 116 = "t" |
| 1358 |
\feyn@annotation{g4A}{-1}{-1.48206}{llft}% 84 = "T" |
| 1359 |
\feyn@annotation{g4V}{-1}{-1.48206}{llft}% 20 = 20 |
| 1360 |
\feyn@annotation{gl}{0}{1.75}{urt}% 121 = "y" |
| 1361 |
\feyn@annotation{glA}{0}{1.75}{urt}% 89 = "Y" |
| 1362 |
\feyn@annotation{glV}{0}{1.75}{urt}% 25 = 25 |
| 1363 |
\feyn@annotation{glu}{0}{-1.25}{llft}% 122 = "z" |
| 1364 |
\feyn@annotation{gluA}{0}{-1.25}{llft}% 90 = "Z" |
| 1365 |
\feyn@annotation{gluV}{0}{-1.25}{llft}% 26 = 26 |
| 1366 |
\feyn@annotation{glB}{1.02051}{2.71367}{urt}% 123 = "{" |
| 1367 |
\feyn@annotation{glBA}{1.02051}{2.71367}{urt}% 91 = "[" |
| 1368 |
\feyn@annotation{glBV}{1.02051}{2.71367}{urt}% 27 = 27 |
| 1369 |
\feyn@annotation{glS}{0}{1.5833}{llft}% 124 = "|" |
| 1370 |
\feyn@annotation{glSA}{0}{1.5833}{llft}% 92 = "\" |
| 1371 |
\feyn@annotation{glSV}{0}{1.5833}{llft}% 28 = 28 |
| 1372 |
\feyn@annotation{h}{0.99974}{0.25}{top}% 104 = "h" |
| 1373 |
\feyn@annotation{hA}{0.99974}{0.25}{top}% 72 = "H" |
| 1374 |
\feyn@annotation{hV}{0.99974}{0.25}{top}% 8 = 8 |
| 1375 |
\feyn@annotation{hu}{0.70464}{0.95464}{ulft}% 105 = "i" |
| 1376 |
\feyn@annotation{huA}{0.70464}{0.95464}{ulft}% 73 = "I" |
| 1377 |
\feyn@annotation{huV}{0.70464}{0.95464}{ulft}% 9 = 9 |
| 1378 |
\feyn@annotation{hd}{0.70464}{0.95464}{urt}% 106 = "j" |
| 1379 |
\feyn@annotation{hdA}{0.70464}{0.95464}{urt}% 74 = "J" |
| 1380 |
\feyn@annotation{hdV}{0.70464}{0.95464}{urt}% 10 = 10 |
| 1381 |
\feyn@annotation{hl}{0}{1.75}{top}% 126 = "~" |
| 1382 |
\feyn@annotation{hlA}{0}{1.75}{top}% 94 = "^" |
| 1383 |
\feyn@annotation{hlV}{0}{1.75}{top}% 30 = 30 |
| 1384 |
\feyn@annotation{hlu}{0}{-1.25}{top}% 127 = 127 |
| 1385 |
\feyn@annotation{hluA}{0}{-1.25}{top}% 95 = "_" |
| 1386 |
\feyn@annotation{hluV}{0}{-1.25}{top}% 31 = 31 |
| 1387 |
\feyn@annotation{hs}{0.49986}{0.25}{top}% 34 = """ |
| 1388 |
\feyn@annotation{c}{0.65044}{0.90044}{top}% 99 = "c" |
| 1389 |
\feyn@annotation{p}{0.65}{0.9}{top}% 112 = "p" |
| 1390 |
\feyn@annotation{P}{0.65044}{0.90044}{top}% 80 = "P" |
| 1391 |
\feyn@annotation{x}{0}{0.55641}{top}% 120 = "x" |
| 1392 |
% \end{macrocode} |
| 1393 |
% |
| 1394 |
% |
| 1395 |
% The |\momentum| macro (finally) invokes its worker macro |
| 1396 |
% |\momentum@|, defaulting that macro's optional argument to empty. |
| 1397 |
% In fact the macro |\momentum| should be only rarely |
| 1398 |
% invoked, since ! is made active and bound to it within |\feyn|. |
| 1399 |
% |
| 1400 |
% The |\momentum@| macro takes two arguments, and expands to a call to |
| 1401 |
% macro |\feyn@ann@#1|, acting on the second argument. This macro is |
| 1402 |
% one of those defined by |\feyn@annotation| above. There is an |
| 1403 |
% optional argument, giving the position for the annotation, if it has |
| 1404 |
% turned out that the default position for this character is |
| 1405 |
% inappropriate. The adjusted position may be one of `top', `urt', |
| 1406 |
% `lrt', `bot', `llft' or `ulft'. |
| 1407 |
% \begin{macrocode} |
| 1408 |
\def\momentum{\@ifnextchar[\momentum@{\momentum@[]}} |
| 1409 |
\def\momentum@[#1]#2#3{% |
| 1410 |
\def\@tempa{#1} |
| 1411 |
\ifx\@tempa\@empty \else |
| 1412 |
\@ifundefined{feyn@pos@#1} |
| 1413 |
{\@latex@error{No annotation position #1}% |
| 1414 |
{You cannot call \string\momentum[#1]{...}^^J(must be one |
| 1415 |
of top, urt, lrt, bot, llft, ulft)}% |
| 1416 |
#2}% |
| 1417 |
\fi |
| 1418 |
\@ifundefined{feyn@ann@#2}% |
| 1419 |
{\@latex@error{No annotation defined for #2}% |
| 1420 |
{You cannot call \string\momentum{#2}{...}}% |
| 1421 |
#2}% |
| 1422 |
{\csname feyn@ann@#2\endcsname{#3}}} |
| 1423 |
% \end{macrocode} |
| 1424 |
% \end{macro} |
| 1425 |
% |
| 1426 |
% \begin{macro}{\vertexlabel} |
| 1427 |
% The command |\vertexlabel^{text}| or |\vertexlabel_{text}| positions |
| 1428 |
% the |{text}| in maths mode either above or below, respectively, the |
| 1429 |
% current position. It's used between characters to label a vertex. |
| 1430 |
% \begin{macrocode} |
| 1431 |
\def\vertexlabel#1#2{\setbox0=\hbox to 0pt{\hss$\scriptstyle #2$\hss} |
| 1432 |
\ifcat #1^ |
| 1433 |
\vbox to 0pt{\vss\box0\nointerlineskip\kern2\feyn@maxis} |
| 1434 |
\else\ifcat #1_ |
| 1435 |
\vbox to 0pt{\kern\feyn@maxis\nointerlineskip\box0\vss} |
| 1436 |
\else |
| 1437 |
\PackageError{feyn} |
| 1438 |
{Bad arguments for \string\vertexlabel} |
| 1439 |
{Usage: \string\vertexlabel^{text} or \string\vertexlabel_{text}} |
| 1440 |
\fi\fi |
| 1441 |
} |
| 1442 |
% \end{macrocode} |
| 1443 |
% \end{macro} |
| 1444 |
% |
| 1445 |
% \begin{macro}{\annotate} |
| 1446 |
% The |\annotate| command takes $x$ and $y$ coordinates in units of |
| 1447 |
% modules, and text (in math mode) to be placed on a |\diagram|. |
| 1448 |
% Deprecated, now that the characters have annotation built in to them. |
| 1449 |
% \begin{macrocode} |
| 1450 |
\def\annotate#1#2#3{\vcenter to 0pt{\vss |
| 1451 |
\hbox to 0pt{\hskip #1\feyn@module\hbox to 0pt{\hss$\scriptstyle #3$\hss}\hss |
| 1452 |
}\vskip #2\feyn@module}} |
| 1453 |
% \end{macrocode} |
| 1454 |
% \end{macro} |
| 1455 |
% \begin{macro}{\tannotate} |
| 1456 |
% The |\tannotate| command is just the same, but the annotating text |
| 1457 |
% is in horizontal mode. |
| 1458 |
% \begin{macrocode} |
| 1459 |
\def\tannotate#1#2#3{\vcenter to 0pt{\vss |
| 1460 |
\hbox to 0pt{\hskip #1\feyn@module\hbox to 0pt{\hss #3\hss}\hss |
| 1461 |
}\vskip #2\feyn@module}} |
| 1462 |
% \end{macrocode} |
| 1463 |
% \end{macro} |
| 1464 |
% |
| 1465 |
% \begin{macro}{\feynstrut} |
| 1466 |
% The macro |\feynstrut#1#2| defines |\strut| to have a height |
| 1467 |
% |#1| modules, and depth |#2| modules. |
| 1468 |
% \begin{macrocode} |
| 1469 |
\def\feynstrut#1#2{\setbox\strutbox=\hbox{\vrule |
| 1470 |
height #1\feyn@module depth #2\feyn@module width 0pt}} |
| 1471 |
% \end{macrocode} |
| 1472 |
% \end{macro} |
| 1473 |
% |
| 1474 |
% \begin{macro}{\arrow} |
| 1475 |
% The command |\arrow#1#2#3| puts an arrow of gradient |#3|${}\times 45^\circ$ |
| 1476 |
% at position |(#1,#2)|(modules). This doesn't work -- the |\char| |
| 1477 |
% results in a |\rm| character appearing, rather than a |\feyn| |
| 1478 |
% character. Putting in a symbol like `+' has the same effect, but |
| 1479 |
% putting in, say, `a' works as expected. In other words, it's to do |
| 1480 |
% with the character's mathcode, and the |\char| |
| 1481 |
% should be replaced by a |\mathchar"7?\@tempcnta| somehow. The |
| 1482 |
% problem is that that depends on the parameter |\fam| having a |
| 1483 |
% suitable value. It's not clear to me what this corresponds to in |
| 1484 |
% \LaTeXe. See the \TeX book, chapter 17. |
| 1485 |
% \begin{macrocode} |
| 1486 |
\def\arrow#1#2#3{\@latex@error{Do not use the \string\arrow macro any more}{}} |
| 1487 |
% \end{macrocode} |
| 1488 |
% \end{macro} |
| 1489 |
% |
| 1490 |
% Declare symbols. All of these are ligatures. |
| 1491 |
% \begin{macrocode} |
| 1492 |
\DeclareMathSymbol{\wfermion}{0}{feynman}{"64} |
| 1493 |
%\DeclareMathSymbol{\Wfermion}{0}{feynman}{"44} |
| 1494 |
\DeclareMathSymbol{\hfermion}{0}{feynman}{"6B} |
| 1495 |
%\DeclareMathSymbol{\Hfermion}{0}{feynman}{"4B} |
| 1496 |
\DeclareMathSymbol{\shfermion}{0}{feynman}{"6C} |
| 1497 |
%\DeclareMathSymbol{\sHfermion}{0}{feynman}{"4C} |
| 1498 |
\DeclareMathSymbol{\whfermion}{0}{feynman}{"6D} |
| 1499 |
%\DeclareMathSymbol{\wHfermion}{0}{feynman}{"4D} |
| 1500 |
\DeclareMathSymbol{\gvcropped}{0}{feynman}{"07} |
| 1501 |
% \end{macrocode} |
| 1502 |
% But the following are not ligatures. |
| 1503 |
% \begin{macrocode} |
| 1504 |
\DeclareMathSymbol{\bigbosonloop}{0}{feynman}{"7B} |
| 1505 |
%\DeclareMathSymbol{\Bigbosonloop}{7}{feynman}{"21} |
| 1506 |
\DeclareMathSymbol{\smallbosonloop}{0}{feynman}{"7C} |
| 1507 |
\DeclareMathSymbol{\bigbosonloopA}{0}{feynman}{"5B} |
| 1508 |
\DeclareMathSymbol{\smallbosonloopA}{0}{feynman}{"5C} |
| 1509 |
\DeclareMathSymbol{\bigbosonloopV}{0}{feynman}{"1B} |
| 1510 |
\DeclareMathSymbol{\smallbosonloopV}{0}{feynman}{"1C} |
| 1511 |
% \end{macrocode} |
| 1512 |
% |
| 1513 |
% |
| 1514 |
% \Finale |
| 1515 |
\endinput |