summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikz-feynhand
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-31 21:59:37 +0000
committerKarl Berry <karl@freefriends.org>2018-01-31 21:59:37 +0000
commit0daa4de8b4c05eed3f3870c9170cb8d4b49fecf7 (patch)
treeccbc669ebf0aaa6a5172e81164cf6d6c90fac3cb /Master/texmf-dist/tex/latex/tikz-feynhand
parent710cab79cc5138c63a0358c10c94a645cab65183 (diff)
tikz-feynhand (31jan18)
git-svn-id: svn://tug.org/texlive/trunk@46502 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikz-feynhand')
-rw-r--r--Master/texmf-dist/tex/latex/tikz-feynhand/tikz-feynhand.sty48
-rw-r--r--Master/texmf-dist/tex/latex/tikz-feynhand/tikzfeynhand.keys.code.tex907
-rw-r--r--Master/texmf-dist/tex/latex/tikz-feynhand/tikzlibraryfeynhand.code.tex266
3 files changed, 1221 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/tikz-feynhand/tikz-feynhand.sty b/Master/texmf-dist/tex/latex/tikz-feynhand/tikz-feynhand.sty
new file mode 100644
index 00000000000..f78d0886f96
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tikz-feynhand/tikz-feynhand.sty
@@ -0,0 +1,48 @@
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% TikZ-FeynHand, Version 1.0.0 of 2018/01/31
+% Feynhand Diagrams with TikZ (LaTex manual version)
+% Copyright (C) 2018 Max Dohse
+% Copyright (C) 2016 Joshua Ellis
+%
+%
+% This LaTeX file and the whole package are free:
+% you can redistribute it and/or modify it under the
+% terms of the GNU General Public License as published by the Free Software Foundation,
+% either version 3 of the License, or (at your option) any later version.
+%
+%
+% This file is a modification of the file tikz-feynman.sty
+% of the package tikz-feynman (version 1.1.0 of 2016/02/05)
+% which is available online at https://ctan.org/pkg/tikz-feynman
+% for a list of changes, see the file CHANGES.TXT
+%
+% available at https://ctan.org/pkg/tikz-feynhand
+% The Current Maintainer of this work is Max Dohse.
+%
+% This program is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+% FOR A PARTICULAR PURPOSE.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\tikzfeynhand@date{2018/01/31}
+\def\tikzfeynhand@version@major{1}
+\def\tikzfeynhand@version@minor{1}
+\def\tikzfeynhand@version@patch{0}
+\edef\tikzfeynhand@version{\tikzfeynhand@version@major.\tikzfeynhand@version@minor.\tikzfeynhand@version@patch}
+
+\ProvidesPackage{tikz-feynhand}[\tikzfeynhand@date v\tikzfeynhand@version Feynman diagrams with TikZ (LaTex manual version)]
+
+\RequirePackage{tikz}[2013/12/13] % v3.0.0
+\RequirePackage{pgfopts}
+
+\usetikzlibrary{feynhand}
+\usetikzlibrary{graphs}
+
+\endinput
+
+% Local Variables:
+% TeX-master: "tikz-feynhand"
+% End:
diff --git a/Master/texmf-dist/tex/latex/tikz-feynhand/tikzfeynhand.keys.code.tex b/Master/texmf-dist/tex/latex/tikz-feynhand/tikzfeynhand.keys.code.tex
new file mode 100644
index 00000000000..4e78722938b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tikz-feynhand/tikzfeynhand.keys.code.tex
@@ -0,0 +1,907 @@
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% TikZ-FeynHand, Version 1.0.0 of 2018/01/31
+% Feynhand Diagrams with TikZ (LaTex manual version)
+% Copyright (C) 2018 Max Dohse
+% Copyright (C) 2016 Joshua Ellis
+%
+%
+% This LaTeX file and the whole package are free:
+% you can redistribute it and/or modify it under the
+% terms of the GNU General Public License as published by the Free Software Foundation,
+% either version 3 of the License, or (at your option) any later version.
+%
+% This file is a modification of the file tikzfeynman.keys.code.tex
+% of the package tikz-feynman (version 1.1.0 of 2016/02/05)
+% which is available online at https://ctan.org/pkg/tikz-feynman
+% for a list of changes, see the file CHANGES.TXT
+%
+% available at https://ctan.org/pkg/tikz-feynhand
+% The Current Maintainer of this work is Max Dohse.
+%
+% This program is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+% FOR A PARTICULAR PURPOSE.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Lengths
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newlength{\feynhanddotsize}
+\setlength{\feynhanddotsize}{1.5mm}
+
+\newlength{\feynhandblobsize}
+\setlength{\feynhandblobsize}{7.5mm}
+
+\newlength{\feynhandlinesize}
+\setlength{\feynhandlinesize}{0.5pt}
+
+\newlength{\feynhandarrowsize}
+\setlength{\feynhandarrowsize}{6pt}
+
+\newlength{\feynhandtopsep}
+\setlength{\feynhandtopsep}{18\feynhandlinesize}
+
+%% Colors
+\newcommand{\feynhandtopsepcolor}{white}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Shapes
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Crossed Circle
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pgfdeclareshape{crossed circle}
+{
+ \inheritsavedanchors[from=circle]
+ \inheritanchorborder[from=circle]
+ \inheritanchor[from=circle]{north}
+ \inheritanchor[from=circle]{north west}
+ \inheritanchor[from=circle]{north east}
+ \inheritanchor[from=circle]{center}
+ \inheritanchor[from=circle]{west}
+ \inheritanchor[from=circle]{east}
+ \inheritanchor[from=circle]{mid}
+ \inheritanchor[from=circle]{mid west}
+ \inheritanchor[from=circle]{mid east}
+ \inheritanchor[from=circle]{base}
+ \inheritanchor[from=circle]{base west}
+ \inheritanchor[from=circle]{base east}
+ \inheritanchor[from=circle]{south}
+ \inheritanchor[from=circle]{south west}
+ \inheritanchor[from=circle]{south east}
+
+ \inheritbackgroundpath[from=circle]
+
+ \foregroundpath{
+ % Compute south west
+ \centerpoint
+ \pgf@xc=\radius
+ \advance\pgf@x by-0.707107\pgf@xc
+ \advance\pgf@y by-0.707107\pgf@xc
+ \pgf@xa=\pgf@x \pgf@ya=\pgf@y % Store coordinates
+ % Compute north east point
+ \centerpoint
+ \pgf@xc=\radius
+ \advance\pgf@x by0.707107\pgf@xc
+ \advance\pgf@y by0.707107\pgf@xc
+ \pgf@xb=\pgf@x \pgf@yb=\pgf@y % Store coordinates
+ \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}}
+ \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}}
+ \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@yb}}
+ \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@ya}}
+ \pgfsetarrowsstart{}
+ \pgfsetarrowsend{}
+ }
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Decorations
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Complete Sines
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Complete sines replaces the path with a whole number of sine waves.
+%% Thanks to http://tex.stackexchange.com/a/134516/26980
+\pgfdeclaredecoration{complete sines}{initial}
+{
+ %% Begin by computing the overall path length and find how many sine waves we
+ %% can fit in. Nothing happens beyond the computation.
+ \state{initial}[
+ width=+0pt,
+ next state=move,
+ persistent precomputation={
+ \def\tikzfeynhand@cs@angle@step{30}
+ \def\tikzfeynhand@cs@current@angle{0}
+ \pgfmathsetlengthmacro{\tikzfeynhand@cs@points@per@step}{
+ \pgfdecoratedinputsegmentlength
+ / int(\pgfdecoratedinputsegmentlength
+ / \pgfdecorationsegmentlength)
+ / 360
+ * \tikzfeynhand@cs@angle@step}
+ },
+ ]{}
+ %% Move to the origin to the path
+ \state{move}[
+ width=+\tikzfeynhand@cs@points@per@step,
+ next state=draw
+ ]{
+ \pgfpathmoveto{\pgfpointorigin}
+ }
+ %% Draw the sine wave itself. This computes the value every 20 degrees and draws straight edges.
+ \state{draw}[
+ width=+\tikzfeynhand@cs@points@per@step,
+ switch if less than=1.25*\tikzfeynhand@cs@points@per@step to final, % <- bit of a hack
+ persistent postcomputation={
+ \pgfmathparse{mod(\tikzfeynhand@cs@current@angle+\tikzfeynhand@cs@angle@step, 360)}
+ \let\tikzfeynhand@cs@current@angle=\pgfmathresult%
+ },
+ ]{
+% \pgfmathparse{sin(\tikzfeynhand@cs@current@angle) * \pgfmetadecorationsegmentamplitude / 2}
+ \pgfmathparse{sin(\tikzfeynhand@cs@current@angle) * 3 * \feynhandlinesize / 2}
+ \tikz@decoratepathfalse
+ \pgfpathlineto{\pgfqpoint{0pt}{\pgfmathresult pt}}%
+ }
+
+ \state{final}{
+ \ifdim\pgfdecoratedremainingdistance>0pt\relax
+ \pgfpathlineto{\pgfpointdecoratedpathlast}
+ \fi
+ }
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Keys
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\tikzfeynhandset{
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %% Hooks
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ execute at begin feynhand/.code={},
+ execute at end feynhand/.code={},
+ every feynhand/.style={/tikzfeynhand/every feynhand@@/.append style={#1}},
+ every feynhand@@/.style={
+ /tikzfeynhand/.cd,
+ },
+ execute at begin feynhand@@/.code={} %% Internal version
+ execute at end feynhand@@/.code={}, %% Internal version
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %% Vertices
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ every vertex@@/.style={
+ /tikz/shape=coordinate,
+ },
+ every vertex/.style={/tikzfeynhand/every vertex@@/.append style={#1}},
+ vertex/.style={
+ /tikzfeynhand/every vertex@@,
+ },
+ %% DOTS + friends
+ every dot@@/.style={
+ /tikz/shape=circle,
+ /tikz/draw,
+ /tikz/fill,
+ /tikz/inner sep=0pt,
+ /tikz/outer sep=0pt,
+ /tikz/minimum size=\feynhanddotsize,
+ /tikz/line width = \feynhandlinesize,
+ },
+ every dot/.style={/tikzfeynhand/every dot@@/.append style={#1}},
+ dot/.style={
+ /tikzfeynhand/every dot@@,
+ },
+ every squaredot@@/.style={
+ /tikz/shape=rectangle,
+ },
+ every squaredot/.style={/tikzfeynhand/every squaredot@@/.append style={#1}},
+ squaredot/.style={
+ /tikzfeynhand/every dot@@,
+ /tikzfeynhand/every squaredot@@,
+ },
+ every ringdot@@/.style={
+ /tikz/fill=none,
+ },
+ every ringdot/.style={/tikzfeynhand/every ringdot@@/.append style={#1}},
+ ringdot/.style={
+ /tikzfeynhand/every dot@@,
+ /tikzfeynhand/every ringdot@@,
+ },
+ every crossdot@@/.style={
+ /tikz/fill=none,
+ /tikz/shape=crossed circle,
+ /tikz/minimum size=2\feynhanddotsize,
+ },
+ every crossdot/.style={/tikzfeynhand/every crossdot@@/.append style={#1}},
+ crossdot/.style={
+ /tikzfeynhand/every dot@@,
+ /tikzfeynhand/every crossdot@@,
+ },
+ %% BLOBS -------------------------------------------------
+ every blob@@/.style={
+ /tikz/shape=circle,
+ /tikz/draw,
+ /tikz/fill,
+ /tikz/outer sep={0.5*\the\feynhandlinesize},
+ /tikz/inner sep=0pt,
+ /tikz/minimum size=\feynhandblobsize,
+ /tikz/line width = \feynhandlinesize,
+ },
+ every blob/.style={/tikzfeynhand/every blob@@/.append style={#1}},
+ blob/.style={
+ /tikzfeynhand/every blob@@,
+ /tikz/fill=black,
+ },
+ every ringblob@@/.style={
+ },
+ every ringblob/.style={/tikzfeynhand/every ringblob@@/.append style={#1}},
+ ringblob/.style={
+ /tikzfeynhand/every blob@@,
+ /tikzfeynhand/every ringblob@@,
+ /tikz/fill=white,
+ },
+ every NWblob@@/.style={
+ },
+ every NWblob/.style={/tikzfeynhand/every NWblob@@/.append style={#1}},
+ NWblob/.style={
+ /tikzfeynhand/every blob@@,
+ /tikzfeynhand/every NWblob@@,
+ /tikz/fill=none,
+ /tikz/pattern=north west lines,
+ },
+ every NEblob@@/.style={
+ },
+ every NEblob/.style={/tikzfeynhand/every NEblob@@/.append style={#1}},
+ NEblob/.style={
+ /tikzfeynhand/every blob@@,
+ /tikzfeynhand/every NEblob@@,
+ /tikz/fill=none,
+ /tikz/pattern=north east lines,
+ },
+ every grayblob@@/.style={
+ },
+ every grayblob/.style={/tikzfeynhand/every grayblob@@/.append style={#1}},
+ grayblob/.style={
+ /tikzfeynhand/every blob@@,
+ /tikzfeynhand/every grayblob@@,
+ /tikz/fill=gray!50!white,
+ },
+ %% PARTICLES
+ every particle@@/.style={
+ /tikz/shape=rectangle,
+ /tikz/draw=none,
+ /tikz/fill=none,
+ /tikz/inner sep=0.3333em,
+ /tikz/outer sep={0.5*\the\feynhandlinesize},
+ },
+ every particle/.style={/tikzfeynhand/every particle@@/.append style={#1}},
+ particle/.style args={#1}{
+ /tikzfeynhand/every particle@@,
+ },
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %% Edge styles
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %% Arrow Style
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ arrow size/.store in=\tikzfeynhand@arrow@size,
+ arrow size=\feynhandarrowsize,
+ with arrow/.style={
+ /tikz/decoration={
+ markings,
+ mark=at position #1 with {
+ \node[
+ transform shape,
+ %xshift=0.5mm,
+ xshift=-0.166666\feynhandarrowsize,
+ fill,
+ inner sep=0mm,
+ minimum width = \tikzfeynhand@arrow@size,
+ draw=none,
+ isosceles triangle
+ ] { };
+ },
+ },
+ /tikz/postaction={
+ /tikz/decorate=true,
+ },
+ },
+ with reversed arrow/.style={
+ /tikz/decoration={
+ markings,
+ mark=at position #1 with {
+ \node[
+ transform shape,
+ %xshift=0.5mm,
+ xshift=0.166666\feynhandarrowsize,
+ rotate=180,
+ fill,
+ inner sep=0mm,
+ minimum width = \tikzfeynhand@arrow@size,
+ draw=none,
+ isosceles triangle
+ ] { };
+ },
+ },
+ /tikz/postaction={
+ /tikz/decorate=true,
+ },
+ },
+ %% Base Edge Styles
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ every edge@@/.style={},
+ every edge/.style={/tikzfeynhand/every edge@@/.append style={#1}},
+ %% Specific Styles
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ every plain@@/.style={
+ /tikz/draw=none,
+ /tikz/line width = \feynhandlinesize,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikz/draw,
+ },
+ },
+ every plain/.style={/tikzfeynhand/every plain@@/.append style={#1}},
+ plain/.style={
+ /tikzfeynhand/every plain@@,
+ },
+ every top@@/.style={
+ /tikz/preaction={draw=\feynhandtopsepcolor,line width=\feynhandtopsep}
+ },
+ every top/.style={/tikzfeynhand/every top@@/.append style={#1}},
+ top/.style={
+ /tikzfeynhand/every top@@,
+ },
+ every boson@@/.style={
+ /tikz/draw=none,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikz/draw,
+ /tikz/line width = \feynhandlinesize,
+ /tikz/decoration={
+ complete sines,
+ amplitude=3\feynhandlinesize,
+ segment length=7.5\feynhandlinesize,
+ },
+ /tikz/decorate=true,
+ },
+ },
+ every boson/.style={/tikzfeynhand/every boson@@/.append style={#1}},
+ boson/.style={
+ /tikzfeynhand/every boson@@,
+ },
+ every charged boson@@/.style={
+ /tikzfeynhand/with arrow=0.5,
+ },
+ every charged boson/.style={/tikzfeynhand/every charged boson@@/.append style={#1}},
+ charged boson/.style={
+ /tikzfeynhand/boson,
+ /tikzfeynhand/every charged boson@@,
+ },
+ every anti charged boson@@/.style={
+ /tikzfeynhand/with reversed arrow=0.5,
+ },
+ every anti charged boson/.style={/tikzfeynhand/every anti charged boson@@/.append style={#1}},
+ anti charged boson/.style={
+ /tikzfeynhand/boson,
+ /tikzfeynhand/every anti charged boson@@,
+ },
+ every photon@@/.style={
+ /tikz/draw=none,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikz/draw,
+ /tikz/line width = \feynhandlinesize,
+ /tikz/decoration={
+ complete sines,
+ amplitude=3\feynhandlinesize,
+ segment length=7.5\feynhandlinesize,
+ },
+ /tikz/decorate=true,
+ },
+ },
+ every photon/.style={/tikzfeynhand/every photon@@/.append style={#1}},
+ photon/.style={
+ /tikzfeynhand/every photon@@,
+ },
+ every scalar@@/.style={
+ /tikz/draw=none,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikz/draw,
+ /tikz/dashed,
+ /tikz/line width = \feynhandlinesize,
+ },
+ },
+ every scalar/.style={/tikzfeynhand/every scalar@@/.append style={#1}},
+ scalar/.style={
+ /tikzfeynhand/every scalar@@,
+ },
+ every charged scalar@@/.style={
+ /tikz/draw=none,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikzfeynhand/with arrow=0.5,
+ },
+ },
+ every charged scalar/.style={/tikzfeynhand/every charged scalar@@/.append style={#1}},
+ charged scalar/.style={
+ /tikzfeynhand/scalar,
+ /tikzfeynhand/every charged scalar@@,
+ },
+ every anti charged scalar@@/.style={
+ /tikz/draw=none,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikzfeynhand/with reversed arrow=0.5,
+ },
+ },
+ every anti charged scalar/.style={/tikzfeynhand/every anti charged scalar@@/.append style={#1}},
+ anti charged scalar/.style={
+ /tikzfeynhand/scalar,
+ /tikzfeynhand/every anti charged scalar@@,
+ },
+ every ghost@@/.style={
+ /tikz/draw=none,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikz/draw,
+ /tikz/dotted,
+ /tikz/line width = 2\feynhandlinesize,
+ },
+ },
+ every ghost/.style={/tikzfeynhand/every ghost@@/.append style={#1}},
+ ghost/.style={
+ /tikzfeynhand/every ghost@@,
+ },
+ every charged ghost@@/.style={
+ /tikz/draw=none,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikzfeynhand/with arrow=0.5,
+ },
+ },
+ every charged ghost/.style={/tikzfeynhand/every charged ghost@@/.append style={#1}},
+ charged ghost/.style={
+ /tikzfeynhand/ghost,
+ /tikzfeynhand/every charged ghost@@,
+ },
+ every anti charged ghost@@/.style={
+ /tikz/draw=none,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikzfeynhand/with reversed arrow=0.5,
+ },
+ },
+ every anti charged ghost/.style={/tikzfeynhand/every anti charged ghost@@/.append style={#1}},
+ anti charged ghost/.style={
+ /tikzfeynhand/ghost,
+ /tikzfeynhand/every anti charged scalar@@,
+ },
+ every fermion@@/.style={
+ /tikz/draw=none,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikz/draw,
+ /tikz/line width = \feynhandlinesize,
+ /tikzfeynhand/with arrow=0.5,
+ },
+ },
+ every fermion/.style={/tikzfeynhand/every fermion@@/.append style={#1}},
+ fermion/.style={
+ /tikzfeynhand/every fermion@@,
+ },
+ every anti fermion@@/.style={
+ /tikz/draw=none,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikz/draw,
+ /tikz/line width = \feynhandlinesize,
+ /tikzfeynhand/with reversed arrow=0.5,
+ },
+ },
+ every anti fermion/.style={/tikzfeynhand/every anti fermion@@/.append style={#1}},
+ anti fermion/.style={
+ /tikzfeynhand/every anti fermion@@,
+ },
+ every majorana@@/.style={
+ /tikz/draw=none,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikz/draw,
+ /tikzfeynhand/with arrow=0.33,
+ /tikzfeynhand/with reversed arrow=0.73,
+ /tikz/line width = \feynhandlinesize,
+ },
+ },
+ every majorana/.style={/tikzfeynhand/every majorana@@/.append style={#1}},
+ majorana/.style={
+ /tikzfeynhand/every majorana@@,
+ },
+ every anti majorana@@/.style={
+ /tikz/draw=none,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikz/draw,
+ /tikzfeynhand/with reversed arrow=0.33,
+ /tikzfeynhand/with arrow=0.73,
+ /tikz/line width = \feynhandlinesize,
+ },
+ },
+ every anti majorana/.style={/tikzfeynhand/every anti majorana@@/.append style={#1}},
+ anti majorana/.style={
+ /tikzfeynhand/every anti majorana@@,
+ },
+ every gluon@@/.style={
+ /tikz/draw=none,
+ /tikz/decoration={name=none},
+ /tikz/postaction={
+ /tikz/draw,
+ /tikz/line width = \feynhandlinesize,
+ /tikz/decoration={
+ coil,
+ aspect=1.2,
+ mirror,
+ amplitude=3\feynhandlinesize,
+ segment length=8\feynhandlinesize,
+ },
+ /tikz/decorate=true,
+ },
+ },
+ every gluon/.style={/tikzfeynhand/every gluon@@/.append style={#1}},
+ gluon/.style={
+ /tikzfeynhand/every gluon@@,
+ },
+ % short versions of style names
+ pho/.style={
+ /tikzfeynhand/photon,
+ },
+ bos/.style={
+ /tikzfeynhand/boson,
+ },
+ antbos/.style={
+ /tikzfeynhand/anti charged boson,
+ },
+ chabos/.style={
+ /tikzfeynhand/charged boson,
+ },
+ sca/.style={
+ /tikzfeynhand/scalar,
+ },
+ chasca/.style={
+ /tikzfeynhand/charged scalar,
+ },
+ antsca/.style={
+ /tikzfeynhand/anti charged scalar,
+ },
+ fer/.style={
+ /tikzfeynhand/fermion,
+ },
+ antfer/.style={
+ /tikzfeynhand/anti fermion,
+ },
+ gho/.style={
+ /tikzfeynhand/ghost,
+ },
+ chagho/.style={
+ /tikzfeynhand/charged ghost,
+ },
+ antgho/.style={
+ /tikzfeynhand/anti charged ghost,
+ },
+ glu/.style={
+ /tikzfeynhand/gluon,
+ },
+ maj/.style={
+ /tikzfeynhand/majorana,
+ },
+ antmaj/.style={
+ /tikzfeynhand/anti majorana,
+ },
+ %% Insertions
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ insertion/.search also={/tikzfeynhand,/tikz},
+ %% Parameters
+ insertion/size/.store in=\tikzfeynhand@insertion@size,
+ insertion/size=5\feynhandlinesize,
+ insertion/style/.store in=\tikzfeynhand@insertion@style,
+ insertion/style={},
+ %% Styles
+ insertion@@/.style args={[#1]#2}{
+ /tikz/line width = \feynhandlinesize,
+ /tikz/decoration={
+ markings,
+ mark=at position #2 with {
+ \tikzfeynhandset{insertion/.cd,#1}
+ \draw [\tikzfeynhand@insertion@style] (-\tikzfeynhand@insertion@size, -\tikzfeynhand@insertion@size) -- (\tikzfeynhand@insertion@size, \tikzfeynhand@insertion@size);
+ \draw [\tikzfeynhand@insertion@style] (-\tikzfeynhand@insertion@size, \tikzfeynhand@insertion@size) -- (\tikzfeynhand@insertion@size, -\tikzfeynhand@insertion@size);
+ },
+ },
+ /tikz/postaction={
+ /tikz/decorate=true,
+ },
+ },
+ insertion@@/.default={[]0.5},
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %% Momentum arrows
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ momentum/.search also={/tikzfeynhand,/tikz},
+ %% Parameters
+ momentum/label distance/.store in=\tikzfeynhand@momentum@label@distance,
+ momentum/label distance=0pt,
+ momentum/arrow distance/.store in=\tikzfeynhand@momentum@arrow@distance,
+ momentum/arrow distance={\the\feynhandarrowsize},
+ momentum/arrow shorten/.store in=\tikzfeynhand@momentum@arrow@shorten,
+ momentum/arrow shorten=0.2,
+ momentum/label style/.store in=\tikzfeynhand@momentum@label@style,
+ momentum/label style={},
+ momentum/arrow style/.store in=\tikzfeynhand@momentum@arrow@style,
+ momentum/arrow style={},
+ momentum/arrow thickness/.store in=\tikzfeynhand@momentum@arrow@thickness,
+ momentum/arrow thickness={0.64*\the\feynhandlinesize},
+ momentum/arrow size/.store in=\tikzfeynhand@momentum@arrow@size,
+ momentum/arrow size={0.8*\the\feynhandarrowsize},
+ %% Styles
+ momentum@@/.style args={[#1]#2}{
+ /tikz/preaction={
+ /tikz/decoration={
+ show path construction,
+ moveto code={},
+ lineto code={
+ \tikzfeynhandset{momentum/.cd,#1}
+ \path (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast)
+ coordinate [pos=\tikzfeynhand@momentum@arrow@shorten] (tf@m@1)
+ coordinate [pos=1 - \tikzfeynhand@momentum@arrow@shorten] (tf@m@2);
+ \draw [-{Stealth[length=\tikzfeynhand@momentum@arrow@size]},
+ line width=\tikzfeynhand@momentum@arrow@thickness,
+ \tikzfeynhand@momentum@arrow@style]
+ ($(tf@m@1)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@2)$)
+ -- ($(tf@m@2)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@1)$)
+ node [pos=0.5, auto,
+ outer sep=\tikzfeynhand@momentum@label@distance,
+ \tikzfeynhand@momentum@label@style] {#2};
+ },
+ curveto code={
+ \tikzfeynhandset{momentum/.cd,#1}
+ \path (\tikzinputsegmentfirst)
+ .. controls (\tikzinputsegmentsupporta) and (\tikzinputsegmentsupportb)
+ .. (\tikzinputsegmentlast)
+ { \foreach \i in {1, ..., 50} {
+ coordinate [pos=\tikzfeynhand@momentum@arrow@shorten + (1-2 * \tikzfeynhand@momentum@arrow@shorten)*\i/50] (tf@m@\i) } };
+ \draw [-{Stealth[length=\tikzfeynhand@momentum@arrow@size]},
+ line width=\tikzfeynhand@momentum@arrow@thickness,
+ \tikzfeynhand@momentum@arrow@style]
+ ($(tf@m@1)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@2)$)
+ foreach \i [count=\j from 3] in {2, ..., 24} {
+ -- ($(tf@m@\i)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@\j)$)
+ }
+ -- ($(tf@m@25)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@26)$)
+ node [pos=0.5, auto,
+ outer sep=\tikzfeynhand@momentum@label@distance,
+ \tikzfeynhand@momentum@arrow@style] {#2}
+ foreach \i [count=\j from 27] in {26, ..., 49} {
+ -- ($(tf@m@\i)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@\j)$)
+ }
+ -- ($(tf@m@50)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@49)$);
+ },
+ closepath code={
+ \tikzfeynhandset{momentum/.cd,#1}
+ \path (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast)
+ coordinate [pos=\tikzfeynhand@momentum@arrow@shorten] (tf@m@1)
+ coordinate [pos=1 - \tikzfeynhand@momentum@arrow@shorten] (tf@m@2);
+ \draw [-{Stealth[length=\tikzfeynhand@momentum@arrow@size]},
+ line width=\tikzfeynhand@momentum@arrow@thickness,
+ \tikzfeynhand@momentum@arrow@style]
+ ($(tf@m@1)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@2)$)
+ -- ($(tf@m@2)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@1)$)
+ node [pos=0.5, auto,
+ outer sep=\tikzfeynhand@momentum@label@distance,
+ \tikzfeynhand@momentum@label@style] {#2};
+ },
+ },
+ /tikz/decorate=true,
+ },
+ },
+ momentum'@@/.style args={[#1]#2}{
+ /tikz/preaction={
+ /tikz/decoration={
+ show path construction,
+ moveto code={},
+ lineto code={
+ \tikzfeynhandset{momentum/.cd,#1}
+ \path (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast)
+ coordinate [pos=\tikzfeynhand@momentum@arrow@shorten] (tf@m@1)
+ coordinate [pos=1 - \tikzfeynhand@momentum@arrow@shorten] (tf@m@2);
+ \draw [-{Stealth[length=\tikzfeynhand@momentum@arrow@size]},
+ line width=\tikzfeynhand@momentum@arrow@thickness,
+ \tikzfeynhand@momentum@arrow@style]
+ ($(tf@m@1)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@2)$)
+ -- ($(tf@m@2)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@1)$)
+ node [pos=0.5, auto, swap,
+ outer sep=\tikzfeynhand@momentum@label@distance,
+ \tikzfeynhand@momentum@label@style] {#2};
+ },
+ curveto code={
+ \tikzfeynhandset{momentum/.cd,#1}
+ \path (\tikzinputsegmentfirst)
+ .. controls (\tikzinputsegmentsupporta) and (\tikzinputsegmentsupportb)
+ .. (\tikzinputsegmentlast)
+ { \foreach \i in {1, ..., 50} {
+ coordinate [pos=\tikzfeynhand@momentum@arrow@shorten + (1-2 * \tikzfeynhand@momentum@arrow@shorten)*\i/50] (tf@m@\i) } };
+ \draw [-{Stealth[length=\tikzfeynhand@momentum@arrow@size]},
+ line width=\tikzfeynhand@momentum@arrow@thickness,
+ \tikzfeynhand@momentum@arrow@style]
+ ($(tf@m@1)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@2)$)
+ foreach \i [count=\j from 3] in {2, ..., 24} {
+ -- ($(tf@m@\i)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@\j)$)
+ }
+ -- ($(tf@m@25)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@26)$)
+ node [pos=0.5, auto, swap,
+ outer sep=\tikzfeynhand@momentum@label@distance,
+ \tikzfeynhand@momentum@arrow@style] {#2}
+ foreach \i [count=\j from 27] in {26, ..., 49} {
+ -- ($(tf@m@\i)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@\j)$)
+ }
+ -- ($(tf@m@50)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@49)$);
+ },
+ closepath code={
+ \tikzfeynhandset{momentum/.cd,#1}
+ \path (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast)
+ coordinate [pos=\tikzfeynhand@momentum@arrow@shorten] (tf@m@1)
+ coordinate [pos=1 - \tikzfeynhand@momentum@arrow@shorten] (tf@m@2);
+ \draw [-{Stealth[length=\tikzfeynhand@momentum@arrow@size]},
+ line width=\tikzfeynhand@momentum@arrow@thickness,
+ \tikzfeynhand@momentum@arrow@style]
+ ($(tf@m@1)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@2)$)
+ -- ($(tf@m@2)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@1)$)
+ node [pos=0.5, auto, swap,
+ outer sep=\tikzfeynhand@momentum@label@distance,
+ \tikzfeynhand@momentum@label@style] {#2};
+ },
+ },
+ /tikz/decorate=true,
+ },
+ },
+ reversed momentum@@/.style args={[#1]#2}{
+ /tikz/preaction={
+ /tikz/decoration={
+ show path construction,
+ moveto code={},
+ lineto code={
+ \tikzfeynhandset{momentum/.cd,#1}
+ \path (\tikzinputsegmentlast) -- (\tikzinputsegmentfirst)
+ coordinate [pos=\tikzfeynhand@momentum@arrow@shorten] (tf@m@1)
+ coordinate [pos=1 - \tikzfeynhand@momentum@arrow@shorten] (tf@m@2);
+ \draw [-{Stealth[length=\tikzfeynhand@momentum@arrow@size]},
+ line width=\tikzfeynhand@momentum@arrow@thickness,
+ \tikzfeynhand@momentum@arrow@style]
+ ($(tf@m@1)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@2)$)
+ -- ($(tf@m@2)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@1)$)
+ node [pos=0.5, auto, swap,
+ outer sep=\tikzfeynhand@momentum@label@distance,
+ \tikzfeynhand@momentum@label@style] {#2};
+ },
+ curveto code={
+ \tikzfeynhandset{momentum/.cd,#1}
+ \path (\tikzinputsegmentlast)
+ .. controls (\tikzinputsegmentsupportb) and (\tikzinputsegmentsupporta)
+ .. (\tikzinputsegmentfirst)
+ { \foreach \i in {1, ..., 50} {
+ coordinate [pos=\tikzfeynhand@momentum@arrow@shorten + (1-2 * \tikzfeynhand@momentum@arrow@shorten)*\i/50] (tf@m@\i) } };
+ \draw [-{Stealth[length=\tikzfeynhand@momentum@arrow@size]},
+ line width=\tikzfeynhand@momentum@arrow@thickness,
+ \tikzfeynhand@momentum@arrow@style]
+ ($(tf@m@1)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@2)$)
+ foreach \i [count=\j from 3] in {2, ..., 24} {
+ -- ($(tf@m@\i)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@\j)$)
+ }
+ -- ($(tf@m@25)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@26)$)
+ node [pos=0.5, auto, swap,
+ outer sep=\tikzfeynhand@momentum@label@distance,
+ \tikzfeynhand@momentum@arrow@style] {#2}
+ foreach \i [count=\j from 27] in {26, ..., 49} {
+ -- ($(tf@m@\i)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@\j)$)
+ }
+ -- ($(tf@m@50)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@49)$);
+ },
+ closepath code={
+ \tikzfeynhandset{momentum/.cd,#1}
+ \path (\tikzinputsegmentlast) -- (\tikzinputsegmentfirst)
+ coordinate [pos=\tikzfeynhand@momentum@arrow@shorten] (tf@m@1)
+ coordinate [pos=1 - \tikzfeynhand@momentum@arrow@shorten] (tf@m@2);
+ \draw [-{Stealth[length=\tikzfeynhand@momentum@arrow@size]},
+ line width=\tikzfeynhand@momentum@arrow@thickness,
+ \tikzfeynhand@momentum@arrow@style]
+ ($(tf@m@1)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@2)$)
+ -- ($(tf@m@2)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@1)$)
+ node [pos=0.5, auto, swap,
+ outer sep=\tikzfeynhand@momentum@label@distance,
+ \tikzfeynhand@momentum@label@style] {#2};
+ },
+ },
+ /tikz/decorate=true,
+ },
+ },
+ reversed momentum'@@/.style args={[#1]#2}{
+ /tikz/preaction={
+ /tikz/decoration={
+ show path construction,
+ moveto code={},
+ lineto code={
+ \tikzfeynhandset{momentum/.cd,#1}
+ \path (\tikzinputsegmentlast) -- (\tikzinputsegmentfirst)
+ coordinate [pos=\tikzfeynhand@momentum@arrow@shorten] (tf@m@1)
+ coordinate [pos=1 - \tikzfeynhand@momentum@arrow@shorten] (tf@m@2);
+ \draw [-{Stealth[length=\tikzfeynhand@momentum@arrow@size]},
+ line width=\tikzfeynhand@momentum@arrow@thickness,
+ \tikzfeynhand@momentum@arrow@style]
+ ($(tf@m@1)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@2)$)
+ -- ($(tf@m@2)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@1)$)
+ node [pos=0.5,
+ auto,
+ outer sep=\tikzfeynhand@momentum@label@distance,
+ \tikzfeynhand@momentum@label@style] {#2};
+ },
+ curveto code={
+ \tikzfeynhandset{momentum/.cd,#1}
+ \path (\tikzinputsegmentlast)
+ .. controls (\tikzinputsegmentsupportb) and (\tikzinputsegmentsupporta)
+ .. (\tikzinputsegmentfirst)
+ { \foreach \i in {1, ..., 50} {
+ coordinate [pos=\tikzfeynhand@momentum@arrow@shorten + (1-2 * \tikzfeynhand@momentum@arrow@shorten)*\i/50] (tf@m@\i) } };
+ \draw [-{Stealth[length=\tikzfeynhand@momentum@arrow@size]},
+ line width=\tikzfeynhand@momentum@arrow@thickness,
+ \tikzfeynhand@momentum@arrow@style]
+ ($(tf@m@1)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@2)$)
+ foreach \i [count=\j from 3] in {2, ..., 24} {
+ -- ($(tf@m@\i)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@\j)$)
+ }
+ -- ($(tf@m@25)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@26)$)
+ node [pos=0.5,
+ auto,
+ outer sep=\tikzfeynhand@momentum@label@distance,
+ \tikzfeynhand@momentum@arrow@style] {#2}
+ foreach \i [count=\j from 27] in {26, ..., 49} {
+ -- ($(tf@m@\i)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@\j)$)
+ }
+ -- ($(tf@m@50)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@49)$);
+ },
+ closepath code={
+ \tikzfeynhandset{momentum/.cd,#1}
+ \path (\tikzinputsegmentlast) -- (\tikzinputsegmentfirst)
+ coordinate [pos=\tikzfeynhand@momentum@arrow@shorten] (tf@m@1)
+ coordinate [pos=1 - \tikzfeynhand@momentum@arrow@shorten] (tf@m@2);
+ \draw [-{Stealth[length=\tikzfeynhand@momentum@arrow@size]},
+ line width=\tikzfeynhand@momentum@arrow@thickness,
+ \tikzfeynhand@momentum@arrow@style]
+ ($(tf@m@1)!\tikzfeynhand@momentum@arrow@distance!90:(tf@m@2)$)
+ -- ($(tf@m@2)!\tikzfeynhand@momentum@arrow@distance!-90:(tf@m@1)$)
+ node [pos=0.5, auto,
+ outer sep=\tikzfeynhand@momentum@label@distance,
+ \tikzfeynhand@momentum@label@style] {#2};
+ },
+ },
+ /tikz/decorate=true,
+ },
+ },
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %% Modifiers
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ half left/.style={
+ /tikz/bend left=90,
+ },
+ half right/.style={
+ /tikz/bend right=90,
+ },
+ quarter left/.style={
+ /tikz/bend left=45,
+ },
+ quarter right/.style={
+ /tikz/bend right=45,
+ },
+}
+
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/tikz-feynhand/tikzlibraryfeynhand.code.tex b/Master/texmf-dist/tex/latex/tikz-feynhand/tikzlibraryfeynhand.code.tex
new file mode 100644
index 00000000000..27d8bc5c7e8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tikz-feynhand/tikzlibraryfeynhand.code.tex
@@ -0,0 +1,266 @@
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% TikZ-FeynHand, Version 1.0.0 of 2018/01/31
+% Feynhand Diagrams with TikZ (LaTex manual version)
+% Copyright (C) 2018 Max Dohse
+% Copyright (C) 2016 Joshua Ellis
+%
+% This LaTeX file and the whole package are free:
+% you can redistribute it and/or modify it under the
+% terms of the GNU General Public License as published by the Free Software Foundation,
+% either version 3 of the License, or (at your option) any later version.
+%
+% This file is a modification of the file tikzlibraryfeynman.code.tex
+% of the package tikz-feynman (version 1.1.0 of 2016/02/05)
+% which is available online at https://ctan.org/pkg/tikz-feynman
+% for a list of changes, see the file CHANGES.TXT
+%
+% available at https://ctan.org/pkg/tikz-feynhand
+% The Current Maintainer of this work is Max Dohse.
+%
+% This program is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+% FOR A PARTICULAR PURPOSE.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Pre-requisites
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\usetikzlibrary{
+ arrows.meta,
+ calc,
+ decorations,
+ decorations.markings,
+ decorations.pathmorphing,
+ decorations.pathreplacing,
+ external,
+ patterns,
+ positioning,
+ shapes.geometric,
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Function definitions
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Miscellaneous functions
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\tikzfeynhand@empty{}
+
+%% Key Manager
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Setup the tikz-feynhand key family
+\pgfkeys{
+ /tikzfeynhand/.is family,
+ /tikzfeynhand/.search also={/tikz},
+}
+
+%% |\tikzfeynhandset| allows keys that belong with tikz-feynhand to be easily set.
+\def\tikzfeynhandset{\pgfqkeys{/tikzfeynhand}}
+
+%% Version check
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Check which version is expected and which is installed
+\def\tikzfeynhand@compat@parse#1.#2.#3\pgfeov{
+ \edef\tikzfeynhand@compat@major{#1}
+ \edef\tikzfeynhand@compat@minor{#2}
+ \edef\tikzfeynhand@compat@patch{#3}
+ \edef\tikzfeynhand@compat{#1.#2.#3}
+}
+\let\tikzfeynhand@compat=\tikzfeynhand@empty
+\pgfkeyslet{/tikzfeynhand/compat/.@cmd}{\tikzfeynhand@compat@parse}
+\ProcessPgfPackageOptions{/tikzfeynhand}
+
+\AtBeginDocument{
+ \ifx\tikzfeynhand@version\tikzfeynhand@compat\else
+ \ifx\tikzfeynhand@compat\tikzfeynhand@empty
+ \PackageWarning{tikz-feynhand}{Consider loading TikZ-Feynhand with \string\usepackage[compat=\tikzfeynhand@version]{tikz-feynhand} so that you can be warned if TikZ-Feynhand changes.}
+ \else
+ \ifx\tikzfeynhand@compat@major\tikzfeynhand@version@major
+ \ifx\tikzfeynhand@compat@minor\tikzfeynhand@version@minor
+ \ifx\tikzfeynhand@compat@patch\tikzfeynhand@version@patch\else
+ \PackageInfo{tikz-feynhand}{The preamble requested version \tikzfeynhand@compat, but the system version is \tikzfeynhand@version. This should cause no issue.}
+ \fi
+ \else
+ \PackageWarning{tikz-feynhand}{The preamble requested version \tikzfeynhand@compat, but the system version is \tikzfeynhand@version. This may change some diagrams.}
+ \fi
+ \else
+ \PackageError{tikz-feynhand}{The preamble requested version \tikzfeynhand@compat, but the system version is \tikzfeynhand@version. They are most likely incompatible. Please download the appropriate version from jpellis.me/projects/tikz-feynhand.}
+ \fi
+ \fi
+ \fi
+}
+
+%% Feynhand Environment
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Provide `\begin{feynhand} ... \end{feynhand}` within TikZ pictures.
+\tikzaddtikzonlycommandshortcutlet\feynhand\tikzfeynhand@environment@feynhand
+\tikzaddtikzonlycommandshortcutlet\endfeynhand\endtikzfeynhand@environment@feynhand
+
+%% \begin{feynhand}...\end{feynhand}
+\def\tikzfeynhand@environment@feynhand{%
+ \pgfutil@ifnextchar[{\tikzfeynhand@environment@feynhand@opt}
+ {\tikzfeynhand@environment@feynhand@opt[]}}
+
+\def\tikzfeynhand@environment@feynhand@opt[#1]{%
+ \begingroup
+ %% Local overrides
+ \let\tikz@@scan@fig=\tikzfeynhand@scan@fig
+ %% Local commands
+ \let\vertex=\tikzfeynhand@commands@vertex
+ \let\propagator=\tikzfeynhand@commands@propagator
+ \let\propag=\propagator
+ %% Opening hooks
+ \scope
+ \tikzfeynhand@tikz@search@tikzfeynhand
+ \pgfkeys{/tikzfeynhand/every feynhand@@,#1}
+ \pgfkeysvalueof{/tikzfeynhand/execute at begin feynhand@@}%
+ \pgfkeysvalueof{/tikzfeynhand/execute at begin feynhand}%
+ }
+
+\def\endtikzfeynhand@environment@feynhand{%
+ %% Closing hooks
+ \pgfkeysvalueof{/tikzfeynhand/execute at end feynhand}%
+ \pgfkeysvalueof{/tikzfeynhand/execute at end feynhand@@}%
+ \endscope
+ \endgroup
+ }
+
+%%% Allow empty nodes
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newif\iftikzfeynhandallowemptynode
+\newif\iftikzfeynhandvertex
+\def\tikzfeynhand@scan@fig{%
+ \pgfutil@ifnextchar a{\tikz@fig@scan@at}
+ {\pgfutil@ifnextchar({\tikz@fig@scan@name}
+ {\pgfutil@ifnextchar[{\tikz@fig@scan@options}%
+ {\pgfutil@ifnextchar\bgroup{\tikz@fig@main}%
+ {\iftikzfeynhandvertex%
+ \tikzset{/tikzfeynhand/every vertex@@}%
+ \iftikzfeynhandallowemptynode%
+ \else%
+ \tikzset{/tikzfeynhand/particle}%
+ \fi%
+ \fi%
+ \tikz@fig@main{}
+ }
+ }
+ }
+ }
+}
+
+%% Include /tikzfeynhand in the search path
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\tikzfeynhand@tikz@search@tikzfeynhand{%
+ \pgfkeys{/tikz/.unknown/.code=%
+ \let\tikz@key\pgfkeyscurrentname%
+ %% Is it a tikzfeynhand key?
+ \pgfkeys{/tikzfeynhand/\tikz@key/.try={##1}}%
+ \ifpgfkeyssuccess%
+ \else%
+ %% Is it a pgf key?
+ \pgfkeys{/pgf/\tikz@key/.try={##1}}%
+ \ifpgfkeyssuccess%
+ \else%
+ \expandafter\pgfutil@in@\expandafter!\expandafter{\tikz@key}%
+ \ifpgfutil@in@%
+ %% this is a color!
+ \expandafter\tikz@addoption\expandafter{\expandafter\tikz@compat@color@set\expandafter{\tikz@key}}%
+ \edef\tikz@textcolor{\tikz@key}%
+ \else%
+ \pgfutil@doifcolorelse{\tikz@key}
+ {%
+ \expandafter\tikz@addoption\expandafter{\expandafter\tikz@compat@color@set\expandafter{\tikz@key}}%
+ \edef\tikz@textcolor{\tikz@key}%
+ }%
+ {%
+ %% Ok, second chance: This might be an arrow specification:
+ \expandafter\pgfutil@in@\expandafter-\expandafter{\tikz@key}%
+ \ifpgfutil@in@%
+ %% Ah, an arrow spec!
+ \expandafter\tikz@processarrows\expandafter{\tikz@key}%
+ \else%
+ %% Ok, third chance: A shape!
+ \expandafter\ifx\csname pgf@sh@s@\tikz@key\endcsname\relax%
+ \pgfkeys{/errors/unknown key/.expand
+ once=\expandafter{\expandafter/\expandafter t\expandafter
+ i\expandafter k\expandafter z\expandafter/\tikz@key}{##1}}%
+ \else%
+ \edef\tikz@shape{\tikz@key}%
+ \fi%
+ \fi%
+ }%
+ \fi%
+ \fi%
+ \fi%
+ }
+}
+
+
+%% Vertex
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% SEE ALSO \vertex above!
+%% Adapted from |\coordinate| code
+\def\tikzfeynhand@commands@vertex{%
+ \path \pgfextra{\tikzfeynhandallowemptynodetrue}
+ \pgfextra{\tikzfeynhandvertextrue}
+ node}
+
+%% Propagators
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand{\tikzfeynhand@commands@propagator}[1][]{\draw [#1]}
+
+%% Optional argument in style key
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\tikzfeynhand@key@opt#1[#2]#3\pgfeov{%
+ \tikzfeynhandset{#1={[#2]#3}}}
+
+%% Insertion
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\tikzfeynhand@insertion{%
+ \pgfutil@ifnextchar[{\tikzfeynhand@key@opt{insertion@@}}
+ {\tikzfeynhand@key@opt{insertion@@}[]}}
+\pgfkeyslet{/tikzfeynhand/insertion/.@cmd}{\tikzfeynhand@insertion}
+
+%% Momentum
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\tikzfeynhand@momentum@std{%
+ \pgfutil@ifnextchar[{\tikzfeynhand@key@opt{momentum@@}}
+ {\tikzfeynhand@key@opt{momentum@@}[]}}
+\pgfkeyslet{/tikzfeynhand/momentum/.@cmd}{\tikzfeynhand@momentum@std}
+
+\def\tikzfeynhand@momentum@stdp{%
+ \pgfutil@ifnextchar[{\tikzfeynhand@key@opt{momentum'@@}}
+ {\tikzfeynhand@key@opt{momentum'@@}[]}}
+\pgfkeyslet{/tikzfeynhand/momentum'/.@cmd}{\tikzfeynhand@momentum@stdp}
+
+\def\tikzfeynhand@momentum@stdr{%
+ \pgfutil@ifnextchar[{\tikzfeynhand@key@opt{reversed momentum@@}}
+ {\tikzfeynhand@key@opt{reversed momentum@@}[]}}
+\pgfkeyslet{/tikzfeynhand/reversed momentum/.@cmd}{\tikzfeynhand@momentum@stdr}
+
+\def\tikzfeynhand@momentum@stdrp{%
+ \pgfutil@ifnextchar[{\tikzfeynhand@key@opt{reversed momentum'@@}}
+ {\tikzfeynhand@key@opt{reversed momentum'@@}[]}}
+\pgfkeyslet{/tikzfeynhand/reversed momentum'/.@cmd}{\tikzfeynhand@momentum@stdrp}
+
+% short versions of momentum styles
+\pgfkeyslet{/tikzfeynhand/rmomentum/.@cmd}{\tikzfeynhand@momentum@stdr}
+\pgfkeyslet{/tikzfeynhand/rmomentum'/.@cmd}{\tikzfeynhand@momentum@stdrp}
+
+\pgfkeyslet{/tikzfeynhand/mom/.@cmd}{\tikzfeynhand@momentum@std}
+\pgfkeyslet{/tikzfeynhand/mom'/.@cmd}{\tikzfeynhand@momentum@stdp}
+
+\pgfkeyslet{/tikzfeynhand/revmom/.@cmd}{\tikzfeynhand@momentum@stdr}
+\pgfkeyslet{/tikzfeynhand/revmom'/.@cmd}{\tikzfeynhand@momentum@stdrp}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Styles
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\input tikzfeynhand.keys.code.tex
+
+\endinput \ No newline at end of file