mdbook-bibtex

Crates.iomdbook-bibtex
lib.rsmdbook-bibtex
version0.1.0
created_at2026-01-08 07:52:18.131948+00
updated_at2026-01-08 07:52:18.131948+00
descriptionAdds support for bibliographies to mdbook. Backed by hayagriva, supporting all CSL citation styles.
homepage
repositoryhttps://github.com/t1mlange/mdbook-bibtex
max_upload_size
id2029723
size68,221
Tim Lange (t1mlange)

documentation

README

mdbook-bibtex

Adds support for bibliographies to mdbook. Backed by hayagriva, supporting all CSL citation styles.

Installation

cargo install mdbook-bibtex

Configuration

Add to your book.toml:

[preprocessor.bibtex]
# Supports both .bib and .yaml bibliographies
bibliography = "bibliography.bib"
# Heading for the bibliography section
title = "Bibliography"
# Either a CSL XML file path or one of the official citation style names
style = "ieee"
# Where to place the bibliography: "global" (new chapter at the end), 
# "chapter" (at the end of each chapter), or "footnotes" (as footnotes)
biblio_location = "global"
# If true, missing citation keys will cause the build to fail
error_on_missing_keys = true
# If true, citations will show a tooltip with the full reference
citation_preview = true
# If true, all bibliography entries will be included (even if not cited)
display_all = true

Usage

Cite sources using @@key where key is the citation identifier from your bibliography file.

Comparison to mdbook-bib

Initially, I planned to extend mdbook-bib to add CSL support and citation tooltips. However, integrating hayagriva for CSL functionality required rewriting most of the core logic, and the swappable template feature had to be removed in the process.

tl;dr: mdbook-bibtex supports all standard citation styles out-of-the-box, but currently lacks customizable appearance templates.

Commit count: 1

cargo fmt