QuantumCitations.jl
QuantumCitations.jl is a fork of DocumenterCitations.jl adapted to the conventions of (quantum) physics. It adds support for BibTeX citations in documentation pages generated by Documenter.jl, especially the documentation of the packages in the JuliaQuantumControl organization.
By default, QuantumCitations.jl uses the numeric citation style of the APS journals, see the REVTeX author's guide. Citations are shown in-line, as a number enclosed in square brackets, e.g., "Optimal control is a cornerstone in the development of quantum technologies [1]."
Alternatively, author-year and alphabetic citations styles are available, see the Citation Style Gallery. In addition, it is possible to define custom styles.
Installation
The QuantumCitations
package can be installed with Pkg as
pkg> add QuantumCitations
In most cases, you will just want to have QuantumCitations
in the project that builds your documentation (e.g. test/Project.toml
). Thus, you can also simply add
QuantumCitations = "259add83-af3e-4603-9706-50e341d5574e"
to the [deps]
section of the relevant Project.toml
file.
Usage
-
Place a BibTeX
refs.bib
file in thedocs/src
folder of your project. Then, indocs/make.jl
, instantiate theCitationBibliography
plugin and pass it tomakedocs
:using QuantumCitations bib = CitationBibliography(joinpath(@__DIR__, "src", "refs.bib")) makedocs(bib, ...)
-
Optional, but recommended: add CSS to properly format the bibliography
-
Somewhere in your documentation include a markdown block
```@bibliography ```
that will expand into a bibliography for all citations in the documentation.
-
Anywhere in the documentation or in docstrings, insert citations as, e.g.,
[GoerzQ2022](@cite)
, which will be rendered as "[2]" and link to the full reference in the bibliography.
See the documentation for additional information.
Documentation
The documentation of QuantumCitations.jl
is available at https://juliaquantumcontrol.github.io/QuantumCitations.jl. In addition to documenting the usage of the package, it also serves as its showcase.