f

feyndrawgram

@preview

Render Feynman diagrams exported from FeynDrawGram web app (https://mbarbieri.it/feyndrawgram/).

v1.0.0
GPL-3.0-or-later

Package Information

Last Updated
Minimum Typst Version
0.14.0
Categories
integrationvisualization
Disciplines
physics

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/feyndrawgram:1.0.0

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/feyndrawgram:1.0.0": *

Version History

1.0.00.14.0
3da246cefea6...

FeynDrawGram - Render Feynman diagrams from FeynDrawGram JSON files

This package renders diagrams produced by the
FeynDrawGram web app.
The input is the JSON exported by the "Save" button in the app.

Typical use:

#import "@preview/feyndrawgram:1.0.0": feyndrawgram

#feyndrawgram(json("my-diagram.json"))

Parameters:

  • use-cetz-decorations (default: false)
    If false, photons/gluons are drawn by sampling exactly the same
    analytic path the web app shows on screen. If true, simple
    straight wavy/gluon edges with multiplicity 1 use CeTZ' native
    decorations.wave / coil; curved or multi-line oscillating edges
    always fall back to sampling so that parallel waves stay in
    phase.
  • unit (default: 1pt)
    Length of one canvas pixel in document units.