CSS Styling

For optimal rendering of the bibliography, place a file citations.css in the docs/src/assets folder of your project, containing, e.g.,

.citation dl {
  display: grid;
  grid-template-columns: max-content auto; }
.citation dt {
  grid-column-start: 1; }
.citation dd {
  grid-column-start: 2;
  margin-bottom: 0.75em; }
.citation ul {
 padding: 0 0 2.25em 0;
 margin: 0;
 list-style: none;}
.citation ul li {
 text-indent: -2.25em;
 margin: 0.33em 0.5em 0.5em 2.25em;}
.citation ol li {
 padding-left:0.75em;}

The HTML generated by DocumenterCitations also uses CSS classes canonical and noncanonical to distinguish between canonical and non-canonical blocks. While these are not used in the above citations.css, a custom citations.css could implement different formatting for the two types of bibliographies.

The citations.css file must be listed as an asset for Documenter.HTML in docs/make.jl:

makedocs(;
    format = Documenter.HTML(
        # ...
        assets=String["assets/citations.css"],
    ),
    plugins=[bib],
    # ...
)