Metadata-Version: 2.5
Name: feynjs
Version: 0.10.1
Summary: Feynman diagrams from text, for Sphinx and Jupyter: the feynjs engine, bundled
Project-URL: Homepage, https://hepjs.github.io/feynjs/
Project-URL: Source, https://github.com/hepjs/feynjs
Project-URL: Changelog, https://github.com/hepjs/feynjs/blob/main/CHANGELOG.md
Author: Jason Oliver, Pengxuan Zhu
License-Expression: MIT
License-File: LICENSE
Keywords: Feynman diagrams,Jupyter,Sphinx,particle physics,visualisation
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Jupyter
Classifier: Framework :: Sphinx :: Extension
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# feynjs for Python

[feynjs](https://hepjs.github.io/feynjs/) lays out and draws Feynman diagrams from text. This
package carries its engine for Python projects: a Sphinx extension and a Jupyter display, with
nothing loaded from the network.

```sh
pip install feynjs
```

## Sphinx

In `conf.py`:

```python
extensions = ["feynjs.sphinx"]
```

Every `feynman` code block, in reST or MyST Markdown, is then drawn:

```rst
.. code-block:: feynman

   p p > t t~, (t > b w+, w+ > e+ ve), (t~ > b~ w-, w- > j j)
```

## Jupyter

```python
from feynjs import Diagram
Diagram("e- e+ > Z > mu- mu+")
```

## The script

`feynjs.SCRIPT` is the path of the bundled `feynjs.min.js`, and `feynjs.script()` its text, for
any other tool that serves a page.

The syntax, and feynjs for the web, Markdown sites, Obsidian and LaTeX:
https://hepjs.github.io/feynjs/
