Lem/Docs

citation add

Resolve one citation query and add it to a paper's bibliography.

Invocation#

Shell
lem-cli citation add <id-or-title> <query> [--bib <path>] [--document <path>]

Inputs and options#

  • id-or-title selects the paper. Every non-option word after it is joined into the required query.
  • --bib <path> overrides the bibliography. --document <path> overrides the LaTeX document.
  • The citation-adder executable is selected by LEM_CITATION_ADDER_PATH.

Output and state#

Runs one citation-adder process, prints the LemCitationAddResult as JSON, and exits nonzero if its state is failed. A successful result names the command, document path, and bibliography path used.

Refusals#

  • A missing query refuses with “citation add needs a query”; --bib or --document without a path refuses with “<option> needs a path”.
  • The tool returns a failed result for no local source directory, no local LaTeX document, a missing citation-adder script, or an execution error; the CLI then exits nonzero.
  • Paper lookup refuses an empty or unmatched selector.