Source code for mojo.latex.pyBibtex

"""
pyBibtex - set up Bibtex
========================

"""


# set bibtex sources and style
[docs]class PyBibtex: """set bibtex sources and style :param sources: bibtex sources as string :type sources: str :param style: bibtex style :type style: str """ def __init__(self, sources, style="plain"): """initiliaze class **parameters**: * **sources** - bibtex sources as string * **style** - bibtex style """ self.sources = sources self.style = style # string instance of class def __str__(self): """string instance of class """ return "\n\\bibliography{%s}\n\\bibliographystyle{%s}\n" % (self.sources, self.style)