tikz-feyn Documentation

Build Status

tikz-feyn is a LaTeX package for drawing Feynman diagrams using the PGF/TikZ graphics package.

The package provides a simple, intuitive syntax for constructing Feynman diagrams with minimal code, making it ideal for lecture notes, papers, and presentations in particle physics and quantum field theory.

Quick Start

Installation

Download tikz-feyn.sty and place it in your LaTeX project directory, then use:

\usepackage{tikz-feyn}

Basic Example

\begin{tfeyn}
  \tfcol{a1, a2}
  \tfcol{b1, b2}
  \tf[f]{a1,c1,a2}[r]
  \tf[f]{b1,c3,b2}[l]
  \tf[p]{c1, c3}
\end{tfeyn}

This creates a simple fermion-photon scattering diagram.

Features

  • Simple syntax - Minimal code for common diagrams

  • Three environments - Display, inline, and math-mode diagrams

  • Multiple particle types - Fermions, photons, bosons, gluons, and more

  • Flexible positioning - Column-based layout with intermediate vertices

  • Loops and arcs - Easy creation of self-energy and vertex corrections

  • Customizable - Full access to TikZ styling options

  • Well-tested - Comprehensive test suite ensures reliability

Particle Types

tikz-feyn includes built-in styles for common particle propagators:

Particle

Style

Description

Example

Fermion

f, fermion

Solid line with arrow

\tf[f]{i,o}

Photon

p, photon

Wavy line (sine wave)

\tf[p]{i,o}

W Boson

w, wboson

Coiled double line (1pt)

\tf[w]{i,o}

Z Boson

z, zboson

Coiled double line (2pt)

\tf[z]{i,o}

Higgs

h, higgs

Dotted line

\tf[h]{i,o}

Gluon

g, gluon

Coiled line

\tf[g]{i,o}

Graviton

G, graviton

Double coiled line

\tf[G]{i,o}

Requirements

  • LaTeX (TeXLive or MiKTeX)

  • PGF/TikZ package

  • xparse package

  • ifthen package

All dependencies are included in standard LaTeX distributions.

License

This package is distributed under the terms of the license specified in the LICENSE.txt file.

Indices and tables