1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/*
SPDX-License-Identifier: MIT OR Apache-2.0
SPDX-FileCopyrightText: © 2023-2026 Bruce D'Arcus and Citum contributors
*/
//! Citum Processor
//!
//! This crate provides the core citation and bibliography processing functionality
//! for the Citum project. It takes style definitions, bibliographic data, and
//! citation information and produces formatted output.
//!
//! The processor is designed to be pluggable with different renderers and supports
//! advanced features like disambiguation, sorting, and localization.
//! # Example
//!
//! ```rust
//! use citum_engine::{
//! Bibliography, Citation, CitationItem, CitationSpec, Config, Contributor,
//! ContributorForm, ContributorList, ContributorRole, DateForm, EdtfString,
//! Monograph, MonographType, MultilingualString, Processing, Processor, Reference,
//! Rendering, StructuredName, Style, StyleInfo, TemplateComponent, TemplateContributor,
//! TemplateDate, TemplateDateVariable, Title, WrapPunctuation,
//! };
//!
//! // Create a simple style using native Citum types
//! let style = Style {
//! info: StyleInfo {
//! title: Some("Simple".to_string()),
//! id: Some("simple".into()),
//! ..Default::default()
//! },
//! options: Some(Config {
//! processing: Some(Processing::AuthorDate),
//! ..Default::default()
//! }),
//! citation: Some(CitationSpec {
//! template: Some(vec![
//! TemplateComponent::Contributor(TemplateContributor {
//! contributor: ContributorRole::Author,
//! form: ContributorForm::Short,
//! rendering: Rendering::default(),
//! ..Default::default()
//! }),
//! TemplateComponent::Date(TemplateDate {
//! date: TemplateDateVariable::Issued,
//! form: DateForm::Year,
//! rendering: Rendering::default(),
//! ..Default::default()
//! }),
//! ]),
//! wrap: Some(WrapPunctuation::Parentheses.into()),
//! ..Default::default()
//! }),
//! ..Default::default()
//! };
//!
//! // Create a bibliography using native Citum reference data
//! let mut bib = Bibliography::new();
//! let reference = Reference::Monograph(Box::new(Monograph {
//! id: Some("kuhn1962".into()),
//! r#type: MonographType::Book,
//! title: Some(Title::Single("The Structure of Scientific Revolutions".to_string())),
//! author: Some(Contributor::ContributorList(ContributorList(vec![
//! Contributor::StructuredName(StructuredName {
//! family: MultilingualString::Simple("Kuhn".to_string()),
//! given: MultilingualString::Simple("Thomas".to_string()),
//! suffix: None,
//! dropping_particle: None,
//! non_dropping_particle: None,
//! }),
//! ]))),
//! issued: EdtfString("1962".to_string()),
//! ..Default::default()
//! }));
//! bib.insert("kuhn1962".to_string(), reference);
//!
//! // Create processor and render
//! let processor = Processor::new(style, bib);
//! let citation = Citation {
//! id: Some("c1".into()),
//! items: vec![CitationItem { id: "kuhn1962".to_string(), ..Default::default() }],
//! ..Default::default()
//! };
//! let result = processor.process_citation(&citation).unwrap();
//! assert_eq!(result, "(Kuhn, 1962)");
//! ```
/// Interactive document-level API for batch citation formatting.
/// Error types returned by citation and bibliography processing.
/// Citation, bibliography, sorting, and document processing logic.
/// Output-format renderers and string conversion helpers.
/// Template value resolution and formatting helpers.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ProcessorError;
pub use DocumentFormat;
pub use ;
pub use ;
pub use ;
pub use ;
// Re-export Locale from citum_schema for convenience
pub use Locale;