Expand description
Map parsed BibTeX records ([mos_bib::BibEntry]) into CSL Items.
This is a best-effort, infallible mapping: BibTeX entry types become the
closest CSL ItemType (unknown โ ItemType::Document), and recognised
BibTeX fields become CSL variables. Unrecognised fields are dropped, as CSL
processors do.
Name handling is intentionally minimal: author/editor are split on
whitespace-delimited and tokens, and per name a Last, First comma form
or First Last form becomes family/given. Single-token names are kept as a
literal. Full BibTeX name parsing (protected institutional
names, von/Jr particles) and month handling are future refinements.
Functionsยง
- apply_
field ๐ - Place one recognised BibTeX field onto the item; drop unknown fields.
- is_
conference_ ๐entry - is_
name_ ๐separator - is_
report_ ๐entry - item_
from_ bib_ entry - Map one BibTeX entry to a CSL
Item. - item_
type_ ๐for - BibTeX entry type (already lowercased by
mos-bib) โ closest CSL type. - library_
from_ bibliography - Map a whole [
Bibliography] to CSL items keyed by citation key. - parse_
name_ ๐without_ comma - parse_
names ๐ - Split a BibTeX name list on whitespace-delimited
andtokens. - parse_
one_ ๐name Last, FirstandFirst Lastforms become family/given; single-token names stay literal becausemos-bibdoes not preserve institutional bracing yet.- parse_
year ๐ - Parse a BibTeX
yearinto anissuedDate; a non-numeric year is kept as a literal. - push_
name ๐