From 8cefb1f7c6b8882cbd65cff83111984caff542c5 Mon Sep 17 00:00:00 2001
From: Brent Huisman <brenthuisman@users.noreply.github.com>
Date: Mon, 20 Dec 2021 12:43:54 +0100
Subject: [PATCH] Have single source for citation info, compatible with Github
 citation UI (#1791)

---
 CITATION.bib  | 36 ++++++++++++++++++++++++++++++++++++
 README.md     |  2 +-
 doc/index.rst | 45 +++++++++------------------------------------
 3 files changed, 46 insertions(+), 37 deletions(-)
 create mode 100644 CITATION.bib

diff --git a/CITATION.bib b/CITATION.bib
new file mode 100644
index 00000000..be62d506
--- /dev/null
+++ b/CITATION.bib
@@ -0,0 +1,36 @@
+@INPROCEEDINGS{
+    paper:arbor2019,
+    author={N. {Abi Akar} and B. {Cumming} and V. {Karakasis} and A. {Küsters} and W. {Klijn} and A. {Peyser} and S. {Yates}},
+    booktitle={2019 27th Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP)},
+    title={{Arbor --- A Morphologically-Detailed Neural Network Simulation Library for Contemporary High-Performance Computing Architectures}},
+    year={2019}, month={feb}, volume={}, number={},
+    pages={274--282},
+    doi={10.1109/EMPDP.2019.8671560},
+    ISSN={2377-5750}}
+
+@software{nora_abi_akar_2021_5031633,
+  author       = {Nora Abi Akar and
+                  John Biddiscombe and
+                  Benjamin Cumming and
+                  Marko Kabic and
+                  Vasileios Karakasis and
+                  Wouter Klijn and
+                  Anne Küsters and
+                  Alexander Peyser and
+                  Stuart Yates and
+                  Thorsten Hater and
+                  Brent Huisman and
+                  Espen Hagen and
+                  Robin De Schepper and
+                  Charl Linssen and
+                  Harmen Stoppels and
+                  Sebastian Schmitt and
+                  Felix Huber},
+  title        = {Arbor Library v0.5.2},
+  month        = jun,
+  year         = 2021,
+  publisher    = {Zenodo},
+  version      = {v0.5.2},
+  doi          = {10.5281/zenodo.5031633},
+  url          = {https://doi.org/10.5281/zenodo.5031633}
+}
diff --git a/README.md b/README.md
index 101615b6..cf119007 100644
--- a/README.md
+++ b/README.md
@@ -14,4 +14,4 @@ An installation guide and library documentation are available online at [Read th
 
 ### Citing Arbor
 
-Please refer to [our documentation](https://docs.arbor-sim.org/en/latest/index.html#citing-arbor).
+The Arbor introductory paper and entry on Zenodo can be cited, see [CITATION.bib](CITATION.bib). Please refer to [our documentation](https://docs.arbor-sim.org/en/latest/index.html#citing-arbor) for more information.
diff --git a/doc/index.rst b/doc/index.rst
index 9cfaa697..8ccc3e49 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -41,31 +41,6 @@ Latest version
 Version 0.5.2
     |z052|
 
-    .. code-block:: latex
-
-        @software{nora_abi_akar_2021_4428108,
-        author       = {Nora {Abi Akar} and
-                        John Biddiscombe and
-                        Benjamin Cumming and
-                        Felix Huber and
-                        Marko Kabic and
-                        Vasileios Karakasis and
-                        Wouter Klijn and
-                        Anne Küsters and
-                        Alexander Peyser and
-                        Stuart Yates and
-                        Thorsten Hater and
-                        Brent Huisman and
-                        Sebastian Schmitt},
-        title        = {arbor-sim/arbor: Arbor Library v0.5},
-        month        = jan,
-        year         = 2021,
-        publisher    = {Zenodo},
-        version      = {v0.5},
-        doi          = {10.5281/zenodo.4428108},
-        url          = {https://doi.org/10.5281/zenodo.4428108}
-        }
-
 Version 0.2
     |z02|
 
@@ -73,20 +48,18 @@ Version 0.1
     |z01|
 
 Introductory paper
-    .. code-block:: latex
+    |intropaper|
+
+    A preprint is available at `arXiv <https://arxiv.org/abs/1901.07454>`_.
 
-        @INPROCEEDINGS{
-            paper:arbor2019,
-            author={N. {Abi Akar} and B. {Cumming} and V. {Karakasis} and A. {Küsters} and W. {Klijn} and A. {Peyser} and S. {Yates}},
-            booktitle={2019 27th Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP)},
-            title={{Arbor --- A Morphologically-Detailed Neural Network Simulation Library for Contemporary High-Performance Computing Architectures}},
-            year={2019}, month={feb}, volume={}, number={},
-            pages={274--282},
-            doi={10.1109/EMPDP.2019.8671560},
-            ISSN={2377-5750}}
+Cite (Bibtex format)
+    Introductory paper and latest version on Zenodo:
 
-    Alternative citation formats for the paper can be `downloaded here <https://ieeexplore.ieee.org/abstract/document/8671560>`_, and a preprint is available at `arXiv <https://arxiv.org/abs/1901.07454>`_.
+    .. literalinclude:: ../CITATION.bib
+        :language: latex
 
+.. |intropaper| image:: https://zenodo.org/badge/DOI/10.1109/EMPDP.2019.8671560.svg
+    :target: https://doi.org/10.1109/EMPDP.2019.8671560
 
 .. |zlatest| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1459678.svg
     :target: https://doi.org/10.5281/zenodo.1459678
-- 
GitLab