GithubHelp home page GithubHelp logo

pedrogaudencio / markdown2latex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rufuspollock/markdown2latex

0.0 2.0 1.0 144 KB

Extension to python-markdown to support LaTeX (rather than html) output

Python 100.00%

markdown2latex's 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

markdown2latex's People

Contributors

pedrogaudencio avatar rufuspollock avatar

Watchers

 avatar  avatar

Forkers

liuzheng

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.