Debian Codegraph @

utils/axodraw2/axodraw2-src/axodraw2-man.tex

raw
1 \documentclass[12pt]{article}
2 \usepackage{a4wide}
3 % Use fix-cm or lmodern to get scaleable cm fonts
4 \usepackage{longtable,fix-cm,url,units,hyperref}
5
6 \usepackage{axodraw2}
7
8 \def\num{$\langle$number$\rangle$}
9 \def\colorname{$\langle$colorname$\rangle$}
10
11 % How to typeset filenames and program names: Use \file and \program
12 % to allow stylistic changes.
13 % Basic definition of \file would be \def\file#1{\texttt{#1}}, but
14 % that would not allow line breaks in long names. So define it by
15 % \DeclareUrlCommand from url package. (We can't use \url itself,
16 % because that provokes hyperref into making a hyperlink.)
17 \DeclareUrlCommand\file{\urlstyle{tt}}
18
19 % Similarly specify how to typeset names of programs
20 \def\program#1{\texttt{#1}}
21
22 % Backslash of the kind used in verbatim
23 \newcommand\BS{\symbol{`\\}}
24
25 % Set the name of a TeX macro (and possibly its signature).
26 % In the argument, the initial backslash. Allow \{ and \} in the
27 % argument. E.g. \name{SetSpace\{\#\}}}
28 \newcommand\name[1]{%
29 \bgroup
30 \def\{{\symbol{`\{}}%
31 \def\}{\symbol{`\}}}%
32 \texttt{\BS#1}%
33 \egroup
34 }
35
36
37 \hyphenation{Jaxo-Draw}
38
39
40 \begin{document}
41
42 %% ?? To get settings useful to test compatibility of axodraw2 with
43 %% color.sty, uncomment the following line:
44 %\SetColor{Blue} \color{green} \pagecolor[cmyk]{0,0.02,0.05,0}
45 %% Note green is useful, because it is defined in rgb color model
46 %% and the apparently equivalent Green, cmyk 1 0 1 0, looks quite
47 %% different on screen. So we can test the colors are entering graphics
48 %% correctly.
49
50 %% ?? To test whether offsets work correctly, uncomment the following
51 %% line:
52 %\SetOffset(10,20) \SetScaledOffset(10,-20)
53
54
55 \setcounter{page}{0}
56 \thispagestyle{empty}
57 \hfill \begin{minipage}{3.0cm}
58 Nikhef 2015-025
59 \end{minipage}
60 \vspace{20mm}
61
62 \begin{center}
63 {\LARGE\bf\sc Manual for Axodraw Version 2}
64 \end{center}
65 \vspace{5mm}
66 \begin{center}
67 {\large John C. Collins$^{\, a}$ and J.A.M. Vermaseren$^{\, b}$}
68 \vspace{1cm}\\
69 {\it $^a$ Department of Physics, Pennsylvania State University, \\
70 \vspace{0.1cm}
71 University Park, Pennsylvania 16802, USA} \\
72 \texttt{jcc8 at psu dot edu} \\
73 \vspace{0.5cm}
74 {\it $^b$Nikhef Theory Group \\
75 \vspace{0.1cm}
76 Science Park 105, 1098 XG Amsterdam, The Netherlands} \\
77 \texttt{t68 at nikhef dot nl} \\
78 \vspace{1.0cm}
79 (2 September 2019)
80 \end{center}
81 \vspace{5mm}
82
83 \begin{abstract}
84 This is the reference manual for version two of the \LaTeX{} graphical
85 style file Axodraw.
86 Relative to version one,
87 it has a number of new drawing primitives and many extra options, and
88 it can now work with \program{pdflatex} to directly produce
89 output in PDF file format (but with the aid of an auxiliary program).
90 \end{abstract}
91
92 \newpage
93
94 \tableofcontents
95
96 \newpage
97
98
99 %>>#[ Introduction :
100 %=========================
101 \section{Introduction}
102 \label{sec:intro}
103
104 This is the documentation for axodraw2, a \LaTeX{} package for drawing
105 Feynman graphs (and other simple graphics). This is version 2 and a
106 substantial update of the original axodraw package \cite{axodraw1},
107 which was released in 1994, and which has become rather popular in the
108 preparation of articles in elementary-particle physics. One of its
109 advantages is that its drawing primitives are included in the
110 \file{.tex} document, in a human-writable form. (This also allows
111 convenient production of axodraw figures by other software, e.g.,
112 Jaxodraw \cite{jaxodraw1,jaxodraw2}.) This is in distinction to
113 methods that use a separate program to create graphics files that are
114 read in during the processing of the \LaTeX{} file. The objects
115 needed in Feynman graphs are often difficult to draw at high quality
116 with conventional computer graphics software.
117
118 The original axodraw package has hardly been modified since its
119 introduction. The new version addresses several later needs. A
120 detailed list of the changes is given in Sec.\ \ref{sec:changes}.
121
122 One change arises from the fact that \TeX{} (and hence \LaTeX{})
123 itself does not possess sufficiently useful methods of drawing
124 complicated graphics, so that the drawing of the graphics is actually
125 done by inserting suitable code in the final output file (postscript
126 or pdf). The original axodraw worked only with the
127 \program{latex}-\program{dvips} processing chain to put the diagrams
128 in the final postscript file.\footnote{A pdf file can be produced from
129 the postscript file by a program like \program{ps2pdf}.} Now we
130 also have in common use the \program{pdflatex} (and \program{lualatex}
131 and \program{xelatex}) programs that directly produce pdf. The new
132 version of axodraw works with \program{pdflatex}, \program{lualatex},
133 and \program{xelatex}, as well as with the
134 \program{latex}-\program{dvips} method.
135
136 Furthermore, more kinds of graphical object and greater flexibility in
137 their properties have been found useful for Feynman graphs. The new
138 version provides a new kind of line, B\'ezier, and is able to make the
139 various kinds of line doubled. There is now a very flexible
140 configuration of arrows. Many of the changes correspond to
141 capabilities of JaxoDraw \cite{jaxodraw1,jaxodraw2}, which is a
142 graphical program for drawing Feynman graphs, and which is able to
143 write and to import diagrams in the axodraw format.
144
145 Finally, substantial improvements have been made in the handling of
146 colors, with much better compatibility with modern packages used to
147 set colors in the normal \LaTeX{} part of a document.
148
149 Since some of the changes (especially in the internal coding)
150 introduce incompatibilities (Sec.\ \ref{sec:compat}) with the original
151 version of axodraw, the new version of the style file is given a new
152 name \file{axodraw2.sty}. Then the many legacy documents (e.g., on
153 \url{http://arxiv.org}) that use the old axodraw will continue to use
154 the old version, and will therefore continue to be compilable without
155 any need for any possible changes in the source document, and with
156 unchanged output. Even so, as regards the coding of diagrams, there
157 are very few backwardly incompatible changes in axodraw2.
158
159 The software is available under the GNU General Public License
160 \cite{GPL} version 3.
161
162
163
164 %=========================
165 \section{Changes}
166 \label{sec:changes}
167
168 \subsection{Changes relative to original, axodraw version 1}
169 \label{sec:changes.wrt.1}
170
171 Relative to the original version of axodraw, the current version,
172 axodraw2, has the following main changes:
173 \begin{itemize}
174
175 \item A bug that the line bounding an oval did not have a uniform
176 width has been corrected.
177
178 \item A bug has been corrected that axodraw did not work with the
179 revtex4 document class when \verb+\maketitle+ and two-column mode
180 were used.
181
182 \item Axodraw2 works both when pdf output is produced directly using
183 the programs \program{pdflatex}, \program{lualatex}, and
184 \program{xelatex}, as well as when a postscript file is produced by
185 the \program{latex}--\program{dvips} method. The old version only
186 worked when postscript output was produced. However, an auxiliary
187 program is needed when using \program{pdflatex}, \program{lualatex},
188 or \program{xelatex}. See Sec.\ \ref{sec:doc.compile} for how this
189 is done.
190
191 \item In the original axodraw, a diagram is coded inside a
192 \verb+picture+ environment of \LaTeX. Now, a specialized
193 \verb+axopicture+ environment is provided and preferred; it provides
194 better behavior, especially when diagrams are to be scaled.
195
196 \item In association with this, there are some changes in how scaling
197 of diagrams is done.
198
199 \item An inconsistency in length units between postscript and \TeX{}
200 has been corrected. All lengths are now specified in terms of
201 $\unit[1]{pt} = \unit[1/72.27]{in} = \unit[0.3515]{mm}$. Previously
202 the unit length for graphics was the one defined by postscript to be
203 $\unit[1]{bp} = \unit[1/72]{in} = \unit[0.3528]{mm}$.
204
205 \item Substantial improvements have been made in the treatment of
206 color. When named colors are used, axodraw2's use of color is
207 generally compatible with that of the modern, \LaTeX-standard
208 \file{color.sty} package. It also provides all the color-setting
209 macros that were defined in v.\ 1 of axodraw, including those of the
210 \file{colordvi.sty} package used by v.\ 1.
211
212 \item The various types of line can now be produced as double lines,
213 e.g.,
214 \begin{axopicture}(35,5)(0,-2)
215 \SetWidth{1}
216 \Line[double,sep=2.5](0,2)(35,2)
217 \end{axopicture}.
218 This is commonly used, for example, for notating Wilson lines.
219
220 \item Lines can be made from B\'ezier curves.
221 Currently this is only for simple lines, not photon, gluon, or
222 zigzag lines.
223
224 \item Gluon, photon, and zigzag lines can be dashed.
225
226 \item Macros are provided for drawing gluon circles, without the
227 endpoint effects given by the corresponding gluon arc macros.
228
229 \item The positions and sizes of arrows can be adjusted. See Sec.\
230 \ref{sec:arrows} for all the possibilities. One example is
231 \begin{axopicture}(30,6)(0,-2)
232 \SetWidth{1}
233 \Line[arrow,arrowpos=0.8](0,2)(30,2)
234 \end{axopicture}
235
236 \item Macros for drawing polygons and filled polygons are provided.
237
238 \item Macros for drawing rotated boxes are provided.
239
240 \item A macro \verb+\ECirc+ is provided for drawing a circle with a
241 transparent interior.
242
243 \item A macro \verb+\EBoxc+ is provided for drawing a box with a
244 specified center.
245
246 \item A macro \verb+\AxoGrid+ is provided for drawing a grid. One
247 use is to provide a useful tool in designing pictures.
248
249 \item Since there are now many more possibilities to specify the
250 properties of a line, optional arguments to the main line drawing
251 commands can be used to specify properties in a keyword style.
252
253 \item A new macro named \verb+\Arc+ is introduced. With the aid of
254 optional arguments, this unifies the behavior of various arc-drawing
255 commands in the original axodraw.
256
257 \item For consistency with the \verb+\Gluon+ macro, the
258 \verb+\GlueArc+ macro has been renamed to \verb+\GluonArc+, with the old
259 macro retained as a synonym.
260
261 \item The behavior of arcs is changed to what we think is more natural
262 behavior when the specified opening angle is outside the natural range.
263
264 \item What we call macros for drawing objects with postscript text are
265 now implemented within \LaTeX{} instead of relying on instructions
266 inserted in the postscript code. Thus all the normal \LaTeX{}
267 commands, including mathematics, can now be used in all text
268 objects, with proper scaling. The placement and scaling of text
269 objects are more consistent.
270
271 \item Some new named colors are provided:
272 \LightYellow{LightYellow}, \LightRed{LightRed},
273 \LightBlue{LightBlue}, \LightGray{LightGray},
274 \VeryLightBlue{VeryLightBlue}.
275 (LightYellow, LightRed, LightBlue, LightGray, VeryLightBlue.)
276
277 \item The macros originally specified as \verb+\B2Text+,
278 \verb+\G2Text+, and \verb+\C2Text+ are now named \verb+\BTwoText+,
279 \verb+\GTwoText+, and \verb+\CTwoText+. The intent of the original
280 code was to define macros with names \verb+\B2Text+, etc. However
281 in \TeX, under normal circumstances, macro names of more than one
282 character must only contain letters, unlike typical programming
283 languages that also allow digits. So the rules for \TeX{} macro
284 names mean that in defining, for example
285 \verb+\def\B2Text(#1,#2)#3#4{...}+, the original version of axodraw
286 actually defined a macro named named \verb+\B+, obligatorially
287 followed by \verb+2Text+. This caused a conflict if the user wished
288 to define a macro \verb+\B+. If it is desired to retain the old
289 behavior, then the following should be placed in the preamble of the
290 \file{.tex} file, then the axodraw2 package should be invoked in the
291 source document with the \texttt{v1compatible} option:
292 \begin{verbatim}
293 \usepackage[v1compatible]{axodraw2}
294 \end{verbatim}
295
296 \end{itemize}
297
298 \subsection{Changes relative to axodraw4j distributed with JaxoDraw}
299 \label{sec:changes.wrt.4j}
300
301 The JaxoDraw program \cite{jaxodraw2} is distributed with a version of
302 axodraw called axodraw4j. At the time of writing (July 2016), this
303 was effectively a predecessor of axodraw2, but without the possibility
304 of working with \program{pdflatex}. (The suffix ``4j'' is intended to
305 mean ``for JaxoDraw''.)
306
307 The changes in axodraw2 relative to the version of axodraw4j dated
308 2011/03/22 are the following subset of those listed in Sec.\
309 \ref{sec:changes.wrt.1}:
310 \begin{itemize}
311 \item The ability to work with \program{pdflatex}, \program{lualatex},
312 and \program{xelatex}.
313 \item The improvements in the handling of color and fonts.
314 \item The double and arrow options for B\'ezier lines.
315 \item The dash option for gluons and photons.
316 \item Color option for all lines.
317 \item Correction of inconsistency of length unit between \TeX{} and
318 postscript.
319 \item Better drawing of double gluons and photons.
320 \item Addition of the macros for making gluon circles, polygons, and rotated
321 boxes.
322 \item Addition of the macros
323 \verb+\ECirc+, \verb+\EBoxc+, and \verb+\AxoGrid+.
324 \item A series of ``LongArrow'' macros for drawing lines with the
325 arrow at the end. The same effect could only be achieved in
326 axodraw4j with arrowpos=1 option to the basic line-drawing
327 commands.
328 \item A series of macros like \verb+\DashDoubleLine+ to provide access
329 to the dashed and double properties in the style of the macros
330 provided in v.\ 1 of axodraw. This is in addition to the optional
331 arguments that allow the same effect in axodraw4j and in axodraw2.
332 \item The \texttt{v1compatible} and other options are provided for the
333 package.
334 \item Better treatment of the scaling of objects.
335 \item The treatment of ``postscript text objects'' within \LaTeX{}
336 itself.
337 \end{itemize}
338
339
340 %---------------
341 \subsection{Backward compatibility, etc}
342 \label{sec:compat}
343
344 The official user interface of axodraw2 is backward-compatible with
345 versions 1 and 4j, with the exception of the issue mentioned above
346 about the commands that had the signatures \verb+\B2Text+,
347 \verb+\G2Text+, and \verb+\C2Text+ in the old version.
348
349 As to behavior, there are some minor changes in the objects that are
350 drawn, mostly concerning the exact dimensions of default arrows. The
351 scaling of the sizes of text objects is changed. The scoping of color
352 changes is substantially changed, but improved.
353
354 The old axodraw only used the tools available in \LaTeX{} in the early
355 1990s. The new version needs a more modern installation.
356 Installations for which axodraw2 has been tested include TeXLive 2011
357 and 2016.
358
359 We have tested backwards compatibility by compiling the version 1
360 manual with axodraw2; only a trivially modified preamble was needed.
361 It also worked to compile Collins's QCD book\cite{qcdbook},
362 which has a large number
363 of JaxoDraw figures (processed automatically to pieces of axodraw code
364 imported into the document); only changes in the preamble were needed.
365
366 In addition, axodraw2 provides an \verb+axopicture+ environment inside
367 of which axodraw2's graphics are coded and drawn. In the old axodraw,
368 \LaTeX's \verb+picture+ environment was used instead. In axodraw2, we
369 recommend only the use of \verb+axopicture+ environment, and that is
370 the only method we document. However, old diagrams coded with
371 \verb+picture+ environment continue to work.
372
373 Some possible compatibility issues could arise because the old and new
374 versions load a different set of external packages. The old version
375 loaded the packages \file{epsf.sty} and \file{colordvi.sty}, and so
376 macros defined by these packages were available. The new version does
377 not load these now essentially-obsolete packages; so they should be
378 loaded from the document if they happen to be needed. But the new
379 version does define some macros for setting colors that correspond to
380 those in \file{colordvi.sty}; these are defined using facilities from
381 the standard \LaTeX{} \file{color.sty} package. Axodraw2 loads the
382 following \LaTeX{} packages: \program{keyval}, \program{ifthen},
383 \program{graphicx}, \program{color}, \program{ifxetex}. It defines
384 its own set of 73 named colors which are the 68 dvips-defined names
385 (as coded in \file{colordvi.sty} and used in axodraw v.\ 1), plus 5
386 more.
387
388
389
390 %=========================
391 \section{Installation}
392 \label{sec:installation}
393
394 %---------------
395 \subsection{Installation from standard \TeX{} distribution}
396
397 At the moment that this document was updated (January 2018), axodraw2
398 was part of both the main \TeX{} distributions, TeXLive and MiKTeX.
399 The easiest way to install axodraw2 is therefore from the package
400 manager of your \TeX{} distribution.
401
402 You can also obtain axodraw2 from CTAN at
403 \url{http://ctan.org/pkg/axodraw2}, and install it manually, following
404 the instructions in Sec.\ \ref{sec:manual.install} below.
405
406 \paragraph{\program{axohelp} in TeXLive}
407 In TeXLive 2018 and later, a binary executable for the
408 \program{axohelp} is provided, as part of the \program{axodraw2}
409 package. So \program{axohelp} is available provided that the
410 \program{axodraw2} package is installed..
411
412
413 \paragraph{\program{axohelp} in MiKTeX}
414 The axodraw2 package including an executable \program{axohelp.exe} was
415 provided by MiKTeX when this was checked in January 2018.
416
417
418
419 %---------------
420 \subsection{Manual installation}
421 \label{sec:manual.install}
422
423 %For a manual installation, the minimum that needs to be done is to put
424 For a manual installation, what needs to be done is to put the file
425 \file{axodraw2.sty} in a place where it will be found by the
426 \program{latex} program. If you wish to use axodraw2 with
427 \program{pdflatex}, you will also need to compile the
428 \program{axohelp} program --- see Sec.\ \ref{sec:axohelp} --- and put
429 it in an appropriate directory. Documentation can also be installed
430 if you want.
431
432 %--
433 \subsubsection{Style file \texorpdfstring{\protect\file{axodraw2.sty}}{axodraw2.sty}}
434
435 If you merely want to try out axodraw2, just put the file
436 \file{axodraw2.sty} in the same directory as the \file{.tex}
437 file(s) you are working on.
438
439 Otherwise, put it in an appropriate directory for a \LaTeX{} style
440 file, and, if necessary, run the texhash program to ensure that the
441 file is in the \TeX{} system's database of files. For example,
442 suppose that you have a TeXLive system installed for all users on a
443 Unix-like system (e.g., Linux or OS-X), and that TeXLive is installed,
444 as is usual, under the directory \file{/usr/local/texlive}. Then an
445 appropriate place for axodraw2 is in a directory
446 \file{/usr/local/texlive/texmf-local/tex/latex/axodraw2}. You will
447 need to run the \program{texhash} program in this last case. For such
448 a system-wide installation, you may have to do these
449 operations as an administrative user (e.g., root), possibly
450 supplemented by running the relevant commands with the \program{sudo}
451 program.
452
453 If you later install the axodraw2 package from the package manager of
454 your \TeX{} distribution, it's a good idea to delete the files you
455 installed manually. Otherwise when you use axodraw2 in a document,
456 then the wrong version of \file{axodraw2.sty} may get used. This is a
457 particularly important issue after possible future updates to axodraw2
458 get installed by the package manager.
459
460 %--
461 \subsubsection{Helper program \program{axohelp}}
462 \label{sec:axohelp}
463
464 If you wish to use axodraw2 with \program{pdflatex},
465 \program{lualatex}, or \program{xelatex}, then you need to install the
466 \program{axohelp} program. \emph{(It is useful to reiterate here that
467 the standard distributions of \TeX{} currently supply the
468 \program{axohelp} program. So the steps described here are only
469 necessary if for some reason you wish to do a manual installation.
470 One possible reason is to use a recent update of \program{axohelp},
471 since TeXLive normally only supplies updated versions of binary
472 executable files with the initial release of one of TeXLive's yearly
473 versions.)}
474
475 To install \program{axohelp} manually, you will first need to compile
476 the program by a C compiler. Under a Unix-like operating system
477 (linux or macOS) an appropriate shell command is
478 \begin{verbatim}
479 cc -o axohelp -O3 axohelp.c -lm
480 \end{verbatim}
481 (Note that this is a C compiler, \emph{not} a C++ compiler.) Most linux
482 systems have the program \program{cc} already installed. This also applies to
483 macOS(OS-X) at versions below 10.7. But on macOS version 10.7 and higher, you
484 will need to install a compiler, which can be done by installing XCode
485 and the associated command-line utilities. If you have the GNU
486 compilers installed, you might need to use the command \program{gcc}
487 instead of \program{cc}.
488
489 For Microsoft Windows, you will need to have installed a C compiler,
490 and use it to compile \file{axohelp.c}.
491
492 Once you have the executable (named \program{axohelp} on Unix-like
493 systems, or \program{axohelp.exe} on a Microsoft system), put it in a
494 directory where it will be found when you run programs from the
495 command line.
496
497
498 %--
499 \subsubsection{Testing}
500
501 To test whether the installation works, you need a simple test file.
502 An example is given in Sec.\ \ref{sec:example}, and is provided
503 with the axodraw2 distribution as \file{example.tex}.
504
505 At a command line with the current directory set to the directory
506 containing the file \file{example.tex}, run the following commands:
507 \begin{verbatim}
508 latex example
509 dvips example -o
510 \end{verbatim}
511 If all goes well, you will obtain a file \file{example.ps}. When
512 you view it, it should contain the diagram shown in Sec.\
513 \ref{sec:example}. You can make a pdf file instead by the commands
514 \begin{verbatim}
515 latex example
516 dvipdf example
517 \end{verbatim}
518 A more extensive test can be made by compiling the manual.
519
520 To make a pdf file directly, with \program{pdflatex}, you use the commands
521 \begin{verbatim}
522 pdflatex example
523 axohelp example
524 pdflatex example
525 \end{verbatim}
526 The \program{axohelp} run takes as input a file \file{example.ax1}
527 produced by the first run of \program{pdflatex} and makes an output
528 file \file{example.ax2}. The second run of \program{pdflatex} reads
529 the \file{example.ax2} file and uses the result to place the axodraw
530 objects in the \file{example.pdf} file.
531
532
533 %--
534 \subsubsection{Documentation}
535
536 Put the documentation in a place where you can find it. If you
537 installed the \file{axodraw2.sty} file in
538 \file{/usr/local/texlive/texmf-local/tex/latex/axodraw2}, the
539 standard place for the documentation would be
540 \file{usr/local/texlive/texmf-local/doc/latex/axodraw2}.
541
542
543 %=========================
544 \section{Use}
545 \label{sec:use}
546
547 In this section we show how to use axodraw2, illustrated with an
548 example.
549
550 \subsection{Basic example}
551 \label{sec:example}
552
553 The principles of using axodraw2 are illustrated by the following
554 complete \LaTeX{} document:
555 \begin{verbatim}
556 \documentclass{article}
557 \usepackage{axodraw2}
558 \begin{document}
559 Example of Feynman graph using axodraw2 macros:
560 \begin{center}
561 \begin{axopicture}(200,110)
562 \SetColor{Red}
563 \Arc[arrow](100,50)(40,0,180)
564 \Text(100,100){$\alpha P_1 + \beta P_2 + k_\perp$}
565 \SetColor{Black}
566 \Arc[arrow](100,50)(40,180,360)
567 \Gluon(0,50)(60,50){5}{4}
568 \Vertex(60,50){2}
569 \Gluon(140,50)(200,50){5}{4}
570 \Vertex(140,50){2}
571 \end{axopicture}
572 \end{center}
573 \end{document}
574 \end{verbatim}
575 After compilation according to the instructions in Sec.\
576 \ref{sec:doc.compile}, viewing the resulting file should show the
577 following Feynman graph:
578 \begin{center}
579 \begin{axopicture}(200,110)
580 \SetColor{Red}
581 \Arc[arrow](100,50)(40,0,180)
582 \Text(100,100){$\alpha P_1 + \beta P_2 + k_\perp$}
583 \SetColor{Black}
584 \Arc[arrow](100,50)(40,180,360)
585 \Gluon(0,50)(60,50){5}{4}
586 \Vertex(60,50){2}
587 \Gluon(140,50)(200,50){5}{4}
588 \Vertex(140,50){2}
589 \end{axopicture}
590 \end{center}
591 See Sec.\ \ref{sec:examples} for more examples
592
593 \emph{Important note about visibility of graphics objects:} If you
594 view this document on a computer monitor, Feynman graphs drawn with
595 narrow lines may not fully match what was intended. This is because
596 of the way graphics viewers interact with the limited resolution of
597 computer monitors. To see the example graphs properly, you may need to
598 use a large enough magnification, or to use an actual print out.
599
600 \emph{Note about sending a document to others}: If for example, you
601 submit an article to arXiv.org, it is likely that their automated
602 system for processing the file will not run \program{axohelp}. So together with
603 the tex file, you one should also submit the \file{.ax2} file.
604
605
606 %-----------------------
607 \subsection{Document preparation}
608 \label{sec:doc.prep}
609
610 The general rules for preparation of a document are:
611 \begin{itemize}
612
613 \item Insert the following
614 \begin{verbatim}
615 \usepackage{axodraw2}
616 \end{verbatim}
617 in the preamble of the \file{.tex} file.
618 There are some options and commands that can be used to change axodraw2's
619 behavior from its default. See Secs.\ \ref{sec:invoke} and
620 \ref{sec:settings} for details.
621
622 \item Where you want to insert axodraw2 objects, put them inside an
623 axopicture environment, specified in Sec.\ \ref{sec:env},
624 \begin{verbatim}
625 \begin{axopicture}(x,y)
626 ...
627 \end{axopicture}
628 \end{verbatim}
629 Here \texttt{x} and \texttt{y} denote the desired size of the box
630 that is to be inserted in the document and that contains the graph.
631 An optional offset can be specified (as with \LaTeX's
632 \texttt{picture} environment). By default the units are
633 $\unit[1]{pt} = \unit[1/72.27]{in} = \unit[0.3515]{mm}$.
634
635 \end{itemize}
636 Full details of all these components are in Sec.\
637 \ref{sec:reference}.
638
639 The design of graphs can be done manually, and this can be greatly
640 facilitated with the new \verb:\AxoGrid: command. A convenient way of
641 constructing diagrams is to use the graphical program
642 JaxoDraw~\cite{jaxodraw1,jaxodraw2}, which is what most people
643 do. This program can export axodraw code. It also uses axodraw as one
644 way of making postscript and pdf files. The original version of
645 axodraw was used by JaxoDraw until version 1.3. In version 2 of
646 JaxoDraw, a specially adapted version of \file{axodraw.sty} is used,
647 named \file{axodraw4j.sty}. The output from version 2 of
648 JaxoDraw is compatible with axodraw2.
649
650
651 %-----------------------
652 \subsection{Document compilation}
653 \label{sec:doc.compile}
654
655 \subsubsection{To make a postscript file}
656 \label{sec:doc.compile.ps}
657
658 When a postscript file is needed, you just make the postscript file as
659 usual. E.g., when the source file is \file{example.tex}, you run
660 the following commands:
661 \begin{verbatim}
662 latex example
663 dvips example -o
664 \end{verbatim}
665 which results in a postscript file \file{example.ps}. Of course, if
666 there are cross references to be resolved, you may need multiple runs
667 of \program{latex}, as usual. When needed, use of \program{bibtex},
668 \program{makeindex}, and other similar programs is also as usual.
669 Instead of \program{latex}, one may also use the \program{dvilualatex}
670 program, which behaves like \program{latex} except for providing some
671 extra capabilities that are sometimes useful.
672
673 Internally, axodraw uses \TeX's \verb+\special+ mechanism to put
674 specifications of postscript code into the \file{.dvi} file, and
675 \program{dvips} puts this code in the postscript file. This postscript
676 code performs the geometrical calculations needed to specific
677 axodraw's objects, and then draws them when the file is displayed or
678 printed.
679
680 \emph{Important note about configuration of \program{dvips}:} You may
681 possibly find that when you run \program{dvips} that it spends a lot of
682 time running \program{mktexpk} to make bitmapped fonts, or that the
683 postscript
684 file contains bitmapped type-3 fonts. This is \emph{not} the default
685 situation in typical current installations. But if you do find this
686 situation, which is highly undesirable in most circumstances, you
687 should arrange for \program{dvips} to use type 1 fonts. This can be
688 done either by appropriately configuring your \TeX{} installation, for
689 which you will have to locate instructions, or by giving
690 \program{dvips} its \texttt{-V0} option:
691 \begin{verbatim}
692 dvips -V0 example -o
693 \end{verbatim}
694 Once you do this, you should see, from \program{dvips}'s output,
695 symptoms of its use of type 1 fonts. \emph{Let us re-emphasize that
696 you do not have to be concerned with this issue, under
697 normal circumstances. But since things were different within our
698 memory, we give some suggestions as to what to do in what are
699 currently abnormal circumstances.}
700
701 \subsubsection{To make a pdf file via \program{latex}}
702
703 There are multiple methods of making pdf files for a latex document;
704 we will not give all the advantages and disadvantages here.
705
706 One way is to convert the postscript file, e.g., by
707 \begin{verbatim}
708 ps2pdf example.ps
709 \end{verbatim}
710 You can also produce a pdf file from the dvi file produced by
711 \program{latex} by the \program{dvipdf} command, e.g,.
712 \begin{verbatim}
713 dvipdf example
714 \end{verbatim}
715 \emph{Important note:} The program here is \program{dvipdf} and
716 \emph{not} the similarly named \program{dvipdfm} or \program{dvipdfmx},
717 which are incompatible with axodraw. The reason why \program{dvipdf}
718 works is that it internally makes a postscript file and then converts
719 it to pdf.
720
721
722 \subsubsection{To make a pdf file by \program{pdflatex},
723 \program{lualatex}, or \program{xelatex}}
724
725 A common and standard way to make a pdf file is the \program{pdflatex}
726 program, which makes pdf directly. It has certain advantages, among
727 which are the possibility of importing a wide variety of graphics file
728 formats. (In contrast, the \program{latex} program only handles
729 encapsulated postscript.)
730
731 However, to use axodraw2 with \program{pdflatex}, you need an
732 auxiliary program, \program{axohelp}, as in
733 \begin{verbatim}
734 pdflatex example
735 axohelp example
736 pdflatex example
737 \end{verbatim}
738 What happens is that during a run of \program{pdflatex}, axodraw2
739 writes a file \file{example.ax1} containing specifications of its
740 graphical objects. Then running \program{axohelp} reads the
741 \file{example.ax1} file, computes the necessary pdf code to draw the
742 objects, and writes the results to \file{example.ax2}. The next run
743 of \program{pdflatex} reads \file{example.ax2} and uses it to put the
744 appropriate code in the output pdf file.
745
746 The reason for the extra program is that axodraw needs many
747 geometrical calculations to place and draw its graphical objects.
748 \LaTeX{} itself does not provide anything convenient and efficient for
749 these calculations, while the PDF language does not offer sufficient
750 computational facilities, unlike the postscript language.
751
752 If you modify a document, and recompile with \program{pdflatex}, you
753 will only need to rerun \program{axohelp} if the modifications
754 involve axodraw objects. Axodraw2 will output an appropriate message
755 when a rerun of \program{axohelp} is needed.
756
757 If you wish to use \program{lualatex} or \program{xelatex}, instead of
758 \program{pdflatex}, then you can simply run the program
759 \program{lualatex} or \program{xelatex} instead of
760 \program{pdflatex}. These are equally compatible with axodraw2.
761
762
763
764
765 %-----------------------
766 \subsection{Automation of document compilation}
767 \label{sec:doc.auto.compile}
768
769 It can be useful to automate the multiple steps for compiling a
770 \LaTeX{} document. One of us has provided a program \program{latexmk}
771 to do this --- see \url{http://www.ctan.org/pkg/latexmk/}. Here we
772 show how to configure
773 \program{latexmk} to run \program{axohelp} as needed when a document is
774 compiled via the \program{pdflatex} route.
775
776 All you need to do is to put the following lines in one of
777 \program{latexmk}'s initialization files (as specified in its
778 documentation):
779 \begin{verbatim}
780 add_cus_dep( "ax1", "ax2", 0, "axohelp" );
781 sub axohelp { return system "axohelp \"$_[0]\""; }
782 $clean_ext .= " %R.ax1 %R.ax2";
783 \end{verbatim}
784 The first two lines specify that \program{latexmk} is to make
785 \file{.ax2} files from \file{.ax1} files by the \program{axohelp}
786 program, whenever necessary. (After that \program{latexmk}
787 automatically also does any further runs of \program{pdflatex} that are
788 necessary.) The last line is optional; it adds \file{.ax1} and
789 \file{.ax2} files to the list of files that will be deleted when
790 \program{latexmk} is requested to do a clean up of generated,
791 recreatable files.
792
793 \program{Latexmk} is installed by default by the currently common
794 distributions of \TeX{} software, i.e., TeXLive and MiKTeX. It has as
795 an additional requirement a properly installed Perl system. For the
796 TeXLive distribution, this requirement is always met.
797
798 With the above configuration, you need no change in how you invoke
799 \program{latexmk} to compile a document, when it uses axodraw2. For
800 producing postscript, you can simply use
801 \begin{verbatim}
802 latexmk -ps example
803 \end{verbatim}
804 and for producing pdf via \program{pdflatex} you can use
805 \begin{verbatim}
806 latexmk -pdf example
807 \end{verbatim}
808 Then \program{latexmk} takes care of whatever runs are needed of all
809 the relevant programs, now including \program{axohelp}, as well
810 whatever, possibly multiple, runs are needed for the usual programs
811 (\program{latex}, \program{pdflatex}, \program{bibtex}, etc).
812
813
814
815 %>>#] Introduction :
816 %>>#[ The Commands :
817
818 \section{Reference}
819 \label{sec:reference}
820
821 \subsection{Package invocation}
822 \label{sec:invoke}
823
824 To use the axodraw2 package in a \LaTeX{} document, you simply put
825 \begin{verbatim}
826 \usepackage{axodraw2}
827 \end{verbatim}
828 in the preamble of the document, as normal.
829
830 The \verb+\usepackage+ command takes optional arguments
831 (comma-separated list of keywords) in square brackets, e.g.,
832 \begin{verbatim}
833 \usepackage[v1compatible]{axodraw2}
834 \end{verbatim}
835 The options supported by axodraw2 are
836 \begin{itemize}
837 \item \texttt{v1compatible}: This makes axodraw2's operation more
838 compatible with v.\ 1. It allows the use of \verb+\B2Text+,
839 \verb+\G2Text+, and \verb+\C2Text+ as synonyms for the macros named
840 \verb+\BTwoText+, \verb+\GTwoText+, and \verb+\CTwoText+.
841 (You may wish also to use the \texttt{canvasScaleisUnitLength}
842 option, so that the scaling of the units in the \texttt{axopicture}
843 environment is the same as it was for the \texttt{picture}
844 environment used in v.\ 1.)
845 \item \texttt{canvasScaleIs1pt}: Unit for canvas dimensions
846 in an \texttt{axopicture} environment is fixed at $\unit[1]{pt}$,
847 \item \texttt{canvasScaleIsObjectScale}: Unit for canvas dimensions
848 in an \texttt{axopicture} environment are the same as those set for
849 axodraw objects (by the \verb+\SetScale+ macro). This is the
850 default setting, so the option need not be given.
851 \item \texttt{canvasScaleIsUnitLength}: Unit for canvas dimensions
852 in an \texttt{axopicture} environment is the current value of
853 \verb+\unitlength+, exactly as for \LaTeX{}'s \texttt{picture}
854 environment. (Thus, this corresponds to the behavior of the
855 original axodraw v.\ 1, which simply used the \texttt{picture}
856 environment.)
857 \item \texttt{PStextScalesIndependently}: Axodraw's text objects are
858 scaled by the factor set by the \verb+\SetTextScale+ command.
859 \item \texttt{PStextScalesLikeGraphics}: Axodraw's text objects are
860 scaled by the factor set by same factor for its graphics objects,
861 i.e., the scale set by the \verb+\SetScale+ command.
862 \end{itemize}
863 (N.B. Default scaling factors are initialized to unity.)
864
865 \emph{Note:} If you use \program{axodraw}'s commands for placing text
866 and you use the standard \TeX{} Computer Modern fonts for the
867 document, then when you compile your document you may get a lot of
868 warning messages. These are about fonts not being available in
869 certain sizes. To fix this problem invoke the package
870 \program{fix-cm} in your document's preamble:
871 \begin{verbatim}
872 \usepackage{fix-cm}
873 \end{verbatim}
874 It is also possible to use the package \program{lmodern} for the same
875 purpose.
876
877
878 \subsection{Environment(s)}
879 \label{sec:env}
880
881 The graphical and other objects made by axodraw2 are placed in an
882 \texttt{axopicture} environment, which is invoked either as
883 \begin{verbatim}
884 \begin{axopicture}(x,y)
885 ...
886 \end{axopicture}
887 \end{verbatim}
888 or
889 \begin{verbatim}
890 \begin{axopicture}(x,y)(xoffset,yoffset)
891 ...
892 \end{axopicture}
893 \end{verbatim}
894 Here, the \dots{} denote sequences of axodraw2 commands, as documented
895 in later sections, for drawing lines, etc. The \texttt{axopicture}
896 environment is just like standard \LaTeX's \texttt{picture}
897 environment,\footnote{In fact, the \texttt{axopicture} is changed from
898 the \texttt{picture} environment only by making some
899 axodraw-specific settings. So the \texttt{picture} environment that
900 was used in v.\ 1 may also be used with axodraw2; it merely has a
901 lack of automation on the setting of the canvas scale relative to
902 the object scale, and, in the future, other possible
903 initializations.}, except for doing some axodraw-specific
904 initialization. It inserts a region of size \texttt{x} by \texttt{y}
905 (with default units of $\unit[1]{pt} = \unit[1/72.27]{in} =
906 \unit[0.3515]{mm}$). Here \texttt{x} and \texttt{y} are set to the
907 numerical values you need.
908
909 The positioning of axodraw objects is specified by giving $x$ and $y$
910 coordinates, e.g., for the ends of lines. The origin of these
911 coordinates is, by default, at the lower left corner of the box that
912 \texttt{axopicture} inserts in your document. But sometimes,
913 particularly after editing a graph, you will find this is not
914 suitable. To avoid changing a lot of coordinate values to get correct
915 placement, you can specify an offset by the optional arguments
916 \texttt{(xoffset,yoffset)} to the \texttt{axopicture} environment,
917 exactly as for \LaTeX's \texttt{picture} environment. The offset
918 \texttt{(xoffset,yoffset)} denotes the position of the bottom left
919 corner of the box inserted in your document relative to the coordinate
920 system used for specifying object positions. Thus
921 \begin{verbatim}
922 \begin{axopicture}(20,20)
923 \Line(0,0)(20,20)
924 \end{axopicture}
925 \end{verbatim}
926 and
927 \begin{verbatim}
928 \begin{axopicture}(20,20)(-10,20)
929 \Line(-10,20)(10,40)
930 \end{axopicture}
931 \end{verbatim}
932 are exactly equivalent.
933
934 Within an \texttt{axopicture} environment, all the commands that can
935 be used inside an ordinary \texttt{picture} environment can also be
936 used.
937
938 We can think of the \texttt{axopicture} environment as defining a
939 drawing canvas for axodraw's graphical and text objects.
940 There are possibilities for manipulating (separately) the units used
941 to specify the canvas and the objects. These can be useful for
942 scaling a diagram or parts of it from an originally chosen design.
943 See Secs.\ \ref{sec:units} and \ref{sec:settings} for details.
944
945
946 \subsection{Graphics drawing commands}
947 \label{sec:commands}
948
949 In this section we present commands for drawing graphical objects,
950 split up by category. Later, we will give: details of options to the
951 line-drawing commands, explanations of some details about specifying
952 gluons and about specifying arrow parameters, and then commands for
953 textual objects and for adjusting settings (e.g., separation in a
954 double line). Mostly, we present the commands by means of examples.
955 Note that many of the arguments of the commands, notably arguments for
956 $(x,y)$ coordinate values are delimited by parentheses and commas
957 instead of the brace delimiters typically used in \LaTeX.
958
959 It should also be noted that some commands provide different ways of
960 performing the same task. For instance
961 \begin{verbatim}
962 \BCirc(50,50){30}
963 \end{verbatim}
964 can also be represented by
965 \begin{verbatim}
966 \CCirc(50,50){30}{Black}{White}
967 \end{verbatim}
968 when the current color is black. The presence of the BCirc command has been
969 maintained both for backward compatibility, and because it represents
970 a convenient short hand for a common situation. This also holds for similar
971 commands involving boxes and triangles. For the new Polygon, FilledPolygon,
972 RotatedBox and FilledRotatedBox commands we have selected a more minimal
973 scheme.
974
975 Similar remarks apply to the new feature of options for line drawing
976 commands. Originally in v.\ 1, a line with an arrow would be coded as
977 \begin{verbatim}
978 \ArrowLine(30,65)(60,25)
979 \end{verbatim}
980 It is now also possible to code using the general \verb+\Line+ macro,
981 but with a keyword optional argument:
982 \begin{verbatim}
983 \Line[arrow](30,65)(60,25)
984 \end{verbatim}
985 One advantage of the option method is a variety of other properties of
986 an individual line may also be coded, as in
987 \begin{verbatim}
988 \Line[arrow,arrowpos=1](30,65)(60,25)
989 \end{verbatim}
990 without the need to use separate global setting for the property, by
991 the commands listed in Sec.\ \ref{sec:settings}, or by having a
992 corresponding compulsory argument to the command.
993 Which way to do things is a matter of user taste in particular
994 situations.
995
996 %--#[ AxoGrid :
997
998 \subsubsection{Grid drawing}
999
1000 \noindent
1001 \begin{minipage}{3.83cm}
1002 \begin{axopicture}{(90,140)(-10,0)}
1003 \AxoGrid(0,0)(10,10)(9,14){LightGray}{0.5}
1004 \end{axopicture}
1005 \end{minipage}
1006 \begin{minipage}{11.5cm}
1007 \label{axogrid}
1008 \verb:\AxoGrid(0,0)(10,10)(9,14){LightGray}{0.5}: \hfill \\
1009 This command is used in our examples to allow the reader to compare the
1010 coordinates in the commands with those of the actual picture. The arguments
1011 are first the position of the left bottom corner, then two values that tell
1012 the size of the divisions in the $x$ and $y$ direction. Next there are two
1013 values that specify how many divisions there should be in the $x$ and $y$
1014 direction. Then the color of the lines is given and finally the width of
1015 the lines. Note that if there are $(n_x,n_y)$ divisions there will be
1016 $n_x+1$ vertical lines and $n_y+1$ horizontal lines. The temporary use of
1017 this command can also be convenient when designing pictures manually.
1018 \end{minipage}\vspace{4mm}
1019
1020 %--#] AxoGrid :
1021 %--#[ Line :
1022
1023 \subsubsection{Ordinary straight lines}
1024 \label{sec:Line}
1025
1026
1027 All of the commands in this section can be given optional keyword
1028 arguments, which are defined in Secs.\ \ref{sec:options} and
1029 \ref{sec:arrows}. These can be used to specify the type of line
1030 (dashed, double), to specify the use of an arrow, and its parameters, and
1031 to specify some of the line's parameters.
1032
1033 The basic line drawing command is \verb+\Line+:\\[3mm]
1034 \begin{minipage}{3.83cm}
1035 \begin{axopicture}{(90,40)(-10,0)}
1036 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1037 \Line(10,10)(80,30)
1038 \end{axopicture}
1039 \end{minipage}
1040 \begin{minipage}{11.5cm}
1041 \label{line}
1042 \verb:\Line(10,10)(80,30): \hfill \\
1043 In this command we have two coordinates. The (solid) line goes from the
1044 first to the second.
1045 \end{minipage}\vspace{4mm}
1046
1047 Examples of the use of optional arguments are:\\[3mm]
1048 \begin{minipage}{3.83cm}
1049 \begin{axopicture}{(90,80)(-10,0)}
1050 \AxoGrid(0,0)(10,10)(9,8){LightGray}{0.5}
1051 \Line[color=Magenta,arrow](10,70)(80,70)
1052 \Line[dash](10,50)(80,50)
1053 \Line[arrow,double](10,30)(80,30)
1054 \Line[arrow,dash,double](10,10)(80,10)
1055 \end{axopicture}
1056 \end{minipage}
1057 \begin{minipage}{11.5cm}
1058 \label{line.options}
1059 \begin{verbatim}
1060 \Line[color=Magenta,arrow](10,70)(80,70)
1061 \Line[dash](10,50)(80,50)
1062 \Line[arrow,double](10,30)(80,30)
1063 \Line[arrow,dash,double](10,10)(80,10)
1064 \end{verbatim}
1065 \end{minipage}
1066 \\[4mm]
1067 Details of the specification of arrows, together with alternative
1068 commands for making lines with arrows are given in Sec.\
1069 \ref{sec:arrows}.
1070
1071 \vspace{4mm}
1072 %--#] Line :
1073 %--#[ DoubleLine :
1074
1075 Alternative commands for dashed and/or double lines are:\\[3mm]
1076 \noindent
1077 \begin{minipage}{3.83cm}
1078 \begin{axopicture}{(90,40)(-10,0)}
1079 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1080 \DoubleLine(10,25)(80,25){1}
1081 \DoubleLine[color=Red](10,15)(80,15){2}
1082 \end{axopicture}
1083 \end{minipage}
1084 \begin{minipage}{11.5cm}
1085 \label{doubleline}
1086 \verb:\DoubleLine(10,25)(80,25){1}: \hfill \\
1087 \verb:\DoubleLine[color=Red](10,15)(80,15){2}: \hfill \\
1088 In this command we have two coordinates as in the Line command but two
1089 lines are drawn. The extra parameter is the separation between the two
1090 lines. Note however that everything between the lines is blanked out.
1091 \end{minipage}\vspace{4mm}
1092
1093 %--#] DoubleLine :
1094 %--#[ DashLine :
1095
1096 \noindent
1097 \begin{minipage}{3.83cm}
1098 \begin{axopicture}{(90,40)(-10,0)}
1099 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1100 \DashLine(10,25)(80,25){2}
1101 \DashLine(10,15)(80,15){6}
1102 \end{axopicture}
1103 \end{minipage}
1104 \begin{minipage}{11.5cm}
1105 \label{dashline}
1106 \verb:\DashLine(10,25)(80,25){2}: \hfill \\
1107 \verb:\DashLine(10,15)(80,15){6}: \hfill \\
1108 In this command we have two coordinates. The dashed line goes from the
1109 first to the second. The extra parameter is the size of the dashes. The
1110 space between the dashes is transparent.
1111 \end{minipage}\vspace{4mm}
1112
1113 %--#] DashLine :
1114 %--#[ DashDoubleLine :
1115
1116 \noindent
1117 \begin{minipage}{3.83cm}
1118 \begin{axopicture}{(90,40)(-10,0)}
1119 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1120 \DashDoubleLine(10,25)(80,25){1.5}{2}
1121 \DashDoubleLine(10,15)(80,15){1.5}{6}
1122 \end{axopicture}
1123 \end{minipage}
1124 \begin{minipage}{11.5cm}
1125 \label{dashdoubleline}
1126 \verb:\DashDoubleLine(10,25)(80,25){1.5}{2}: \hfill \\
1127 \verb:\DashDoubleLine(10,15)(80,15){1.5}{6}: \hfill \\
1128 In this command we have two coordinates. The dashed lines go from the
1129 first to the second. The first extra parameter is the separation between
1130 the lines and the second extra parameter is the size of the dashes.
1131 \end{minipage}\vspace{4mm}
1132
1133 %--#] DashDoubleLine :
1134 %--#[ Arc :
1135
1136 \subsubsection{Arcs}
1137 \label{sec:Arc}
1138
1139 The commands in this section draw circular arcs in types corresponding
1140 to the straight lines of Sec.\ \ref{sec:Line}. In v.\ 1, some of
1141 these commands had names containing ``Arc'' and some ``CArc''. Some
1142 kinds had variant names containing ``Arcn'', whose the direction of
1143 drawing was clockwise instead of anticlockwise. In v.\ 2, we have
1144 tried to make the situation more consistent. First, all the old names
1145 have been retained, for backward compatibility. Second, a general
1146 purpose command \verb+\Arc+ has been introduced; in a single command,
1147 with the aid of optional arguments, it covers all the variants. See
1148 Secs.\ \ref{sec:options} and \ref{sec:arrows} for full details. The
1149 options can be used to specify the type of line (dashed, double,
1150 clockwise or anticlockwise), to specify the use of arrow, and its
1151 parameters, and to specify some of the line's parameters. The other
1152 commands in this section can also be given optional keyword arguments.
1153
1154 The basic \verb+\Arc+ command has the form\\[3mm]
1155 \noindent
1156 \begin{minipage}{3.83cm}
1157 \begin{axopicture}{(90,50)(-10,0)}
1158 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1159 \Arc(45,0)(40,20,160)
1160 \end{axopicture}
1161 \end{minipage}
1162 \begin{minipage}{11.5cm}
1163 \label{carc}
1164 \verb:\Arc(45,0)(40,20,160):\hfill \\
1165 In this command we have one coordinate: the center of the circle. Then
1166 follow the radius of the circle, the start angle and the finishing angle.
1167 The arc will be drawn counterclockwise.
1168 \end{minipage}\vspace{4mm}
1169
1170 An example of the use of the optional parameters is:\\[3mm]
1171 \begin{minipage}{3.83cm}
1172 \begin{axopicture}{(80,80)(-10,0)}
1173 \AxoGrid(0,0)(10,10)(8,8){LightGray}{0.5}
1174 \Arc[arrow,dash,clockwise](40,40)(30,20,160)
1175 \end{axopicture}
1176 \end{minipage}
1177 \begin{minipage}{11.5cm}
1178 \label{carc.opt}
1179 \verb:\Arc[arrow,dash,clockwise](40,40)(30,20,160):
1180 \end{minipage}\vspace{4mm}
1181
1182 Alternative commands for dashed and/or double arcs are as follows.
1183 \vspace*{4mm}
1184
1185 %--#] Arc :
1186 %--#[ DoubleArc :
1187
1188 \noindent
1189 \begin{minipage}{3.83cm}
1190 \begin{axopicture}{(90,50)(-10,0)}
1191 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1192 \DoubleArc[color=Green](45,0)(40,20,160){2}
1193 \end{axopicture}
1194 \end{minipage}
1195 \begin{minipage}{11.5cm}
1196 \label{doublearc}
1197 \verb:\DoubleArc[color=Green](45,0)(40,20,160){2}:\hfill \\
1198 In this command we have one coordinate: the center of the circle. Then
1199 follow the radius of the circle, the start angle and the finishing angle.
1200 The arc will be drawn counterclockwise. The last argument is the line
1201 separation of the double line.
1202 \end{minipage}\vspace{4mm}
1203
1204 %--#] DoubleArc :
1205 %--#[ DashArc :
1206
1207 \noindent
1208 \begin{minipage}{3.83cm}
1209 \begin{axopicture}{(90,50)(-10,0)}
1210 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1211 \DashArc(45,0)(40,20,160){4}
1212 \end{axopicture}
1213 \end{minipage}
1214 \begin{minipage}{11.5cm}
1215 \label{dasharc}
1216 \verb:\DashArc(45,0)(40,20,160){4}:\hfill \\
1217 In this command we have one coordinate: the center of the circle. Then
1218 follow the radius of the circle, the start angle and the finishing angle.
1219 The arc will be drawn counterclockwise. The last argument is the size of
1220 the dashes.
1221 \end{minipage}\vspace{4mm}
1222
1223 %--#] DashArc :
1224 %--#[ DashDoubleArc :
1225
1226 \noindent
1227 \begin{minipage}{3.83cm}
1228 \begin{axopicture}{(90,50)(-10,0)}
1229 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1230 \DashDoubleArc(45,0)(40,20,160){2}{4}
1231 \end{axopicture}
1232 \end{minipage}
1233 \begin{minipage}{11.5cm}
1234 \label{dashdoublearc}
1235 \verb:\DashDoubleArc(45,0)(40,20,160){2}{4}:\hfill \\
1236 In this command we have one coordinate: the center of the circle. Then
1237 follow the radius of the circle, the start angle and the finishing angle.
1238 The arc will be drawn counterclockwise. The last two arguments are the line
1239 separation of the double line and the size of the dashes.
1240 \end{minipage}\vspace{4mm}
1241
1242 %--#] DashDoubleArc :
1243 %--#[ Bezier :
1244
1245 \subsubsection{B\'ezier lines}
1246 \label{sec:Bezier}
1247
1248 The commands in this section draw B\'ezier curves, specified by 4
1249 points. The variants are just as for straight lines, Sec.\
1250 \ref{sec:Line}.
1251
1252 All of the commands in this section can be given optional keyword
1253 arguments, which are defined in Sec.\ \ref{sec:options}. These can be
1254 used to specify the type of line (dashed, double), to specify the use
1255 of an arrow, and its parameters, and to specify some of the line's
1256 parameters.
1257
1258 The basic general purpose command is \verb+\Bezier+:\\[3mm]
1259 \noindent
1260 \begin{minipage}{3.83cm}
1261 \begin{axopicture}{(60,60)(-25,0)}
1262 \AxoGrid(0,0)(10,10)(6,6){LightGray}{0.5}
1263 \Bezier(10,10)(75,30)(65,40)(20,50)
1264 \end{axopicture}
1265 \end{minipage}
1266 \begin{minipage}{11.5cm}
1267 \label{bezier}
1268 \verb:\Bezier(10,10)(75,30)(65,40)(20,50): \hfill \\
1269 Draws a cubic B\'ezier curve based on the four given points. The first
1270 point is the starting point and the fourth the finishing point. The
1271 second and third points are the two control points.
1272 \end{minipage}\vspace{4mm}
1273
1274 An example of the use of optional arguments is
1275 \\[3mm]
1276 \begin{minipage}{3.83cm}
1277 \begin{axopicture}{(60,60)(-25,0)}
1278 \AxoGrid(0,0)(10,10)(6,6){LightGray}{0.5}
1279 \Bezier[color=Red,arrow,double,arrowpos=1](10,10)%
1280 (75,30)(65,40)(20,50)
1281 \end{axopicture}
1282 \end{minipage}
1283 \begin{minipage}{11.5cm}
1284 \label{bezier.opt}
1285 \begin{verbatim}
1286 \Bezier[color=Red,arrow,double,arrowpos=1](10,10)%
1287 (75,30)(65,40)(20,50)
1288 \end{verbatim}
1289 \end{minipage}\vspace{4mm}
1290
1291 %--#] Bezier :
1292 %--#[ DoubleBezier :
1293 Alternative ways of making dashed and/or double B\'ezier curves
1294 are:\\[3mm]
1295 \noindent
1296 \begin{minipage}{3.83cm}
1297 \begin{axopicture}{(60,60)(-25,0)}
1298 \AxoGrid(0,0)(10,10)(6,6){LightGray}{0.5}
1299 \DoubleBezier(10,10)(75,30)(65,40)(20,50){1.5}
1300 \end{axopicture}
1301 \end{minipage}
1302 \begin{minipage}{11.5cm}
1303 \label{doublebezier}
1304 \verb:\DoubleBezier(10,10)(75,30)(65,40)(20,50){1.5}: \hfill \\
1305 Draws a cubic B\'ezier curve based on the four given points.
1306 The first four arguments are the same as for \verb+\Bezier+.
1307 The final argument is the line separation.
1308 \end{minipage}\vspace{4mm}
1309
1310 %--#] DoubleBezier :
1311 %--#[ DashBezier :
1312
1313 \noindent
1314 \begin{minipage}{3.83cm}
1315 \begin{axopicture}{(60,60)(-25,0)}
1316 \AxoGrid(0,0)(10,10)(6,6){LightGray}{0.5}
1317 \DashBezier(10,10)(75,30)(65,40)(20,50){4}
1318 \end{axopicture}
1319 \end{minipage}
1320 \begin{minipage}{11.5cm}
1321 \label{dashbezier}
1322 \verb:\DashBezier(10,10)(75,30)(65,40)(20,50){4}: \hfill \\
1323 Draws a cubic B\'ezier curve based on the four given points.
1324 The first four arguments are the same as for \verb+\Bezier+.
1325 The final argument is the size of the dashes.
1326 \end{minipage}\vspace{4mm}
1327
1328 %--#] DashBezier :
1329 %--#[ DashDoubleBezier :
1330
1331 \noindent
1332 \begin{minipage}{3.83cm}
1333 \begin{axopicture}{(60,60)(-25,0)}
1334 \AxoGrid(0,0)(10,10)(6,6){LightGray}{0.5}
1335 \DashDoubleBezier(10,10)(75,30)(65,40)(20,50){1.5}{4}
1336 \end{axopicture}
1337 \end{minipage}
1338 \begin{minipage}{11.5cm}
1339 \label{dashdoublebezier}
1340 \verb:\DashDoubleBezier(10,10)(75,30)(65,40)(20,50){1.5}{4}:
1341 Draws a cubic B\'ezier curve based on the four given points.
1342 The first four arguments are the same as for \verb+\Bezier+.
1343 The final two arguments are the line separation and the size of the
1344 dashes.
1345 \end{minipage}\vspace{4mm}
1346
1347 %--#] DashDoubleBezier :
1348 %--#[ Curve :
1349
1350 \subsubsection{Curves}
1351
1352 The commands in this section draw curves through an arbitrary sequence
1353 of points. They only exist in variants for continuous and dashed
1354 lines. No optional arguments are allowed.
1355 \vspace{4mm}
1356
1357 \noindent
1358 \begin{minipage}{3.83cm}
1359 \begin{axopicture}{(60,60)(-25,0)}
1360 \AxoGrid(0,0)(10,10)(6,6){LightGray}{0.5}
1361 \Curve{(5,55)(10,32.5)(15,23)(20,18)(25,14.65)(30,12.3)(40,9.5)(55,7)}
1362 \end{axopicture}
1363 \end{minipage}
1364 \begin{minipage}{11.5cm}
1365 \label{curve}
1366 \verb:\Curve{(5,55)(10,32.5)(15,23)(20,18): \hfill \\
1367 \verb: (25,14.65)(30,12.3)(40,9.5)(55,7)}: \hfill \\
1368 Draws a smooth curve through the given points. The $x$ coordinates of the
1369 points should be in ascending order. The curve is obtained by constructing
1370 quadratic fits to each triplet of adjacent points and then in each interval
1371 between two points interpolating between the two relevant parabolas.
1372 \end{minipage}\vspace{4mm}
1373
1374 %--#] Curve :
1375 %--#[ DashCurve :
1376
1377 \noindent
1378 \begin{minipage}{3.83cm}
1379 \begin{axopicture}{(60,60)(-25,0)}
1380 \AxoGrid(0,0)(10,10)(6,6){LightGray}{0.5}
1381 \DashCurve{(5,55)(10,32.5)(15,23)(20,18)(25,14.65)(30,12.3)(40,9.5)(55,7)}{4}
1382 \end{axopicture}
1383 \end{minipage}
1384 \begin{minipage}{11.5cm}
1385 \label{dashcurve}
1386 \verb:\DashCurve{(5,55)(10,32.5)(15,23)(20,18): \hfill \\
1387 \verb: (25,14.65)(30,12.3)(40,9.5)(55,7)}{4}: \hfill \\
1388 Draws a smooth dashed curve through the given points. The $x$ coordinates of
1389 the points should be in ascending order. The last argument is the size of
1390 the dashes.
1391 \end{minipage}\vspace{4mm}
1392
1393 %--#] DashCurve :
1394 %--#[ Gluon :
1395
1396 \subsubsection{Gluon lines}
1397 \label{sec:Gluon}
1398
1399 The basic gluon drawing commands are \verb+\Gluon+, \verb+\GluonArc+,
1400 \verb+\GluonCirc+. There are also variants for dashed and double
1401 gluons. But arrows aren't possible.
1402
1403 See Sec.\ \ref{sec:gluon.remarks} for additional information on the
1404 shape of gluon lines.
1405
1406 All of the commands in this section can be given optional keyword
1407 arguments, which are defined in Sec.\ \ref{sec:options}. These can be
1408 used to specify the type of line (dashed, double), and to specify some
1409 of the line's parameters.
1410 \vspace{3mm}
1411
1412 \noindent
1413 \begin{minipage}{3.83cm}
1414 \begin{axopicture}{(90,40)(-10,0)}
1415 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1416 \Gluon(10,20)(80,20){5}{7}
1417 \end{axopicture}
1418 \end{minipage}
1419 \begin{minipage}{11.5cm}
1420 \label{gluon}
1421 \verb:\Gluon(10,20)(80,20){5}{7}: \hfill \\
1422 In this command we have coordinates for the start and end of the line,
1423 the amplitude of the windings and the number of windings. A negative
1424 value for the amplitude reverses the orientation of the windings ---
1425 see Sec.\ \ref{sec:gluon.remarks} for details.
1426 \end{minipage}
1427 \\[4mm]
1428 Optional arguments can be used, e.g., \hfill \\[3mm]
1429 \noindent
1430 \begin{minipage}{3.83cm}
1431 \begin{axopicture}{(90,40)(-10,0)}
1432 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1433 \Gluon[color=Blue,dash,dashsize=1,double](10,20)(80,20){4}{7}
1434 \end{axopicture}
1435 \end{minipage}
1436 \begin{minipage}{11.5cm}
1437 \label{gluon.opt}
1438 \verb:\Gluon[color=Blue,dash,double](10,20)(80,20){4}{7}:
1439 \end{minipage}
1440
1441
1442 \vspace{4mm}
1443
1444 %--#] Gluon :
1445 %--#[ DoubleGluon :
1446 \noindent
1447 Examples of the other commands for various types of gluon line are as
1448 follows. They can all take optional arguments.
1449 \\[3mm]
1450 \begin{minipage}{3.83cm}
1451 \begin{axopicture}{(90,40)(-10,0)}
1452 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1453 \DoubleGluon(10,20)(80,20){5}{7}{1.3}
1454 \end{axopicture}
1455 \end{minipage}
1456 \begin{minipage}{11.5cm}
1457 \label{doublegluon}
1458 \verb:\DoubleGluon(10,20)(80,20){5}{7}{1.3}:\hfill \\
1459 The first 6 arguments are as in the \verb+\Gluon+ command. The
1460 extra argument is the line separation.
1461 \end{minipage}\vspace{4mm}
1462
1463 %--#] DoubleGluon :
1464 %--#[ DashGluon :
1465
1466 \noindent
1467 \begin{minipage}{3.83cm}
1468 \begin{axopicture}{(90,40)(-10,0)}
1469 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1470 \DashGluon(10,20)(80,20){5}{7}{1}
1471 \end{axopicture}
1472 \end{minipage}
1473 \begin{minipage}{11.5cm}
1474 \label{dashgluon}
1475 \verb:\DashGluon(10,20)(80,20){5}{7}{1}:\hfill \\
1476 The first 6 arguments are as in the \verb+Gluon+ command. The
1477 extra argument is the size of the dashes.
1478 \end{minipage}\vspace{4mm}
1479
1480 %--#] DashGluon :
1481 %--#[ DashDoubleGluon :
1482
1483 \noindent
1484 \begin{minipage}{3.83cm}
1485 \begin{axopicture}{(90,40)(-10,0)}
1486 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1487 \DashDoubleGluon(10,20)(80,20){5}{7}{1.3}{1}
1488 \end{axopicture}
1489 \end{minipage}
1490 \begin{minipage}{11.5cm}
1491 \label{dashdoublegluon}
1492 \verb:\DashDoubleGluon(10,20)(80,20){5}{7}{1.3}{1}:\hfill \\
1493 The first 7 arguments are as in the \verb+DoubleGluon+
1494 command.
1495 The last two arguments are the line
1496 separation of the double line and the size of the dashes.
1497 \end{minipage}
1498 \vspace{8mm}
1499
1500 %--#] DashDoubleGluon :
1501 %--#[ GluonArc :
1502
1503 \noindent
1504 \begin{minipage}{3.83cm}
1505 \begin{axopicture}{(90,50)(-10,0)}
1506 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1507 \GluonArc(45,0)(40,20,160){5}{8}
1508 \end{axopicture}
1509 \end{minipage}
1510 \begin{minipage}{11.5cm}
1511 \label{gluonarc}
1512 \verb:\GluonArc(45,0)(40,20,160){5}{8}:\hfill \\
1513 In this command we have one coordinate: the center of the circle. Then
1514 follow the radius of the circle, the start angle and the finishing angle.
1515 The arc will be drawn counterclockwise. The final two parameters are the
1516 amplitude of the windings and the number of windings.
1517 Like the other commands in this section, this command can take
1518 optional arguments, Sec.\ \ref{sec:options}.
1519 \end{minipage}
1520 \vspace{4mm}
1521
1522 %--#] GluonArc :
1523 %--#[ DoubleGluonArc :
1524
1525 \noindent
1526 \begin{minipage}{3.83cm}
1527 \begin{axopicture}{(90,50)(-10,0)}
1528 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1529 \DoubleGluonArc[color=Red](45,0)(40,20,160)%
1530 {5}{8}{1.3}
1531 \end{axopicture}
1532 \end{minipage}
1533 \begin{minipage}{11.5cm}
1534 \label{doublegluonarc}
1535 \begin{verbatim}
1536 \DoubleGluonArc[color=Red](45,0)(40,20,160)%
1537 {5}{8}{1.3}
1538 \end{verbatim}
1539 The first 7 arguments are as in the \verb+GluonArc+ command. The extra
1540 argument is the separation in the double line.
1541 \end{minipage}\vspace{4mm}
1542
1543 %--#] DoubleGluonArc :
1544 %--#[ DashGluonArc :
1545
1546 \noindent
1547 \begin{minipage}{3.83cm}
1548 \begin{axopicture}{(90,50)(-10,0)}
1549 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1550 \DashGluonArc(45,0)(40,20,160){5}{8}{1.5}
1551 \end{axopicture}
1552 \end{minipage}
1553 \begin{minipage}{11.5cm}
1554 \label{dashgluonarc}
1555 \verb:\DashGluonArc(45,0)(40,20,160){5}{8}{1.5}:\hfill \\
1556 The first 7 arguments are as in the \verb+GluonArc+ command. The extra
1557 argument is the size of the dash segments.
1558 \end{minipage}\vspace{4mm}
1559
1560 %--#] DashGluonArc :
1561 %--#[ DashDoubleGluonArc :
1562
1563 \noindent
1564 \begin{minipage}{3.83cm}
1565 \begin{axopicture}{(90,50)(-10,0)}
1566 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1567 \DashDoubleGluonArc(45,0)(40,20,160){5}{8}{1.3}{1.5}
1568 \end{axopicture}
1569 \end{minipage}
1570 \begin{minipage}{11.5cm}
1571 \label{dashdoublegluonarc}
1572 \verb:\DashDoubleGluonArc(45,0)(40,20,160){5}{8}{1.3}{1.5}:\hfill \\
1573 The first 7 arguments are as in the \verb+GluonArc+ command. The extra
1574 arguments are the separation of the lines and the size of the dash
1575 segments.
1576 \end{minipage}\vspace{10mm}
1577
1578 %--#] DashDoubleGluonArc :
1579 %--#[ GluonCirc :
1580
1581 \noindent
1582 \begin{minipage}{3.83cm}
1583 \begin{axopicture}{(80,80)(-15,0)}
1584 \AxoGrid(0,0)(10,10)(8,8){LightGray}{0.5}
1585 \GluonCirc(40,40)(30,0){5}{16}
1586 \end{axopicture}
1587 \end{minipage}
1588 \begin{minipage}{11.5cm}
1589 \label{gluoncirc}
1590 \verb:\GluonCirc(40,40)(30,0){5}{16}:\hfill \\
1591 The arguments are: Coordinates for the center of the circle, the
1592 radius and a phase, the
1593 amplitude of the gluon windings and the number of windings.
1594 Like the other commands in this section, this command can take
1595 optional arguments, Sec.\ \ref{sec:options}. The phase argument
1596 specifies a counterclockwise rotation of the line relative to a
1597 default starting point.
1598 \end{minipage}\vspace{4mm}
1599
1600 %--#] GluonCirc :
1601 %--#[ DoubleGluonCirc :
1602
1603 \noindent
1604 \begin{minipage}{3.83cm}
1605 \begin{axopicture}{(80,80)(-15,0)}
1606 \AxoGrid(0,0)(10,10)(8,8){LightGray}{0.5}
1607 \DoubleGluonCirc[color=Red](40,40)(30,0){5}{16}{1.3}
1608 \end{axopicture}
1609 \end{minipage}
1610 \begin{minipage}{11.5cm}
1611 \label{doublegluoncirc}
1612 \verb:\DoubleGluonCirc[color=Red](40,40)(30,0){5}{16}{1.3}:\hfill \\
1613 The first 6 arguments are as for the \verb+GluonCirc+ command. The
1614 final argument is the line separation.
1615 \end{minipage}\vspace{4mm}
1616
1617 %--#] DoubleGluonCirc :
1618 %--#[ DashGluonCirc :
1619
1620 \noindent
1621 \begin{minipage}{3.83cm}
1622 \begin{axopicture}{(80,80)(-15,0)}
1623 \AxoGrid(0,0)(10,10)(8,8){LightGray}{0.5}
1624 \DashGluonCirc(40,40)(30,0){5}{16}{1.5}
1625 \end{axopicture}
1626 \end{minipage}
1627 \begin{minipage}{11.5cm}
1628 \label{dashgluoncirc}
1629 \verb:\DashGluonCirc(40,40)(30,0){5}{16}{1.5}:\hfill \\
1630 The first 6 arguments are as for the \verb+GluonCirc+ command.
1631 The final argument is the size of the dashes.
1632 \end{minipage}\vspace{4mm}
1633
1634 %--#] DashGluonCirc :
1635 %--#[ DashDoubleGluonCirc :
1636
1637 \noindent
1638 \begin{minipage}{3.83cm}
1639 \begin{axopicture}{(80,80)(-15,0)}
1640 \AxoGrid(0,0)(10,10)(8,8){LightGray}{0.5}
1641 \DashDoubleGluonCirc(40,40)(30,0){5}{16}{1.3}{1.5}
1642 \end{axopicture}
1643 \end{minipage}
1644 \begin{minipage}{11.5cm}
1645 \label{dashdoublegluoncirc}
1646 \verb:\DashDoubleGluonCirc(40,40)(30,0){5}{16}{1.3}{1.5}:\hfill \\
1647 The first 6 arguments are as for the \verb+GluonCirc+ command.
1648 The final 2 arguments are the line separation and the size of the
1649 dashes.
1650 \end{minipage}\vspace{4mm}
1651
1652 %--#] DashDoubleGluonCirc :
1653 %--#[ Photon :
1654
1655 \subsubsection{Photon lines}
1656 \label{sec:Photon}
1657
1658 The basic drawing commands for drawing photon lines are \verb+\Photon+
1659 and \verb+\PhotonArc+. There are also variants for dashed and double
1660 photons. But arrows aren't possible.
1661
1662 All of the commands in this section can be given optional keyword
1663 arguments, which are defined in Sec.\ \ref{sec:options}. These can be
1664 used to specify the type of line (dashed, double), and to specify some
1665 of the line's parameters.\vspace{3mm}
1666
1667 \noindent
1668 \begin{minipage}{3.83cm}
1669 \begin{axopicture}{(90,40)(-10,0)}
1670 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1671 \Photon(10,20)(80,20){5}{7}
1672 \end{axopicture}
1673 \end{minipage}
1674 \begin{minipage}{11.5cm}
1675 \label{photon}
1676 \verb:\Photon(10,20)(80,20){5}{7}: \hfill \\
1677 In this command we have two coordinates, the amplitude of the wiggles and
1678 the number of wiggles.
1679 A negative value for the amplitude will reverse the orientation of the
1680 wiggles.
1681 The line will be drawn with the number of wiggles rounded to the
1682 nearest half integer.
1683 Like the other commands in this section, this command can take
1684 optional arguments, Sec.\ \ref{sec:options}.
1685 \end{minipage}\vspace{4mm}
1686
1687 %--#] Photon :
1688 %--#[ DoublePhoton :
1689
1690 \noindent
1691 \begin{minipage}{3.83cm}
1692 \begin{axopicture}{(90,40)(-10,0)}
1693 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1694 \DoublePhoton(10,20)(80,20){5}{7}{1.3}
1695 \end{axopicture}
1696 \end{minipage}
1697 \begin{minipage}{11.5cm}
1698 \label{doublephoton}
1699 \verb:\DoublePhoton(10,20)(80,20){5}{7}{1.3}:\hfill \\
1700 The first 6 arguments are as in the \verb+Photon+ command. The
1701 extra argument is the line separation.
1702 \end{minipage}\vspace{4mm}
1703
1704 %--#] DoublePhoton :
1705 %--#[ DashPhoton :
1706
1707 \noindent
1708 \begin{minipage}{3.83cm}
1709 \begin{axopicture}{(90,40)(-10,0)}
1710 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1711 \DashPhoton[color=Red](10,20)(80,20){5}{7}{1}
1712 \end{axopicture}
1713 \end{minipage}
1714 \begin{minipage}{11.5cm}
1715 \label{dashphoton}
1716 \verb:\DashPhoton[color=Red](10,20)(80,20){5}{7}{1}:\hfill \\
1717 The first 6 arguments are as in the \verb+Photon+ command. The
1718 extra argument is the size of the dashes.
1719 \end{minipage}\vspace{4mm}
1720
1721 %--#] DashPhoton :
1722 %--#[ DashDoublePhoton :
1723
1724 \noindent
1725 \begin{minipage}{3.83cm}
1726 \begin{axopicture}{(90,40)(-10,0)}
1727 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1728 \DashDoublePhoton(10,20)(80,20){5}{7}{1.3}{1}
1729 \end{axopicture}
1730 \end{minipage}
1731 \begin{minipage}{11.5cm}
1732 \label{dashdoublephoton}
1733 \verb:\DashDoublePhoton(10,20)(80,20){5}{7}{1.3}{1}:\hfill \\
1734 The first 6 arguments are as in the \verb+Photon+
1735 command.
1736 The final 2 arguments are the line separation and the size of the
1737 dashes.
1738 \end{minipage}\vspace{10mm}
1739
1740 %--#] DashDoublePhoton :
1741 %--#[ PhotonArc :
1742
1743 \noindent
1744 \begin{minipage}{3.83cm}
1745 \begin{axopicture}{(90,50)(-10,0)}
1746 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1747 \PhotonArc(45,0)(40,20,160){5}{8}
1748 \end{axopicture}
1749 \end{minipage}
1750 \begin{minipage}{11.5cm}
1751 \label{photonarc}
1752 \verb:\PhotonArc(45,0)(40,20,160){5}{8}:\hfill \\
1753 In this command we have one coordinate: the center of the circle. Then
1754 follow the radius of the circle, the start angle and the finishing angle.
1755 The arc will be drawn counterclockwise. The final two parameters are the
1756 amplitude of the wiggles and the number of wiggles.
1757 Like the other commands in this section, this command can take
1758 optional arguments, Sec.\ \ref{sec:options}.
1759 \end{minipage}\vspace{4mm}
1760
1761 %--#] PhotonArc :
1762 %--#[ DoublePhotonArc :
1763
1764 \noindent
1765 \begin{minipage}{3.83cm}
1766 \begin{axopicture}{(90,50)(-10,0)}
1767 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1768 \DoublePhotonArc[color=Red](45,0)(40,20,160)%
1769 {5}{8}{1.3}
1770 \end{axopicture}
1771 \end{minipage}
1772 \begin{minipage}{11.5cm}
1773 \label{doublephotonarc}
1774 \begin{verbatim}
1775 \DoublePhotonArc[color=Red](45,0)(40,20,160)%
1776 {5}{8}{1.3}
1777 \end{verbatim}
1778 The first 7 arguments are as in the \verb+PhotonArc+ command. The extra
1779 argument is the separation of the double line.
1780 \end{minipage}\vspace{4mm}
1781
1782 %--#] DoublePhotonArc :
1783 %--#[ DashPhotonArc :
1784
1785 \noindent
1786 \begin{minipage}{3.83cm}
1787 \begin{axopicture}{(90,50)(-10,0)}
1788 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1789 \DashPhotonArc(45,0)(40,20,160){5}{8}{1.5}
1790 \end{axopicture}
1791 \end{minipage}
1792 \begin{minipage}{11.5cm}
1793 \label{dashphotonarc}
1794 \verb:\DashPhotonArc(45,0)(40,20,160){5}{8}{1.5}:\hfill \\
1795 The first 7 arguments are as in the \verb+PhotonArc+ command. The
1796 extra argument is the size of the dash segments.
1797 \end{minipage}\vspace{4mm}
1798
1799 %--#] DashPhotonArc :
1800 %--#[ DashDoublePhotonArc :
1801
1802 \noindent
1803 \begin{minipage}{3.83cm}
1804 \begin{axopicture}{(90,50)(-10,0)}
1805 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1806 \DashDoublePhotonArc(45,0)(40,20,160){5}{8}{1.3}{1.5}
1807 \end{axopicture}
1808 \end{minipage}
1809 \begin{minipage}{11.5cm}
1810 \label{dashdoublephotonarc}
1811 \verb:\DashDoublePhotonArc(45,0)(40,20,160){5}{8}{1.3}{1.5}:\hfill \\
1812 The first 7 arguments are as in the \verb+PhotonArc+ command. The
1813 extra arguments are the separation of the lines and the size of the
1814 dash segments.
1815 \end{minipage}\vspace{4mm}
1816
1817 %--#] DashDoublePhotonArc :
1818 %--#[ ZigZag :
1819
1820 \subsubsection{Zigzag lines}
1821
1822 The basic drawing commands for drawing zigzag lines are \verb+\Zigzag+
1823 and \verb+\ZigzagArc+. There are also variants for dashed and double
1824 lines. But arrows aren't possible.
1825
1826 All of the commands in this section can be given optional keyword
1827 arguments, which are defined in Sec.\ \ref{sec:options}. These can be
1828 used to specify the type of line (dashed, double), and to specify some
1829 of the line's parameters.
1830 \vspace{4mm}
1831
1832 \noindent
1833 \begin{minipage}{3.83cm}
1834 \begin{axopicture}{(90,40)(-10,0)}
1835 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1836 \ZigZag(10,20)(80,20){5}{7.5}
1837 \end{axopicture}
1838 \end{minipage}
1839 \begin{minipage}{11.5cm}
1840 \label{zigzag}
1841 \verb:\ZigZag(10,20)(80,20){5}{7.5}: \hfill \\
1842 In this command we have two coordinates, the amplitude of the sawteeth and
1843 the number of sawteeth.
1844 A negative value for the amplitude will reverse the orientation of the
1845 sawteeth.
1846 The line will be drawn with the number of sawteeth rounded to the
1847 nearest half integer.
1848 \end{minipage}
1849 \\[3mm]
1850 Like the other commands in this section, this command can take
1851 optional arguments, Sec.\ \ref{sec:options}, e.g.,\\[3mm]
1852 \noindent
1853 \begin{minipage}{3.83cm}
1854 \begin{axopicture}{(90,40)(-10,0)}
1855 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1856 \ZigZag[color=Red,double,sep=1.5](10,20)(80,20){5}{7}
1857 \end{axopicture}
1858 \end{minipage}
1859 \begin{minipage}{11.5cm}
1860 \label{zigzag.opt}
1861 \verb:\ZigZag[color=Red,double,sep=1.5](10,20)(80,20){5}{7}:
1862 \end{minipage}\vspace{6mm}
1863
1864 %--#] ZigZag :
1865 %--#[ DoubleZigZag :
1866
1867 \noindent
1868 \begin{minipage}{3.83cm}
1869 \begin{axopicture}{(90,40)(-10,0)}
1870 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1871 \DoubleZigZag(10,20)(80,20){5}{7}{1.3}
1872 \end{axopicture}
1873 \end{minipage}
1874 \begin{minipage}{11.5cm}
1875 \label{doublezigzag}
1876 \verb:\DoubleZigZag(10,20)(80,20){5}{7}{1.3}:\hfill \\
1877 The first 6 arguments are as in the \verb+ZigZag+ command. The
1878 extra argument is the line separation.
1879 \end{minipage}\vspace{4mm}
1880
1881 %--#] DoubleZigZag :
1882 %--#[ DashZigZag :
1883
1884 \noindent
1885 \begin{minipage}{3.83cm}
1886 \begin{axopicture}{(90,40)(-10,0)}
1887 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1888 \DashZigZag(10,20)(80,20){5}{7}{1}
1889 \end{axopicture}
1890 \end{minipage}
1891 \begin{minipage}{11.5cm}
1892 \label{dashzigzag}
1893 \verb:\DashZigZag(10,20)(80,20){5}{7}{1}:\hfill \\
1894 The first 6 arguments are as in the \verb+ZigZag+ command. The
1895 extra argument is the size of the dashes.
1896 \end{minipage}\vspace{4mm}
1897
1898 %--#] DashZigZag :
1899 %--#[ DashDoubleZigZag :
1900
1901 \noindent
1902 \begin{minipage}{3.83cm}
1903 \begin{axopicture}{(90,40)(-10,0)}
1904 \AxoGrid(0,0)(10,10)(9,4){LightGray}{0.5}
1905 \DashDoubleZigZag(10,20)(80,20){5}{7}{1.3}{1}
1906 \end{axopicture}
1907 \end{minipage}
1908 \begin{minipage}{11.5cm}
1909 \label{dashdoublezigzag}
1910 \verb:\DashDoubleZigZag(10,20)(80,20){5}{7}{1.3}{1}:\hfill \\
1911 The first 6 arguments are as in the \verb+ZigZag+ command.
1912 The extra arguments are the separation of the lines and the size of
1913 the dash segments.
1914 \end{minipage}\vspace{6mm}
1915
1916 %--#] DashDoubleZigZag :
1917 %--#[ ZigZagArc :
1918
1919 \noindent
1920 \begin{minipage}{3.83cm}
1921 \begin{axopicture}{(90,50)(-10,0)}
1922 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1923 \ZigZagArc(45,0)(40,20,160){5}{8}
1924 \end{axopicture}
1925 \end{minipage}
1926 \begin{minipage}{11.5cm}
1927 \label{zigzagarc}
1928 \verb:\ZigZagArc(45,0)(40,20,160){5}{8}:\hfill \\
1929 In this command we have one coordinate: the center of the circle. Then
1930 follow the radius of the circle, the start angle and the finishing
1931 angle. The arc will be drawn counterclockwise. The final two
1932 arguments are the amplitude of the sawteeth and the number of
1933 sawteeth. Like the other commands in this section, this command can
1934 take optional arguments, Sec.\ \ref{sec:options}.
1935 \end{minipage}\vspace{4mm}
1936
1937 %--#] ZigZagArc :
1938 %--#[ DoubleZigZagArc :
1939
1940 \noindent
1941 \begin{minipage}{3.83cm}
1942 \begin{axopicture}{(90,50)(-10,0)}
1943 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1944 \DoubleZigZagArc(45,0)(40,20,160){5}{8}{1.3}
1945 \end{axopicture}
1946 \end{minipage}
1947 \begin{minipage}{11.5cm}
1948 \label{doublezigzagarc}
1949 \verb:\DoubleZigZagArc(45,0)(40,20,160){5}{8}{1.3}:\hfill \\
1950 The first 7 arguments are as for the \verb+ZigZagArc+ command. The
1951 extra argument is the separation in the double line.
1952 \end{minipage}\vspace{4mm}
1953
1954 %--#] DoubleZigZagArc :
1955 %--#[ DashZigZagArc :
1956
1957 \noindent
1958 \begin{minipage}{3.83cm}
1959 \begin{axopicture}{(90,50)(-10,0)}
1960 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1961 \DashZigZagArc(45,0)(40,20,160){5}{8}{1.5}
1962 \end{axopicture}
1963 \end{minipage}
1964 \begin{minipage}{11.5cm}
1965 \label{dashzigzagarc}
1966 \verb:\DashZigZagArc(45,0)(40,20,160){5}{8}{1.5}:\hfill \\
1967 The first 7 arguments are as for the \verb+ZigZagArc+ command. The
1968 extra argument is the size of the dash segments.
1969 \end{minipage}\vspace{4mm}
1970
1971 %--#] DashZigZagArc :
1972 %--#[ DashDoubleZigZagArc :
1973
1974 \noindent
1975 \begin{minipage}{3.83cm}
1976 \begin{axopicture}{(90,50)(-10,0)}
1977 \AxoGrid(0,0)(10,10)(9,5){LightGray}{0.5}
1978 \DashDoubleZigZagArc(45,0)(40,20,160){5}{8}{1.3}{1.5}
1979 \end{axopicture}
1980 \end{minipage}
1981 \begin{minipage}{11.5cm}
1982 \label{dashdoublezigzagarc}
1983 \verb:\DashDoubleZigZagArc(45,0)(40,20,160){5}{8}{1.3}{1.5}:\hfill \\
1984 The first 7 arguments are as for the \verb+ZigZagArc+ command. The
1985 final 2 arguments are the separation of the lines and the size of the
1986 dash segments.
1987 \end{minipage}\vspace{4mm}
1988
1989 %--#] DashDoubleZigZagArc :
1990 %--#[ Vertex :
1991
1992 \subsubsection{Vertices, circles, ovals; other graphics}
1993 \label{sec:other.graphics}
1994
1995 The commands in this section are for graphical elements other
1996 than those that we conceived of as lines in Feynman graphs. Many of
1997 these have standard uses as components of Feynman graphs\footnote{Of
1998 course, none of the commands is restricted to its originally
1999 envisaged use, or to being used to draw Feynman graphs. But
2000 especially the line-drawing commands have been designed from the
2001 point-of-view of being suitable for the needs of drawing particular
2002 elements of Feynman graphs.}. The commands here are mostly shown
2003 in association with other objects, to indicate some of their
2004 properties.
2005 \vspace{4mm}
2006
2007 \noindent
2008 \begin{minipage}{3.83cm}
2009 \begin{axopicture}{(80,50)(-15,0)}
2010 \AxoGrid(0,0)(10,10)(8,5){LightGray}{0.5}
2011 \Line(10,10)(70,10)
2012 \Photon(40,10)(40,40){4}{3}
2013 \Vertex(40,10){1.5}
2014 \end{axopicture}
2015 \end{minipage}
2016 \begin{minipage}{11.5cm}
2017 \label{vertex}
2018 \verb:\Line(10,10)(70,10): \hfill \\
2019 \verb:\Photon(40,10)(40,40){4}{3}: \hfill \\
2020 \verb:\Vertex(40,10){1.5}: \hfill \\
2021 \verb+\Vertex+ gives a vertex, as is often used for connecting lines
2022 in Feynman graphs. It gives a fat dot. The arguments are coordinates
2023 (between parentheses) for its center, and the radius of the dot.
2024 \end{minipage}\vspace{4mm}
2025
2026 %--#] Vertex :
2027 %--#[ ECirc :
2028
2029 \noindent
2030 \begin{minipage}{3.83cm}
2031 \begin{axopicture}{(60,60)(-25,0)}
2032 \AxoGrid(0,0)(10,10)(6,6){LightGray}{0.5}
2033 \Red{\Line(0,0)(60,60)}
2034 \ECirc(30,30){20}
2035 \end{axopicture}
2036 \end{minipage}
2037 \begin{minipage}{11.5cm}
2038 \label{ecirc}
2039 \verb:\Red{\Line(0,0)(60,60)}:\\
2040 \verb:\ECirc(30,30){20}:\\
2041 \verb+\ECirc+ draws a circle with its center at the specified
2042 coordinate (first two arguments) and the specified radius (third
2043 argument). The interior is transparent, so that it does not erase
2044 previously drawn material.
2045 If you need a filled circle, use the \verb+\Vertex+ command (to which
2046 we have defined a synonym \verb+\FCirc+ to match similar commands for
2047 other shapes).
2048 \end{minipage}\vspace{4mm}
2049
2050 %--#] ECirc :
2051 %--#[ BCirc :
2052
2053 \noindent
2054 \begin{minipage}{3.83cm}
2055 \begin{axopicture}{(60,60)(-25,0)}
2056 \AxoGrid(0,0)(10,10)(6,6){LightGray}{0.5}
2057 \Red{\Line(0,0)(60,60)}
2058 \BCirc(30,30){20}
2059 \Blue{\Line(60,0)(0,60)}
2060 \end{axopicture}
2061 \end{minipage}
2062 \begin{minipage}{11.5cm}
2063 \label{bcirc}
2064 \verb:\Red{\Line(0,0)(60,60)}:\\
2065 \verb:\BCirc(30,30){20}:\\
2066 \verb:\Blue{\Line(60,0)(0,60)}:\\
2067 \verb+\BCirc+
2068 draws a circle with the center at the specified coordinate (first two
2069 arguments) and the specified radius (third argument). The interior is
2070 white and opaque, so that it erases previously written objects, but not
2071 subsequently drawn objects.
2072 \end{minipage}\vspace{4mm}
2073
2074 %--#] BCirc :
2075 %--#[ GCirc :
2076
2077 \noindent
2078 \begin{minipage}{3.83cm}
2079 \begin{axopicture}{(60,60)(-25,0)}
2080 \AxoGrid(0,0)(10,10)(6,6){LightGray}{0.5}
2081 \Red{\Line(0,0)(60,60)}
2082 \GCirc(30,30){20}{0.82}
2083 \Blue{\Line(60,0)(0,60)}
2084 \end{axopicture}
2085 \end{minipage}
2086 \begin{minipage}{11.5cm}
2087 \label{gcirc}
2088 \verb:\Red{\Line(0,0)(60,60)}:\\
2089 \verb:\GCirc(30,30){20}{0.82}:\\
2090 \verb:\Blue{\Line(60,0)(0,60)}:\\
2091 \verb+\GCirc+ draws a circle with the center at the specified
2092 coordinate (first two arguments) and the specified radius (third
2093 argument). Previously written contents are overwritten and made gray
2094 according to the grayscale specified by the fourth argument (0=black,
2095 1=white).
2096 \end{minipage}\vspace{4mm}
2097
2098 %--#] GCirc :
2099 %--#[ CCirc :
2100
2101 \noindent
2102 \begin{minipage}{3.83cm}
2103 \begin{axopicture}{(60,60)(-25,0)}
2104 \AxoGrid(0,0)(10,10)(6,6){LightGray}{0.5}
2105 \Red{\Line(0,0)(60,60)}
2106 \CCirc(30,30){20}{Red}{Yellow}
2107 \Blue{\Line(60,0)(0,60)}
2108 \end{axopicture}
2109 \end{minipage}
2110 \begin{minipage}{11.5cm}
2111 \label{ccirc}
2112 \verb:\Red{\Line(0,0)(60,60)}:\\
2113 \verb:\CCirc(30,30){20}{Red}{Yellow}:\\
2114 \verb:\Blue{\Line(60,0)(0,60)}:\\
2115 \verb+\CCirc+ draws a colored circle with the center at the specified
2116 coordinate (first two arguments) and the specified radius (third
2117 argument). The fourth argument is the name of the color for the circle
2118 itself. Its interior is overwritten and colored with the color
2119 specified by name in the fifth argument.
2120 \end{minipage}\vspace{4mm}
2121
2122 %--#] CCirc :
2123 %--#[ Oval :
2124
2125 \noindent
2126 \begin{minipage}{3.83cm}
2127 \begin{axopicture}{(80,110)(-15,0)}
2128 \AxoGrid(0,0)(10,10)(8,11){LightGray}{0.5}
2129 \Oval(40,80)(20,30)(0)
2130 \Oval(40,30)(20,30)(30)
2131 \end{axopicture}
2132 \end{minipage}
2133 \begin{minipage}{11.5cm}
2134 \label{oval}
2135 \verb:\Oval(40,80)(20,30)(0):\\
2136 \verb:\Oval(40,30)(20,30)(30):\\
2137 \verb:\Oval: draws an oval. The first pair of values is the center of
2138 the oval. The next pair forms the half-height and the half-width. The
2139 last argument is a (counterclockwise) rotation angle. The interior is
2140 transparent, so that it does not erase previously drawn material.
2141 \end{minipage}\vspace{4mm}
2142
2143 %--#] Oval :
2144 %--#[ FOval :
2145
2146 \noindent
2147 \begin{minipage}{3.83cm}
2148 \begin{axopicture}{(80,60)(-15,0)}
2149 \AxoGrid(0,0)(10,10)(8,6){LightGray}{0.5}
2150 \SetColor{Yellow}
2151 \FOval(40,30)(20,30)(30)
2152 \end{axopicture}
2153 \end{minipage}
2154 \begin{minipage}{11.5cm}
2155 \label{foval}
2156 \verb:\SetColor{Yellow}:\\
2157 \verb:\FOval(40,80)(20,30)(30):\\
2158 \verb:\FOval: draws an oval filled with the current color overwriting
2159 previously written material. Its arguments are the same as for the
2160 \verb:\Oval: command.
2161 \end{minipage}\vspace{4mm}
2162
2163 %--#] FOval :
2164 %--#[ GOval :
2165
2166 \noindent
2167 \begin{minipage}{3.83cm}
2168 \begin{axopicture}{(80,60)(-15,0)}
2169 \AxoGrid(0,0)(10,10)(8,6){LightGray}{0.5}
2170 \Red{\Line(0,0)(80,60)}
2171 \GOval(40,30)(20,30)(0){0.6}
2172 \Blue{\Line(80,0)(0,60)}
2173 \end{axopicture}
2174 \end{minipage}
2175 \begin{minipage}{11.5cm}
2176 \label{goval}
2177 \verb:\Red{\Line(0,0)(80,60)}:\\
2178 \verb:\GOval(40,30)(20,30)(0){0.6}: \\
2179 \verb:\Blue{\Line(80,0)(0,60)}:\\
2180 \verb:\GOval: draws an oval with a gray interior.
2181 The first 5 arguments are the same as for the \verb:\Oval: command.
2182 The last argument indicates the
2183 grayscale with which the oval will be filled, overwriting previously
2184 written contents (0=black, 1=white).
2185 \end{minipage}\vspace{4mm}
2186
2187 %--#] GOval :
2188 %--#[ COval :
2189
2190 \noindent
2191 \begin{minipage}{3.83cm}
2192 \begin{axopicture}{(80,60)(-15,0)}
2193 \AxoGrid(0,0)(10,10)(8,6){LightGray}{0.5}
2194 \SetWidth{1}
2195 \Green{\Line(0,0)(80,60)}
2196 \COval(40,30)(20,30)(20){Orange}{Blue}
2197 \Yellow{\Line(80,0)(0,60)}
2198 \end{axopicture}
2199 \end{minipage}
2200 \begin{minipage}{11.5cm}
2201 \label{coval}
2202 \verb:\Green{\Line(0,0)(80,60)}:\\
2203 \verb:\COval(40,30)(20,30)(20){Orange}{Blue}:\\
2204 \verb:\Yellow{\Line(80,0)(0,60)}:\\
2205 \verb:\COval: draws a colored oval.
2206 The first 5 arguments are the same as for the \verb:\Oval: command.
2207 The last two arguments are the names of two colors.
2208 The first is the color of the line that forms the oval and the second is
2209 the color of the inside.
2210 \end{minipage}\vspace{4mm}
2211
2212 %--#] COval :
2213 %--#[ EBox :
2214
2215 Commands for drawing boxes are in two series. For the first set, the
2216 box's position is specified by the coordinates of its bottom left
2217 corner and top right corner:\\[4mm]
2218 \noindent
2219 \begin{minipage}{3.83cm}
2220 \begin{axopicture}{(60,50)(-25,0)}
2221 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2222 \EBox(10,10)(50,40)
2223 \end{axopicture}
2224 \end{minipage}
2225 \begin{minipage}{11.5cm}
2226 \label{ebox}
2227 \verb:\EBox(10,10)(50,40): \hfill \\
2228 Draws a box. The points specified are the bottom left corner and the top
2229 right corner.
2230 The interior is transparent, so that it does not erase previously
2231 drawn material.
2232 \end{minipage}\vspace{4mm}
2233
2234 %--#] EBox :
2235 %--#[ FBox :
2236
2237 \noindent
2238 \begin{minipage}{3.83cm}
2239 \begin{axopicture}{(60,50)(-25,0)}
2240 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2241 \FBox(10,10)(50,40)
2242 \end{axopicture}
2243 \end{minipage}
2244 \begin{minipage}{11.5cm}
2245 \label{fbox}
2246 \verb:\FBox(10,10)(50,40): \hfill \\
2247 Draws a box filled with the current color overwriting
2248 previously written material. Its arguments are the same as for the
2249 \verb:\EBox: command.
2250 \end{minipage}\vspace{4mm}
2251
2252 %--#] FBox :
2253 %--#[ BBox :
2254
2255 \noindent
2256 \begin{minipage}{3.83cm}
2257 \begin{axopicture}{(60,50)(-25,0)}
2258 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2259 \BBox(10,10)(50,40)
2260 \end{axopicture}
2261 \end{minipage}
2262 \begin{minipage}{11.5cm}
2263 \label{bbox}
2264 \verb:\BBox(10,10)(50,40): \hfill \\
2265 Draws a blanked-out box. The points specified are the bottom left corner
2266 and the top right corner.
2267 \end{minipage}\vspace{4mm}
2268
2269 %--#] BBox :
2270 %--#[ GBox :
2271
2272 \noindent
2273 \begin{minipage}{3.83cm}
2274 \begin{axopicture}{(60,50)(-25,0)}
2275 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2276 \GBox(10,10)(50,40){0.9}
2277 \end{axopicture}
2278 \end{minipage}
2279 \begin{minipage}{11.5cm}
2280 \label{gbox}
2281 \verb:\GBox(10,10)(50,40){0.9}: \hfill \\
2282 Draws a box filled with a grayscale given by the fifth argument (black=0,
2283 white=1). The points specified are the bottom left corner and the top
2284 right corner.
2285 \end{minipage}\vspace{4mm}
2286
2287 %--#] GBox :
2288 %--#[ CBox :
2289
2290 \noindent
2291 \begin{minipage}{3.83cm}
2292 \begin{axopicture}{(60,50)(-25,0)}
2293 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2294 \SetWidth{1.5}
2295 \CBox(10,10)(50,40){Green}{LightRed}
2296 \end{axopicture}
2297 \end{minipage}
2298 \begin{minipage}{11.5cm}
2299 \label{cbox}
2300 \verb:\CBox(10,10)(50,40){Green}{LightRed}: \hfill \\
2301 Draws a box in the color specified by name in the fifth argument. The
2302 contents are filled with the color specified by name in the sixth
2303 argument. The points specified are the bottom left corner and the top
2304 right corner.
2305 \end{minipage}\vspace{4mm}
2306
2307 %--#] CBox :
2308 %--#[ EBoxc :
2309
2310 For the other series of box-drawing commands, the box's position is
2311 specified by its center, and its width and height. The command names
2312 end with a ``\texttt{c}'', for ``center'':\\[3mm]
2313 \noindent
2314 \begin{minipage}{3.83cm}
2315 \begin{axopicture}{(60,50)(-25,0)}
2316 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2317 \EBoxc(30,25)(40,30)
2318 \end{axopicture}
2319 \end{minipage}
2320 \begin{minipage}{11.5cm}
2321 \label{eboxc}
2322 \label{boxc}
2323 \verb:\EBoxc(30,25)(40,30): \hfill \\
2324 Draws a box. The first two numbers give the center of the box. The next two
2325 numbers are the width and the height of the box. Instead of \verb:\EBoxc:
2326 one may also use \verb:\Boxc:.
2327
2328 There is also the similar command \verb:\FBoxc: that draws a filled box.
2329 \end{minipage}\vspace{4mm}
2330
2331 %--#] EBoxc :
2332 %--#[ BBoxc :
2333
2334 \noindent
2335 \begin{minipage}{3.83cm}
2336 \begin{axopicture}{(60,50)(-25,0)}
2337 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2338 \BBoxc(30,25)(40,30)
2339 \end{axopicture}
2340 \end{minipage}
2341 \begin{minipage}{11.5cm}
2342 \label{bboxc}
2343 \verb:\BBoxc(30,25)(40,30): \hfill \\
2344 Draws a box of which the contents are blanked out. The arguments are
2345 the same as for the \verb+\EBoxc+ command.
2346 \end{minipage}\vspace{4mm}
2347
2348 %--#] BBoxc :
2349 %--#[ GBoxc :
2350
2351 \noindent
2352 \begin{minipage}{3.83cm}
2353 \begin{axopicture}{(60,50)(-25,0)}
2354 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2355 \GBoxc(30,25)(40,30){0.9}
2356 \end{axopicture}
2357 \end{minipage}
2358 \begin{minipage}{11.5cm}
2359 \label{gboxc}
2360 \verb:\GBoxc(30,25)(40,30){0.9}: \hfill \\
2361 Draws a box filled with a grayscale given by the fifth argument (black=0,
2362 white=1).
2363 The first 4 arguments are the same as for the \verb+\EBoxc+ command.
2364 \end{minipage}\vspace{4mm}
2365
2366 %--#] GBoxc :
2367 %--#[ CBoxc :
2368
2369 \noindent
2370 \begin{minipage}{3.83cm}
2371 \begin{axopicture}{(60,50)(-25,0)}
2372 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2373 \SetWidth{1.5}
2374 \CBoxc(30,25)(40,30){Brown}{LightBlue}
2375 \end{axopicture}
2376 \end{minipage}
2377 \begin{minipage}{11.5cm}
2378 \label{cboxc}
2379 \verb:\CBoxc(30,25)(40,30){Brown}{LightBlue}: \hfill \\
2380 Draws a box in the color specified by name in the fifth argument. The
2381 contents are filled with the color specified by name in the sixth
2382 argument.
2383 The first 4 arguments are the same as for the \verb+\EBoxc+ command.
2384 \end{minipage}\vspace{4mm}
2385
2386 %--#] BBoxc :
2387 %--#] CBoxc :
2388 %--#[ RotatedBox :
2389
2390 \noindent
2391 \begin{minipage}{3.83cm}
2392 \begin{axopicture}{(60,50)(-25,0)}
2393 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2394 \RotatedBox(30,25)(40,30){30}{Red}
2395 \end{axopicture}
2396 \end{minipage}
2397 \begin{minipage}{11.5cm}
2398 \label{rotatedbox}
2399 \verb:\RotatedBox(30,25)(40,30){30}{Red}: \hfill \\
2400 Draws a rotated box. The first two numbers give the center of the
2401 box. The next two numbers are the width and the height of the box. The
2402 fifth argument is the counterclockwise rotation angle and the sixth
2403 argument is the color of the box. The interior of the box is
2404 transparent.
2405 \end{minipage}\vspace{4mm}
2406
2407 %--#] RotatedBox :
2408 %--#[ FilledRotatedBox :
2409
2410 \noindent
2411 \begin{minipage}{3.83cm}
2412 \begin{axopicture}{(60,50)(-25,0)}
2413 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2414 \FilledRotatedBox(30,25)(40,30){30}{Blue}
2415 \end{axopicture}
2416 \end{minipage}
2417 \begin{minipage}{11.5cm}
2418 \label{filledrotatedbox}
2419 \verb:\FilledRotatedBox(30,25)(40,30){30}{Blue}: \hfill \\
2420 Draws a rotated box.
2421 The first 4 arguments are the same as for the \verb+\RotatedBox+ command.
2422 The
2423 fifth argument is the counterclockwise rotation angle and the sixth
2424 argument is the color of the inside of the box. If a differently
2425 colored outline is needed, it should be written with the
2426 \verb+RotatedBox+ command.
2427 \end{minipage}\vspace{4mm}
2428
2429 %--#] FilledRotatedBox :
2430 %--#[ ETri :
2431
2432 \noindent
2433 \begin{minipage}{3.83cm}
2434 \begin{axopicture}{(60,50)(-25,0)}
2435 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2436 \ETri(10,20)(50,10)(40,40)
2437 \end{axopicture}
2438 \end{minipage}
2439 \begin{minipage}{11.5cm}
2440 \label{etri}
2441 \verb:\ETri(10,20)(50,10)(40,40): \hfill \\
2442 Draws a triangle. The three points specified are the corners of the
2443 triangle.
2444 The interior is transparent.
2445
2446 There is also the similar command \verb:\FTri: that draws a filled triangle.
2447 \end{minipage}\vspace{4mm}
2448
2449 %--#] ETri :
2450 %--#[ BTri :
2451
2452 \noindent
2453 \begin{minipage}{3.83cm}
2454 \begin{axopicture}{(60,50)(-25,0)}
2455 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2456 \BTri(10,20)(50,10)(40,40)
2457 \end{axopicture}
2458 \end{minipage}
2459 \begin{minipage}{11.5cm}
2460 \label{btri}
2461 \verb:\BTri(10,20)(50,10)(40,40): \hfill \\
2462 Draws a blanked-out triangle. The three points specified are the corners of
2463 the triangle.
2464 \end{minipage}\vspace{4mm}
2465
2466 %--#] BTri :
2467 %--#[ GTri :
2468
2469 \noindent
2470 \begin{minipage}{3.83cm}
2471 \begin{axopicture}{(60,50)(-25,0)}
2472 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2473 \GTri(10,20)(50,10)(40,40){0.9}
2474 \end{axopicture}
2475 \end{minipage}
2476 \begin{minipage}{11.5cm}
2477 \label{gtri}
2478 \verb:\GTri(10,20)(50,10)(40,40){0.9}: \hfill \\
2479 Draws a triangle of which the content are filled with the grayscale
2480 specified by the seventh argument (black=0, white=1). The three points
2481 specified are the corners of the triangle.
2482 \end{minipage}\vspace{4mm}
2483
2484 %--#] GTri :
2485 %--#[ CTri :
2486
2487 \noindent
2488 \begin{minipage}{3.83cm}
2489 \begin{axopicture}{(60,50)(-25,0)}
2490 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2491 \SetWidth{1}
2492 \CTri(10,20)(50,10)(40,40){Red}{Yellow}
2493 \end{axopicture}
2494 \end{minipage}
2495 \begin{minipage}{11.5cm}
2496 \label{ctri}
2497 \verb:\CTri(10,20)(50,10)(40,40){Red}{Yellow}: \hfill \\
2498 Draws a triangle in the color named in the seventh argument. The
2499 contents are filled with the color named in the eightth argument. The
2500 three points specified are the corners of the triangle.
2501 \end{minipage}\vspace{4mm}
2502
2503 %--#] CTri :
2504 %--#[ Polygon :
2505
2506 \noindent
2507 \begin{minipage}{3.83cm}
2508 \begin{axopicture}{(60,50)(-25,0)}
2509 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2510 \Polygon{(10,20)(20,10)(40,20)(50,10)(45,40)(15,30)}{Red}
2511 \end{axopicture}
2512 \end{minipage}
2513 \begin{minipage}{11.5cm}
2514 \label{polygon}
2515 \verb:\Polygon{(10,20)(20,10)(40,20)(50,10): \hfill \\
2516 \verb: (45,40)(15,30)}{Red}: \hfill \\
2517 Draws a polygon. The first argument is a sequence of two dimensional
2518 points which form the corners of the polygon. The second argument is
2519 the name of the color of the polygon. The interior is transparent.
2520 \end{minipage}\vspace{4mm}
2521
2522 %--#] Polygon :
2523 %--#[ FilledPolygon :
2524
2525 \noindent
2526 \begin{minipage}{3.83cm}
2527 \begin{axopicture}{(60,50)(-25,0)}
2528 \AxoGrid(0,0)(10,10)(6,5){LightGray}{0.5}
2529 \FilledPolygon{(10,20)(20,10)(40,20)(50,10)(45,40)(15,30)}{Apricot}
2530 \end{axopicture}
2531 \end{minipage}
2532 \begin{minipage}{11.5cm}
2533 \label{filledpolygon}
2534 \verb:\FilledPolygon{(10,20)(20,10)(40,20)(50,10): \hfill \\
2535 \verb: (45,40)(15,30)}{Apricot}: \hfill \\
2536 Draws a polygon. The first argument is a sequence of two dimensional
2537 points which form the corners of the polygon. The second argument is
2538 the name of the color of the interior.
2539 \end{minipage}\vspace{4mm}
2540
2541 %--#] FilledPolygon :
2542 %--#[ LinAxis :
2543
2544 \noindent
2545 \begin{minipage}{3.83cm}
2546 \begin{axopicture}{(100,50)(-5,0)}
2547 \AxoGrid(0,0)(10,10)(10,5){LightGray}{0.5}
2548 \LinAxis(10,30)(90,30)(4,5,5,0,1)
2549 \LinAxis(10,10)(90,10)(4,5,5,2,1)
2550 \end{axopicture}
2551 \end{minipage}
2552 \begin{minipage}{11.5cm}
2553 \label{linaxis}
2554 \verb:\LinAxis(10,30)(90,30)(4,5,5,0,1):\\
2555 \verb:\LinAxis(10,10)(100,10)(4,5,5,2,1): \\
2556 \verb+\LinAxis+($x_1$,$y_1$)($x_2$,$y_2$)($N_D$,$d$,hashsize,offset,width) \hfill \\
2557 This draws a line to be used as an axis in a graph. Along the axis
2558 are hash marks. Going from the first coordinate to the second, the
2559 hash marks are on the left side if `hashsize', which is the size of the
2560 hash marks, is positive and on the right side if it is negative.
2561 $N_D$ is the number of `decades', indicated by fat hash marks, and
2562 $d$ is the (integer) number of subdivisions inside each decade. The offset
2563 parameter tells to which subdivision the first coordinate
2564 corresponds. When it is zero, this coordinate corresponds to a fat
2565 mark of a decade. Because axes have their own width, this is
2566 indicated with the last parameter.
2567
2568 When arguments are outside the natural range, which is a positive
2569 integer for the number of subdivisions $d$, and a real value
2570 between 0 and $N_D$ for the offset, corrected values are used as
2571 follows: For $d$, it is first rounded to the nearest integer, and
2572 if it is zero or less, $d$ is replaced by 1. The offset is used
2573 modulo the number of subdivisions.
2574
2575 \end{minipage}\vspace{4mm}
2576
2577 %--#] LinAxis :
2578 %--#[ LogAxis :
2579
2580 \noindent
2581 \begin{minipage}{3.83cm}
2582 \begin{axopicture}{(100,40)(-5,0)}
2583 \AxoGrid(0,0)(10,10)(10,4){LightGray}{0.5}
2584 \LogAxis(0,30)(100,30)(4,3,0,1)
2585 \LogAxis(0,10)(100,10)(4,3,3,1)
2586 \end{axopicture}
2587 \end{minipage}
2588 \begin{minipage}{11.5cm}
2589 \label{logaxis}
2590 \verb:\LogAxis(0,30)(100,30)(4,3,0,1): \hfill \\
2591 \verb:\LogAxis(0,10)(100,10)(4,3,3,1): \hfill \\
2592 \verb+\LogAxis+($x_1$,$y_1$)($x_2$,$y_2$)($N_L$,hashsize,offset,width) \hfill \\
2593 This draws a line to be used as a logarithmic axis in a graph. Along
2594 the axis are hash marks. Going from the first coordinate to the second,
2595 the hash marks are on the left side if `hashsize', which is the size of
2596 the hash marks, is positive and on the right side if it is negative.
2597 $N_L$ is the number of orders of magnitude, indicated by fat hash
2598 marks. The offset parameter tells to which subdivision the
2599 first coordinate corresponds. When it is zero, this coordinate
2600 corresponds to a fat mark, which is identical to when the value would
2601 have been 1. Because axes have their own width, this is indicated with
2602 the last parameter.
2603
2604 When the offset is outside its natural range, which is a real
2605 value between 1 and 10, a corrected value is used as
2606 follows: If the offset is zero or less, it is replaced by 1. Then
2607 it is multiplied by an integer power of 10 to bring it into the
2608 range 1 to 10 (or equivalently, the offset's logarithm to base 10
2609 is used modulo 1).
2610
2611 \end{minipage}\vspace{4mm}
2612
2613 %--#] LogAxis :
2614 %>>#] The Commands :
2615 %>>#[ Text :
2616
2617 \subsection{Text}
2618 \label{sec:text}
2619
2620 %--#[ Implementation :
2621
2622 Axodraw2 provides several commands for inserting text into diagrams.
2623 Some are for plain text, with a chosen placement and angle. Some
2624 allow placement of text inside boxes. There are two sets of commands.
2625 Some we call \TeX-text commands; these use the standard \LaTeX{} fonts
2626 as used in the rest of the document. The others we call
2627 postscript-text commands; these use a user-specified standard
2628 postscript font or, if the user wishes, the usual document font, at a
2629 user-chosen size.
2630
2631 [\emph{Side issue:} In version 1 of axodraw, the difference between
2632 the classes of text command was caused by a serious implementation
2633 difficulty. With the then-available \LaTeX{} technology, certain
2634 graphic effects, could not be achieved within \LaTeX, at least not
2635 easily. So direct programming in postscript was resorted to, with the
2636 result that normal \LaTeX{} commands, including mathematics, were not
2637 available in the postscript-text commands. With the greatly improved
2638 methods now available, this has all changed, and the restrictions have
2639 gone. But since the commands and their basic behavior is already
2640 defined, we have retained the distinction between \TeX{}-text commands
2641 and postscript-text commands.]
2642
2643 In the original version of Axodraw the commands for two lines inside a
2644 box were \verb:B2Text:, \verb:G2Text: and \verb:C2Text:. This causes
2645 some problems explained in Sec.\ \ref{sec:changes.wrt.1}. If you need to
2646 retain compatibility with v.\ 1 on this issue, e.g., with old files or
2647 old diagrams or for personal preference, you can use the
2648 \texttt{v1compatible} option when loading axodraw2 --- see Sec.\
2649 \ref{sec:invoke}.
2650
2651 \vspace{4mm}
2652
2653 %--#] Implementation :
2654 %--#[ Text :
2655
2656 \subsubsection{\TeX-type text}
2657
2658 Illustrated by examples, the commands to insert text are as follows:
2659
2660 \medskip
2661
2662 \noindent
2663 \begin{minipage}{3.83cm}
2664 \begin{axopicture}{(90,90)(-10,0)}
2665 \AxoGrid(0,0)(10,10)(9,9){LightGray}{0.5}
2666 \Text(10,10)[l]{left}
2667 \Text(45,45){centered}
2668 \Text(80,80)[rt]{right-top}
2669 \Text(20,60)(45){$e^{i\pi/4}$}
2670 \SetColor{Red}
2671 \Vertex(10,10){1.5}
2672 \Vertex(45,45){1.5}
2673 \Vertex(80,80){1.5}
2674 \end{axopicture}
2675 \end{minipage}
2676 \begin{minipage}{11.5cm}
2677 \label{text}
2678 \verb:\Text(10,10)[l]{left}: \hfill \\
2679 \verb:\Text(45,45){centered}: \hfill \\
2680 \verb:\Text(80,80)[rt]{right-top}: \hfill \\
2681 \verb:\Text(20,60)(45){$e^{i\pi/4}$}: \hfill \\
2682 \verb:\SetColor{Red}: \hfill \\
2683 \verb:\Vertex(10,10){1.5}: \hfill \\
2684 \verb:\Vertex(45,45){1.5}: \hfill \\
2685 \verb:\Vertex(80,80){1.5}: \hfill \\
2686 \verb+\Text+ writes text in the current \LaTeX{} font. The most
2687 general form is \verb+\Text(x,y)(theta)[pos]{text}+; but either or
2688 both of the theta and pos arguments (and their delimiters) can be omitted.
2689 It puts the text
2690 at focal point $(x,y)$, with a rotation by anticlockwise angle theta.
2691 The default angle is zero, and the default position is to
2692 center the text horizontally and vertically at the focal point. The
2693 position letters are any relevant combination of `l', `r', `t', and
2694 `b', as in the various
2695 \TeX/\LaTeX{} box commands to indicate left, right, top or bottom
2696 adjustment with respect to the focal point. No indication means
2697 centered.
2698 \end{minipage}\vspace{4mm}
2699
2700 %--#] Text :
2701 %--#[ rText :
2702
2703 \noindent
2704 \begin{minipage}{3.83cm}
2705 \begin{axopicture}{(90,90)(-10,0)}
2706 \AxoGrid(0,0)(10,10)(9,9){LightGray}{0.5}
2707 \rText(10,10)[l][l]{left-left}
2708 \rText(45,45)[][u]{upside}
2709 \rText(80,10)[r][r]{right-right}
2710 \rText(20,60)[][r]{$e^{i\pi}$}
2711 \SetColor{Red}
2712 \Vertex(10,10){1.5}
2713 \Vertex(45,45){1.5}
2714 \Vertex(80,10){1.5}
2715 \end{axopicture}
2716 \end{minipage}
2717 \begin{minipage}{11.5cm}
2718 \label{rtext}
2719 \verb:\rText(10,10)[l][l]{left-left}: \hfill \\
2720 \verb:\rText(45,45)[][u]{upside}: \hfill \\
2721 \verb:\rText(80,10)[r][r]{right-right}: \hfill \\
2722 \verb:\rText(20,60)[][r]{$e^{i\pi}$}: \hfill \\
2723 \verb:\SetColor{Red}: \hfill \\
2724 \verb:\Vertex(10,10){1.5}: \hfill \\
2725 \verb:\Vertex(45,45){1.5}: \hfill \\
2726 \verb:\Vertex(80,10){1.5}: \hfill \\
2727 The \verb:\rText: command gives a subset of the functionality of the
2728 \verb+\Text+ command. It is used for backward compatibility with
2729 Axodraw v.\ 1. The general form of the command is
2730 \verb:\rText(x,y)[mode][rotation]{text}:.
2731 Unlike the case with the \verb:\Text: command and typical standard
2732 \LaTeX{} commands, if the option letters are omitted, the square
2733 brackets must be retained.
2734 The coordinates $(x,y)$ are
2735 the focal point of the text. The third argument is \verb+l+,
2736 \verb+r+, or empty to indicate the justification of the text. The
2737 fourth argument is \verb+l+, \verb+r+, \verb+u+, or empty to indicate
2738 respectively whether the text is rotated left (anticlockwise) by 90
2739 degrees, is rotated right (clockwise) by 90 degrees, is upside-down,
2740 or is not rotated. The fifth argument is the text.
2741 This command is retained only for backward compatibility;
2742 for new diagrams it is probably better to use the the \verb:\Text:.
2743 \end{minipage}\vspace{4mm}
2744
2745 %--#] rText :
2746 %--#[ SetPFont :
2747
2748 \subsubsection{Postscript-type text}
2749 \label{sec:PSText}
2750
2751 The remaining text-drawing commands can use postscript fonts with an
2752 adjustable size.
2753
2754 To set the font for later text-drawing commands in this class, the
2755 \verb:\SetPFont: command sets the `Postscript'
2756 font, e.g.,
2757 \begin{verbatim}
2758 \SetPFont{Helvetica}{20}
2759 \end{verbatim}
2760 (This font is initialized by axodraw2 to Times-Roman at 10pt.)
2761 The font set in this way is used in the \verb:PText:, \verb:BText:,
2762 \verb:GText:, \verb:CText:, \verb:BTwoText:, \verb:GTwoText: and
2763 \verb:CTwoText: commands. The fonts that can be used are the 35 fonts
2764 that are made available by Adobe and that are normally available in
2765 all postscript interpreters, including printers. The fonts, together
2766 with the names used to specify them in the normal font-setting
2767 commands of \TeX{} and \LaTeX{}, are shown in Table \ref{tab:Pfont}.
2768
2769 \begin{table}
2770 \begin{tabular}{|l|l|l|l|}
2771 \hline
2772 Font name & \LaTeX{} & Font name & \LaTeX{} \\
2773 \hline
2774 AvantGarde-Book & pagk & Helvetica-Narrow & phvrrn\\
2775 AvantGarde-BookOblique & pagko & Helvetica-NarrowOblique & phvron\\
2776 AvantGarde-Demi & pagd & NewCenturySchlbk-Bold & pncb \\
2777 AvantGarde-DemiOblique & pagdo & NewCenturySchlbk-BoldItalic & pncbi \\
2778 Bookman-Demi & pbkd & NewCenturySchlbk-Italic & pncri \\
2779 Bookman-DemiItalic & pbkdi & NewCenturySchlbk-Roman & pncr \\
2780 Bookman-Light & pbkl & Palatino-Bold & pplb \\
2781 Bookman-LightItalic & pbkli & Palatino-BoldItalic & pplbi \\
2782 Courier-Bold & pcrb & Palatino-Italic & pplri \\
2783 Courier-BoldOblique & pcrbo & Palatino-Roman & pplr \\
2784 Courier & pcrr & Symbol & psyr \\
2785 Courier-Oblique & pcrro & Times-Bold & ptmb \\
2786 Helvetica-Bold & phvb & Times-BoldItalic & ptmbi \\
2787 Helvetica-BoldOblique & phvbo & Times-Italic & ptmri \\
2788 Helvetica-NarrowBold & phvbrn& Times-Roman & ptmr \\
2789 Helvetica-NarrowBoldOblique & phvbon& ZapfChancery-MediumItalic & pzcmi \\
2790 Helvetica & phvr & ZapfDingbats & pzdr \\
2791 Helvetica-Oblique & phvro & & \\
2792 \hline
2793 \end{tabular}
2794 \caption{Available postscript fonts and their corresponding names in
2795 \LaTeX.}
2796 \label{tab:Pfont}
2797 \end{table}
2798 If you prefer to use the normal document font (which would normally be
2799 Computer Modern in the common document classes), you simply leave the
2800 fontname empty, e.g,.
2801 \begin{verbatim}
2802 \SetPFont{}{20}
2803 \end{verbatim}
2804 As for the second, fontsize argument, leaving it empty uses the size
2805 that \LaTeX{} is using at the moment the text-drawing command starts,
2806 e.g.,
2807 \begin{verbatim}
2808 \SetPFont{Helvetica-Bold}{}
2809 \end{verbatim}
2810 \vspace{3mm}
2811
2812 %--#] SetPFont :
2813 %--#[ PText :
2814
2815 \noindent
2816 \begin{minipage}{3.83cm}
2817 \begin{axopicture}{(90,90)(-10,0)}
2818 \AxoGrid(0,0)(10,10)(9,9){LightGray}{0.5}
2819 \SetPFont{Helvetica}{13}
2820 \PText(10,10)(0)[l]{left}
2821 \PText(45,45)(30)[]{centered}
2822 \PText(80,80)(20)[rt]{right-top}
2823 %\PText(20,60)(140)[]{$e^{i\pi}$}
2824 \SetColor{Red}
2825 \Vertex(10,10){1.5}
2826 \Vertex(45,45){1.5}
2827 \Vertex(80,80){1.5}
2828 \end{axopicture}
2829 \end{minipage}
2830 \begin{minipage}{11.5cm}
2831 \label{ptext}
2832 \verb:\SetPFont{Helvetica}{13}: \hfill \\
2833 \verb:\PText(10,10)(0)[l]{left}: \hfill \\
2834 \verb:\PText(45,45)(30)[]{centered}: \hfill \\
2835 \verb:\PText(80,80)(20)[rt]{right-top}: \hfill \\
2836 %\verb:\PText(20,60)(90)[]{$e^{i\pi}$}: \hfill \\
2837 \verb:\SetColor{Red}: \hfill \\
2838 \verb:\Vertex(10,10){1.5}: \hfill \\
2839 \verb:\Vertex(45,45){1.5}: \hfill \\
2840 \verb:\Vertex(80,80){1.5}: \hfill \\
2841 The \verb:\PText: command writes %text
2842 in Axodraw's current Postscript font.
2843 The first two arguments give the focal point, the third argument is a
2844 rotation angle and the fourth argument is as in the various \TeX/\LaTeX{}
2845 box commands to indicate left, right, top or bottom adjustment with respect
2846 to the focal point. No indication means centered.
2847
2848 Note that use of normal \LaTeX{} font setting commands or of math-mode
2849 will not normally have the desired effect.
2850 \end{minipage}\vspace{4mm}
2851
2852 %--#] PText :
2853 %--#[ BText :
2854
2855 \noindent
2856 \begin{minipage}{4.53cm}
2857 \begin{axopicture}{(110,110)(-10,0)}
2858 \AxoGrid(0,0)(10,10)(10,9){LightGray}{0.5}
2859 \ArrowLine(30,65)(60,25)
2860 \SetPFont{Bookman-Demi}{14}
2861 \BText(30,65){Who?}
2862 \SetPFont{AvantGarde-Book}{16}
2863 \BText(60,25){Me?}
2864 \end{axopicture}
2865 \end{minipage}
2866 \begin{minipage}{10.8cm}
2867 \label{btext}
2868 \verb:\ArrowLine(30,65)(60,25): \hfill \\
2869 \verb:\SetPFont{Bookman-Demi}{14}: \hfill \\
2870 \verb:\BText(30,65){Who?}: \hfill \\
2871 \verb:\SetPFont{AvantGarde-Book}{16}: \hfill \\
2872 \verb:\BText(60,25){Me?}: \hfill \\
2873 The \verb:\BText: command writes a centered box with text in it. It uses
2874 Axodraw's current Postscript font.
2875 \end{minipage}\vspace{4mm}
2876
2877 %--#] BText :
2878 %--#[ GText :
2879
2880 \noindent
2881 \begin{minipage}{4.53cm}
2882 \begin{axopicture}{(110,110)(-10,0)}
2883 \AxoGrid(0,0)(10,10)(10,9){LightGray}{0.5}
2884 \ArrowLine(30,65)(60,25)
2885 \SetPFont{Bookman-Demi}{12}
2886 \GText(30,65){0.9}{Why?}
2887 \SetPFont{Courier-Bold}{5}
2888 \GText(60,25){0.75}{We wanted it that way!}
2889 \end{axopicture}
2890 \end{minipage}
2891 \begin{minipage}{10.8cm}
2892 \label{gtext}
2893 \verb:\ArrowLine(30,65)(60,25): \hfill \\
2894 \verb:\SetPFont{Bookman-Demi}{12}: \hfill \\
2895 \verb:\GText(30,65){0.9}{Why?}: \hfill \\
2896 \verb:\SetPFont{Courier-Bold}{5}: \hfill \\
2897 \verb:\GText(60,25){0.75}{We wanted it that way!}: \hfill \\
2898 The \verb:\GText: command writes a centered box with text in it. It uses
2899 Axodraw's current Postscript font. The third argument is the grayscale
2900 with which
2901 the box will be filled. 0 is black and 1 is white.
2902 \end{minipage}\vspace{4mm}
2903
2904 %--#] GText :
2905 %--#[ CText :
2906
2907 \noindent
2908 \begin{minipage}{4.53cm}
2909 \begin{axopicture}{(110,110)(-10,0)}
2910 \AxoGrid(0,0)(10,10)(9,9){LightGray}{0.5}
2911 \ArrowLine(30,65)(60,25)
2912 \SetPFont{Times-Bold}{15}
2913 \CText(30,65){LightYellow}{LightBlue}{Who?}
2914 \SetPFont{Courier-Bold}{14}
2915 \CText(60,25){Red}{Yellow}{You!}
2916 \end{axopicture}
2917 \end{minipage}
2918 \begin{minipage}{10.8cm}
2919 \label{ctext}
2920 \verb:\ArrowLine(30,65)(60,25): \hfill \\
2921 \verb:\SetPFont{Times-Bold}{15}: \hfill \\
2922 \verb:\CText(30,65){LightYellow}{LightBlue}{Who?}: \hfill \\
2923 \verb:\SetPFont{Courier-Bold}{14}: \hfill \\
2924 \verb:\CText(60,25){Red}{Yellow}{You!}: \hfill \\
2925 The \verb:\CText: command writes a centered box with text in it. It uses
2926 Axodraw's current Postscript font. The third argument is the color of
2927 the box and
2928 the text. The fourth argument is the color with which the box will be
2929 filled.
2930 \end{minipage}\vspace{4mm}
2931
2932 %--#] CText :
2933 %--#[ BTwoText :
2934 \noindent
2935 \begin{minipage}{4.53cm}
2936 \begin{axopicture}{(110,110)(-10,0)}
2937 \AxoGrid(0,0)(10,10)(9,9){LightGray}{0.5}
2938 \ArrowLine(30,65)(60,25)
2939 \SetPFont{Bookman-Demi}{14}
2940 \BTwoText(30,65){Why}{Me?}
2941 \SetPFont{AvantGarde-Book}{16}
2942 \BTwoText(60,25){You}{did it}
2943 \end{axopicture}
2944 \end{minipage}
2945 \begin{minipage}{10.8cm}
2946 \label{btwotext}
2947 \verb:\ArrowLine(30,65)(60,25): \hfill \\
2948 \verb:\SetPFont{Bookman-Demi}{14}: \hfill \\
2949 \verb:\BTwoText(30,65){Why}{Me?}: \hfill \\
2950 \verb:\SetPFont{AvantGarde-Book}{16}: \hfill \\
2951 \verb:\BTwoText(60,25){You}{did it}: \hfill \\
2952 The \verb:\BTwoText: command writes a centered box with two lines of text in
2953 it. It uses Axodraw's current Postscript font.
2954 \end{minipage}\vspace{4mm}
2955
2956 %--#] BTwoText :
2957 %--#[ GTwoText :
2958
2959 \noindent
2960 \begin{minipage}{4.53cm}
2961 \begin{axopicture}{(110,110)(-10,0)}
2962 \AxoGrid(0,0)(10,10)(10,9){LightGray}{0.5}
2963 \ArrowLine(30,65)(60,25)
2964 \SetPFont{Bookman-Demi}{12}
2965 \GTwoText(30,65){0.9}{Prove}{it!}
2966 \SetPFont{Courier-Bold}{11}
2967 \GTwoText(60,25){0.75}{Sherlock}{says so}
2968 \end{axopicture}
2969 \end{minipage}
2970 \begin{minipage}{10.8cm}
2971 \label{gtwotext}
2972 \verb:\ArrowLine(30,65)(60,25): \hfill \\
2973 \verb:\SetPFont{Bookman-Demi}{12}: \hfill \\
2974 \verb:\GTwoText(30,65){0.9}{Prove}{it!}: \hfill \\
2975 \verb:\SetPFont{Courier-Bold}{11}: \hfill \\
2976 \verb:\GTwoText(60,25){0.75}{Sherlock}{says so}: \hfill \\
2977 The \verb:\GTwoText: command writes a centered box with two lines of text in
2978 it. It uses Axodraw's current Postscript font. The third argument is the
2979 grayscale with which the box will be filled. 0 is black and 1 is white.
2980 \end{minipage}\vspace{4mm}
2981
2982 %--#] GTwoText :
2983 %--#[ CTwoText :
2984
2985 \noindent
2986 \begin{minipage}{4.53cm}
2987 \begin{axopicture}{(110,110)(-10,0)}
2988 \AxoGrid(0,0)(10,10)(9,9){LightGray}{0.5}
2989 \ArrowLine(30,65)(60,25)
2990 \SetPFont{Times-Bold}{10}
2991 \CTwoText(30,65){LightYellow}{Blue}{That is}{no proof!}
2992 \SetPFont{Courier-Bold}{14}
2993 \CTwoText(60,25){Red}{Yellow}{Yes}{it is}
2994 \end{axopicture}
2995 \end{minipage}
2996 \begin{minipage}{10.8cm}
2997 \label{ctwotext}
2998 \verb:\ArrowLine(30,65)(60,25): \hfill \\
2999 \verb:\SetPFont{Times-Bold}{10}: \hfill \\
3000 \verb:\CTwoText(30,65){LightYellow}{Blue}: \\
3001 \verb:{That is}{no proof!}: \hfill \\
3002 \verb:\SetPFont{Courier-Bold}{14}: \hfill \\
3003 \verb:\CTwoText(60,25){Red}{Yellow}{Yes}{it is}: \hfill \\
3004 The \verb:\CTwoText: command writes a centered box with two lines of text in
3005 it. It uses Axodraw's current Postscript font. The third argument is
3006 the color of both
3007 the box and the text. The fourth argument is the color with which the box
3008 will be filled.
3009 \end{minipage}\vspace{4mm}
3010
3011 %--#] CTwoText :
3012 %--#[ Features :
3013
3014 Note that because you can now use \LaTeX{} commands for the text
3015 arguments of the commands described in this section, the effects of
3016 the \verb+\BTwoText+, \verb+\GTwoText+, and \verb+\CTwoText+ can be
3017 achieved also by the use of regular \verb:\BText: etc commands.
3018 Mathematics can also be used. (None of these was possible in v.\ 1 of
3019 axodraw.) Here are some examples: \vspace{4mm}
3020
3021 \noindent
3022 \begin{minipage}{5.5cm}
3023 \begin{axopicture}{(150,90)(-10,0)}
3024 \AxoGrid(0,0)(10,10)(12,9){LightGray}{0.5}
3025 \SetPFont{Helvetica}{15}
3026 \BText(60,45){%
3027 \begin{minipage}{4.5cm}
3028 Here is boxed text in a larger size, including
3029 mathematics: $\alpha^2$.
3030 \end{minipage}%
3031 }
3032 \end{axopicture}
3033 \end{minipage}
3034 \begin{minipage}{8.5cm}
3035 \label{btext2}
3036 \begin{verbatim}
3037 \SetPFont{Helvetica}{15}
3038 \BText(70,45){%
3039 \begin{minipage}{4.5cm}
3040 Here is boxed text in a
3041 larger size, including
3042 mathematics: $\alpha^2$.
3043 \end{minipage}%
3044 }
3045 \end{verbatim}
3046 This example shows that the \verb:\BText: command can also be used
3047 with minipages and other \LaTeX{} methods to make more complicated
3048 boxed texts.
3049 \end{minipage}
3050 \vspace{4mm}
3051
3052 \noindent
3053 \begin{minipage}{5.5cm}
3054 \begin{axopicture}{(150,90)(-10,0)}
3055 \AxoGrid(0,0)(10,10)(13,9){LightGray}{0.5}
3056 \SetPFont{}{15}
3057 \BText(65,45){%
3058 \begin{minipage}{4cm}
3059 \sffamily Here is boxed text in a
3060 large size, including
3061 mathematics: $\alpha^2$.
3062 \end{minipage}%
3063 }
3064 \end{axopicture}
3065 \end{minipage}
3066 \begin{minipage}{8.5cm}
3067 \label{btext2.mod}
3068 \begin{verbatim}
3069 \SetPFont{}{15}
3070 \BText(65,45){%
3071 \begin{minipage}{4cm}
3072 \sffamily Here is boxed text in a
3073 large size, including
3074 mathematics: $\alpha^2$.
3075 \end{minipage}%
3076 }
3077 \end{verbatim}
3078 But if you use mathematics, the text may be more elegant if you use
3079 the document font, which has matching fonts for text and mathematics.
3080 Use of a sans-serif font (by \verb:\sffamily:) may be better in a diagram.
3081 \end{minipage}
3082 \vspace{4mm}
3083
3084 %--#] Features :
3085 %>>#] Text :
3086 %>>#[ Options :
3087
3088 \subsection{Options}
3089 \label{sec:options}
3090
3091 Almost all of axodraw2's line-drawing commands take optional
3092 arguments. The form here is familiar from many standard \LaTeX{}
3093 commands. The optional arguments are placed in square brackets after
3094 the command name, and are made of a comma-separated list of items of
3095 the form: \texttt{keyword} or \texttt{keyword=value}. The required
3096 arguments are placed afterwards.
3097
3098 Optional arguments can be used to set particular characteristics of a
3099 line, e.g., whether it is dashed or has an arrow. They can also be
3100 used to set some of the line's parameters, to be used instead of
3101 default values. (The default values can be adjusted by commands
3102 listed in Sec.\ \ref{sec:settings}. Those commands are useful for
3103 adjusting parameters that apply to multiple lines, while the optional
3104 arguments are useful for setting parameters for individual lines.)
3105
3106 The original axodraw only had different command names to determine
3107 whether lines were dashed, or had arrows, etc. The new version
3108 retains these commands,
3109 but now the basic commands
3110 (\verb:\Line:, \verb:\Arc:, \verb:\Gluon:, etc) can also be treated as
3111 generic commands, with the different varieties (dashed, double, and/or
3112 with an arrow) being set by options.
3113
3114 The same set of options are available for all types of line. However,
3115 not all apply or are implemented for particular types of line. Thus,
3116 \texttt{clockwise} is irrelevant for a straight line, while
3117 \texttt{arrow} is not implemented for gluons, photons and zigzag
3118 lines. Warnings are given for unimplemented features, while
3119 inapplicable arguments are ignored.
3120
3121 The full set of options.
3122 \begin{center}
3123 \begin{tabular}{ll}
3124 color=\colorname & Set the line in this color. \\
3125 colour=\colorname & Same as color=\colorname. \\
3126 dash & Use a dashed line. \\
3127 dsize=\num & Set the dash size (when a line is dashed). \\
3128 dashsize=\num & Same as dsize=\num. \\
3129 double & Use a double line. \\
3130 sep=\num & Sets the separation for a double line. \\
3131 linesep=\num & Same as sep=\num. \\
3132 width=\num & Sets line width for this line only.\\[2mm]
3133 clock & For arcs, makes the arc run clockwise. \\
3134 clockwise & For arcs, makes the arc run clockwise. \\[2mm]
3135 arrow & Use an arrow.\\
3136 flip & If there is an arrow, its direction is flipped. \\
3137
3138 arrowpos=\num & The number should be between zero and one and\\
3139 & indicates where along the line the arrow should be. \\
3140 & 1 is at the end. 0.5 is halfway (the initial default).\\
3141 arrowaspect=\num & See Sec.\ \ref{sec:arrows}. \\
3142 arrowlength=\num & See Sec.\ \ref{sec:arrows}. \\
3143 arrowheight=\num & See Sec.\ \ref{sec:arrows}. \\
3144 arrowinset=\num & See Sec.\ \ref{sec:arrows}. \\
3145 arrowscale=\num & See Sec.\ \ref{sec:arrows}. \\
3146 arrowstroke=\num & See Sec.\ \ref{sec:arrows}. \\
3147 arrowwidth=\num & See Sec.\ \ref{sec:arrows}. \\
3148 inset=\num & Same as arrowinset.\\
3149 \end{tabular}
3150 \end{center}
3151 The options without an extra argument, e.g., \texttt{arrow}, are
3152 actually of a boolean type. That is, they can also be used with a
3153 suffix ``\texttt{=true}'' or ``\texttt{=false}'', e.g.,
3154 \texttt{arrow=true} or \texttt{arrow=false}.
3155
3156 If an option is not provided, its default value is used. Defaults are
3157 no dashes, no double lines, anticlockwise arcs, no arrow and if an
3158 arrow is asked for, its position is halfway along the line. Other
3159 arrow settings are explained in Sec.\ \ref{sec:arrows}. There are
3160 also default values for dash size (3) and the separation of double
3161 lines (2).
3162
3163 The full set of the generic line commands with their syntax is
3164 \begin{center}
3165 \begin{tabular}{l}
3166 \verb+\Line[options](x1,y1)(x2,y2)+ \\
3167 \verb+\Arc[options](x,y)(r,theta1,theta2)+ \\
3168 \verb+\Bezier[options](x1,y1)(x2,y2)(x3,y3)(x4,y4)+ \\
3169 \verb+\Gluon[options](x1,y1)(x2,y2){amplitude}{windings}+ \\
3170 \verb+\GluonArc[options](x,y)(r,theta1,theta2){amplitude}{windings}+ \\
3171 \verb+\GluonCirc[options](x,y)(r,phase){amplitude}{windings}+ \\
3172 \verb+\Photon[options](x1,y1)(x2,y2){amplitude}{windings}+ \\
3173 \verb+\PhotonArc[options](x,y)(r,theta1,theta2){amplitude}{windings}+ \\
3174 \verb+\ZigZag[options](x1,y1)(x2,y2){amplitude}{windings}+ \\
3175 \verb+\ZigZagArc[options](x,y)(r,theta1,theta2){amplitude}{windings}+ \\
3176 \end{tabular}
3177 \end{center}
3178 The applicability of the options is as follows
3179 \begin{center}
3180 \begin{tabular}{lcc}
3181 & Arrow, etc & Clockwise \\
3182 \verb+\Line+ & Y & N \\
3183 \verb+\Arc+ & Y & Y \\
3184 \verb+\Bezier+ & Y & N \\
3185 \verb+\Gluon+ & N & N \\
3186 \verb+\GluonArc+ & N & Y \\
3187 \verb+\GluonCirc+ & N & N \\
3188 \verb+\Photon+ & N & N \\
3189 \verb+\PhotonArc+ & N & Y \\
3190 \verb+\ZigZag+ & N & N \\
3191 \verb+\ZigZagArc+ & N & Y \\
3192 \end{tabular}
3193 \end{center}
3194 The arrow options include those for setting the arrow dimensions.
3195 Options not indicated in the last table apply to all cases.
3196
3197 %{\sc The next options still have to be implemented, but it seems the most
3198 %sensible thing to do.}\vspace{3mm}
3199 %
3200 %The third family is the one of the shapes:
3201 %
3202 %\begin{center}
3203 %\begin{minipage}{14cm}
3204 %\begin{verbatim}
3205 %\Box[options](x1,y1)(x2,y2)
3206 %\Tri[options](x1,y1)(x2,y2)(x3,y3)
3207 %\Polygon[options]{(x1,y1)(x2,y2)...(xn,yn)}
3208 %\Circ[options](x1,y1){radius}
3209 %\Oval[options](x1,y1)(height,width)(rotation)
3210 %\end{verbatim}
3211 %\end{minipage}
3212 %\end{center}
3213 %
3214 %\noindent The options here are:
3215 %\begin{center}
3216 %\begin{tabular}{ll}
3217 % centered & For boxes: x1,y1 is the center. x2,y2 is width,
3218 % height \\
3219 % blanked & Inside is blanked out. \\
3220 % inside & (Over)write only the inside. \\
3221 % color,line=$<$color$>$ & Main color. \\
3222 % filled,fill=$<$color$>$ & When both the outline and the inside are written. \\
3223 % gray,grayscale=\num & Inside is in gray. Filled overwrites this. \\
3224 % rotation=\num & Only for centered boxes: rotation angle.
3225 %\end{tabular}
3226 %\end{center}
3227 %The options gray and filled imply blanked. Hence it is not needed to use
3228 %blanked when either of those options is used. The default values are that
3229 %none of these options are used.
3230
3231 Some examples are:
3232 \begin{verbatim}
3233 \Line[double,sep=1.5,dash,dsize=4](10,10)(70,30)
3234 \Line[double,sep=1.5,arrow,arrowpos=0.6](10,10)(70,30)
3235 \end{verbatim}
3236
3237 The options can also be used on the more explicit commands as extra
3238 options. Hence it is possible to use
3239 \begin{verbatim}
3240 \DoubleLine[dash,dsize=4](10,10)(70,30){1.5}
3241 \end{verbatim}
3242 instead of the first line in the previous example.
3243
3244 One may notice that some of the options are not accessible with the more
3245 explicit commands. For example, it is possible to put arrows on B\'ezier
3246 curves only by using the option `arrow' for the B\'ezier command.
3247
3248 %>>#] Options :
3249 %>>#[ Remarks about Gluons :
3250 %
3251 \subsection{Remarks about Gluons}
3252 \label{sec:gluon.remarks}
3253
3254 There are 12 commands that concern gluons. This allows much freedom in
3255 developing one's own style. Gluons can be drawn as single solid lines, as
3256 double lines, as dashed lines and as dashed double lines.
3257
3258 Gluons have an amplitude and a number of windings. By varying these
3259 quantities one may obtain completely different gluons as in:
3260
3261 \noindent
3262 \begin{minipage}{3.83cm}
3263 \begin{axopicture}{(90,90)(-10,0)}
3264 \AxoGrid(0,0)(10,10)(9,8){LightGray}{0.5}
3265 \Gluon(10,70)(80,70){3}{5}
3266 \Gluon(10,50)(80,50){3}{9}
3267 \Gluon(10,30)(80,30){5}{7}
3268 \Gluon(10,10)(80,10){8}{9}
3269 \end{axopicture}
3270 \end{minipage}
3271 \begin{minipage}{11.5cm}
3272 \label{gluons}
3273 \verb:\Gluon(10,70)(80,70){3}{5}: \hfill \\
3274 \verb:\Gluon(10,50)(80,50){3}{9}: \hfill \\
3275 \verb:\Gluon(10,30)(80,30){5}{7}: \hfill \\
3276 \verb:\Gluon(10,10)(80,10){8}{9}:
3277 \end{minipage}\vspace{4mm}
3278
3279 One may change the orientation of the windings by reversing the
3280 direction in which the gluon is drawn and/or changing the sign of the
3281 amplitude:
3282
3283 \noindent
3284 \begin{minipage}{3.83cm}
3285 \begin{axopicture}{(90,90)(-10,0)}
3286 \AxoGrid(0,0)(10,10)(9,8){LightGray}{0.5}
3287 \DoubleGluon(10,70)(80,70){5}{7}{1.2}
3288 \DoubleGluon(80,50)(10,50){5}{7}{1.2}
3289 \DoubleGluon(10,30)(80,30){-5}{7}{1.2}
3290 \DoubleGluon(80,10)(10,10){-5}{7}{1.2}
3291 \end{axopicture}
3292 \end{minipage}
3293 \begin{minipage}{11.5cm}
3294 \label{gluonss}
3295 \verb:\DoubleGluon(10,70)(80,70){5}{7}{1.2}: \hfill \\
3296 \verb:\DoubleGluon(80,50)(10,50){5}{7}{1.2}: \hfill \\
3297 \verb:\DoubleGluon(10,30)(80,30){-5}{7}{1.2}: \hfill \\
3298 \verb:\DoubleGluon(80,10)(10,10){-5}{7}{1.2}:
3299 \end{minipage}\vspace{4mm}
3300
3301 \noindent
3302 \begin{minipage}{3.83cm}
3303 \begin{axopicture}{(90,70)(-10,0)}
3304 \AxoGrid(0,0)(10,10)(9,7){LightGray}{0.5}
3305 \GluonArc(45,20)(40,20,160){5}{8}
3306 \GluonArc(45,0)(40,20,160){-5}{8}
3307 \end{axopicture}
3308 \end{minipage}
3309 \begin{minipage}{11.5cm}
3310 \label{gluonarcA}
3311 \verb:\GluonArc(45,20)(40,20,160){5}{8}:\hfill \\
3312 \verb:\GluonArc(45,0)(40,20,160){-5}{8}:\hfill \\
3313 Here one can see that the sign of the amplitude gives a completely
3314 different aspect to a gluon on an arc segment.
3315 \end{minipage}\vspace{4mm}
3316
3317 There are two ways of drawing a gluon circle. One is with the command
3318 GluonCirc and the other is an arc of 360 degrees with the GluonArc command.
3319 The second way has a natural attachment point, because the GluonArc
3320 command makes gluons with a begin- and endpoint. \vspace{4mm}
3321
3322 \noindent
3323 \begin{minipage}{3.83cm}
3324 \begin{axopicture}{(80,80)(-15,0)}
3325 \AxoGrid(0,0)(10,10)(8,8){LightGray}{0.5}
3326 \GluonCirc(40,40)(30,0){5}{16}
3327 \end{axopicture}
3328 \end{minipage}
3329 \begin{minipage}{11.5cm}
3330 %\label{gluoncirc}
3331 \verb:\GluonCirc(40,40)(30,0){5}{16}:\hfill \\
3332 This is the `complete circle'. If one likes to attach one or more lines to
3333 it one should take into account that the best places for this are at a
3334 distance radius+amplitude from the center of the circle. One can rotate the
3335 circle by using the phase argument.
3336 \end{minipage}\vspace{4mm}
3337
3338 \noindent
3339 \begin{minipage}{3.83cm}
3340 \begin{axopicture}{(80,80)(-15,0)}
3341 \AxoGrid(0,0)(10,10)(8,8){LightGray}{0.5}
3342 \GluonArc(40,40)(30,0,360){5}{16}
3343 \end{axopicture}
3344 \end{minipage}
3345 \begin{minipage}{11.5cm}
3346 \label{gluonarc360}
3347 \verb:\GluonArc(40,40)(30,0,360){5}{16}:\hfill \\
3348 In the 360 degree arc there is a natural point of attachment. Of course
3349 there is only one such point. If one needs more than one such point one
3350 should use more than one arc segment.
3351 \end{minipage}\vspace{4mm}
3352
3353 Some examples are:
3354
3355 \begin{center} \begin{axopicture}{(460,60)(0,0)}
3356 \Gluon(7,30)(27,30){3}{3}
3357 \GluonCirc(50,30)(20,0){3}{16}
3358 \Gluon(73,30)(93,30){3}{3}
3359 \Vertex(27,30){1.5}
3360 \Vertex(73,30){1.5}
3361 %
3362 \Gluon(110,30)(130,30){3}{3}
3363 \GluonArc(150,30)(20,0,180){3}{8}
3364 \GluonArc(150,30)(20,180,360){3}{8}
3365 \Gluon(170,30)(190,30){3}{3}
3366 \Vertex(130,30){1.5}
3367 \Vertex(170,30){1.5}
3368 %
3369 \Gluon(210,30)(230,30){3}{3}
3370 \GluonArc(250,30)(20,0,180){-3}{8}
3371 \GluonArc(250,30)(20,180,360){-3}{8}
3372 \Gluon(270,30)(290,30){3}{3}
3373 \Vertex(230,30){1.5}
3374 \Vertex(270,30){1.5}
3375 %
3376 \DashLine(310,30)(330,30){3}
3377 \GluonArc(350,30)(20,-180,180){3}{16}
3378 \Vertex(330,30){1.5}
3379 %
3380 \DashLine(387,30)(407,30){3}
3381 \GluonCirc(430,30)(20,0){3}{16}
3382 \Vertex(407,30){1.5}
3383 %
3384 \end{axopicture} \end{center}
3385 This picture was generated with the code:
3386 \begin{verbatim}
3387 \begin{center} \begin{axopicture}{(460,60)(0,0)}
3388 \Gluon(7,30)(27,30){3}{3}
3389 \GluonCirc(50,30)(20,0){3}{16}
3390 \Gluon(73,30)(93,30){3}{3}
3391 \Vertex(27,30){1.5}
3392 \Vertex(73,30){1.5}
3393 \Gluon(110,30)(130,30){3}{3}
3394 \GluonArc(150,30)(20,0,180){3}{8}
3395 \GluonArc(150,30)(20,180,360){3}{8}
3396 \Gluon(170,30)(190,30){3}{3}
3397 \Vertex(130,30){1.5}
3398 \Vertex(170,30){1.5}
3399 \Gluon(210,30)(230,30){3}{3}
3400 \GluonArc(250,30)(20,0,180){-3}{8}
3401 \GluonArc(250,30)(20,180,360){-3}{8}
3402 \Gluon(270,30)(290,30){3}{3}
3403 \Vertex(230,30){1.5}
3404 \Vertex(270,30){1.5}
3405 \DashLine(310,30)(330,30){3}
3406 \GluonArc(350,30)(20,-180,180){3}{16}
3407 \Vertex(330,30){1.5}
3408 \DashLine(387,30)(407,30){3}
3409 \GluonCirc(430,30)(20,0){3}{16}
3410 \Vertex(407,30){1.5}
3411 \end{axopicture} \end{center}
3412 \end{verbatim}
3413
3414 %>>#] Remarks about Gluons :
3415 %>>#[ Arrows :
3416
3417 \subsection{Remarks about arrows}
3418 \label{sec:arrows}
3419
3420 %--#[ General :
3421
3422 The old Axodraw arrows were rather primitive little triangles. The JaxoDraw
3423 program has introduced fancier arrows which the user can also customize.
3424 There are parameters connected to this as shown in the figure:
3425 \begin{center}
3426 \begin{axopicture}{(150,100)(0,0)}
3427 \AxoGrid(0,0)(10,10)(15,10){LightGray}{0.5}
3428 \SetWidth{3}
3429 %\Line(10,50)(130,50)
3430 %\FilledPolygon{(140,50)(90,90)(105,50)(90,10)}{White}
3431 %\Polygon{(140,50)(90,90)(105,50)(90,10)}{Black}
3432 %\SetWidth{0.5}
3433 %\LongArrow(85,50)(85,90)
3434 %\LongArrow(90,5)(105,5)
3435 %\LongArrow(90,95)(140,95)
3436 %\SetPFont{Helvetica}{9}
3437 %\PText(110,85)(0)[l]{Length}
3438 %\PText(76,71)(90)[c]{Width}
3439 %\PText(110,5)(0)[l]{Inset}
3440 \Line[arrow,arrowinset=0.3,arrowaspect=1,arrowwidth=40,arrowpos=1,
3441 arrowstroke=3](10,50)(100,50)
3442 \SetWidth{0.5}
3443 \LongArrow(55,50)(55,90)
3444 \LongArrow(60,5)(84,5)
3445 \LongArrow(60,95)(140,95)
3446 \SetPFont{Helvetica}{9}
3447 \PText(100,85)(0)[l]{Length}
3448 \PText(46,71)(90)[c]{Width}
3449 \PText(90,5)(0)[l]{Inset}
3450 \end{axopicture}\vspace{2mm} \\
3451 \verb:\Line[arrow,arrowinset=0.3,arrowaspect=1,arrowwidth=40,arrowpos=1,:\\
3452 \verb:arrowstroke=3](10,50)(100,50):
3453 \end{center}
3454 The full set of parameters is:
3455 \begin{description}
3456 \item[aspect] A multiplicative parameter when the length is calculated
3457 from the width. The normal formula is:
3458 $\mbox{length}=2\times \mbox{width}\times \mbox{aspect}$.
3459 \item[inset] The fraction of the length that is taken inward.
3460 \item[length] The full length of the arrowhead.
3461 \item[position] The position of the arrow in the line as a fraction of the
3462 length of the line.
3463 \item[scale] A scale parameter for the complete arrowhead.
3464 \item[stroke] The width of the line that makes up the arrowhead. If the
3465 value is not set (default value is zero) the arrow is filled and overwrites
3466 whatever was there. In the case of a stroke value the contents are
3467 overwritten in the background color.
3468 \item[width] The half width of the arrowhead.
3469 \end{description}
3470 The parameters can be set in two ways. One is with one of the commands
3471 \begin{center}
3472 \begin{tabular}{ll}
3473 \verb:\SetArrowScale{number}: & Initial value is 1. \\
3474 \verb:\SetArrowInset{number}: & Initial value is 0.2 \\
3475 \verb:\SetArrowAspect{number}: & Initial value is 1.25 \\
3476 \verb:\SetArrowPosition{number}: & Initial value is 0.5 \\
3477 \verb:\SetArrowStroke{number}: & Initial value is 0 \\
3478 \end{tabular} \vspace{2mm} \\
3479 \end{center}
3480 (A complete list of commands for setting defaults is in
3481 Sec.\ \ref{sec:settings}.)
3482 These commands determine settings that will hold for all following
3483 commands, up to the end of whatever \LaTeX{} or \TeX{} grouping the
3484 default setting is given in. E.g., setting a default value inside an
3485 \texttt{axopicture} environment sets it until the end of the
3486 environment only. (Thus the settings obey the normal rules of
3487 \LaTeX{} for scoping.)
3488
3489 The other way is to use one or more of these parameters as options in a
3490 command that uses an arrow. The general use of options is in Sec.\
3491 \ref{sec:options}. The options that are available are
3492 \begin{center}
3493 \begin{tabular}{ll}
3494 arrow & initial default=false \\
3495 arrowscale=\num & initial default=1 \\
3496 arrowwidth=\num & initial default=0 \\
3497 arrowlength=\num & initial default=0 \\
3498 arrowpos=\num & initial default=0.5 \\
3499 arrowinset=\num & initial default=0.2 \\
3500 arrowstroke=\num & initial default=0 \\
3501 arrowaspect=\num & initial default=1.25 \\
3502 flip & initial default=false
3503 \end{tabular}
3504 \end{center}
3505 The arrow option tells the program to draw an arrow. Without it no
3506 arrow will be drawn. The flip option indicates that the direction of
3507 the arrow should be reversed from the `natural' direction.
3508
3509 When
3510 neither the width nor the length are specified, but instead both are
3511 given as zero, they are computed from the line width (and the line
3512 separation when there is a double line). The formula is:
3513 \begin{eqnarray}
3514 \mbox{Arrowwidth} & = &
3515 1.2 \times \left( \mbox{linewidth}
3516 + 0.7 \times \mbox{separation}
3517 + 1
3518 \right)
3519 \times \mbox{arrowscale},
3520 \\
3521 \label{arrowlength}
3522 \mbox{Length} & = &
3523 2 \times \mbox{arrowwidth} \times \mbox{arrowaspect}.
3524 \end{eqnarray}
3525 %If however $\mbox{linewidth} + \frac{1}{4} \times \mbox{separation} <
3526 %0.5$ the formula for the arrow width becomes $\mbox{arrowwidth} = 2.5
3527 %\times \mbox{arrowscale}$.
3528 If, however, $1.2 \times(\mbox{linewidth}+0.7\times\mbox{separation}+1)$ is less
3529 than 2.5, the formula for the arrow width becomes
3530 $\mbox{arrowwidth}=2.5\times\mbox{arrowscale}$.
3531
3532 If only one of the arrowwidth or the arrowlength parameters is zero,
3533 it is computed from the other non-zero parameter using formula
3534 (\ref{arrowlength}). When both are non-zero, those are the values that
3535 are used.
3536
3537 The position of the arrowhead is a bit tricky. The arrowpos parameter is a
3538 fraction of the length of the line and indicates the position of the center
3539 of the arrowhead. This means that when arrowpos is one, the arrowhead
3540 sticks out beyond the end of the line by half the arrowlength. When for
3541 instance the line width is 0.5, the default length of the arrowhead
3542 defaults to 6.25. Hence if one would like to compensate for this one should
3543 make the line 3.125 points shorter. Usually 3 pt will be sufficient.
3544
3545 Because of backward compatibility axodraw2 has many individual commands for
3546 lines with arrows. We present them here, together with some `options'
3547 varieties.\vspace{4mm}
3548
3549 %--#] General :
3550 %--#[ ArrowLine :
3551
3552 \noindent
3553 \begin{minipage}{3.83cm}
3554 \begin{axopicture}{(90,80)(-10,0)}
3555 \AxoGrid(0,0)(10,10)(9,8){LightGray}{0.5}
3556 \Line[arrow,arrowscale=2](10,70)(80,70)
3557 \Line[arrow,arrowpos=0.8,flip](10,50)(80,50)
3558 \Line[arrow](10,30)(80,30)
3559 \ArrowLine(10,10)(80,10)
3560 \end{axopicture}
3561 \end{minipage}
3562 \begin{minipage}{11.5cm}
3563 \label{arrowline}
3564 \verb:\Line[arrow,arrowscale=2](10,70)(80,70): \hfill \\
3565 \verb:\Line[arrow,arrowpos=0.8,flip](10,50)(80,50): \hfill \\
3566 \verb:\Line[arrow](10,30)(80,30): \hfill \\
3567 \verb:\ArrowLine(10,10)(80,10): \hfill \\
3568 The default position for the arrow is halfway (arrowpos=0.5). With the line
3569 command and the options we can put the arrow in any position.
3570 \end{minipage}\vspace{4mm}
3571
3572 %--#] ArrowLine :
3573 %--#[ LongArrow :
3574
3575 \noindent
3576 \begin{minipage}{3.83cm}
3577 \begin{axopicture}{(90,60)(-10,0)}
3578 \AxoGrid(0,0)(10,10)(9,6){LightGray}{0.5}
3579 \Line[arrow,arrowpos=1](10,30)(80,30)
3580 \LongArrow(10,10)(80,10)
3581 \SetWidth{4}
3582 \LongArrow[arrowscale=0.8](10,50)(70,50)
3583 \end{axopicture}
3584 \end{minipage}
3585 \begin{minipage}{11.5cm}
3586 \label{longarrow}
3587 \verb:\Line[arrow,arrowpos=1](10,30)(80,30): \hfill \\
3588 \verb:\LongArrow(10,10)(80,10): \hfill \\
3589 \verb:\SetWidth{4}: \hfill \\
3590 \verb:\LongArrow[arrowscale=0.8](10,50)(70,50): \hfill \\
3591 The \verb:\LongArrow: command just places the arrowhead at the end of the
3592 line. The size of the arrowhead is a function of the linewidth.
3593 \end{minipage}\vspace{4mm}
3594
3595 %--#] LongArrow :
3596 %--#[ ArrowDoubleLine :
3597
3598 \noindent
3599 \begin{minipage}{3.83cm}
3600 \begin{axopicture}{(90,100)(-10,0)}
3601 \AxoGrid(0,0)(10,10)(9,10){LightGray}{0.5}
3602 \SetArrowStroke{1}
3603 \Line[arrow,arrowpos=1,double,sep=5,arrowscale=1.3](10,90)(75,90)
3604 \Line[arrow,arrowpos=1,double,sep=2,arrowscale=1.5](10,70)(80,70)
3605 \Line[arrow,arrowpos=1,double,sep=2](10,50)(80,50)
3606 \Line[arrow,double,sep=2](10,30)(80,30)
3607 \ArrowDoubleLine(10,10)(80,10){2}
3608 \end{axopicture}
3609 \end{minipage}
3610 \begin{minipage}{11.5cm}
3611 \label{arrowdoubleline}
3612 \verb:\SetArrowStroke{1}: \hfill \\
3613 \verb:\Line[arrow,arrowpos=1,double,sep=5,arrowscale=1.3]: \hfill \\
3614 \verb: (10,90)(75,90): \hfill \\
3615 \verb:\Line[arrow,arrowpos=1,double,sep=2,arrowscale=1.5]: \hfill \\
3616 \verb: (10,70)(80,70): \hfill \\
3617 \verb:\Line[arrow,arrowpos=1,double,sep=2](10,50)(80,50): \hfill \\
3618 \verb:\Line[arrow,double,sep=2](10,30)(80,30): \hfill \\
3619 \verb:\ArrowDoubleLine(10,10)(80,10){2}: \hfill \\
3620 As one can see, the arrows also work with double lines.
3621 \end{minipage}\vspace{4mm}
3622
3623 %--#] ArrowDoubleLine :
3624 %--#[ ArrowDashLine :
3625
3626 \noindent
3627 \begin{minipage}{3.83cm}
3628 \begin{axopicture}{(90,80)(-10,0)}
3629 \AxoGrid(0,0)(10,10)(9,8){LightGray}{0.5}
3630 \Line[arrow,arrowpos=0.3,dash,dsize=3,arrowscale=1.5](10,70)(80,70)
3631 \DashArrowLine(10,50)(80,50){3}
3632 \Line[arrow,dash,dsize=3](10,30)(80,30)
3633 \ArrowDashLine(10,10)(80,10){3}
3634 \end{axopicture}
3635 \end{minipage}
3636 \begin{minipage}{11.5cm}
3637 \label{arrowdashline}
3638 \verb:\Line[arrow,arrowpos=0.3,dash,dsize=3,arrowscale=1.5]: \\
3639 \verb:(10,70)(80,70): \\
3640 \verb:\DashArrowLine(10,50)(80,50){3}: \\
3641 \verb:\Line[arrow,dash,dsize=3](10,30)(80,30): \\
3642 \verb:\ArrowDashLine(10,10)(80,10){3}: \\
3643 We have not taken provisions for the dashes to be centered in the
3644 arrowhead, because at times that is nearly impossible. The commands
3645 \verb:\ArrowDashLine: and \verb:\DashArrowLine: are identical.
3646 \end{minipage}\vspace{4mm}
3647
3648 %--#] ArrowDashLine :
3649 %--#[ ArrowDashDoubleLine :
3650
3651 \noindent
3652 \begin{minipage}{3.83cm}
3653 \begin{axopicture}{(90,80)(-10,0)}
3654 \AxoGrid(0,0)(10,10)(9,8){LightGray}{0.5}
3655 \SetArrowStroke{0.5}
3656 \Line[arrow,arrowpos=1,dash,dsize=3,double,sep=1.5,arrowscale=1.5](10,70)(80,70)
3657 \DashArrowDoubleLine(10,50)(80,50){1.5}{3}
3658 \Line[arrow,dash,dsize=3,double,sep=1.5](10,30)(80,30)
3659 \ArrowDashDoubleLine(10,10)(80,10){1.5}{3}
3660 \end{axopicture}
3661 \end{minipage}
3662 \begin{minipage}{11.5cm}
3663 \label{arrowdashdoubleline}
3664 \verb:\SetArrowStroke{0.5}: \\
3665 \verb:\Line[arrow,arrowpos=1,dash,dsize=3,double: \\
3666 \verb:,sep=1.5,arrowscale=1.5](10,70)(80,70): \\
3667 \verb:\DashArrowDoubleLine(10,50)(80,50){1.5}{3}: \\
3668 \verb:\Line[arrow,dash,dsize=3](10,30)(80,30): \\
3669 \verb:\ArrowDashDoubleLine(10,10)(80,10){1.5}{3}: \\
3670 The \verb:\ArrowDashDoubleLine: and \verb:\DashArrowDoubleLine:
3671 commands are identical.
3672 \end{minipage}\vspace{4mm}
3673
3674 %--#] ArrowDashDoubleLine :
3675 %--#[ LongArrowDashLine :
3676
3677 \noindent
3678 \begin{minipage}{3.83cm}
3679 \begin{axopicture}{(90,80)(-10,0)}
3680 \AxoGrid(0,0)(10,10)(9,8){LightGray}{0.5}
3681 \Line[arrow,arrowpos=0,dash,dsize=3,arrowscale=1.5,flip](10,70)(80,70)
3682 \DashLongArrowLine(10,50)(80,50){3}
3683 \Line[arrow,arrowpos=1,dash,dsize=3](10,30)(80,30)
3684 \LongArrowDashLine(10,10)(80,10){3}
3685 \end{axopicture}
3686 \end{minipage}
3687 \begin{minipage}{11.5cm}
3688 \label{longarrowdashline}
3689 \verb:\Line[arrow,arrowpos=0,dash,dsize=3,arrowscale=1.5: \\
3690 \verb:,flip](10,70)(80,70): \\
3691 \verb:\DashLongArrowLine(10,50)(80,50){3}: \\
3692 \verb:\Line[arrow,arrowpos=1,dash,dsize=3](10,30)(80,30): \\
3693 \verb:\LongArrowDashLine(10,10)(80,10){3}: \\
3694 The commands
3695 \verb:\LongArrowDashLine:, \verb:\DashLongArrowLine:,
3696 \verb:\LongArrowDash: and \verb:\DashLongArrow: are identical.
3697 \end{minipage}\vspace{4mm}
3698
3699 %--#] LongArrowDashLine :
3700 %--#[ ArrowArc :
3701
3702 \noindent
3703 \begin{minipage}{3.83cm}
3704 \begin{axopicture}{(90,140)(-10,0)}
3705 \AxoGrid(0,0)(10,10)(9,14){LightGray}{0.5}
3706 \Arc[arrow,arrowpos=1,clock](45,95)(40,160,20)
3707 \LongArrowArcn(45,80)(40,160,20)
3708 \Arc[arrow,arrowpos=0.5,clock](45,65)(40,160,20)
3709 \ArrowArcn(45,50)(40,160,20)
3710 \Arc[arrow,arrowpos=1](45,35)(40,20,160)
3711 \LongArrowArc(45,20)(40,20,160)
3712 \Arc[arrow,arrowpos=0.5](45,5)(40,20,160)
3713 \ArrowArc(45,-10)(40,20,160)
3714 \end{axopicture}
3715 \end{minipage}
3716 \begin{minipage}{11.5cm}
3717 \label{arrowarc}
3718 \verb:\Arc[arrow,arrowpos=0,flip](45,95)(40,20,160): \\
3719 \verb:\LongArrowArcn(45,80)(40,20,160): \\
3720 \verb:\Arc[arrow,arrowpos=0.5](45,65)(40,20,160): \\
3721 \verb:\ArrowArcn(45,50)(40,20,160): \\
3722 \verb:\Arc[arrow,arrowpos=1](45,35)(40,20,160): \\
3723 \verb:\LongArrowArc(45,20)(40,20,160): \\
3724 \verb:\Arc[arrow,arrowpos=0.5](45,5)(40,20,160): \\
3725 \verb:\ArrowArc(45,-10)(40,20,160): \\
3726 The \verb:Arc: and the \verb:CArc: commands are identical.
3727 \end{minipage}\vspace{4mm}
3728
3729 %--#] ArrowArc :
3730 %--#[ ArrowDashArc :
3731
3732 \noindent
3733 \begin{minipage}{3.83cm}
3734 \begin{axopicture}{(90,110)(-10,0)}
3735 \AxoGrid(0,0)(10,10)(9,11){LightGray}{0.5}
3736 \Arc[arrow,dash,dsize=3,arrowpos=0.5,clock](45,65)(40,160,20)
3737 \ArrowDashArcn(45,50)(40,160,20){3}
3738 \Arc[arrow,dash,dsize=3,arrowpos=1](45,35)(40,20,160)
3739 \LongArrowDashArc(45,20)(40,20,160){3}
3740 \Arc[arrow,dash,dsize=3,arrowpos=0.5](45,5)(40,20,160)
3741 \ArrowDashArc(45,-10)(40,20,160){3}
3742 \end{axopicture}
3743 \end{minipage}
3744 \begin{minipage}{11.5cm}
3745 \label{arrowdasharc}
3746 \verb:\Arc[arrow,dash,dsize=3,arrowpos=0.5]: \\
3747 \verb:(45,65)(40,20,160): \\
3748 \verb:\ArrowDashArcn(45,50)(40,20,160){3}: \\
3749 \verb:\Arc[arrow,dash,dsize=3,arrowpos=1]: \\
3750 \verb:(45,35)(40,20,160): \\
3751 \verb:\LongArrowDashArc(45,20)(40,20,160){3}: \\
3752 \verb:\Arc[arrow,dash,dsize=3,arrowpos=0.5]: \\
3753 \verb:(45,5)(40,20,160): \\
3754 \verb:\ArrowDashArc(45,-10)(40,20,160){3}: \\
3755 The \verb:DashArrowArc: and the \verb:ArrowDashArc: commands are identical.
3756 So are the commands \verb:DashArrowArcn: and \verb:ArrowDashArcn:.
3757 \end{minipage}\vspace{4mm}
3758
3759 %--#] ArrowDashArc :
3760 %--#[ ArrowDashDoubleArc :
3761
3762 \noindent
3763 \begin{minipage}{3.83cm}
3764 \begin{axopicture}{(90,80)(-10,0)}
3765 \AxoGrid(0,0)(10,10)(9,8){LightGray}{0.5}
3766 \Arc[arrow,dash,dsize=3,double,sep=1.5,arrowpos=0.5](45,35)(40,20,160)
3767 \ArrowDashDoubleArc(45,20)(40,20,160){1.5}{3}
3768 \Arc[arrow,double,sep=1.5,arrowpos=0.5](45,5)(40,20,160)
3769 \ArrowDoubleArc(45,-10)(40,20,160){1.5}
3770 \end{axopicture}
3771 \end{minipage}
3772 \begin{minipage}{11.5cm}
3773 \label{arrowdashdoublearc}
3774 \verb:\Arc[arrow,dash,dsize=3,double,sep=1.5: \\
3775 \verb:,arrowpos=0.5](45,35)(40,20,160): \\
3776 \verb:\ArrowDashDoubleArc(45,20)(40,160,20){1.5}{3}: \\
3777 \verb:\Arc[arrow,double,sep=1.5,arrowpos=0.5]: \\
3778 \verb:(45,5)(40,20,160): \\
3779 \verb:\ArrowDoubleArc(45,-10)(40,20,160){1.5}: \\
3780 Other commands involving Long do not exist. The options can take care of
3781 their functionality.
3782 \end{minipage}\vspace{4mm}
3783
3784 %--#] ArrowDashDoubleArc :
3785 %--#[ Bezier :
3786
3787 Computing the position of the arrow in a B\'ezier curve is a bit complicated.
3788 Let us recall the definition of a cubic B\'ezier curve:
3789 \begin{eqnarray}
3790 x & = & x_0 (1-t)^3 + 3 x_1 t (1-t)^2 + 3 x_2 t^2 (1-t) + x_3 t^3
3791 \nonumber \\
3792 y & = & y_0 (1-t)^3 + 3 y_1 t (1-t)^2 + 3 y_2 t^2 (1-t) + y_3 t^3
3793 \end{eqnarray}
3794 Computing the length of the curve is done with the integral
3795 \begin{eqnarray}
3796 L & = & \int_0^1 dt
3797 \sqrt{ \left( \frac{dx}{dt} \right)^2 + \left( \frac{dy}{dt} \right )^2 },
3798 \end{eqnarray}
3799 which is an integral over the square root of a quartic polynomial. This we
3800 do with a 16 point Gaussian quadrature and it gives us more than enough
3801 accuracy\footnote{We need to compute the length of the B\'ezier curve also
3802 when we want to put a dash pattern on it. The exact dash size is determined
3803 such that an integer number of patterns fits in the line.}. Let us assume
3804 now that we want the arrow at 0.6 of the length. To find the exact fraction
3805 of the length involves finding the upper limit of the integral for which
3806 the length is $0.6 L$. This requires an iteration procedure till we have a
3807 reasonable accuracy for the position $(x,y)$. After that we have to calculate
3808 the derivative in this point as well.
3809
3810 Because the B\'ezier curves are new commands in axodraw2 there is no need for
3811 backwards compatibility in the use of arrows. Hence all arrow commands are
3812 done by means of the options. Some examples are:
3813 \vspace{4mm}
3814
3815 \noindent
3816 \begin{minipage}{3.83cm}
3817 \begin{axopicture}{(80,80)(-15,0)}
3818 \AxoGrid(0,0)(10,10)(8,8){LightGray}{0.5}
3819 \Bezier[arrow](10,10)(30,30)(10,50)(30,70)
3820 \Bezier[arrow,dash,dsize=3](30,10)(50,30)(30,50)(50,70)
3821 \Bezier[arrow,arrowpos=1,double,sep=1,arrowstroke=0.5](50,10)(70,30)(50,50)(70,70)
3822 \end{axopicture}
3823 \end{minipage}
3824 \begin{minipage}{11.5cm}
3825 \label{arrowbezier}
3826 \verb:\Bezier[arrow](10,10)(30,30)(10,50)(30,70): \\
3827 \verb:\Bezier[arrow,dash,dsize=3](30,10)(50,30): \\
3828 \verb:(30,50)(50,70): \\
3829 \verb:\Bezier[arrow,arrowpos=1,double,sep=1,arrowstroke: \\
3830 \verb:=0.5](50,10)(70,30)(50,50)(70,70):
3831 \end{minipage}\vspace{4mm}
3832
3833 %--#] Bezier :
3834 %>>#] Arrows :
3835 %>>#[ Settings :
3836
3837 \subsection{Units and scaling}
3838 \label{sec:units}
3839
3840 When you have constructed a diagram, you may need to change its scale,
3841 to make it larger or smaller. Axodraw2 provides ways of doing this,
3842 for scaling diagrams without recoding all the individual coordinates.
3843 However the requirements for the nature of the scaling change between
3844 different cases. For example, suppose a diagram is designed for use in
3845 a journal article and you wish to use it in the slides for a seminar.
3846 Then you will want to enlarge both the geometric size of the diagram's
3847 objects and the text labels it contains. But if you wish to use a
3848 scaled diagram in another place in a journal article, you will wish to
3849 scale its lines etc, but will probably not wish to scale the text (to
3850 preserve its legibility).
3851
3852 Axodraw2 therefore provides tools for the different situations, so we
3853 will now explain what to do. The commands to achieve this all appear
3854 in the list of parameter-setting commands in Sec.\ \ref{sec:settings}.
3855
3856
3857 \subsubsection{Scaling for slides}
3858
3859 Suppose the original diagram is
3860 \begin{center}
3861 \begin{minipage}{10cm}
3862 \begin{verbatim}
3863 \SetPFont{Helvetica-Oblique}{12}
3864 Document text. Then diagram:
3865 \begin{axopicture}(60,43)
3866 \Arc[arrow](30,0)(30,0,180)
3867 \Text(30,33)[b]{$\alpha P_1$}
3868 \CText(30,10){Red}{Yellow}{Arc}
3869 \end{axopicture}
3870 \end{verbatim}
3871 \end{minipage}
3872 \end{center}
3873 to give
3874 \begin{center}
3875 \SetPFont{Helvetica-Oblique}{12}
3876 Document text. Then diagram:
3877 \begin{axopicture}(60,43)
3878 \Arc[arrow](30,0)(30,0,180)
3879 \Text(30,33)[b]{$\alpha P_1$}
3880 \CText(30,10){Red}{Yellow}{Arc}
3881 \end{axopicture}
3882 \end{center}
3883 Then you could double the scale of the diagram by
3884 \begin{center}
3885 \begin{minipage}{10cm}
3886 \begin{verbatim}
3887 \SetScale{2}
3888 \fontsize{24}{26}\selectfont
3889 \SetPFont{Helvetica-Oblique}{12}
3890 Document text. Then diagram:
3891 \begin{axopicture}(60,43)
3892 \Arc[arrow](30,0)(30,0,180)
3893 \Text(30,33)[b]{$\alpha P_1$}
3894 \CText(30,10){Red}{Yellow}{Arc}
3895 \end{axopicture}
3896 \end{verbatim}
3897 \end{minipage}
3898 \end{center}
3899 to get
3900 \begin{center}
3901 \SetScale{2}
3902 \fontsize{24}{26}\selectfont
3903 \SetPFont{Helvetica-Oblique}{12}
3904 Document text. Then diagram:
3905 \begin{axopicture}(60,43)
3906 \Arc[arrow](30,0)(30,0,180)
3907 \Text(30,33)[b]{$\alpha P_1$}
3908 \CText(30,10){Red}{Yellow}{Arc}
3909 \end{axopicture}
3910 \end{center}
3911 We have changed the size of the document font, as would be appropriate
3912 for a make slides for a presentation; this we did by the
3913 \verb+\fontsize+ command. The arc and the space inserted
3914 in the document for the diagram have scaled up. The label inserted by
3915 the \verb:\Text: command has changed to match the document font. The
3916 postscript text in the \verb:\CText: was specified to be at
3917 $\unit[12]{pt}$, but is now scaled up also.
3918
3919 The above behavior is what axodraw2 does by default, and is what v.\ 1
3920 did.
3921
3922
3923 \subsubsection{Scaling within article}
3924
3925 If you wanted to make an enlarged figure in a journal article, you
3926 would not change the document font. But the obvious modification to
3927 the previous example is
3928 \begin{center}
3929 \begin{minipage}{10cm}
3930 \begin{verbatim}
3931 \SetScale{2}
3932 \SetPFont{Helvetica-Oblique}{12}
3933 Document text. Then diagram:
3934 \begin{axopicture}(60,43)
3935 \Arc[arrow](30,0)(30,0,180)
3936 \Text(30,33)[b]{$\alpha P_1$}
3937 \CText(30,10){Red}{Yellow}{Arc}
3938 \end{axopicture}
3939 \end{verbatim}
3940 \end{minipage}
3941 \end{center}
3942 which gives
3943 \begin{center}
3944 \SetScale{2}
3945 \SetPFont{Helvetica-Oblique}{12}
3946 Document text. Then diagram:
3947 \begin{axopicture}(60,43)
3948 \Arc[arrow](30,0)(30,0,180)
3949 \Text(30,33)[b]{$\alpha P_1$}
3950 \CText(30,10){Red}{Yellow}{Arc}
3951 \end{axopicture}
3952 \end{center}
3953 The label $\alpha P_1$ is now not enlarged, since it copies the
3954 behavior of the document font. But the postscript text is enlarged,
3955 which is probably undesirable. If you were scaling down the diagram
3956 instead of scaling it up, the situation would be worse, because the
3957 postscript font would be difficult to read.
3958
3959 So in this situation, of scaling the diagram while keeping the
3960 document font intact, you probably also want to leave unchanged the
3961 size of the postscript font. You can achieve this by the
3962 \verb:\PSTextScalesLikeGraphicsfalse: command:
3963 \begin{center}
3964 \begin{minipage}{10cm}
3965 \begin{verbatim}
3966 \SetScale{2}
3967 \PSTextScalesLikeGraphicsfalse
3968 \SetPFont{Helvetica-Oblique}{12}
3969 Document text. Then diagram:
3970 \begin{axopicture}(60,43)
3971 \Arc[arrow](30,0)(30,0,180)
3972 \Text(30,33)[b]{$\alpha P_1$}
3973 \CText(30,10){Red}{Yellow}{Arc}
3974 \end{axopicture}
3975 \end{verbatim}
3976 \end{minipage}
3977 \end{center}
3978 \begin{center}
3979 \SetScale{2}
3980 \PSTextScalesLikeGraphicsfalse
3981 \SetPFont{Helvetica-Oblique}{12}
3982 Document text. Then diagram:
3983 \begin{axopicture}(60,43)
3984 \Arc[arrow](30,0)(30,0,180)
3985 \Text(30,33)[b]{$\alpha P_1$}
3986 \CText(30,10){Red}{Yellow}{Arc}
3987 \end{axopicture}
3988 \end{center}
3989
3990 To achieve this on a document-wide basis, which is probably what you
3991 want, you can use the \texttt{PStextScalesIndependently} option when you
3992 load axodraw2 --- see Sec.\ \ref{sec:invoke}.
3993
3994 Nevertheless, if you turn off the default scaling of postscript text,
3995 %you may still want to scale text. To do this you can use the
3996 you may still want to scale text. For this you can use the
3997 \verb:\SetTextScale: command, as in \verb:\SetTextScale{1.2}:. This
3998 only has an effect when you have turned off the scaling of postscript
3999 text with graphics objects; but then it applies to \TeX{} text
4000 inserted by axodraw2's \verb:\Text: and \verb:\rText: commands, as
4001 well text inserted by axodraw2's ``postscript-text'' commands.
4002
4003 If you are confused by the above, we recommend experimentation to
4004 understand how to achieve the effects that you specifically need. We
4005 could have made the set of commands and options simpler, but only at
4006 the expense of not being able to meet the demands of the different
4007 plausible situations that we could imagine and have to deal with
4008 ourselves.
4009
4010 \subsubsection{Canvas and object scales}
4011
4012 When you use \verb:\SetScale: outside an \verb:axopicture:
4013 environment, as above, the scaling applies to both the axodraw2
4014 objects and the space inserted for the \texttt{axopicture} environment
4015 in the document, as is natural. But you may find you need to scale a
4016 subset of objects inside the diagram, e.g.,
4017 \begin{center}
4018 \begin{minipage}{10cm}
4019 \verb:\begin{axopicture}:(\dots)\\
4020 \hspace*{1cm} (First block)\\
4021 \verb:\SetScale{0.5}:\\
4022 \hspace*{1cm} (Second block)\\
4023 \verb:\end{axopicture}:
4024 \end{minipage}
4025 \end{center}
4026 In this case, the units for specifying the objects in the second block
4027 are different from those for specifying the \verb:axopicture:
4028 environment's size (as well as the first block of objects). We thus
4029 distinguish object units from canvas units, where ``canvas'' refers to
4030 the \verb:axopicture: environment as a whole.
4031
4032 Another complication is that the \LaTeX{} \verb+picture+ environment
4033 has is own \verb:\unitlength: parameter. In v.\ 1 of axodraw, the
4034 canvas scale was determined by \LaTeX's \verb:\unitlength:. But there
4035 was an independent unit for the object scale; this was the one
4036 determined by axodraw's \verb:\SetScale: command. Also, not all
4037 objects used the object scale. The situation therefore got quite
4038 confusing. In v.\ 1, if, as is often natural, you wished to scale the
4039 canvas as well as the objects, you would have needed to set \LaTeX's
4040 \verb:\unitlength: parameter as well as using axodraw's
4041 \verb:\SetScale: command.
4042
4043 So now we have arranged things so that the canvas and object scales
4044 are tied by default, provided that you use axodraw2's \verb:\SetScale:
4045 command, and that axodraw diagrams are inside \verb+axopicture+
4046 environments (in contrast to the \verb+picture+ environment used in
4047 the original axodraw).
4048 However, it may be necessary to keep backward compatibility in some
4049 cases, and we weren't certain that the new behavior is exactly what is
4050 always desired. So in axodraw2, we have provided three choices, given
4051 by the \texttt{canvasScaleIs1pt}, \texttt{canvasScaleIsObjectScale},
4052 and \texttt{canvasScaleIsUnitLength} options when loading axodraw2 ---
4053 see Sec.\ \ref{sec:invoke}. Naturally,
4054 \texttt{canvasScaleIsObjectScale} is the default. If you wish to
4055 change the setting mid-document, there are corresponding commands ---
4056 Sec.\ \ref{sec:settings}.
4057
4058
4059
4060 \subsection{Settings}
4061 \label{sec:settings}
4062
4063 Axodraw2 has a number of parameters that can be set by the user. The
4064 parameters include defaults for line types, dimensions, etc. The
4065 parameters can be set either inside the axopicture environment or
4066 outside. If they are set outside they modify the default value for
4067 subsequent pictures. If set inside they only affect the current
4068 picture. (In general, the parameters obey the usual rules for the
4069 scope of \LaTeX{} variables.) In many cases, the parameters provide
4070 default values for a command to draw an object and can be overridden
4071 for a single object by using an optional parameter in invoking the
4072 command for the object.
4073
4074 The unit for lengths is the current object scale, as set by the
4075 \verb+\SetScale+ command.
4076
4077 \break
4078
4079 The parameter-setting commands are:
4080 %\begin{center}
4081 %\def\arraystretch{1.4}
4082 %%
4083 %% See preamble for definition of \name
4084 %\def\descr#1#2{%
4085 % % #1 = command-syntax, #2 = description
4086 % \name{#1} & #2\\
4087 % \hline
4088 %}
4089 %\def\descrL#1#2{%
4090 % % #1 = command-syntax, #2 = description
4091 % % Set #1 on separate line
4092 % \multicolumn{2}{|l|}{\name{#1}} \\
4093 % & #2\\
4094 % \hline
4095 %}
4096 %\catcode`\#=13
4097 %\def#{\#}
4098 %%
4099 %\begin{longtable}{|p{5cm}|p{10.2cm}|}
4100 %\hline
4101 % Command & Commentary
4102 %\\
4103 %\hline
4104 %%
4105 %\descr{SetLineSep\{\#1\}}{
4106 % This sets the default separation of double lines. Its initial value
4107 % is 2.
4108 %}
4109 %%
4110 %\descr{SetDashSize\{\#1\}}{
4111 % This sets the default size for the size of the dashes of dashed
4112 % lines. Its initial value is 3.
4113 %}
4114 %%
4115 %\descr{SetWidth\{\#1\}}{
4116 % This sets the default width of lines. Its initial value is 1.
4117 %}
4118 %%
4119 %\descr{SetScale\{\#1\}}{
4120 % This sets a scale factor.
4121 % This factor applies a magnification factor to all
4122 % axodraw2 graphics objects. When the setting that
4123 % postscript-text-scales-like-graphics is set (as is true by
4124 % default), it also applies to axodraw2's ``postscript-text''
4125 % writing commands (\name{PText}, \name{BText}, etc), but not to
4126 % its \TeX{}-text commands (\name{Text} etc). The initial scale
4127 % factor is unity.
4128 %}
4129 %%
4130 %\descr{SetTextScale\{\#1\}}{
4131 % This factor applies a magnification factor to all
4132 % axodraw2 text objects, but \emph{only when} the setting that
4133 % postscript-text-scales-like-graphics is turned off.
4134 %}
4135 %%
4136 %\descr{SetOffset(\#1,\#2)}{
4137 % Sets an offset value
4138 % for all commands of
4139 % axodraw2. Its value is not affected by the scale variable.
4140 %}
4141 %%
4142 %\descr{SetScaledOffset(\#1,\#2)}{
4143 % Sets an offset for
4144 % all commands of axodraw2. This
4145 % offset is affected by the scale factor.
4146 %}
4147 %%
4148 %\descr{SetColor\{\#1\}}{
4149 % Sets the named color,
4150 % for both axodraw2 objects and regular text. See Sec.\
4151 % \ref{sec:colors} for details on using color with axodraw2.
4152 %}
4153 %%
4154 %\descr{textRed}{
4155 % Alternative command for setting named a color
4156 % for both axodraw2 objects and regular text. See Sec.\
4157 % \ref{sec:colors} for details on using color with axodraw2.
4158 % There is one such command for each axodraw2 named color.
4159 %}
4160 %%
4161 %\descr{SetPFont\{\#1\}\{\#2\}}{
4162 % Sets the Postscript
4163 % font, and its size in units of points. See Sec.\ \ref{sec:PSText}
4164 % for the commands that use this font, for a table of the names of
4165 % the fonts. An empty first argument, instead of a font name, (as in
4166 % \name{SetPFont\{\}\{20\}} indicates that the normal document font is
4167 % to be used at the indicated size. An empty second argument,
4168 % instead of the font size, (as in \name{SetPFont\{Helvetica\}\{\}} or
4169 % \name{SetPFont\{\}\{\}}) indicates that the font size is to be
4170 % \LaTeX's document font size at the time the text-making command is
4171 % executed.
4172 %}
4173 %%
4174 %\descr{SetArrowScale\{\#1\}}{
4175 % A scale parameter for the
4176 % entire head of an arrow.
4177 %}
4178 %%
4179 %\descr{SetArrowInset\{\#1\}}{
4180 % See Sec.\ \ref{sec:arrows}.
4181 %}
4182 %%
4183 %\descr{SetArrowAspect\{\#1\}}{
4184 % See Sec.\ \ref{sec:arrows}.
4185 %}
4186 %%
4187 %\descr{SetArrowPosition\{\#1\}}{
4188 % Determines where the
4189 %arrowhead is on a line. The position is the fraction of the length of the
4190 %line.
4191 %}
4192 %%
4193 %\descr{SetArrowStroke\{\#1\}}{
4194 % This parameter determines the linewidth of the arrowhead if it is just
4195 % outlined. Its initial value is zero (filled arrowhead).
4196 %}
4197 %%
4198 %\descr{canvasScaleOnept}{
4199 % Sets canvas scale to $\unit[1]{pt}$.
4200 %}
4201 %%
4202 %\descr{canvasScaleObjectScale}{
4203 % Sets canvas scale to equal the value set by \name{SetScale} in
4204 % units of points. This is the initial default of axodraw2,
4205 % unless overridden.
4206 %}
4207 %%
4208 %\descr{canvasScaleUnitLength}{
4209 % The canvas scale is the same as \LaTeX's length parameter
4210 % \name{unitlength}.
4211 %}
4212 %%
4213 %\descrL{PSTextScalesLikeGraphicsfalse}{
4214 % Text drawn by all of Axodraws's text commands scales with the
4215 % factor set by \name{SetTextScale}.
4216 % See Sec.\ \ref{sec:text}.
4217 %}
4218 %%
4219 %\descrL{PSTextScalesLikeGraphicstrue}{
4220 % (Default setting.) Text drawn by Axodraw's postscript-text
4221 % commands scales with the same factor as graphics objects, as set
4222 % by \name{SetScale}. Text drawn by Axodraw's \TeX{}-text
4223 % commands is unscaled.
4224 % See Sec.\ \ref{sec:text}.
4225 %}
4226 %\end{longtable}
4227 %\end{center}
4228 \begin{center}
4229 \def\arraystretch{1.4}
4230 %
4231 % See preamble for definition of \name
4232 \def\descr#1#2{%
4233 % #1 = command-syntax, #2 = description
4234 \name{#1} & #2\\
4235 \hline
4236 }
4237 \def\descrL#1#2{%
4238 % #1 = command-syntax, #2 = description
4239 % Set #1 on separate line
4240 \multicolumn{2}{|l|}{\name{#1}} \\
4241 & #2\\
4242 \hline
4243 }
4244 \def\category#1{%
4245 % #1 = name of category
4246 \multicolumn{2}{l}{#1:}
4247 \\
4248 \hline
4249 }
4250 \catcode`\#=13
4251 \def#{\#}
4252 %
4253 \begin{longtable}{|p{5cm}|p{10.2cm}|}
4254 \hline
4255 \endfirsthead
4256 Command & Commentary
4257 \\
4258 \hline
4259 %====================
4260 \category{Lines}
4261 %
4262 \descr{SetDashSize\{\#1\}}{
4263 This sets the default size for the size of the dashes of dashed
4264 lines. Its initial value is 3.
4265 }
4266 %
4267 \descr{SetLineSep\{\#1\}}{
4268 This sets the default separation of double lines. Its initial value
4269 is 2.
4270 }
4271 %
4272 \descr{SetWidth\{\#1\}}{
4273 This sets the default width of lines. Its initial value is 0.5.
4274 }
4275 %====================
4276 \category{Arrows}
4277 %
4278 \descr{SetArrowAspect\{\#1\}}{
4279 See Sec.\ \ref{sec:arrows}.
4280 }
4281 %
4282 \descr{SetArrowInset\{\#1\}}{
4283 See Sec.\ \ref{sec:arrows}.
4284 }
4285 %
4286 \descr{SetArrowPosition\{\#1\}}{
4287 Determines where the
4288 arrowhead is on a line. The position is the fraction of the length of the
4289 line.
4290 }
4291 %
4292 \descr{SetArrowScale\{\#1\}}{
4293 A scale parameter for the
4294 entire head of an arrow.
4295 }
4296 %
4297 \descr{SetArrowStroke\{\#1\}}{
4298 This parameter determines the linewidth of the arrowhead if it is just
4299 outlined. Its initial value is zero (filled arrowhead).
4300 }
4301 %====================
4302 \category{Scaling}
4303 %
4304 \descr{canvasScaleOnept}{
4305 Sets canvas scale to $\unit[1]{pt}$.
4306 }
4307 %
4308 \descr{canvasScaleObjectScale}{
4309 Sets canvas scale to equal the value set by \name{SetScale} in
4310 units of points. This is the initial default of axodraw2,
4311 unless overridden.
4312 }
4313 %
4314 \descr{canvasScaleUnitLength}{
4315 The canvas scale is the same as \LaTeX's length parameter
4316 \name{unitlength}.
4317 }
4318 %
4319 \descr{SetScale\{\#1\}}{
4320 This sets a scale factor.
4321 This factor applies a magnification factor to all
4322 axodraw2 graphics objects. When the setting that
4323 postscript-text-scales-like-graphics is set (as is true by
4324 default), it also applies to axodraw2's ``postscript-text''
4325 writing commands (\name{PText}, \name{BText}, etc), but not to
4326 its \TeX{}-text commands (\name{Text} etc). The initial scale
4327 factor is unity.
4328 }
4329 %
4330 \descr{SetTextScale\{\#1\}}{
4331 This factor applies a magnification factor to all
4332 axodraw2 text objects, but \emph{only when} the setting that
4333 postscript-text-scales-like-graphics is turned off.
4334 }
4335 %
4336 \descrL{PSTextScalesLikeGraphicsfalse}{
4337 Text drawn by all of Axodraws's text commands scales with the
4338 factor set by \name{SetTextScale}.
4339 See Sec.\ \ref{sec:text}.
4340 }
4341 %
4342 \descrL{PSTextScalesLikeGraphicstrue}{
4343 (Default setting.) Text drawn by Axodraw's postscript-text
4344 commands scales with the same factor as graphics objects, as set
4345 by \name{SetScale}. Text drawn by Axodraw's \TeX{}-text
4346 commands is unscaled.
4347 See Sec.\ \ref{sec:text}.
4348 }
4349 %
4350 %====================
4351 \category{Offsets}
4352 %
4353 \descr{SetOffset(\#1,\#2)}{
4354 Sets an offset value
4355 for all commands of
4356 axodraw2. Its value is not affected by the scale variable.
4357 }
4358 %
4359 \descr{SetScaledOffset(\#1,\#2)}{
4360 Sets an offset for
4361 all commands of axodraw2. This
4362 offset is affected by the scale factor.
4363 }
4364 %
4365 %====================
4366 \category{Color}
4367 %
4368 \descr{SetColor\{\#1\}}{
4369 Sets the named color,
4370 for both axodraw2 objects and regular text. See Sec.\
4371 \ref{sec:colors} for details on using color with axodraw2.
4372 }
4373 %
4374 \descr{textRed}{
4375 Alternative command for setting named a color
4376 for both axodraw2 objects and regular text. See Sec.\
4377 \ref{sec:colors} for details on using color with axodraw2.
4378 There is one such command for each axodraw2 named color.
4379 }
4380 %====================
4381 \category{Font}
4382 %
4383 \descr{SetPFont\{\#1\}\{\#2\}}{
4384 Sets the Postscript
4385 font, and its size in units of points. See Sec.\ \ref{sec:PSText}
4386 for the commands that use this font, for a table of the names of
4387 the fonts. An empty first argument, instead of a font name, (as in
4388 \name{SetPFont\{\}\{20\}} indicates that the normal document font is
4389 to be used at the indicated size. An empty second argument,
4390 instead of the font size, (as in \name{SetPFont\{Helvetica\}\{\}} or
4391 \name{SetPFont\{\}\{\}}) indicates that the font size is to be
4392 \LaTeX's document font size at the time the text-making command is
4393 executed.
4394 }
4395 %
4396 \end{longtable}
4397 \end{center}
4398
4399
4400 %>>#] Settings :
4401 %>>#[ Colors :
4402
4403 \subsection{Colors}
4404 \label{sec:colors}
4405
4406 \TeX{} and \LaTeX{} by themselves do not provide any means to set
4407 colors in a document. Instead, one must use a suitable package to
4408 achieve the effect; the current standard one is \file{color.sty}.
4409 Such a package performs its work by passing graphics commands to the
4410 viewable output file. Since axodraw also works in a similar fashion,
4411 there is a potentiality for conflicts.
4412
4413 Axodraw version 1, released in 1994, used the package
4414 \file{colordvi.sty} for applying color to normal textual material,
4415 and its own separate methods for applying color to its graphical
4416 objects. They both defined the same convenient set of named colors
4417 that could be used, but they had to be set separately for text and
4418 graphics\footnote{The named colors corresponded to ones defined by the
4419 \program{dvips} program.}. The \file{colordvi.sty} package also had
4420 an important disadvantage that its color settings did not respect
4421 \TeX{} grouping and \LaTeX{} environments, so that a color setting
4422 made for text in an environment continued to apply after the end of
4423 the environment.
4424
4425 Since then, the available tools, notably in the powerful
4426 \file{color.sty}, have greatly improved. But this has introduced
4427 both real and potential incompatibilities with the older methods.
4428 Note that \file{color.sty} is currently the most standard way for
4429 implementing color, and is a required part of \LaTeX{} distributions,
4430 as part of the graphics bundle.
4431
4432 In the new version of axodraw, we have arranged to have compatibility
4433 with \file{color.sty}, while allowing as much backward compatibility
4434 as we could with the user interface from v.\ 1. We fully rely on
4435 \file{color.sty} for setting color\footnote{Except for certain hard
4436 wired settings in double lines and stroked arrows.}. But to keep
4437 the best of the old methods, we have defined all the named colors that
4438 were defined in the old version, together with a few extra ones. We
4439 have also defined color-setting commands in the style of
4440 \file{colordvi.sty}, but they now apply uniformly to both text and
4441 axodraw graphical objects, and they respect \TeX{} and \LaTeX{}
4442 grouping and environments.
4443
4444 This results in some changes in behavior in certain situations. We
4445 think the new behavior is more natural from the user's point of view;
4446 but it is a change.
4447
4448 There are two classes of graphics-drawing command in axodraw. One
4449 class has no explicit color argument, and uses the currently set
4450 color; the line-drawing commands are typical of these. Other commands
4451 have explicit color arguments, and these arguments are named colors.
4452 The named colors are a union of those axodraw defines, with those
4453 defined by \file{color.sty} together with any further ones defined
4454 by the user.
4455
4456 \subsubsection{How to use colors}
4457
4458 Axodraw works with named colors --- see Sec.\ \ref{sec:defined.colors}
4459 --- which are a standard set of 68 originally defined by the \program{dvips}
4460 program and the \file{colordvi.sty}, plus 5 extra colors defined in
4461 axodraw2. (In addition there are several named colors that are
4462 normally defined by default by \file{color.sty}, and that can also
4463 be used.)
4464
4465 To use them we have several possibilities to specify colors. Which to
4466 use is mostly a matter of user preference or convenience.
4467 \begin{itemize}
4468
4469 \item The axodraw command \verb+\SetColor{colorname}+: sets the color
4470 to be the named color for everything until the end of the current
4471 environment (or \TeX{} group, as relevant.) The initial default
4472 color is Black, of course. An example:
4473 \begin{center}
4474 \begin{minipage}{4cm}
4475 \SetColor{Red}
4476 Now red is used:\\
4477 \begin{axopicture}(0,40)
4478 \Line(0,10)(40,30)
4479 \end{axopicture}
4480 \end{minipage}
4481 \begin{minipage}{7cm}
4482 \label{SetColor}
4483 \begin{verbatim}
4484 \SetColor{Red}
4485 Now red is used:\\
4486 \begin{axopicture}(0,40)
4487 \Line(0,10)(40,30)
4488 \end{axopicture}
4489 \end{verbatim}
4490 \end{minipage}
4491 \end{center}
4492
4493 \item Completely equivalently, one can use the command
4494 \verb+\color{colorname}+ defined by the standard \file{color.sty}
4495 package, with any of its options, e.g., \verb+\color{Red}+ or
4496 \verb+\color[rgb]{1,0,0}+. In fact \verb+\SetColor+ is now a
4497 synonym for \verb+\color+, retained for backward compatibility.
4498
4499 \item The named colors defined by axodraw2 are listed in Sec.\
4500 \ref{sec:defined.colors}. Extra ones can be defined by axodraw2's
4501 \verb+\newcolor+ command.
4502
4503 \item For each of the named colors defined by axodraw2 (and others
4504 defined by the use of the \verb+\newcolor+ command), there is a
4505 macro whose name is ``text'' followed by the color name, e.g.,
4506 \verb+\textMagenta+. This behaves just like the corresponding call
4507 to \verb+\SetColor+ or \verb+\color+. Thus we have
4508 \begin{center}
4509 \begin{minipage}{4cm}
4510 \textMagenta
4511 Now magenta is used: \hfill \\
4512 \begin{axopicture}(0,40)
4513 \Line(0,10)(40,30)
4514 \end{axopicture}
4515 \end{minipage}
4516 \begin{minipage}{7cm}
4517 \label{textName}
4518 \begin{verbatim}
4519 \textMagenta
4520 Now magenta is used:\\
4521 \begin{axopicture}(0,40)
4522 \Line(0,10)(40,30)
4523 \end{axopicture}
4524 \end{verbatim}
4525 \end{minipage}
4526 \end{center}
4527 These macros correspond to macros defined by the venerable
4528 \file{colordvi.sty} package, but now have what is normally an advantage
4529 that their scope is delimited by the enclosing environment.
4530 \begin{center}
4531 \begin{minipage}{5cm}
4532 Normal text, then
4533 \begin{center}
4534 \Large \bf \color{Blue}
4535 Large, bold blue\\
4536 \begin{axopicture}(40,20)
4537 \Gluon(0,10)(40,10){4}{4}
4538 \end{axopicture}\\
4539 \end{center}
4540 And normal text afterward.
4541 \end{minipage}
4542 \begin{minipage}{7.7cm}
4543 \label{scope}
4544 \begin{verbatim}
4545 Normal text, then
4546 \begin{center}
4547 \Large \bf \color{Blue}
4548 Large, bold blue
4549 \begin{axopicture}(40,20)
4550 \Gluon(0,10)(40,10){4}{4}
4551 \end{axopicture}\\
4552 \end{center}
4553 And normal text afterward.
4554 \end{verbatim}
4555 \end{minipage}
4556 \end{center}
4557
4558 \item A delimited section of text can be set in a color by using a
4559 macro named by the color (e.g., $\verb+\Red+$):
4560 \begin{center}
4561 \begin{minipage}{6cm}
4562 In the middle of black text,
4563 \textcolor{Red}{red text and
4564 \begin{axopicture}(30,10)
4565 \Gluon(0,5)(30,5){3}{4}
4566 \end{axopicture}\
4567 gluon%
4568 }.
4569 Then continue \dots
4570 \end{minipage}
4571 \begin{minipage}{7.3cm}
4572 \label{Red}
4573 \begin{verbatim}
4574 In the middle of black text,
4575 \Red{red text and
4576 \begin{axopicture}(30,10)
4577 \Gluon(0,5)(30,5){3}{4}
4578 \end{axopicture}\
4579 gluon%
4580 }.
4581 Then continue \dots
4582 \end{verbatim}
4583 \end{minipage}
4584 \end{center}
4585 These macros correspond to macros defined by the \file{colordvi.sty}
4586 package, but they now apply to axodraw objects as well.
4587
4588 \item The same effect, for named colors, can be achieved by
4589 \file{color.sty}'s \verb+\textcolor+ macro. Thus
4590 \verb+\textcolor{Red}{...}+ is equivalent to \verb+\Red{...}+.
4591
4592 \end{itemize}
4593
4594 It is also possible to define new named colors, in the CMYK
4595 system. This means that each color is defined by four numbers. New
4596 colors can be introduced with the \verb:\newcolor{#1}{#2}: command as
4597 in \verb:\newcolor{LightRed}{0 0.75 0.7 0}:. This use of this command
4598 defines a named color for use in axodraw, with corresponding macros
4599 \verb:\LightRed: and \verb:\textLightRed{#1}:, and also makes the name
4600 known to \file{color.sty}. (Use of \file{color.sty}'s
4601 \verb:\definecolor: macro is not supported here: it will affect only
4602 normal \LaTeX{} text, but not axodraw objects, and it will fail to
4603 define the extra macros.)
4604
4605 We define the CMYK values for the named colors in the
4606 \file{axodraw2.sty} file. These override the definitions provided
4607 by \file{color.sty} (in its file dvipsnam.def), which are the same
4608 (at least currently).
4609
4610 There can be differences in how colors render on different devices.
4611 In principle, there should be compensations made by the driver to
4612 compensate for individual device properties. Our experience is however
4613 that such compensations are not always implemented well enough. Most
4614 notorious are differences between the shades of green on the screen,
4615 on projectors, and on output from a printer. These colors are usually
4616 much too light on a projector and one way to correct this is to
4617 redefine those colors when the output is prepared for a projector,
4618 e.g., by use of axodraw's \verb:\newcolor{#1}{#2}: macro. An example
4619 is illustrated by
4620 \begin{center}
4621 \color{green}
4622 \begin{axopicture}(100,20)
4623 \Text(25,15){color.sty's green}
4624 \Line[width=2](0,0)(50,0)
4625 \end{axopicture}
4626 %
4627 \color{Green}
4628 \begin{axopicture}(100,20)
4629 \Text(25,15){axodraw's Green}
4630 \Line[width=2](0,0)(50,0)
4631 \end{axopicture}
4632 \end{center}
4633 coded by
4634 \begin{verbatim}
4635 \color{green}
4636 \begin{axopicture}(100,20)
4637 \Text(25,15){color.sty's green}
4638 \Line[width=2](0,0)(50,0)
4639 \end{axopicture}
4640 %
4641 \color{Green}
4642 \begin{axopicture}(100,20)
4643 \Text(25,15){axodraw's Green}
4644 \Line[width=2](0,0)(50,0)
4645 \end{axopicture}
4646 \end{verbatim}
4647 On a typical screen or projector, we find that the two greens are
4648 quite distinct, the ``green'' being much lighter than the
4649 ``Green''\footnote{The ``green'' is defined in the RGB scheme from the
4650 values $(0,1,0)$, while ``Green'' is defined in the CMYK scheme from
4651 the values $(1,0,1,0)$.}. But on the paper output from our
4652 printers, they give close results.
4653
4654
4655
4656 \subsubsection{Defined named colors}
4657 \label{sec:defined.colors}
4658
4659 The first set of predefined colors are those defined by dvips (and
4660 defined in \file{colordvi.sty}, or in \file{color.sty} with the
4661 use of both of its usenames and dvipsnames options). They are
4662 \begin{quote}
4663 \sloppy
4664 \GreenYellow{GreenYellow},
4665 \Yellow{Yellow},
4666 \Goldenrod{Goldenrod},
4667 \Dandelion{Dandelion},
4668 \Apricot{Apricot},
4669 \Peach{Peach},
4670 \Melon{Melon},
4671 \YellowOrange{YellowOrange},
4672 \Orange{Orange},
4673 \BurntOrange{BurntOrange},
4674 \Bittersweet{Bittersweet},
4675 \RedOrange{RedOrange},
4676 \Mahogany{Mahogany},
4677 \Maroon{Maroon},
4678 \BrickRed{BrickRed},
4679 \Red{Red},
4680 \OrangeRed{OrangeRed},
4681 \RubineRed{RubineRed},
4682 \WildStrawberry{WildStrawberry},
4683 \Salmon{Salmon},
4684 \CarnationPink{CarnationPink},
4685 \Magenta{Magenta},
4686 \VioletRed{VioletRed},
4687 \Rhodamine{Rhodamine},
4688 \Mulberry{Mulberry},
4689 \RedViolet{RedViolet},
4690 \Fuchsia{Fuchsia},
4691 \Lavender{Lavender},
4692 \Thistle{Thistle},
4693 \Orchid{Orchid},
4694 \DarkOrchid{DarkOrchid},
4695 \Purple{Purple},
4696 \Plum{Plum},
4697 \Violet{Violet},
4698 \RoyalPurple{RoyalPurple},
4699 \BlueViolet{BlueViolet},
4700 \Periwinkle{Periwinkle},
4701 \CadetBlue{CadetBlue},
4702 \CornflowerBlue{CornflowerBlue},
4703 \MidnightBlue{MidnightBlue},
4704 \NavyBlue{NavyBlue},
4705 \RoyalBlue{RoyalBlue},
4706 \Blue{Blue},
4707 \Cerulean{Cerulean},
4708 \Cyan{Cyan},
4709 \ProcessBlue{ProcessBlue},
4710 \SkyBlue{SkyBlue},
4711 \Turquoise{Turquoise},
4712 \TealBlue{TealBlue},
4713 \Aquamarine{Aquamarine},
4714 \BlueGreen{BlueGreen},
4715 \Emerald{Emerald},
4716 \JungleGreen{JungleGreen},
4717 \SeaGreen{SeaGreen},
4718 \Green{Green},
4719 \ForestGreen{ForestGreen},
4720 \PineGreen{PineGreen},
4721 \LimeGreen{LimeGreen},
4722 \YellowGreen{YellowGreen},
4723 \SpringGreen{SpringGreen},
4724 \OliveGreen{OliveGreen},
4725 \RawSienna{RawSienna},
4726 \Sepia{Sepia},
4727 \Brown{Brown},
4728 \Tan{Tan},
4729 \Gray{Gray},
4730 \Black{Black},
4731 White.
4732 \end{quote}
4733 In addition \file{axodraw2.sty} defines the following extra colors:
4734 \begin{quote}
4735 \LightYellow{LightYellow},
4736 \LightRed{LightRed},
4737 \LightBlue{LightBlue},
4738 \LightGray{LightGray},
4739 \VeryLightBlue{VeryLightBlue}.
4740 \end{quote}
4741
4742 Note that \file{color.sty} by default also defines a set of other
4743 named colors: black, white, red, green, blue, cyan, magenta, and
4744 yellow (with purely lower-case names). Depending on properties of
4745 your screen, projector or printer, these may or may not agree with the
4746 similarly named axodraw colors (which have capitalized names). These
4747 names can also be used in the \verb+\SetColor+ and \verb+\color+
4748 commands and for color names to those axodraw commands that take named
4749 colors for arguments.
4750
4751
4752 %\subsection{Background issues on color}
4753 %\label{sec:color.issues}
4754
4755
4756
4757
4758 %>>#] Colors :
4759 %>>#[ Some examples :
4760
4761 \section{Some examples}
4762 \label{sec:examples}
4763
4764 \subsection{A Feynman diagram}
4765
4766 When computing the singlet part of structure functions in polarized Deep
4767 Inelastic Scattering one approach is to use spin two currents to determine
4768 all anomalous dimensions. At the three loop level this can give diagrams
4769 like the following:
4770 \begin{center}
4771 \begin{axopicture}{(200,140)(0,0)}
4772 \SetArrowStroke{0.5}
4773 \SetArrowScale{0.8}
4774 \Photon(7,70)(37,70){4}{3}
4775 \Photon(7,70)(37,70){-4}{3}
4776 \GluonArc(70,70)(30,90,270){3}{10}
4777 \Line[arrow](100,100)(70,100)
4778 \Line[arrow](130,100)(100,100)
4779 \Line[arrow,arrowpos=0.25](70,100)(130,40)
4780 \Line[arrow](100,40)(70,40)
4781 \Line[arrow](130,40)(100,40)
4782 \Line[arrow,arrowpos=0.75](70,40)(130,100)
4783 \GluonArc(130,70)(30,270,450){3}{10}
4784 \Photon(163,70)(193,70){4}{3}
4785 \Photon(163,70)(193,70){-4}{3}
4786 \Gluon(100,100)(100,130){3}{4}
4787 \Gluon(100,40)(100,10){3}{4}
4788 \Vertex(37,70){2}
4789 \Vertex(163,70){2}
4790 \Vertex(70,100){2}
4791 \Vertex(70,40){2}
4792 \Vertex(130,100){2}
4793 \Vertex(130,40){2}
4794 \Vertex(100,100){2}
4795 \Vertex(100,40){2}
4796 \end{axopicture}
4797 \end{center}
4798 for which the code is:
4799 \begin{verbatim}
4800 \begin{center} \begin{axopicture}{(200,140)(0,0)}
4801 \SetArrowStroke{0.5} \SetArrowScale{0.8}
4802 \Photon(7,70)(37,70){4}{3}
4803 \Photon(7,70)(37,70){-4}{3}
4804 \GluonArc(70,70)(30,90,270){3}{10}
4805 \Line[arrow](100,100)(70,100) \Line[arrow](130,100)(100,100)
4806 \Line[arrow,arrowpos=0.25](70,100)(130,40)
4807 \Line[arrow](100,40)(70,40) \Line[arrow](130,40)(100,40)
4808 \Line[arrow,arrowpos=0.75](70,40)(130,100)
4809 \GluonArc(130,70)(30,270,450){3}{10}
4810 \Photon(163,70)(193,70){4}{3}
4811 \Photon(163,70)(193,70){-4}{3}
4812 \Gluon(100,100)(100,130){3}{4}
4813 \Gluon(100,40)(100,10){3}{4}
4814 \Vertex(37,70){2} \Vertex(163,70){2} \Vertex(70,100){2}
4815 \Vertex(70,40){2} \Vertex(130,100){2} \Vertex(130,40){2}
4816 \Vertex(100,100){2} \Vertex(100,40){2}
4817 \end{axopicture} \end{center}
4818 \end{verbatim}
4819 The diagrams can become a bit more complicated when more lines meet in a
4820 single vertex. One could compose some lines from straight lines and arcs,
4821 but in this case we selected some B\'ezier curves. The result is
4822 \begin{center}
4823 \begin{axopicture}{(200,140)(0,0)}
4824 \SetArrowStroke{0.5}
4825 \SetArrowScale{0.8}
4826 \Photon(7,70)(40,70){4}{3}
4827 \Photon(7,70)(40,70){-4}{3}
4828 \GluonArc(70,70)(30,180,270){3}{5}
4829 \Bezier[arrow](100,100)(55,100)(40,95)(40,70)
4830 \Line[arrow](130,100)(100,100)
4831 \Bezier[arrow,arrowpos=0.37](40,70)(110,70)(130,70)(130,40)
4832 \Line[arrow](100,40)(70,40)
4833 \Line[arrow](130,40)(100,40)
4834 \Line[arrow,arrowpos=0.75](70,40)(130,100)
4835 \GluonArc(130,70)(30,270,450){3}{10}
4836 \Photon(163,70)(193,70){4}{3}
4837 \Photon(163,70)(193,70){-4}{3}
4838 \Gluon(100,100)(100,130){3}{4}
4839 \Gluon(100,40)(100,10){3}{4}
4840 \Vertex(40,70){2}
4841 \Vertex(163,70){2}
4842 \Vertex(70,40){2}
4843 \Vertex(130,100){2}
4844 \Vertex(130,40){2}
4845 \Vertex(100,100){2}
4846 \Vertex(100,40){2}
4847 \end{axopicture}
4848 \end{center}
4849 for which the code is:
4850 \begin{verbatim}
4851 \begin{center}
4852 \begin{axopicture}{(200,140)(0,0)}
4853 \SetArrowStroke{0.5} \SetArrowScale{0.8}
4854 \Photon(7,70)(40,70){4}{3}
4855 \Photon(7,70)(40,70){-4}{3}
4856 \GluonArc(70,70)(30,180,270){3}{5}
4857 \Bezier[arrow](100,100)(55,100)(40,95)(40,70)
4858 \Line[arrow](130,100)(100,100)
4859 \Bezier[arrow,arrowpos=0.37](40,70)(100,70)(130,70)(130,40)
4860 \Line[arrow](100,40)(70,40) \Line[arrow](130,40)(100,40)
4861 \Line[arrow,arrowpos=0.75](70,40)(130,100)
4862 \GluonArc(130,70)(30,270,450){3}{10}
4863 \Photon(163,70)(193,70){4}{3}
4864 \Photon(163,70)(193,70){-4}{3}
4865 \Gluon(100,100)(100,130){3}{4} \Gluon(100,40)(100,10){3}{4}
4866 \Vertex(40,70){2} \Vertex(163,70){2} \Vertex(70,40){2}
4867 \Vertex(130,100){2} \Vertex(130,40){2} \Vertex(100,100){2}
4868 \Vertex(100,40){2}
4869 \end{axopicture}
4870 \end{center}
4871 \end{verbatim}
4872
4873 %\subsection{A flowchart}
4874
4875 %\subsection{A histogram}
4876
4877 \subsection{A diagrammatic equation}
4878
4879 This example is from ref~\cite{twopap}. The equations in that paper were
4880 rather untransparent, because each Feynman diagram represents a complicated
4881 two loop integral and to solve these integrals one needed many different
4882 recursion relations in terms of the powers of the propagators. We defined a
4883 number of macro's for the diagrams, each containing one picture. Here are
4884 three of them:
4885
4886 \begin{verbatim}
4887 \def\TAA(#1,#2,#3,#4,#5,#6){
4888 \raisebox{-19.1pt}{ \hspace{-12pt}
4889 \begin{axopicture}{(50,39)(0,-4)}
4890 \SetScale{0.5}\SetColor{Blue}%
4891 \CArc(40,35)(25,90,270) \CArc(60,35)(25,270,90)
4892 \Line(40,60)(60,60) \Line(40,10)(60,10) \Line(50,10)(50,60)
4893 \Line(0,35)(15,35) \Line(85,35)(100,35)
4894 \SetColor{Black}\SetPFont{Helvetica}{14}%
4895 \PText(55,39)(0)[lb]{#5} \PText(55,36)(0)[lt]{#6}
4896 \PText(35,62)(0)[rb]{#1} \PText(65,62)(0)[lb]{#2}
4897 \PText(65,8)(0)[lt]{#3} \PText(35,8)(0)[rt]{#4}
4898 \SetColor{Red} \SetWidth{3}
4899 \Line(50,35)(50,60) \Line(40,60)(50,60)
4900 \CArc(40,35)(25,90,180) \Vertex(50,60){1.3}
4901 \end{axopicture}
4902 \hspace{-12pt}
4903 }
4904 }
4905 \end{verbatim}
4906 \def\TAA(#1,#2,#3,#4,#5,#6){
4907 \raisebox{-18.1pt}{ \hspace{-12pt}
4908 \begin{axopicture}{(50,39)(0,-4)}
4909 \SetScale{0.5}\SetColor{Blue}%
4910 \CArc(40,35)(25,90,270) \CArc(60,35)(25,270,90)
4911 \Line(40,60)(60,60) \Line(40,10)(60,10) \Line(50,10)(50,60)
4912 \Line(0,35)(15,35) \Line(85,35)(100,35)
4913 \SetColor{Black}\SetPFont{Helvetica}{14}%
4914 \PText(55,39)(0)[lb]{#5} \PText(55,36)(0)[lt]{#6}
4915 \PText(35,62)(0)[rb]{#1} \PText(65,62)(0)[lb]{#2}
4916 \PText(65,8)(0)[lt]{#3} \PText(35,8)(0)[rt]{#4}
4917 \SetColor{Red} \SetWidth{3}
4918 \Line(50,35)(50,60) \Line(40,60)(50,60)
4919 \CArc(40,35)(25,90,180) \Vertex(50,60){1.3}
4920 \end{axopicture}
4921 \hspace{-12pt}
4922 }
4923 }
4924 \begin{verbatim}
4925 \def\TABs(#1,#2,#3,#4,#5){
4926 \raisebox{-18.1pt}{ \hspace{-12pt}
4927 \begin{axopicture}{(50,39)(0,-4)}
4928 \SetScale{0.5}\SetColor{Blue}%
4929 \CArc(40,35)(25,90,270) \CArc(60,35)(25,270,90)
4930 \Line(40,60)(60,60) \Line(40,10)(60,10) \Line(50,10)(50,60)
4931 \Line(0,35)(15,35) \Line(85,35)(100,35)
4932 \SetColor{Black}\SetPFont{Helvetica}{14}%
4933 \PText(55,38)(0)[l]{#5}
4934 \PText(35,62)(0)[rb]{#1} \PText(65,62)(0)[lb]{#2}
4935 \PText(65,8)(0)[lt]{#3} \PText(35,8)(0)[rt]{#4}
4936 \SetColor{Red} \SetWidth{3}
4937 \Line(50,10)(50,60) \Vertex(50,60){1.3}
4938 \Line(40,60)(50,60) \CArc(40,35)(25,90,180)
4939 \end{axopicture}
4940 \hspace{-12pt}
4941 }
4942 }
4943 \end{verbatim}
4944 \def\TABs(#1,#2,#3,#4,#5){
4945 \raisebox{-18.1pt}{ \hspace{-12pt}
4946 \begin{axopicture}{(50,39)(0,-4)}
4947 \SetScale{0.5}\SetColor{Blue}%
4948 \CArc(40,35)(25,90,270) \CArc(60,35)(25,270,90)
4949 \Line(40,60)(60,60) \Line(40,10)(60,10) \Line(50,10)(50,60)
4950 \Line(0,35)(15,35) \Line(85,35)(100,35)
4951 \SetColor{Black}\SetPFont{Helvetica}{14}%
4952 \PText(55,38)(0)[l]{#5}
4953 \PText(35,62)(0)[rb]{#1} \PText(65,62)(0)[lb]{#2}
4954 \PText(65,8)(0)[lt]{#3} \PText(35,8)(0)[rt]{#4}
4955 \SetColor{Red} \SetWidth{3}
4956 \Line(50,10)(50,60) \Vertex(50,60){1.3}
4957 \Line(40,60)(50,60) \CArc(40,35)(25,90,180)
4958 \end{axopicture}
4959 \hspace{-12pt}
4960 }
4961 }
4962 \begin{verbatim}
4963 \def\TACs(#1,#2,#3,#4,#5){
4964 \raisebox{-19.1pt}{ \hspace{-12pt}
4965 \begin{axopicture}{(50,39)(0,-4)}
4966 \SetScale{0.5}\SetColor{Blue}%
4967 \CArc(40,35)(25,90,270) \CArc(60,35)(25,270,90)
4968 \Line(40,60)(60,60) \Line(40,10)(60,10) \Line(50,10)(50,60)
4969 \Line(0,35)(15,35) \Line(85,35)(100,35)
4970 \SetColor{Black}\SetPFont{Helvetica}{14}%
4971 \PText(53,38)(0)[l]{#5}
4972 \PText(35,62)(0)[rb]{#1} \PText(65,62)(0)[lb]{#2}
4973 \PText(65,8)(0)[lt]{#3} \PText(35,8)(0)[rt]{#4}
4974 \SetColor{Red} \SetWidth{3}
4975 \Line(40,60)(50,60) \CArc(40,35)(25,90,180)
4976 \end{axopicture}
4977 \hspace{-12pt}
4978 }
4979 }
4980 \end{verbatim}
4981 \def\TACs(#1,#2,#3,#4,#5){
4982 \raisebox{-19.1pt}{ \hspace{-12pt}
4983 \begin{axopicture}{(50,39)(0,-4)}
4984 \SetScale{0.5}\SetColor{Blue}%
4985 \CArc(40,35)(25,90,270) \CArc(60,35)(25,270,90)
4986 \Line(40,60)(60,60) \Line(40,10)(60,10) \Line(50,10)(50,60)
4987 \Line(0,35)(15,35) \Line(85,35)(100,35)
4988 \SetColor{Black}\SetPFont{Helvetica}{14}%
4989 \PText(53,38)(0)[l]{#5}
4990 \PText(35,62)(0)[rb]{#1} \PText(65,62)(0)[lb]{#2}
4991 \PText(65,8)(0)[lt]{#3} \PText(35,8)(0)[rt]{#4}
4992 \SetColor{Red} \SetWidth{3}
4993 \Line(40,60)(50,60) \CArc(40,35)(25,90,180)
4994 \end{axopicture}
4995 \hspace{-12pt}
4996 }
4997 }
4998 and together with two extra little macro's
4999 \begin{verbatim}
5000 \def\plus{\!+\!}
5001 \def\minus{\!-\!}
5002 \end{verbatim}
5003 \def\plus{\!+\!}
5004 \def\minus{\!-\!}
5005 the equations became rather transparent and easy to program. This is the
5006 code
5007 \begin{verbatim}
5008 \begin{eqnarray}
5009 \TAA({n,m},1,1,1,1,1) & = & \frac{1}{\tilde{N}\plus 5\plus n\minus
5010 m\minus D}\ (\ n\ \ \TAA({n+1,m},0,1,1,1,1)
5011 \ \ -n\ \ \TACs({n+1,m},1,1,1,1) \\ & &
5012 +\ \ \TAA({n,m},1,0,2,1,1)
5013 \ \ -\ \ \TABs({n,m},1,1,2,1)
5014 \ \ +m\ \ \TACs({n,m-1},1,1,1,1)
5015 \ \ -m\ \ \TABs({n,m-1},1,1,1,1)\ \ \ ) \, .\nonumber
5016 \end{eqnarray}
5017 \end{verbatim}
5018 and the equation becomes
5019 \begin{eqnarray}
5020 \TAA({n,m},1,1,1,1,1) & = & \frac{1}{\tilde{N}\plus 5\plus n\minus
5021 m\minus D}\ (\ n\ \ \TAA({n+1,m},0,1,1,1,1)
5022 \ \ -n\ \ \TACs({n+1,m},1,1,1,1) \\ & &
5023 +\ \ \TAA({n,m},1,0,2,1,1)
5024 \ \ -\ \ \TABs({n,m},1,1,2,1)
5025 \ \ +m\ \ \TACs({n,m-1},1,1,1,1)
5026 \ \ -m\ \ \TABs({n,m-1},1,1,1,1)\ \ \ ) \, .\nonumber
5027 \end{eqnarray}
5028 The diagrams are actually four-point diagrams. A momentum $P$ flows through
5029 the diagram (the fat red line), but because the method of computation
5030 involves an expansion in terms of this momentum the remaining diagrams are
5031 like two-point functions. Details are in the paper.
5032
5033 %>>#] Some examples :
5034 %>>#[ Acknowledgements :
5035
5036 \section*{Acknowledgements}
5037
5038 JAMV's work is part of the research program of the ``Stichting voor
5039 Fundamenteel Onderzoek der Materie (FOM)'', which is financially supported
5040 by the ``Nederlandse organisatie voor Wetenschappelijke Onderzoek (NWO)'' and
5041 is also supported by the ERC Advanced Grant no.~320651, HEPGAME.
5042 JCC is supported in part by the U.S. Department of Energy under Grant
5043 No.\ DE-SC0008745.
5044
5045 We like to thank Lucas Theussl for discussions during the development of
5046 axodraw2.
5047
5048 %>>#] Acknowledgements :
5049 %--#[ Appendix :
5050
5051 \appendix
5052
5053 \section{The \program{axohelp} program: Information for developers}
5054 \label{sec:axohelp.devel}
5055
5056 This appendix provides some details on how the \program{axohelp} program works.
5057 Most of the information is only relevant to people who wish to modify
5058 or extend axodraw2 and therefore may need to modify \program{axohelp} as well.
5059
5060 The reason for \program{axohelp}'s existence is that axodraw needs to perform
5061 substantial geometric calculations. When axodraw is used with
5062 pdflatex to produce pdf output directly, suitable calculational
5063 facilities are not available, neither within the PDF language nor
5064 within \LaTeX{} itself. Therefore when axodraw is used under
5065 pdflatex, we use our program \program{axohelp} to perform the calculations.
5066
5067 The mode of operation is as follows. Let us assume that the
5068 \file{.tex} file being compiled by the \program{pdflatex} program is
5069 called \file{paper.tex}. When one issues the command
5070 \begin{verbatim}
5071 pdflatex paper
5072 \end{verbatim}
5073 the reaction of the system is of course to translate all \TeX{}
5074 related objects into a PDF file. Most (but not all) axodraw objects
5075 need non-trivial calculations and hence their specifications are
5076 placed inside a file called \file{paper.ax1}. At the end of the
5077 processing \program{pdflatex} will place a message on the screen that
5078 mentions that the user should run the command
5079 \begin{verbatim}
5080 axohelp paper
5081 \end{verbatim}
5082 for the processing of this graphical information. In principle it is
5083 possible to arrange for \program{axohelp} to be invoked automatically from
5084 within pdflatex. But for this to be done, the running of general
5085 external commands from pdflatex would have to be enabled. That is a
5086 security risk, and is therefore normally disabled by default for
5087 pdflatex.
5088
5089 When run, \program{axohelp} reads the file \file{paper.ax1}, processes the
5090 contents, and produces a file \file{paper.ax2}. For each axodraw
5091 object, it contains both the code to be placed in the pdf file, and a
5092 copy of the corresponding specification that was in \file{paper.ax1}.
5093
5094 When pdflatex is run again, it sees that the file \file{paper.ax2} is
5095 present and reads it in to give essentially an array of objects, one
5096 for each processed axodraw object. Then during the processing of the
5097 document, whenever axodraw runs into an axodraw object in need of
5098 external calculation, it determines whether an exactly corresponding
5099 specification was present in the file \file{paper.ax2}. If not, it
5100 means that the graphical information in the file \file{paper.tex} has
5101 changed since the last run of \program{axohelp} and the graphics information is
5102 invalidated. In that case, at the end of the program the message to
5103 run \program{axohelp} will be printed again. But if instead there is an exact
5104 match between an axodraw object in the current \file{paper.tex} and
5105 its specification in \file{paper.ax2}, then the corresponding pdf code
5106 will be placed in the PDF file. If all axodraw commands have a proper
5107 match in the \file{paper.ax2} file, there will be no message in the
5108 paper.log file and on the screen about rerunning \program{axohelp}; then the PDF
5109 file should contain the correct information for drawing the axodraw
5110 objects (at least if there are no \TeX{} errors).
5111
5112 In a sense the situation with \program{axohelp} is no different from the use of
5113 makeindex when one prepares a document that contains an index. In that
5114 case one also has to run \LaTeX{} once to prepare a file for the
5115 makeindex program, then run this program which prepares another file
5116 and finally run \LaTeX{} again. Note that if you submit a paper to
5117 arXiv.org, it is likely that their automated system for processing the
5118 file will not run \program{axohelp}. So together with \file{paper.tex}, you one
5119 should also submit the \file{.ax2} file.
5120
5121 The complete source of the \program{axohelp} program can be found in the file
5122 \file{axohelp.c}. This file contains a bit less than 4000 lines of C
5123 code but should translate without problems with any C compiler --- see
5124 Sec.\ \ref{sec:axohelp} for an appropriate command line on typical
5125 Unix-like systems.
5126
5127 The \program{axohelp} program functions as follows:
5128 \begin{enumerate}
5129 \item The \file{.ax1} file is located, space is allocated for it and
5130 the complete file is read and closed again.
5131 \item The input is analysed and split in individual object
5132 specifications, of which a list is made.
5133 \item The list of object specifications is processed one by
5134 one. Before the processing of each object specification, the system
5135 is brought to a default state to avoid that there is a memory of the
5136 previous object.
5137 \item In the \file{.ax2} file, for each object is written both the
5138 corresponding pdf code and a copy of the specification of the object
5139 as was earlier read from the \file{.ax1} file. Before the output
5140 for an object is written to the \file{.ax2} file it is optimized a
5141 bit to avoid superfluous spaces and linefeeds.
5142 \end{enumerate}
5143
5144 Processing an object from the input involves finding the proper routine for
5145 it and testing that the number of parameters is correct. Some objects have
5146 a special input (like the Curve, DashCurve, Polygon and FilledPolygon
5147 commands). All relevant information is stored in an array of double
5148 precision numbers. Then some generic action is taken (like setting the
5149 linewidth and the color) and the right routine is
5150 called. The output is written to an array of fixed (rather large) length.
5151 Finally the array is optimized and written to file.
5152
5153 A user who would like to extend the system with new objects should
5154 take the above structure into account. There is an array that gives
5155 the correspondence between axodraw object names and the corresponding
5156 routine in \program{axohelp}. For each object, this array also gives the number
5157 of parameters and whether the stroking or non-stroking color space
5158 should be used.
5159
5160 Naturally, when adding new kinds of object, it is necessary to add new
5161 items to the just-mentioned array, and to add a corresponding
5162 subroutine. One should also try to do all the writing of PDF code by
5163 means of some routines like the ones sitting in the file in the
5164 section named ``PDF utilities''. This is important from the viewpoint
5165 of future action. When new graphical languages will be introduced and
5166 it will be needed to modify axodraw2 such that it can produce code for
5167 those languages, it should be much easier if code in the supporting
5168 \program{axohelp} program needs to be changed in as few places as possible.
5169 They form a set of graphics primitives used by other subroutines.
5170 Some of these subroutines in the ``PDF utilities'' section of
5171 \file{axohelp.c} have names similar to operators in the postscript
5172 language that perform the same function.
5173
5174 %--#] Appendix :
5175 %>>#[ bibliography :
5176
5177 \begin{thebibliography}{9}
5178
5179 \bibitem{axodraw1} J.A.M. Vermaseren,
5180 Comput.\ Phys.\ Commun.\ {\bf 83} (1994) 45--58
5181
5182 \bibitem{jaxodraw1} D. Binosi and L. Theussl,
5183 Comput.\ Phys.\ Commun.\ {\bf 161} (2004) 76--86.
5184
5185 \bibitem{jaxodraw2}
5186 D. Binosi, J. Collins, C. Kaufhold, L. Theussl,
5187 Comput.\ Phys.\ Commun.\ {\bf 180} (2009) 1709--1715
5188
5189 \bibitem{GPL} GNU General Public
5190 License. \url{http://www.gnu.org/copyleft/gpl.html}.
5191
5192 \bibitem{qcdbook}
5193 J.C. Collins, ``Foundations of Perturbative QCD'' (Cambridge
5194 University Press, 2011).
5195
5196 \bibitem{twopap} S. Moch and J.A.M. Vermaseren,
5197 Nucl.\ Phys.\ {\bf B573} (2000) 853.
5198 %%CITATION = NUPHA,B573,853;%%.
5199
5200 \end{thebibliography}
5201
5202 %>>#] bibliography :
5203 \end{document}
5204