An MkDocs plugin that enables managing citations with BibTex
Project description
mkdocs-bibtex
A MkDocs plugin for citation management using bibtex.
Setup
Install the plugin using pip:
pip install mkdocs-bibtex
If you're having trouble with pandoc, try installing the conda-forge version of pypandoc:
conda install -c conda-forge pypandocwhich will install a version with built in pandoc binaries
Next, add the following lines to your mkdocs.yml:
plugins:
- search
- bibtex:
bib_file: "refs.bib"
markdown_extensions:
- footnotes
The footnotes extension is how citations are linked for now.
If you have no
pluginsentry in your config file yet, you'll likely also want to add thesearchplugin. MkDocs enables it by default if there is nopluginsentry set.
Options
bib_file- Name of your bibtex file. Either the absolute path or the path relative tomkdocs.ymlbib_dir- Directory for bibtex files to load, same as above for path resolutionbib_command- The command for your bibliography, defaults to\bibliographyfull_bib_command- The command for your full bibliography, defaults to\full_bibliographycsl_file- Bibtex CSL file to format the citation with, defaults to None, using a built in plain format instead
Usage
In your markdown files:
- Add your citations as you would if you used pandoc, IE:
[@first_cite;@second_cite] - Add in
\bibliographyor whatever you set yourbib_commandto where you want your references. - Add in
\full_bibliographyor whatever you set yourfull_bib_commandto where you want the full set of references. Note: This is not work just right since this plugin can't dictate the orer in which files are processed. The best way to ensure the file with the full bibliography gets processed last is to use numbers in front of file/folder names to enforce an order of processing, IE:01_my_first_file.md - (Optional) Setup
csl_fileto control the citation text formatting.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file mkdocs-bibtex-2.0.3.tar.gz.
File metadata
- Download URL: mkdocs-bibtex-2.0.3.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fd1d1c11b3844e41e76ddee281c4c4c5182b6c459da6ae4f1363fb430dc4a68
|
|
| MD5 |
df2155e9a2b5c192521128b046528502
|
|
| BLAKE2b-256 |
74a95b362495c4c6b29ad0516d1777ee33356a2fcd0f8542e8ce00176dc07b46
|