Pybtex / Docs / Supported formats

# Supported formats

- Bibliography formats

  - BibTeX

  - BibTeXML

  - YAML

- Bibliography style formats

- Output formats

## Bibliography formats

### BibTeX

BibTeX is the default bibliography format used by Pybtex:

    @BOOK{strunk-and-white,
        author = "Strunk, Jr., William and E. B. White",
        title = "The Elements of Style",
        publisher = "Macmillan",
        edition = "Third",
        year = 1979
    }

Some links:

- A basic description of the BibTeX format.

- An in-depth description of the quirky BibTeX syntax.

### BibTeXML

BibTeXML is an attempt to translate the BibTeX format into XML. The above BibTeX snippet translates into this XML:

    <bibtex:entry id="strunk-and-white">
        <bibtex:book>
            <bibtex:author>
                <bibtex:person>
                    <bibtex:first>William</bibtex:first>
                    <bibtex:last>Strunk</bibtex:last>
                    <bibtex:lineage>Jr.</bibtex:lineage>
                </bibtex:person>
                <bibtex:person>
                    <bibtex:first>E.</bibtex:first>
                    <bibtex:middle>B.</bibtex:first>
                    <bibtex:last>White</bibtex:last>
                </bibtex:person>
            </bibtex:author>
            <bibtex:title>The Elements of Style</bibtex:title>
            <bibtex:publisher>Macmillan<bibtex:publisher>
            <bibtex:edition>Third</bibtex:edition>
            <bibtex:year>1979</bibtex:year>
        </bibtex:book>
    </bibtex:entry>

### YAML

We added our own experimental YAML-based bibliography format to Pybtex. It is mostly a straightforward translation of BibTeXML into YAML:

    strunk-and-white:
        type: book
        author:
            - first: William
              last: Strunk
              lineage: Jr.
            - first: E.
              middle: B.
              last: White
        title: The Elements of Style
        publisher: Macmillan
        edition: Third
        year: 1979

## Bibliography style formats

Pybtex currently supports bibliography styles in two formats:

- BibTeX’ `.bst` files

- Pybtex’ Pythonic styles

## Output formats

BibTeX’s `.bst` styles usually contain hardcoded LaTeX markup and are LaTeX-only. Pythonic styles in Pybtex are markup-independent and can output multiple formats, including:

- LaTeX

- Markdown

- HTML

- plain text

There is also pybtex-docutils by Matthias Troffaes that integrates Pybtex with Docutils, and sphinxcontrib-bibtex by the same author, integrating Pybtex with Sphinx.

← Command line interface
Table of contents
Python API →