|
1 | 1 | # PDG role for Sphinx |
2 | 2 |
|
3 | | -[](https://pypi.org/project/sphinxcontrib-hep-pdgref) |
4 | | -[](https://pypi.org/project/sphinxcontrib-hep-pdgref) |
5 | | -[](https://opensource.org/licenses/BSD-3-Clause) |
6 | | -[](https://open.vscode.dev/ComPWA/sphinxcontrib-hep-pdgref) |
7 | | -[](https://gitpod.io/#https://github.com/ComPWA/sphinxcontrib-hep-pdgref) |
8 | | -[](https://codecov.io/gh/ComPWA/sphinxcontrib-hep-pdgref) |
9 | | -[](https://www.codacy.com/gh/ComPWA/sphinxcontrib-hep-pdgref) |
10 | | -[](https://github.com/ComPWA/sphinxcontrib-hep-pdgref/actions?query=branch%3Amain+workflow%3ACI-tests) |
11 | | -[](https://mypy.readthedocs.io) |
12 | | -[](https://results.pre-commit.ci/latest/github/ComPWA/sphinxcontrib-hep-pdgref/main) |
13 | | -[](https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell) |
14 | | -[](https://github.com/prettier/prettier) |
15 | | -[](https://github.com/psf/black) |
16 | | -[](https://github.com/astral-sh/ruff) |
17 | | - |
18 | | -This package is a |
19 | | -[Sphinx extension](https://www.sphinx-doc.org/en/master/usage/extensions/index.html) |
20 | | -that makes it easy to refer to PDF files of reviews and particle listings in the PDG. |
21 | | - |
22 | | -## Installation |
23 | | - |
24 | | -Just install through [PyPI](https://pypi.org) with `pip`: |
25 | | - |
26 | | -```bash |
27 | | -pip install sphinxcontrib-hep-pdgref |
28 | | -``` |
29 | | - |
30 | | -Next, in your |
31 | | -[Sphinx configuration file](https://www.sphinx-doc.org/en/master/usage/configuration.html) |
32 | | -(`conf.py`), add `"sphinxcontrib.hep.pdgref"` to your `extensions`: |
33 | | - |
34 | | -```python |
35 | | -extensions = [ |
36 | | - # ... |
37 | | - "sphinxcontrib.hep.pdgref", |
38 | | - # ... |
39 | | -] |
40 | | -``` |
41 | | - |
42 | | -## Usage |
43 | | - |
44 | | -There are two roles, one for the |
45 | | -[particle listings](https://pdg.lbl.gov/2020/listings/contents_listings.html) and one |
46 | | -for the [review](https://pdg.lbl.gov/2020/reviews/contents_sports.html). These roles can |
47 | | -be used as follows: |
48 | | - |
49 | | -```restructuredtext |
50 | | -:pdg-listing:`K-zero` |
51 | | -
|
52 | | -:pdg-review:`Kinematics` |
53 | | -
|
54 | | -:pdg-review:`2014; Resonances` |
55 | | -
|
56 | | -:pdg-review:`Resonances; 2018; pp. 2-4, 7` |
57 | | -
|
58 | | -:pdg-review:`QCD; p5` |
59 | | -
|
60 | | -:pdg-review:`PDG2015; Quark Model; p.2` |
61 | | -``` |
62 | | - |
63 | | -which will render in the HTML pages as: |
64 | | - |
65 | | -> [PDG2020](https://pdg.lbl.gov/2020/listings/rpp2020-list-K-zero.pdf) |
66 | | -> |
67 | | -> [PDG2020, §Kinematics](https://pdg.lbl.gov/2020/reviews/rpp2020-rev-kinematics.pdf) |
68 | | -> |
69 | | -> [PDG2014, §Resonances](https://pdg.lbl.gov/2014/reviews/rpp2014-rev-resonances.pdf) |
70 | | -> |
71 | | -> [PDG2018, §Resonances, pp.2-4,7](https://pdg.lbl.gov/2018/reviews/rpp2018-rev-resonances.pdf#page=2) |
72 | | -> |
73 | | -> [PDG2020, §QCD, p.5](https://pdg.lbl.gov/2020/reviews/rpp2020-rev-qcd.pdf#page=5) |
74 | | -> |
75 | | -> [PDG2015, §Quark Model, p.2](https://pdg.lbl.gov/2015/reviews/rpp2015-rev-qcd.pdf#page=2) |
76 | | -
|
77 | | -_Note that the resulting links lead to the correct page as well!_ |
| 3 | +_This package has been renamed to **[`sphinx-hep-pdgref`](https://pypi.org/project/sphinx-hep-pdgref)**! Please use that package instead._ |
0 commit comments