All Projects → cebe → Markdown Latex

cebe / Markdown Latex

Licence: mit
A markdown parser for converting markdown to LaTeX written in PHP.

Projects that are alternatives of or similar to Markdown Latex

Laravel Smartmd
🎯 A simple markdown editor compatible most markdown parse,You can choose any parse methods on server or client,like Mathematical formula、flowchart、upload image...
Stars: ✭ 76 (+90%)
Mutual labels:  markdown, latex, markdown-parser
Pandoc Starter
📄 My pandoc markdown templates and makefiles
Stars: ✭ 443 (+1007.5%)
Mutual labels:  markdown, latex
Pytablewriter
pytablewriter is a Python library to write a table in various formats: CSV / Elasticsearch / HTML / JavaScript / JSON / LaTeX / LDJSON / LTSV / Markdown / MediaWiki / NumPy / Excel / Pandas / Python / reStructuredText / SQLite / TOML / TSV.
Stars: ✭ 422 (+955%)
Mutual labels:  markdown, latex
Remarkable
Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.
Stars: ✭ 5,252 (+13030%)
Mutual labels:  markdown, markdown-parser
Multimarkdown 6
Lightweight markup processor to produce HTML, LaTeX, and more.
Stars: ✭ 394 (+885%)
Mutual labels:  markdown, latex
Crowbook
Converts books written in Markdown to HTML, LaTeX/PDF and EPUB
Stars: ✭ 399 (+897.5%)
Mutual labels:  markdown, latex
Mditor
📝 [ M ] arkdown + E [ ditor ] = Mditor
Stars: ✭ 523 (+1207.5%)
Mutual labels:  markdown, markdown-parser
Mistletoe
A fast, extensible and spec-compliant Markdown parser in pure Python.
Stars: ✭ 368 (+820%)
Mutual labels:  markdown, latex
Rdiscount
Discount (For Ruby) Implementation of John Gruber's Markdown
Stars: ✭ 756 (+1790%)
Mutual labels:  markdown, markdown-parser
Readme2tex
Renders TeXy Math for Github Readmes
Stars: ✭ 826 (+1965%)
Mutual labels:  markdown, latex
Cocalc
CoCalc: Collaborative Calculation in the Cloud
Stars: ✭ 888 (+2120%)
Mutual labels:  markdown, latex
Mark Mind
MarkMind — a mind map and outliner editor for Windows, Mac, Linux, andriod and ios ,it support markdown in node.
Stars: ✭ 385 (+862.5%)
Mutual labels:  markdown, latex
Marktext
📝A simple and elegant markdown editor, available for Linux, macOS and Windows.
Stars: ✭ 22,894 (+57135%)
Mutual labels:  markdown, latex
Franklin.jl
(yet another) static site generator. Simple, customisable, fast, maths with KaTeX, code evaluation, optional pre-rendering, in Julia.
Stars: ✭ 413 (+932.5%)
Mutual labels:  latex, markdown-parser
Letter Boilerplate
Finest letter typesetting from the command line
Stars: ✭ 374 (+835%)
Mutual labels:  markdown, latex
Redpen
RedPen is an open source proofreading tool to check if your technical documents meet the writing standard. RedPen supports various markup text formats (Markdown, Textile, AsciiDoc, Re:VIEW, reStructuredText and LaTeX).
Stars: ✭ 466 (+1065%)
Mutual labels:  markdown, latex
Markdown
A super fast, highly extensible markdown parser for PHP
Stars: ✭ 945 (+2262.5%)
Mutual labels:  markdown, markdown-parser
Md4c
C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
Stars: ✭ 322 (+705%)
Mutual labels:  markdown, markdown-parser
Marcdown
👻 Lightweight realtime markdown viewer and editor - Simple, clean and beautiful https://liyasthomas.github.io/marcdown
Stars: ✭ 345 (+762.5%)
Mutual labels:  markdown, markdown-parser
Mdmath
LaTeX Math for Markdown inside of Visual Studio Code.
Stars: ✭ 675 (+1587.5%)
Mutual labels:  markdown, latex

markdown-latex

Latest Stable Version Total Downloads Build Status Code Coverage Scrutinizer Quality Score

A markdown parser for converting markdown to LaTeX written in PHP.

Implementation based on cebe/markdown.

Installation

PHP 5.4 or higher is required to use it.

Installation is recommended to be done via composer by adding the following to the require section in your composer.json:

"cebe/markdown-latex": "*"

Run composer update afterwards.

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:

// 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:

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

Using github flavored markdown:

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

or convert the original markdown description to html using the unix pipe:

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:

\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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].