Skip to main content

Module values

Module values 

Source
Expand description

Template value resolution and formatting helpers. Value extraction for template components.

This module provides the logic to extract formatted values from references based on template component specifications.

Re-exports§

pub use contributor::format_contributors_short;
pub use date::int_to_letter;

Modules§

contributor
Contributor extraction and name-formatting helpers. Rendering logic for contributors (authors, editors, translators).
date
Date extraction and date-formatting helpers. Rendering logic for date fields with locale-aware formatting.
identifier
Supplementary standardized identifier extraction. Rendering for supplementary standardized identifiers.
list
List-component value extraction helpers. Rendering logic for list components with configurable delimiters.
locator
Locator rendering logic. Locator rendering logic for citations.
message
Locale message component rendering. Rendering logic for locale-authored message components.
number
Numeric variable extraction and page-range helpers. Rendering logic for numeric variables (volume, issue, pages, citation numbers, etc.).
range
Shared helpers for collapsing consecutive numeric or ordinal numbering. Shared helpers for collapsing ordered consecutive numbering into spans.
term
Locale term resolution helpers. Rendering logic for localized term components.
text_case
Title text-case transform functions. Title text-case transforms.
title
Title extraction and title-formatting helpers. Rendering logic for title fields with smartening, form selection, and text-case transforms.
type_label
type-label component rendering (localized reference-type description). Rendering logic for the type-label component: a localized description of a reference’s own type (e.g. “Dataset”, “Classical work”), with a genre/medium fallback before the locale term lookup.
variable
Generic variable extraction helpers. Rendering logic for simple variables (DOI, URL, ISBN, etc.).

Structs§

ProcHints
Processing hints computed before rendering a reference or citation item.
ProcValues
Processed values ready for rendering.
RenderOptions
Options for rendering.

Enums§

RenderContext
Context for rendering (citation vs bibliography).
ScriptClass
Script partition used to select semantic wrap-punctuation glyphs (docs/specs/PUNCTUATION_REALIZATION.md, increment 1). Extends by adding variants (Cyrillic, Arabic, …) as later increments broaden coverage; v1 covers the two classes the embedded bilingual styles need.

Traits§

ComponentValues
Trait for extracting values from template components.

Functions§

apply_abbreviation
Apply abbreviation substitution if the map contains an entry for value.
effective_component_language
Resolve the effective language for the specific template component being rendered.
effective_field_language
Resolve the effective language for one logical field scope on a reference.
effective_item_language
Resolve the effective language for the primary title of a reference.
is_latin_script_language
Whether a BCP 47 language tag resolves to the Latin script.
punctuation_realization_context
Resolve the effective script class and punctuation realization overrides for one item.
realization_default_script_class
Resolve the style-declared realization-default script class from options.multilingual.realization-default, defaulting to ScriptClass::Latin when unset — today’s wrap: parentheses/brackets behavior, byte-for-byte.
resolve_effective_url
Resolve the effective URL for a component, checking local links then falling back to global config.
resolve_language_script
Resolve a BCP 47 language tag to its effective ISO 15924 script code.
resolve_multilingual_name
Resolve a multilingual contributor name based on style configuration.
resolve_multilingual_string
Resolve a multilingual string based on style configuration.
resolve_url
Resolve the URL for a component based on its links configuration and the reference data.
script_class
Resolve the effective script class from positive script evidence only.
should_strip_periods
Check if periods should be stripped based on three-tier precedence.
strip_all_periods
Strip every period from a string.
strip_trailing_periods
Strip trailing periods from a string.
wrap_script_class
Resolve the script class to realize semantic wrap punctuation as.