Markdown to LaTeX in Python

Go To StackoverFlow.com

1

There are few versions of the Markdown-Latex package for Python, but I can't get any to work with the current version of the Markdown package. Does anyone have a working example using python like:

lines = markdown.markdown(lines,extensions=[MarkdownLatex()]

Thanks!

2012-04-05 00:08
by Jeff
What package? Can you provide a link and a bit more context for that code - Niklas B. 2012-04-05 01:01


2

You can rename the file of the extension to "mdx_latex.py" and then, in the same directory, you can run the following command:

import markdown
md = markdown.Markdown(extensions=['latex'])
out = md.convert(text)
2012-04-05 01:33
by Jonathan
Ads