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 pypandoc
which 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"
cite_style: "pandoc"
markdown_extensions:
- footnotes
The footnotes extension is how citations are linked for now.
If you have no
plugins
entry in your config file yet, you'll likely also want to add thesearch
plugin. MkDocs enables it by default if there is noplugins
entry set.
Options
bib_file
- Name of your bibtex file. Either the absolute path or the path relative tomkdocs.yml
bib_dir
- Directory for bibtex files to load, same as above for path resolutioncite_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 insteadunescape_for_arithmatex
- Optional; set toTrue
to avoid the\(
\)
issue with pymdownx.arithmatex
Usage
In your markdown files:
- Add your citations as you would normally using either "plain" or "pandoc" style
- Add in
\bibliography
or whatever you set yourbib_command
to where you want your references. - Add in
\full_bibliography
or whatever you set yourfull_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 theon_files()
event first. - (Optional) Setup
csl_file
to 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-1.1.0.tar.gz
.
File metadata
- Download URL: mkdocs-bibtex-1.1.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1731a4de241e0a1219488106780df77764dd3355d7f09cc051c2ca72b344a43 |
|
MD5 | 7952579c0de4585a53f9c20d5f80ca76 |
|
BLAKE2b-256 | 9a17d477e3b987a6c26fe7a159b9cefc2e24e968964c8e2b83037dda53332a37 |