Debian Codegraph @

texmf-dist/doc/latex/tikz-feynman/README.md

raw
1 [Ti*k*Z-Feynman](http://www.jpellis.me/projects/tikz-feynman) [![ctan.org](https://img.shields.io/ctan/v/tikz-feynman.svg)](https://ctan.org/pkg/tikz-feynman) [![Travis](https://img.shields.io/travis/JP-Ellis/tikz-feynman/master.svg)](https://travis-ci.org/JP-Ellis/tikz-feynman)
2 =============================================================
3
4 Ti*k*Z-Feynman is a LaTeX package allowing Feynman diagrams to be easily
5 generated within LaTeX with minimal user instructions and without the need of
6 external programs. It builds upon the Ti*k*Z package and leverages the graph
7 placement algorithms from Ti*k*Z in order to automate the placement of many
8 vertices. Ti*k*Z-Feynman still allows fine-tuned placement of vertices so that
9 even complex diagrams can still be generated with ease.
10
11 Ti*k*Z-Feynman is made available through the
12 [Comprehensive TeX Archive Network (CTAN)][ctan] and comes with some thorough
13 [documentation][documentation] containing a tutorial and many examples. Please
14 refer to the [project page][projectpage] for additional information.
15
16 Ti*k*Z-Feynman is open source and contribution are welcome. If you have any
17 suggestions, feature requests, or have found any bugs, feel free to create a new
18 issue or pull request on Github.
19
20 Below are a few example to demonstrate how easy diagram can be, and how
21 extensible it can be. Many more are given in the
22 [documentation][documentation]:
23
24 <p align="center"><img src="./images/qed.png" alt="QED Example" width=300px /></p>
25 ```latex
26 \feynmandiagram [horizontal=a to b] {
27 i1 -- [fermion] a -- [fermion] i2,
28 a -- [photon] b,
29 f1 -- [fermion] b -- [fermion] f2,
30 };
31 ```
32
33 <p align="center"><img src="./images/penguin.png" alt="Penguin Example" width=300px /></p>
34 ```latex
35 \feynmandiagram [large, vertical=e to f] {
36 a -- [fermion] b -- [photon, momentum=\(k\)] c -- [fermion] d,
37 b -- [fermion, momentum'=\(p_{1}\)] e -- [fermion, momentum'=\(p_{2}\)] c,
38 e -- [gluon] f,
39 h -- [fermion] f -- [fermion] i;
40 };
41 ```
42
43 <p align="center"><img src="./images/mixing.png" alt="Mixing Example" width=490px /></p>
44 ```latex
45 \begin{tikzpicture}
46 \begin{feynman}
47 \vertex (a1) {\(\overline b\)};
48 \vertex[right=1cm of a1] (a2);
49 \vertex[right=1cm of a2] (a3);
50 \vertex[right=1cm of a3] (a4) {\(b\)};
51 \vertex[right=1cm of a4] (a5);
52 \vertex[right=2cm of a5] (a6) {\(u\)};
53
54 \vertex[below=2em of a1] (b1) {\(d\)};
55 \vertex[right=1cm of b1] (b2);
56 \vertex[right=1cm of b2] (b3);
57 \vertex[right=1cm of b3] (b4) {\(\overline d\)};
58 \vertex[below=2em of a6] (b5) {\(\overline d\)};
59
60 \vertex[above=of a6] (c1) {\(\overline u\)};
61 \vertex[above=2em of c1] (c3) {\(d\)};
62 \vertex at ($(c1)!0.5!(c3) - (1cm, 0)$) (c2);
63
64 \diagram* {
65 {[edges=fermion]
66 (b1) -- (b2) -- (a2) -- (a1),
67 (b5) -- (b4) -- (b3) -- (a3) -- (a4) -- (a5) -- (a6),
68 },
69 (a2) -- [boson, edge label=\(W\)] (a3),
70 (b2) -- [boson, edge label'=\(W\)] (b3),
71
72 (c1) -- [fermion, out=180, in=-45] (c2) -- [fermion, out=45, in=180] (c3),
73 (a5) -- [boson, bend left, edge label=\(W^{-}\)] (c2),
74 };
75
76 \draw [decoration={brace}, decorate] (b1.south west) -- (a1.north west)
77 node [pos=0.5, left] {\(B^{0}\)};
78 \draw [decoration={brace}, decorate] (c3.north east) -- (c1.south east)
79 node [pos=0.5, right] {\(\pi^{-}\)};
80 \draw [decoration={brace}, decorate] (a6.north east) -- (b5.south east)
81 node [pos=0.5, right] {\(\pi^{+}\)};
82 \end{feynman}
83 \end{tikzpicture}
84 ```
85
86 [ctan]: https://ctan.org/pkg/tikz-feynman
87 [documentation]: http://www.jpellis.me/projects/tikz-feynman/tikz-feynman/tikz-feynman.pdf
88 [projectpage]: http://www.jpellis.me/projects/tikz-feynman
89
90
91 Licence
92 -------
93
94 Ti*k*Z-Feynman
95
96 Feynman Diagrams with Ti*k*Z
97
98 Copyright (C) 2016 Joshua Ellis
99
100
101 This *documentation* may be redistributed and/or modified under the terms of the
102 GNU General Public License as published by the Free Software Foundation, either
103 version 3 of the License, or (at your option) any later version.
104
105 The *code of this package* may be distributed and/or modified under the
106 conditions of the LaTeX Project Public License, either version 1.3 of this
107 license or (at your option) any later version.
108
109 This work has the LPPL maintenance status `maintained'.
110
111 The Current Maintainer of this work is Joshua Ellis.
112
113 This package is distributed in the hope that it will be useful, but WITHOUT ANY
114 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
115 PARTICULAR PURPOSE.