Skip to content

anteprandium/mdx_bibtex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mdx_bibtex

A proof-of-concept bibtex extension for Python markdown.

Loading a bibliography

First of all, you need to indicate a bibliography to use this extension. You can do that from python,

import markdown
import mdx_bibtex
md=markdown.Markdown(extensions=['bibtex(bibliography=example.bib)'])

or, if you are using the Meta extension, with the Meta key bibliography

Bibliography: example.bib
Title: Nifty title

Neat, you're ready to use the bibliography.

In this later case, you can tell the bibtex extension where to look for files using the 'root' configuration key:

import markdown
import mdx_bibtex
md=markdown.Markdown(extensions=['bibtex(root=/path/to/bib/folder)'])

Using the bibliography

The most basic syntax is @(key) to cite a key from your bib file. Other possibilities:

Use To get
@(wiles95) (Wiles 1995)
@(wiles95,bennet70) (Wiles 1995, Bennett 1970)
@(wiles95)[p. 11] (Wiles 1995, p. 11)
@[see](wiles95) (see Wiles 1995)
@[see](wiles95)[p. 11] (see Wiles 1995, p. 11)
@+(wiles95) Wiles
@-(wiles95) (1995)
@.(wiles95) Wiles 1995
@/(wiles95) Nothing, equivalent of \nocite{wiles95}
@/(*) Nothing, equivalent of \nocite{*}

At the end of the document, use [REFERENCES] to indicate where your list of references will go.

## References 

[REFERENCES]

References

  • (Bennett 1970), Bennett, B.M., On the characteristic functions of a local ring, The Annals of Mathematics, 91(1), 25–87.
  • (Wiles 1995), Wiles, Andrew John, Modular elliptic curves and Fermat’s Last Theorem, Annals of Mathematics, 141(3), 553-572.

About

A proof-of-concept bibtex extension for Python markdown.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published