Skip to main content

Module processor

Module processor 

Source
Expand description

Citation, bibliography, sorting, and document processing logic. The Citum processor for rendering citations and bibliographies.

§Architecture

Processor is intentionally a thin facade over a small set of focused implementation modules:

  • setup: construction, configuration resolution, and numbering setup
  • note_context: note-number normalization and citation position inference
  • citation: citation rendering orchestration
  • bibliography: bibliography rendering, grouping, and document-facing helpers

The processor remains intentionally “dumb”: it applies the style as written without implicit logic. Style-specific behavior (for example, suppressing a publisher for journals) should be expressed in the style YAML via overrides, not hardcoded here.

§CSL 1.0 Compatibility

The processor implements the CSL 1.0 “variable-once” rule:

“Substituted variables are suppressed in the rest of the output to prevent duplication.”

This is tracked by TemplateComponentTracker during template rendering. Suppressed components do not claim variables; see docs/specs/TEMPLATE_RENDERING_SEMANTICS.md.

Modules§

disambiguation
Author/date disambiguation and year-suffix assignment.
document
Document-level citation processing.
labels
Label generation for alphanumeric citation styles.
matching
Matching helpers for substitution and repeated-contributor detection. Matching logic for determining if references share primary contributors.
rendering
Template rendering orchestration and per-component state handling. Rendering logic for citation and bibliography output.

Structs§

FinalizedRun
A RunState that has completed the registration phase.
ProcessedReferences
Processed output containing citations and bibliography.
Processor
The Citum processor facade.
RunState
Mutable per-render-run state: citation numbering, cite-order tracking, and dynamic (cite-time) compound-group membership.

Functions§

validate_compound_sets
Validate optional compound sets against the loaded bibliography.