QuantumCitations.jl

Github v0.2.1

QuantumCitations.jl is a fork of DocumenterCitations.jl adapted primarily 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 common in 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]."

QuantumCitations.jl by default differs from DocumenterCitations.jl in the following ways:

  • A numeric citation style is used by default, with citation numbers that are sequential throughout the entire documentation.
  • Only cited references are included in the main bibliography by default.

QuantumCitations.jl furthermore has several additional features:

  • The @bibligraphy block can have additional options to customize which references are included, see Syntax for the Bibliography Block.
  • It is possible to generate secondary bibliographies, e.g., for a specific page.
  • There is Syntax to create links to bibliographic references, with arbitrary text.
  • The following variations of the @cite command are supported: @citet, @citep, @cite*, @citet*, @citep*, @Citet, @Citep, @Cite*, @Citet*, @Citep*. See Syntax for Citations for details.
  • Citations can include notes, e.g., "Eq. (1)".

In addition to the default numeric style, built-in author-year and alphabetic styles are available. It is possible to extend these by defining arbitrary custom styles.

Installation instructions

You can install the latest version of QuantumCitations.jl using the built-in package manager (accessed by pressing ] in the Julia command prompt) to add the package and instantiate/build all dependencies

julia>]
pkg> add QuantumCitations

Telling Documenter.jl about your bibliography

First, 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");
    style=:numeric
)
makedocs(bib, ...)

Somewhere in your documentation, like a References page, include a markdown block

```@bibliography
```

to insert the bibliography for all cited references in the project. See Syntax for the Bibliography Block for more options. You will also want to add custom CSS Styling to your documentation to improve the rendering of your bibliography.

How to cite references in your documentation

You can put citations anywhere in your docs, both in the markdown pages and in the docstrings of any functions that are shown as part of the API documentation: The basic syntax is, e.g., [GoerzQ2022](@cite), for a BibTeX key GoerzQ2022 in refs.bib, which will be rendered in the default numeric style as "[2]". See Syntax for Citations for more details.

Clicking on the citations takes you to the bibliography ("References").

Home References

This page cites the following references:

[1]
C. Brif, R. Chakrabarti and H. Rabitz. Control of quantum phenomena: past, present and future. New J. Phys. 12, 075008 (2010).
[2]
M. H. Goerz, S. C. Carrasco and V. S. Malinovsky. Quantum Optimal Control via Semi-Automatic Differentiation. Quantum 6, 871 (2022).

Also see the full bibliography for further references cited throughout this documentation.