Skip to main content

Crate mini_cite

Crate mini_cite 

Source
Expand description

BibTeX-backed inline citations and footnotes for Markdown.

Pairs a directory of .bib files with [@key]-style inline citations in a Markdown body, rewriting each citation into a numbered footnote reference and appending a matching footnote block.

let bibliography = mini_cite::Bibliography::load_dir("bib")?;
let style = mini_cite::CiteStyle::default();
let html = mini_cite::process("Small things matter [@smith2020].", &bibliography, &style)?;

The emitted classes and the back-link’s glyph are configurable through CiteStyle; the markup’s structure and its fn-N/fnref-N ids are not.

Structs§

Bibliography
Every citation key defined by a directory of .bib files, and the entry each key resolves to.
CiteStyle
How the emitted citation markup is labelled and named.
Entry
A single parsed BibTeX entry.

Enums§

CiteError
Errors that can occur while loading a bibliography or processing citations.

Functions§

format_citation
Renders one entry as a single-line citation.
parse_entries
Parses every entry in a .bib source string, in file order.
process
Rewrites every [@key] citation in body into a numbered footnote reference and appends the matching footnote block.
rewrite
Rewrites every [@key] citation in body into a numbered footnote reference, returning the rewritten body and the cited keys in first-appearance order.

Type Aliases§

Result
Result alias for fallible mini-cite operations.