Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/darwindarak/mdx_bib

A Python-Markdown extension for RMarkdown-style bibliographies and citations
https://github.com/darwindarak/mdx_bib

Last synced: about 2 months ago
JSON representation

A Python-Markdown extension for RMarkdown-style bibliographies and citations

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

Some claim [see