Metadata-Version: 2.1
Name: sphinx-hep-pdgref
Version: 0.2.0
Summary: Sphinx role for linking to PDG reviews and listing
Home-page: UNKNOWN
Author: Common Partial Wave Analysis
Author-email: compwa-admin@ep1.rub.de
Maintainer-email: compwa-admin@ep1.rub.de
License: BSD 3-Clause License
Project-URL: Tracker, https://github.com/ComPWA/sphinx-hep-pdgref/issues
Project-URL: Changelog, https://github.com/ComPWA/sphinx-hep-pdgref/releases
Project-URL: Documentation, https://github.com/ComPWA/sphinx-hep-pdgref/blob/main/README.md
Project-URL: Source, https://github.com/ComPWA/sphinx-hep-pdgref
Keywords: particle data group,pdg,reference,sphinx
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Documentation
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: attrs >=20.1.0
Requires-Dist: docutils
Requires-Dist: Sphinx
Provides-Extra: dev
Requires-Dist: pre-commit >=1.4.0 ; extra == 'dev'
Requires-Dist: black ; extra == 'dev'
Requires-Dist: mypy >=0.730 ; extra == 'dev'
Requires-Dist: types-docutils ; extra == 'dev'
Requires-Dist: types-setuptools ; extra == 'dev'
Requires-Dist: ruff ; extra == 'dev'
Requires-Dist: pyquery ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'
Requires-Dist: pytest-xdist ; extra == 'dev'
Requires-Dist: tox >=1.9 ; extra == 'dev'
Requires-Dist: importlib-metadata ; (python_version < "3.8.0") and extra == 'dev'
Provides-Extra: format
Requires-Dist: black ; extra == 'format'
Provides-Extra: lint
Requires-Dist: mypy >=0.730 ; extra == 'lint'
Requires-Dist: types-docutils ; extra == 'lint'
Requires-Dist: types-setuptools ; extra == 'lint'
Requires-Dist: ruff ; extra == 'lint'
Provides-Extra: mypy
Requires-Dist: mypy >=0.730 ; extra == 'mypy'
Requires-Dist: types-docutils ; extra == 'mypy'
Requires-Dist: types-setuptools ; extra == 'mypy'
Provides-Extra: sty
Requires-Dist: pre-commit >=1.4.0 ; extra == 'sty'
Requires-Dist: black ; extra == 'sty'
Requires-Dist: mypy >=0.730 ; extra == 'sty'
Requires-Dist: types-docutils ; extra == 'sty'
Requires-Dist: types-setuptools ; extra == 'sty'
Requires-Dist: ruff ; extra == 'sty'
Requires-Dist: pyquery ; extra == 'sty'
Requires-Dist: pytest ; extra == 'sty'
Requires-Dist: pytest-cov ; extra == 'sty'
Requires-Dist: pytest-xdist ; extra == 'sty'
Requires-Dist: importlib-metadata ; (python_version < "3.8.0") and extra == 'sty'
Provides-Extra: test
Requires-Dist: pyquery ; extra == 'test'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: pytest-xdist ; extra == 'test'
Requires-Dist: importlib-metadata ; (python_version < "3.8.0") and extra == 'test'

# PDG role for Sphinx

[![PyPI package](https://badge.fury.io/py/sphinx-hep-pdgref.svg)](https://pypi.org/project/sphinx-hep-pdgref)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/sphinx-hep-pdgref)](https://pypi.org/project/sphinx-hep-pdgref)
[![BSD 3-Clause license](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![Open in Visual Studio Code](https://img.shields.io/badge/vscode-open-blue?logo=visualstudiocode)](https://open.vscode.dev/ComPWA/sphinx-hep-pdgref)
[![GitPod](https://img.shields.io/badge/gitpod-open-blue?logo=gitpod)](https://gitpod.io/#https://github.com/ComPWA/sphinx-hep-pdgref)
[![Test coverage](https://codecov.io/gh/ComPWA/sphinx-hep-pdgref/branch/main/graph/badge.svg?token=SS8ZB8J11N)](https://codecov.io/gh/ComPWA/sphinx-hep-pdgref)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/dbe042deb2914f6098eb98586d3983fe)](https://www.codacy.com/gh/ComPWA/sphinx-hep-pdgref)
[![CI status](https://github.com/ComPWA/sphinx-hep-pdgref/workflows/CI-tests/badge.svg)](https://github.com/ComPWA/sphinx-hep-pdgref/actions?query=branch%3Amain+workflow%3ACI-tests)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy.readthedocs.io)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ComPWA/sphinx-hep-pdgref/main.svg)](https://results.pre-commit.ci/latest/github/ComPWA/sphinx-hep-pdgref/main)
[![Spelling checked](https://img.shields.io/badge/cspell-checked-brightgreen.svg)](https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

This package is a
[Sphinx extension](https://www.sphinx-doc.org/en/master/usage/extensions/index.html)
that makes it easy to refer to PDF files of reviews and particle listings in the PDG.

## Installation

Just install through [PyPI](https://pypi.org) with `pip`:

```bash
pip install sphinx-hep-pdgref
```

Next, in your
[Sphinx configuration file](https://www.sphinx-doc.org/en/master/usage/configuration.html)
(`conf.py`), add `"sphinx_hep_pdgref"` to your `extensions`:

```python
extensions = [
    # ...
    "sphinx_hep_pdgref",
    # ...
]
```

## Usage

There are two roles, one for the
[particle listings](https://pdg.lbl.gov/2020/listings/contents_listings.html) and one
for the [review](https://pdg.lbl.gov/2020/reviews/contents_sports.html). These roles can
be used as follows:

```restructuredtext
:pdg-listing:`K-zero`

:pdg-review:`Kinematics`

:pdg-review:`2014; Resonances`

:pdg-review:`Resonances; 2018; pp. 2-4, 7`

:pdg-review:`QCD; p5`

:pdg-review:`PDG2015; Quark Model; p.2`
```

which will render in the HTML pages as:

> [PDG2020](https://pdg.lbl.gov/2020/listings/rpp2020-list-K-zero.pdf)
>
> [PDG2020, §Kinematics](https://pdg.lbl.gov/2020/reviews/rpp2020-rev-kinematics.pdf)
>
> [PDG2014, §Resonances](https://pdg.lbl.gov/2014/reviews/rpp2014-rev-resonances.pdf)
>
> [PDG2018, §Resonances, pp.2-4,7](https://pdg.lbl.gov/2018/reviews/rpp2018-rev-resonances.pdf#page=2)
>
> [PDG2020, §QCD, p.5](https://pdg.lbl.gov/2020/reviews/rpp2020-rev-qcd.pdf#page=5)
>
> [PDG2015, §Quark Model, p.2](https://pdg.lbl.gov/2015/reviews/rpp2015-rev-qcd.pdf#page=2)

_Note that the resulting links lead to the correct page as well!_


