citeformer.render

Deterministic CSL reference rendering (home-grown, no citeproc-py dependency).

This module is what makes citeformer’s “references are never generated by the LLM” promise real. Home-grown formatters (citeformer.render.formatters) consume Source.metadata (CSL-JSON) and render both the inline marker and the full bibliography entry. The model is never involved.

Public API:

  • render_references(sources, citations, style) — produce the Reference list for a generation call.

  • render_single_reference(source, style_name) — convenience helper.

  • get_formatter(name) — look up a CitationFormatter directly.

  • bundled_style_names() — list of built-in styles.

  • style_citation_format(name) — classify a style (author-date / author / numeric / note / label).

Subpackages

Submodules