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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
|
%% $Id: pst-feyn.tex 826 2018-09-27 09:21:43Z herbert $
%%
%% This is file `pst-feyn.tex',
%%
%% IMPORTANT NOTICE:
%%
%% Package `pst-feyn.tex'
%%
%% Herbert Voss <hvoss _at_ tug.org>
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
%% in directory macros/latex/base/lppl.txt.
%%
%% DESCRIPTION:
%% `pst-feyn' is a style file for the drawing of Feynman diagrams.
%% originally made by J.A.M. Vermaseren 14-feb-1994 for the picture environment
%
%%
\csname PSTFeynLoaded\endcsname
\let\PSTFeynLoaded\endinput
% Requires PSTricks,
\ifx\PSTricksLoaded\endinput\else \input pstricks.tex\fi
\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi
%
\def\fileversion{0.01}
\def\filedate{2018/09/26}
\message{`PST-feyn' v\fileversion, \filedate\space (HV,DL)}
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
\pst@addfams{pst-feyn}
\pstheader{pst-feyn.pro}
%
\def\axoxoff{0 }
\def\axoyoff{0 }
\def\axoxo{0 }
\def\axoyo{0 }
%
\define@key[psset]{pst-feyn}{amplitude}[0.25]{\pst@getlength{#1}\psk@feyn@amplitude}
\define@key[psset]{pst-feyn}{windings}[10]{\pst@checknum{#1}\psk@feyn@windings}
%\pst@getint{#1}\psk@feyn@windings}
\define@key[psset]{pst-feyn}{radius}[1]{\pst@getlength{#1}\psk@feyn@radius}
\psset[pst-feyn]{amplitude=0.25,windings=10,radius=1}
%
\def\psGluon{\pst@object{psGluon}}
\def\psGluon@i(#1)(#2){% Draws a gluon from (P1) to (P2) with amplitude and number of windings
%\put(\axoxoff,\axoyoff){\special{"\axocolor #1 \axoxo add #2 \axoyo add #3
% \axoxo add #4 \axoyo add #5 #6 \axowidth \axoscale gluon showpage}}
\pst@getcoor{#1}\pst@tempA
\pst@getcoor{#2}\pst@tempB
\begin@OpenObj
\addto@pscode{
\pst@tempA\space \axoyo add exch \axoxo add exch
\pst@tempB\space \axoyo add exch \axoxo add exch
\psk@feyn@amplitude\space %\pst@number\psunit mul
\psk@feyn@windings
tx@FeynDict begin gluon end
}%
\end@OpenObj
\ignorespaces
}
\def\psPhoton{\pst@object{psPhoton}}
\def\psPhoton@i(#1)(#2){% Draws a photon from (x1,y1) to (x2,y2) with amplitude and number of windings
\pst@getcoor{#1}\pst@tempA
\pst@getcoor{#2}\pst@tempB
\begin@OpenObj
\addto@pscode{
\pst@tempA\space \axoyo add exch \axoxo add exch
\pst@tempB\space \axoyo add exch \axoxo add exch
\psk@feyn@amplitude\space %\pst@number\psunit mul
\psk@feyn@windings
tx@FeynDict begin photon end
}%
\end@OpenObj
\ignorespaces
}
%
\def\psZigZag{\pst@object{psZigZag}}
\def\psZigZag@i(#1)(#2){% Draws a zigzag from (x1,y1) to (x2,y2) with amplitude and number of windings
\pst@getcoor{#1}\pst@tempA
\pst@getcoor{#2}\pst@tempB
\begin@OpenObj
\addto@pscode{
\pst@tempA\space \axoyo add exch \axoxo add exch
\pst@tempB\space \axoyo add exch \axoxo add exch
\psk@feyn@amplitude\space %\pst@number\psunit div
\psk@feyn@windings
tx@FeynDict begin zigzag end
}%
\end@OpenObj
\ignorespaces
}
%
\def\psPhotonArc{\pst@object{psPhotonArc}}
\def\psPhotonArc@i(#1)(#2,#3){% Draws a photon on an arc segment. start angle and target angle are (#2,#3)
\pst@getcoor{#1}\pst@tempA
\begin@OpenObj
\addto@pscode{
\pst@tempA\space \axoyo add exch \axoxo add exch
\psk@feyn@radius
#2 #3
\psk@feyn@amplitude\space %\pst@number\psunit div
\psk@feyn@windings
tx@FeynDict begin photonarc end
}%
\end@OpenObj
\ignorespaces
}
%
\def\psGluonArc{\pst@object{psGluonArc}}
\def\psGluonArc@i(#1)(#2,#3){%
%
% Draws a gluon on an arc segment. The center of the curve is at (1,2)
% The radius, start angle and target angle are (#2,#3,#4), 5 is the
% amplitude of the gluon, and 6 is the number of windings.
%New \psGluonArc[options](Coor)(phi1,\phi2)
\pst@getcoor{#1}\pst@tempA
\begin@OpenObj
\addto@pscode{
\pst@tempA\space \axoyo add exch \axoxo add exch translate
\psk@feyn@radius
#2 #3 % start angle end angle
\psk@feyn@amplitude\space %\pst@number\psunit div
\psk@feyn@windings
tx@FeynDict begin gluearc end
}%
\end@OpenObj
\ignorespaces
}
%
\def\psArrowArc{\pst@object{psArrowArc}}% Draws an arc segment with an arrow in it.
\def\psArrowArc@i(#1)(#2,#3){%
\pst@getcoor{#1}\pst@tempA
\begin@OpenObj
\addto@pscode{
\pst@tempA\space \axoyo add exch \axoxo add exch
\psk@feyn@radius\space %\pst@number\psrunit div
#2 #3
tx@FeynDict begin arrowarc end
}%
\end@OpenObj
\ignorespaces
}
%
\def\psLongArrowArc{\pst@object{psLongArrowArc}}
\def\psLongArrowArc@i(#1)(#2,#3){% Draws an arc segment with an arrow at its end.
% The arc segment runs anticlockwise
\begingroup
\use@keep@par
\psarc(#1){\psk@feyn@radius pt}{#2}{#3}%
\endgroup
\pst@getcoor{#1}\pst@tempA
\begin@OpenObj
\addto@pscode{
\pst@tempA\space \axoyo add exch \axoxo add exch
\psk@feyn@radius
#2 #3
tx@FeynDict begin longarrowarc end
}%
\end@OpenObj
\ignorespaces
}
%
\def\DashArrowArc(#1,#2)(#3,#4,#5)#6{
%
% Draws a dashed arc segment with an arrow in it. The center of the curve
% is at (1,2).
% The radius, start angle and target angle are (#3,#4,#5).
% The arc segment runs anticlockwise
%
\put(\axoxoff,\axoyoff){\special{" tx@FeynDict begin \axocolor #1 \axoxo add #2 \axoyo add #3
#4 #5 #6 \axowidth \axoscale dasharrowarc end showpage}}
}
%
\def\psArrowArcn{\pst@object{psArrowArcn}}% Draws an arc segment with an arrow in it.
\def\psArrowArcn@i(#1)(#2,#3){%
\pst@getcoor{#1}\pst@tempA
\begin@OpenObj
\addto@pscode{
\pst@tempA\space \axoyo add exch \axoxo add exch
\psk@feyn@radius\space \pst@number\psrunit div
#2 #3
tx@FeynDict begin arrowarcn end
}%
\end@OpenObj
\ignorespaces
}
%
\def\LongArrowArcn(#1,#2)(#3,#4,#5){
%
% Draws an arc segment with an arrow at the end. The center of the curve
% is at (1,2).
% The radius, start angle and target angle are (#3,#4,#5).
% The arc segment runs clockwise
%
\put(\axoxoff,\axoyoff){\special{" tx@FeynDict begin \axocolor #1 \axoxo add #2 \axoyo add #3
#4 #5 \axowidth \axoscale longarrowarcn end showpage}}
}
%
\def\DashArrowArcn(#1,#2)(#3,#4,#5)#6{
%
% Draws a dashed arc segment with an arrow in it. The center of the curve
% is at (1,2).
% The radius, start angle and target angle are (#3,#4,#5).
% The arc segment runs clockwise
%
\put(\axoxoff,\axoyoff){\special{" tx@FeynDict begin \axocolor #1 \axoxo add #2 \axoyo add #3
#4 #5 #6 \axowidth \axoscale dasharrowarcn end showpage}}
}
%
\def\psArrowLine{\pst@object{psArrowLine}}
\def\psArrowLine@i(#1)(#2){% Draws a line with an arrow in it from (x1,y1) to (x2,y2)
\begingroup
\use@keep@par
\psline(#1)(#2)%
\endgroup
\pst@getcoor{#1}\pst@tempA
\pst@getcoor{#2}\pst@tempB
\begin@OpenObj
\addto@pscode{
\pst@tempA\space \axoyo add exch \axoxo add exch %\tx@UserCoor
\pst@tempB\space \axoyo add exch \axoxo add exch %\tx@UserCoor
tx@FeynDict begin arrowline end
}%
\end@OpenObj
\ignorespaces
}
%
\def\LongArrow(#1,#2)(#3,#4){
%
% Draws a line with an arrow at the end from (x1,y1) to (x2,y2)
%
\put(\axoxoff,\axoyoff){\special{" tx@FeynDict begin \axocolor #1 \axoxo add #2 \axoyo add #3
\axoxo add #4 \axoyo add \axowidth \axoscale longarrow end showpage}}
}
%
\def\DashArrowLine(#1,#2)(#3,#4)#5{
%
% Draws a dashed line with an arrow in it from (x1,y1) to (x2,y2)
% The size of the dashes is given by the fifth argument.
%
\put(\axoxoff,\axoyoff){\special{" tx@FeynDict begin \axocolor #1 \axoxo add #2 \axoyo add #3
\axoxo add #4 \axoyo add #5 \axowidth \axoscale dasharrowline end showpage}}
}
%
\def\psCArc{\pst@object{psCArc}}
\def\psCArc@i(#1)(#2,#3){% Draws an arc segment. The center of the curve is at .
%\axocolor #1 \axoxo add #2 \axoyo add #3 #4 #5 \axowidth \axoscale carc end showpage
\pst@getcoor{#1}\pst@tempA
\begin@OpenObj
\addto@pscode{
\pst@tempA\space \axoyo add exch \axoxo add exch
\psk@feyn@radius\space %\pst@number\psrunit div
#2 #3
tx@FeynDict begin carc end
}%
\end@OpenObj
\ignorespaces
}
%
\let\psText\rput
%
\def\psBCirc{\pst@object{psBCirc}}
\def\psBCirc@i(#1)#2{\begingroup\use@par\pscircle[fillstyle=solid,fillcolor=white](#1){#2}\endgroup}%
% Draws a circle at (1,2) and radius 3 that is blanked out.
%
\def\psGCirc{\pst@object{psGCirc}}% fill the circle with a gray scale
\def\psGCirc@i(#1)#2#3{{\use@par\pscircle[fillstyle=solid,fillcolor={[gray]#3}](#1){#2}}}%
%
\def\psCCirc{\pst@object{psCCirc}}% #3 is the color of the circle, #4 the color of the contents
\def\psCCirc@i(#1)#2#3#4{\begingroup\use@par\pscircle[linecolor=#3,fillstyle=solid,fillcolor=#4](#1){#2}\endgroup}
%
\def\psPText{\@ifnextchar[\psPText@i{\psPText@i[c]}}
\def\psPText@i[#1](#2)(#3)#4{%
% \definecolor{temp@color}{gray}{#3}%
\rput[#1]{#3}(#2){\shortstack{#4}}%
% \rput[#1](#2){\textcolor{temp@color}{\shortstack{#4}}}%
}
%
\def\psLogAxis{\pst@object{psLogAxis}}
% LogAxis(x1,y1)(x2,y2)(num_logs,hashsize,offset)
\def\psLogAxis@i(#1)(#2)(#3,#4,#5){%
% The line is from (x1,y1) to (x2,y2) and the marks are on the left side
% when hashsize is positive, and right when it is negative.
% num_logs is the number of orders of magnitude and offset is the number
% at which one starts at (x1,y1) (like if offset=2 we start at 2)
% When offset is 0 we start at 1. Width is the linewidth.
\pst@getcoor{#1}\pst@tempA
\pst@getcoor{#2}\pst@tempB
\begin@OpenObj
\addto@pscode{
\pst@tempA\space \axoyo add exch \axoxo add exch
\pst@tempB\space \axoyo add exch \axoxo add exch
#3 #4 #5
tx@FeynDict begin logaxis end
}%
\end@OpenObj
\ignorespaces
}
%
\def\psLinAxis{\pst@object{psLinAxis}}
% LinAxis(x1,y1)(x2,y2)(num_decs,per_dec,hashsize,offset)
\def\psLinAxis@i(#1)(#2)(#3,#4,#5,#6){%
% The line is from (x1,y1) to (x2,y2) and the marks are on the left side
% when hashsize is positive, and right when it is negative.
% num_decs is the number of accented marks, per_dec the number of
% divisions between them and offset is the number
% at which one starts at (x1,y1) (like if offset=2 we start at the second
% small mark) Width is the linewidth.
\pst@getcoor{#1}\pst@tempA
\pst@getcoor{#2}\pst@tempB
\begin@OpenObj
\addto@pscode{
\pst@tempA\space \axoyo add exch \axoxo add exch
\pst@tempB\space \axoyo add exch \axoxo add exch
#3 #4 #5 #6
tx@FeynDict begin linaxis end
}%
\end@OpenObj
\ignorespaces
}
%
\def\psBText{\pst@object{psBText}}% Draws a box with the center at (x1,y1) and postscript text in it.
\def\psBText@i(#1)#2{\begingroup\use@par
\rput(#1){\psframebox[fillstyle=solid,fillcolor=white]{\shortstack{#2}}}%
\endgroup}
%
\def\psGText{\pst@object{psGText}}% The color of the background is in #2
\def\psCText@i(#1)#2#3{\begingroup\use@par
\rput(#1){\psframebox[fillcolor={[gray]#2},fillstyle=solid]{\shortstack{#3}}}%
\endgroup}
%
\def\psCText{\pst@object{psCText}}% The color of box and text is in #2
\def\psCText@i(#1)#2#3#4{\begingroup\use@par
\rput(#1){\psframebox[linecolor=#2,fillcolor=#3,fillstyle=solid]{\shortstack{#4}}}%
\endgroup}
%
\catcode`\@=\PstAtCode\relax
%
%% END: pst-feyn.tex
\endinput
|