https://github.com/darwindarak/mdx_bib
A Python-Markdown extension for RMarkdown-style bibliographies and citations
https://github.com/darwindarak/mdx_bib
Last synced: over 1 year ago
JSON representation
A Python-Markdown extension for RMarkdown-style bibliographies and citations
- Host: GitHub
- URL: https://github.com/darwindarak/mdx_bib
- Owner: darwindarak
- License: mit
- Created: 2015-07-13T16:11:45.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-06-23T04:15:55.000Z (about 2 years ago)
- Last Synced: 2025-03-18T05:22:52.112Z (over 1 year ago)
- Language: Python
- Size: 9.77 KB
- Stars: 15
- Watchers: 2
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bibliography and Citation support for Python-Markdown
This extension to Python Markdown is inspired by the support for citations in [R Markdown][].
It looks for all citation keys with the form `@` inside matching square brackets and appends a bibliography to the output.
The references associated with the citation keys can be defined manually or generated from a BibTeX file.
## Installation
Running
```bash
$ python setup.py build
$ python setup.py install
```
will install a module named `mdx_bib`.
```python
import markdown
from mdx_bib import CitationsExtension
cite = CitationsExtension(bibtex_file='library.bib', order='unsorted')
html = markdown.markdown(text, extensions=[cite])
```
## Syntax
Citation keys are any identifiers inside square brackets with a `@`-prefix
```markdown
Some claim [see @adams98].
Some claim [@adams98; @barney04].
```
The first line will be converted
```html