citum-engine 0.53.3

Citum citation and bibliography processor
Documentation
/*
SPDX-License-Identifier: MIT OR Apache-2.0
SPDX-FileCopyrightText: © 2023-2026 Bruce D'Arcus
*/

//! Rendering utilities for Citum templates.
//!
//! This module provides the logic to transform processed template components
//! into formatted strings. It supports multiple output formats through a
//! pluggable architecture defined by the [`crate::render::format::OutputFormat`] trait.
//!
//! ## Modules
//! - `format`: Defines the core [`crate::render::format::OutputFormat`] trait.
//! - `plain`, `html`, `djot`, `latex`, `typst`: Concrete renderer implementations.
//! - `component`: Logic for rendering individual template components.
//! - `citation`: Logic for joining components into full citations.
//! - `bibliography`: Logic for rendering bibliographies.

/// Bibliography-level rendering and output assembly helpers.
pub mod bibliography;
/// Citation-level rendering and output assembly helpers.
pub mod citation;
/// Component-level rendering primitives shared by citations and bibliographies.
pub mod component;
pub mod djot;
pub mod format;
pub mod html;
pub mod latex;
pub mod org;
pub mod plain;
pub mod rich_text;
pub mod typst;

#[cfg(test)]
#[allow(
    clippy::unwrap_used,
    clippy::expect_used,
    clippy::panic,
    clippy::indexing_slicing,
    clippy::todo,
    clippy::unimplemented,
    clippy::unreachable,
    clippy::get_unwrap,
    reason = "Panicking is acceptable and often desired in tests."
)]
mod test_formats;

pub use bibliography::{refs_to_string, refs_to_string_with_format};
pub use citation::{citation_to_string, citation_to_string_with_format};
pub use component::{
    ProcEntry, ProcTemplate, ProcTemplateComponent, render_component,
    render_component_with_format_and_renderer,
};
pub use rich_text::render_djot_inline;