Finds a paper by title, author, or DOI, adds BibTeX to references.bib, and shows citation syntax. Use when adding a reference.
Find a paper, create a BibTeX entry, add it to references.bib, and provide the citation syntax.
$ARGUMENTS — a paper description, title, author name, or DOI (e.g., "Acemoglu 2001 colonial origins" or "10.1257/aer.91.5.1369")Parse the argument to determine if it is a DOI or a descriptive search query.
Search for the paper:
Construct a valid BibTeX entry with these fields (at minimum):
@article{key, (or @book, @incollection, etc. as appropriate)author, title, journal (or booktitle), , , , , yearvolumenumberpagesdoilastname_yearword (e.g., acemoglu2001colonial)Read references.bib and check for duplicate keys:
Append the new entry to references.bib (add a blank line before the new entry)
Show the user the citation syntax for use in index.qmd:
@key → "Author (Year)"[@key] → "(Author, Year)"[@key1; @key2]Ask if the user wants to create an annotation note in references/ (see /project:literature-note)
references.bib does not exist, create it with the new entry.