Skip to main content

Module sorting

Module sorting 

Source
Expand description

Bibliography and citation reference sorting. Reference sorting for bibliographies, groups, and citations.

ReferenceSorter is the engine’s single sorting stack: bibliography sorts (explicit bibliography.sort, processing presets, and config-level sort: mapped via Sort::group_sort()), per-group sorting, citation-item ordering, and disambiguation all route through it. Sort keys are compiled once and cached per reference (Schwartzian transform), so collation and article stripping are not re-derived on every comparison. Supports:

  • Type-order sorting (explicit sequence like [legal-case, statute, treaty])
  • Name-order sorting (family-given vs given-family for multilingual bibliographies)
  • Standard sort keys (author, title, issued) and an opt-in reference-ID tiebreak

Structs§

ReferenceSorter
Sorts grouped bibliography entries using group-specific sort rules.