#mdbook #mdbook-preprocessor #citeproc #mdbook-pandoc #pandoc-citeproc

app mdbook-bibfile-referencing

An mdBook preprocessor to add bibfile referencing to each page

3 releases (breaking)

0.3.0 Dec 11, 2022
0.2.0 Jun 20, 2022
0.1.0 Jul 30, 2021

#176 in Text processing


272 lines

mdBook Bibfile Referencing

Build status crates.io

An mdBook preprocessor that uses Pandoc to add referencing to each chapter from a bibfile.


In your book.toml just specify:

command = "mdbook-bibfile-referencing bibliography.bib ieee.csl"

You must include the path to the bibliography, followed by the path to your CSL (Citation Style Language) file which defines the style of the generated references (you can download pre-made ones here).

In each chapter of your book markdown source you can use the references in the format [@key, PAGE_NUMBER] - see the Pandoc Citeproc Docs for the full syntax.


Make sure you have Pandoc Installed.

cargo install mdbook-bibfile-referencing

Usage in CI/CD

There is a docker image: ghcr.io/jacob-pro/mdbook-bibfile-referencing:latest provided to make it simple and fast to build an mdbook in a CI system. For example in GitHub Actions you could have:

    runs-on: ubuntu-18.04
      image: ghcr.io/jacob-pro/mdbook-bibfile-referencing:latest
      - uses: actions/checkout@v2
      - name: Build book
        run: mdbook build


~684K SLoC