Skip to content

mosaic cite ​

Prints a citation for a DOI: BibTeX, or a formatted reference in APA, MLA, Chicago, Harvard or Vancouver style.

Usage ​

bash
mosaic cite 10.3389/fphy.2019.00140                      # BibTeX
mosaic cite 10.3389/fphy.2019.00140 --style apa          # a formatted reference
mosaic cite https://doi.org/10.3389/fphy.2019.00140 -s vancouver
mosaic cite 10.3389/fphy.2019.00140 --style apa --copy   # and to the clipboard

Behaviour ​

StyleMade byNetwork
bibtex (default)mosaic, from the paper's metadataonly when the DOI is not in the cache (Crossref lookup)
apa, mla, chicago, harvard, vancouverCrossref content negotiation at doi.orgalways

The DOI may be bare, doi:-prefixed or a https://doi.org/ URL. A DOI looked up on Crossref is saved in the cache.

--copy tries pyperclip, then pbcopy (macOS), clip (Windows), xclip or xsel (Linux). If none works the citation is still printed, with a warning.

Exit code 1 for an unknown style, a DOI that cannot be parsed or is not found, or no network.

See also: tutorial 6, exporting recipes.

Options ​

mosaic cite [OPTIONS] DOI
ArgumentValueDescription
DOITEXTDOI of the paper (e.g. 10.48550/arXiv.1706.03762)
OptionValueDefaultDescription
--style, -sTEXTbibtexCitation style: bibtex (default), apa, mla, chicago, harvard, vancouver
--copy, -cCopy the formatted citation to the clipboard

Released under GPL-3.0-or-later, BSD-2-Clause, BSD-3-Clause or MIT, at your choice.