pub struct Citation {
pub id: Option<String>,
pub note_number: Option<u32>,
pub mode: CitationMode,
pub position: Option<Position>,
pub suppress_author: bool,
pub prefix: Option<String>,
pub suffix: Option<String>,
pub items: Vec<CitationItem>,
pub grouped: bool,
pub sentence_start: bool,
}Expand description
A citation containing one or more references.
Fields§
§id: Option<String>The citation ID (optional, for tracking).
note_number: Option<u32>Note number for footnote/endnote styles. Assigned by the document processor, not the citation processor.
mode: CitationModeCitation mode: integral (narrative) vs non-integral (parenthetical). Only relevant for author-date styles.
position: Option<Position>Position of this citation in the document flow. Detected automatically by the processor or set explicitly by the caller.
Suppress the author name across all items in this citation. Used when the author is already named in the prose: “Smith argues (2020)”. Applies uniformly to all items — per-item suppression is not supported because mixed-visibility citations are typographically incoherent.
prefix: Option<String>Prefix text before all citation items.
suffix: Option<String>Suffix text after all citation items.
items: Vec<CitationItem>The citation items (references being cited).
grouped: boolIf true, the entire citation is a single dynamic compound set.
The first item acts as the head and subsequent items are merged as tails in the bibliography. Ignored for non-numeric (compound-numeric) styles. Item order is preserved and sorting is suppressed when this flag is set.
sentence_start: boolSignal that this citation cluster opens a sentence, so its leading character should be capitalized (e.g. “see also …” → “See also …”).
The processor cannot infer sentence context from rendered text; the host
(document pipeline, WASM bridge, or editor) supplies this flag
explicitly — mirroring LaTeX’s capitalized cite commands (\Citet,
\Parencite, \Textcite). When false (the default), no
capitalization transform is applied.