citation check
Check a document's citations against its bibliography.
Invocation#
lem-cli citation check <id-or-title> [--bib <path>] [--document <path>]Inputs and options#
- id-or-title selects the paper.
- --bib <path> overrides the bibliography. --document <path> overrides the LaTeX or Markdown document.
Output and state#
Prints JSON containing the document and bibliography paths, citation_keys, bibliography_keys, missing_keys, duplicate_bibliography_keys, and unused_bibliography_keys, and a message counting each, `<n> missing, <n> duplicate, <n> unused`. A completed check has state checked even when missing or duplicate keys make it unclean. Keys are read from the document and every file it inputs or includes.
Refusals#
- --bib or --document without a following path refuses with “<option> needs a path”.
- The tool returns state failed for no local source directory, no local document, a missing bibliography, or a read/parse error — including an included file that is missing or cannot be read, named with its cause; the CLI prints that result and exits nonzero.
- Paper lookup refuses an empty or unmatched selector.