Markdown
From Wikipedia, the free encyclopedia
Markdown is a lightweight markup language, originally created by John Gruber and Aaron Swartz, which aims for maximum readability and "publishability" of both its input and output forms, taking many cues from existing conventions for marking up plain text in email. Markdown converts its marked-up text input to valid, well-formed XHTML and replaces left-pointing angle brackets ('<') and ampersands with their corresponding character entity references. Markdown was originally implemented in Perl by Gruber, but has since been re-implemented by others in a variety of programming languages (see below for list). It is distributed under a BSD-style license and is included with, or available as a plugin for, several content-management systems.
Contents |
[edit] Syntax examples
This is not an exhaustive listing of Markdown's syntax, and in many cases multiple styles of syntax are available to accomplish a particular effect. See the full Markdown syntax for more information. Characters which are ordinarily interpreted by Markdown as formatting commands will instead be interpreted literally if preceded by a backslash; for example, the sequence '\*' would output an asterisk rather than beginning a span of emphasized text. Markdown also does not transform any text within a "raw" block-level XHTML element; thus it is possible to include sections of XHTML within a Markdown source document by wrapping them in block-level XHTML tags.
Emphasized text:
*emphasis* (e.g., italics)
**strong emphasis** (e.g., boldface)
Code:
`code`
Lists:
- An item in a bulleted (unordered) list - Another item in a bulleted list
1. An item in an enumerated (ordered) list 2. Another item in an enumerated list
Headings:
HTML headings are produced by placing a number of hashes before the header text corresponding to the level of heading desired (HTML offers six levels of headings), like so:
# First-level heading
#### Fourth-level heading
The first two heading levels also have an alternate syntax:
First-level heading ===================
Second-level heading --------------------
Blockquotes:
> This text will be enclosed in an HTML blockquote element.
Links:
[link text here](link.address.here "link title here")
Images:

[edit] See also
- Markdown Extra
- SmartyPants, a text filter which implements certain typographic niceties, also by John Gruber and often used in conjunction with Markdown.
- List of lightweight markup languages
[edit] External links
- Official website, featuring full overview and exhaustive syntax reference.
- Markdown test cases for developers
- Markdown wiki at infogami
[edit] Additional implementations
- Babelmark tool for comparing implementations
- C#: Markdown.NET
- C: markdown
- ColdFusion: CFX_Markdown
- Common Lisp: cl-markdown
- Haskell: Pandoc
- Java: markdownj
- JavaScript: Showdown
- Lua: markdown.lua
- newLISP: markdown-newlisp
- Perl: Text::Markdown
- PHP: PHP Markdown
- Python: python-markdown and python-markdown2
- Ruby: BlueCloth
- Ruby: Maruku
[edit] Extensions
The following packages implement Markdown and also extend it with additional functionality:
- MultiMarkdown (Perl)
- PHP Markdown Extra
- python-markdown2 (supports some of the extensions of PHP Markdown)
- python-markdown (has an extension system for adding new syntax)
- Markout (Java)
- Maruku (Ruby)
- Pandoc (Haskell): see Pandoc’s markdown vs. standard markdown
[edit] Syntax Guides
- Markdown: Dingus online converter
- Markdown cheat sheet
- Quick Markdown Syntax Guide
- Markdown and PHP Markdown Extra Cheat Sheet includes additions in PHP Markdown Extra
- Simple Markdown Syntax Reference plain text/html toggle
- Markdown Cheat Sheet at Ollieman.net
[edit] Converters
- HTML to Markdown
- html2text.py (in Python)
- Markdownify (in PHP)
- Make.text (a bookmarklet which converts any web page into Markdown.)
- XHTML-to-Markdown XSLT (a stylesheet, works with XHTML only)
- Pandoc (a Haskell library that can convert between many formats including Markdown, HTML, reStructuredText, LaTeX, and others)
- Other formats to Markdown
- Pandoc (a Haskell library that can convert between many formats including Markdown, HTML, reStructuredText, LaTeX, and others)
- odt2txt (a Python script to convert OpenDocument text files to Markdown)
- word_markdown_macro (a Microsoft Word macro that converts some of Word's formatting into Markdown)
[edit] Web publishing software using Markdown (server-side support)
- Wiki:
- Weblog:
- Blojsom (via the Markdown plugin)
- Blosxom (via the Markdown plugin)
- Frog CMS (via the Markdown plugin)
- Mephisto
- Movable Type (via the Markdown plugin)
- NanoBlogger (via the Markdown plugin)
- Textpattern (see "Textile replacement" at the PHP Markdown page)
- Tumblr
- Typo
- Wordpress (via the Markdown plugin)
- WCMS
- Drupal - see Marksmarty module
- Plone - (Native support in Plone 3)
- CoalEngine (Native Support)
- Web application frameworks:
- Django (separate download/install of python-markdown required -- see django.contrib.markup for details)
- Ruby on Rails (separate download/install of BlueCloth or Maruku required -- see Markdown on Rails)
- refbase
[edit] Text editor support
- General-purpose editors: TextMate (Built into the Automation system), BBEdit (as of version 8.6), SubEthaEdit (through a user-contributed mode, from Chris Biagini), Vim (text editor) (through a user-contributed mode, from Ben Williams), Emacs, TextWrangler, Smultron
- Weblog editors: Ecto, MarsEdit
- A plugin is available for the Eclipse (software) editor, from ThinkTank Mathematics.
- Scrivener from Literature and Latte for Mac OS X

