【问题标题】:Markdown to LaTeX in Python在 Python 中 Markdown 到 LaTeX
【发布时间】:2012-04-18 17:53:09
【问题描述】:

用于 Python 的 Markdown-Latex 包的版本很少,但我无法使用当前版本的 Markdown 包。有没有人有一个使用 python 的工作示例:

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

谢谢!

【问题讨论】:

  • 什么包?您能否提供该代码的链接和更多上下文?

标签: python latex markdown


【解决方案1】:

您可以将扩展名的文件重命名为“mdx_latex.py”,然后在同一目录下运行以下命令:

import markdown
md = markdown.Markdown(extensions=['latex'])
out = md.convert(text)

【讨论】:

  • 此解决方案不再有效。第二行给出错误AttributeError: Failed to initiate extension 'latex': module 'latex' has no attribute 'makeExtension'
猜你喜欢
  • 2019-06-14
  • 1970-01-01
  • 2019-01-21
  • 2019-02-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多