• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

rufuspollock/markdown2latex: Extension to python-markdown to support LaTeX (rath ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

rufuspollock/markdown2latex

开源软件地址(OpenSource Url):

https://github.com/rufuspollock/markdown2latex

开源编程语言(OpenSource Language):

Python 100.0%

开源软件介绍(OpenSource Introduction):

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])

Usage:

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)

History

Version: 1.0 (November 15, 2006)

  • First working version (compatible with markdown 1.5)
  • Includes support for tables

Version: 1.1 (January 17, 2007)

  • Support for verbatim and images

Version: 1.2 (June 2008)

  • Refactor as an extension.
  • Make into a proper python/setuptools package.
  • Tested with markdown 1.7 but should work with 1.6 and (possibly) 1.5 (though pre/post processor stuff not as worked out there)

Version 1.3: (July 2008)

  • Improvements to image output (width)

Version 1.3.1: (August 2009)

  • Tiny bugfix to remove duplicate keyword argument and set zip_safe=False
  • Add [width=\textwidth] by default for included images

Version 2.0: (June 2011)

  • PEP8 cleanup
  • Major rework since this was broken by new Python-Markdown releases

Version 2.1: (August 2013)

  • Add handler for non locally referenced images, hyperlinks and horizontal rules
  • Update math delimiters



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap