Plugin to add support for numeric citations to Documenterl.jl
Author JuliaQuantumControl
1 Star
Updated Last
1 Year Ago
Started In
March 2023


Version Stable Dev Build Status Coverage

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]."

Rendered bibliography of two references, [1] and [2]

Alternatively, author-year and alphabetic citations styles are available, see the Citation Style Gallery. In addition, it is possible to define custom styles.


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.


  • Place a BibTeX refs.bib file in the docs/src folder of your project. Then, in docs/make.jl, instantiate the CitationBibliography plugin and pass it to makedocs:

    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


    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.


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.

Used By Packages

No packages found.