2017 © Pedro Peláez
 

library markdown-latex

A super fast, highly extensible markdown parser for PHP, that converts markdown files into latex

image

cebe/markdown-latex

A super fast, highly extensible markdown parser for PHP, that converts markdown files into latex

  • Friday, May 19, 2017
  • by cebe
  • Repository
  • 2 Watchers
  • 28 Stars
  • 163,629 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 6 Forks
  • 3 Open issues
  • 7 Versions
  • 8 % Grown

The README.md

markdown-latex

Latest Stable Version Total Downloads Build Status Code Coverage Scrutinizer Quality Score, (*1)

A markdown parser for converting markdown to LaTeX written in PHP., (*2)

Implementation based on cebe/markdown., (*3)

Installation

PHP 5.4 or higher is required to use it., (*4)

Installation is recommended to be done via composer by adding the following to the require section in your composer.json:, (*5)

"cebe/markdown-latex": "*"

Run composer update afterwards., (*6)

Usage

In your PHP project

To use the parser as is, you just create an instance of a provided flavor class and call the parse()- or parseParagraph()-method:, (*7)

// default markdown and parse full text
$parser = new \cebe\markdown\latex\Markdown();
$parser->parse($markdown);

// use github
$parser = new \cebe\markdown\latex\GithubMarkdown();
$parser->parse($markdown);

// parse only inline elements (useful for one-line descriptions)
$parser = new \cebe\markdown\latex\GithubMarkdown();
$parser->parseParagraph($markdown);

The command line script

You can use it to render this readme:, (*8)

bin/markdown-latex README.md > output.tex

Using github flavored markdown:, (*9)

bin/markdown-latex --flavor=gfm README.md > output.tex

or convert the original markdown description to html using the unix pipe:, (*10)

curl http://daringfireball.net/projects/markdown/syntax.text | bin/markdown-latex > output.tex

To create a latex document you have to include the generated latex source in a latex document main.tex:, (*11)

\documentclass[a4paper, 12pt]{article}

% english and utf8
\usepackage[british]{babel}
\usepackage[utf8]{inputenc}

% url support
\usepackage{url}

% make links clickable
\usepackage{hyperref}

% code listings
\usepackage{listings}

% include images
\usepackage{graphicx}

% better tables using tabularx
\usepackage{tabularx}

% support github markdown strikethrough
% http://tex.stackexchange.com/questions/23711/strikethrough-text
\usepackage{ulem}

\begin{document}

    \include{output.tex}

\end{document}

make a PDF with pdflatex main.tex., (*12)

The Versions

19/05 2017

dev-master

9999999-dev https://github.com/cebe/markdown-latex#readme

A super fast, highly extensible markdown parser for PHP, that converts markdown files into latex

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown fast latex extensible gfm markdown-extra

19/05 2017

1.1.4

1.1.4.0 https://github.com/cebe/markdown-latex#readme

A super fast, highly extensible markdown parser for PHP, that converts markdown files into latex

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown fast latex extensible gfm markdown-extra

23/08 2016

1.1.3

1.1.3.0 https://github.com/cebe/markdown-latex#readme

A super fast highly extensible markdown parser for PHP that converts markdown files into latex

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown fast latex extensible gfm markdown-extra

22/08 2016

1.1.2

1.1.2.0 https://github.com/cebe/markdown-latex#readme

A super fast highly extensible markdown parser for PHP that converts markdown files into latex

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown fast latex extensible gfm markdown-extra

22/08 2016

1.1.1

1.1.1.0 https://github.com/cebe/markdown-latex#readme

A super fast highly extensible markdown parser for PHP that converts markdown files into latex

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown fast latex extensible gfm markdown-extra

28/08 2015

1.1.0

1.1.0.0 https://github.com/cebe/markdown-latex#readme

A super fast highly extensible markdown parser for PHP that converts markdown files into latex

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown fast latex extensible gfm markdown-extra

21/10 2014

1.0.0

1.0.0.0 https://github.com/cebe/markdown-latex#readme

A super fast highly extensible markdown parser for PHP that converts markdown files into latex

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown fast latex extensible gfm markdown-extra