Skip to main content

An MkDocs plugin that enables managing citations with BibTex

Project description

testing codecov Language grade: Python

mkdocs-bibtex

A MkDocs plugin for citation management using bibtex.

Setup

Install the plugin using pip:

pip install mkdocs-bibtex

Next, add the following lines to your mkdocs.yml:

plugins:
  - search
  - bibtex:
      bib_file: "refs.bib"
      cite_style: "pandoc"

If you have no plugins entry in your config file yet, you'll likely also want to add the search plugin. MkDocs enables it by default if there is no plugins entry set.

Options

  • bib_file - Name of your bibtex file. Either the absolute path or the path relative to mkdocs.yml
  • bib_dir - Directory for bibtex files to load, same as above for path resolution
  • cite_style - The way you place citations into text: "pandoc" for [@myRef] and "plain" for @myRef
  • bib_command - The command for your bibliography, defaults to \bibliography
  • full_bib_command - The command for your bibliography, defaults to \full_bibliography
  • csl_file - Bibtex CSL file to format the citation with, defaults to None, using a built in plain format instead

Usage

In your markdown files:

  1. Add your citations as you would normally using either "plain" or "pandoc" style
  2. Add in \bibliography or whatever you set your bib_command to where you want your references.
  3. Add in \full_bibliography or whatever you set your full_bib_command to where you want the full set of references. Note: This is not guaranteed to work yet since one issue is the order in which markdown files are processed. Might need to do something using the on_files() event first.
  4. (Optional) Setup csl_file to control the citation text formatting.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs-bibtex-0.3.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

mkdocs_bibtex-0.3.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs-bibtex-0.3.1.tar.gz.

File metadata

  • Download URL: mkdocs-bibtex-0.3.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for mkdocs-bibtex-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c0855da194656a499499800756db2b0832e224bc172d48faf135d412276f26a1
MD5 e2523112454e6be15c8374e235eb2b81
BLAKE2b-256 a327b4cec0c940393ef7e9c425199e3cdb5737c8e20fc3e1bdac549996d66eeb

See more details on using hashes here.

File details

Details for the file mkdocs_bibtex-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_bibtex-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for mkdocs_bibtex-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9dafb77706f410512ecd3aaad89531103047fd629aa472636c9d915a091eb28e
MD5 8111923ae32fd51658e3a1c422e6647c
BLAKE2b-256 ec9e5c2fdb811e13df08c67104ab67b3cb5be0f8c56ce3167bbe6a600c19bfd0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page