Comparison of lightweight markup languages

From Wikipedia, the free encyclopedia

This article provides a basic feature comparison for several lightweight markup languages.

Contents

[edit] Comparison of Syntax

[edit] Text/font-face formatting

Comparing text formatting syntax
Language Bold Italic Monospace (Teletype) Notes
Almost Free Text _bold text_ ''italic text'' |monospace text| Formatting will not occur across line breaks unless the first formatting character is the first character on the line.
BBCode [b]bold text[/b] [i]italic text[/i] [code]monospace text[/code] Formatting works across line breaks.
Markdown **bold text**

or
__bold text__

*italic text*

or
_italic text_

Non-monospace text

    monospace text
    more monospace text

Markdown doesn't use bold and italic tags, but rather em (typically italic) and strong (typically bold) tags.

Monospace text is created by indenting that line 4 spaces or one tab character, there is no way of doing inline monospaced text.

ReStructured Text **bold text** *italic text* ``monospace text``
Textile *bold text* _italic text_ <code>monospace text</code> Textile doesn't use bold and italic tags, but rather em (typically italic) and strong (typically bold) tags.

[edit] Section headers

Comparing section header formatting
Language Format Notes
Almost Free Text * Level 1 Header

** Level 2 Header

Up to 4 levels
BBCode Does not support section headers
Markdown # Level 1 Header

## Level 2 Header
or
Level 1 Header
==============

Level 2 Header
--------------

You can optionally "close" the #-style headers with an equal number of #'s. The #-style headers support up to 6 levels. The = and - style headers support only the two shown.
ReStructured Text Chapter 1 Title

===============

Section 1.1 Title
-----------------

Subsection 1.1.1 Title
~~~~~~~~~~~~~~~~~~~~~~

Section 1.2 Title
-----------------

Chapter 2 Title
===============

Any of the following characters can be used as the "underline": = - ` : ' " ~ ^ _ * + # < >. The same character must be used for the same indentation level and may not be used for a new indentation level.
Textile h1. Level 1 Header

h2. Level 2 Header

Up to 6 levels

[edit] Link Syntax

Comparing link syntax
Language Syntax Notes
Almost Free Text [Link text (http://www.example.com)] Also has support for targeting references within the same text, not just URLs.
BBCode [url]http://www.example.com[/url]

[url=http://www.example.com]Link text[/url]

Some BBCode implementations can auto-parse URLs as well and convert them to a elements.
Markdown [Link text](http://www.example.com "optional title attribute") Allows for an optional title attribute.
ReStructured Text `Link text <http://www.example.com/>`_ Can also be done in a non-embedded format which may be seen as more readable.
Textile "Link text":http://www.example.com

[edit] Comparison of language features

A lot of this was taken from http://bluebones.net/2005/02/humane-text-formats/

Comparing language features
Language HTML export tool HTML import tool Tables Link titles class attribute id attribute Exportable formats License
Almost Free Text Yes No No No No No HTML, LaTeX, lout, DocBook, RTF Clarified Artistic License
BBCode No No No No No No ? ?
Markdown Yes Yes No Yes No No XHTML BSD-style
ReStructured Text Yes No Yes No Yes auto Latex, XML, PseduoXML, HTML Python
Textile Yes No Yes Yes Yes Yes XHTML Textile License