Extension to python-markdown to support LaTeX (rather than html) output
python-markdown extension to output LaTeX (rather than html) - i.e. to provide support for converting markdown to LaTeX.
Authored by Rufus Pollock: http://rufuspollock.org/
Reworked by Julian Wulfheide ([email protected]) and Pedro GaudĂȘncio ([email protected])
1. Command Line. A script entitled markdown2latex.py is automatically installed. For details of usage see help::
$ markdown2latex.py -h
2. As a python-markdown extension::
>>> import markdown
>>> md = markdown.Markdown(None, extensions=['latex'])
>>> # text is input string ...
>>> latex_out = md.convert(text)
3. Directly as a module (slight inversion of std markdown extension setup)::
>>> import markdown
>>> import mdx_latex
>>> md = markdown.Markdown()
>>> latex_mdx = mdx_latex.LaTeXExtension()
>>> latex_mdx.extendMarkdown(md, markdown.__dict__)
>>> out = md.convert(text)
Version: 1.0 (November 15, 2006)
Version: 1.1 (January 17, 2007)
Version: 1.2 (June 2008)
Version 1.3: (July 2008)
Version 1.3.1: (August 2009)
Version 2.0: (June 2011)
Version 2.1: (August 2013)