Lightweight markup language
This article may require cleanup to meet Wikipedia's quality standards. Please improve this article if you can. (December 2007) |
A lightweight markup language is a markup language with a simple syntax, designed to be easy for a human to enter with a simple text editor, and easy to read in its raw form.
Lightweight markup languages are used in applications where people might be expected to read the document source as well as the rendered output. For instance, a person downloading a software library might prefer to read the documentation in a text editor rather than a browser.
Another application is for entry in web-based publishing, such as weblogs and wikis, where the input interface is a simple text box. The server software converts the input to a common document markup language like HTML or XHTML.
History
Lightweight markup languages were originally used on text-only displays which could not display characters in italics or bold, so informal methods to convey this information had to be developed. This formatting choice was naturally carried forth to plain-text email communications.
1986 international standard SGML provided facilities to define and parse lightweight markup languages using grammars and tag implication. The 1998 W3C XML is a profile of SGML that omits these facilities.
List of lightweight markup languages
The following is a partial list of lightweight markup languages.
Presentation oriented
- AsciiDoc
- BBCode
- Curl (programming language)
- Creole
- Crossmark
- Epytext
- EtText
- Haml
- JsonML
- MakeDoc
- Markdown
- POD
- reStructuredText
- Ruby Document format
- Setext
- SiSU
- SPIP
- Texy!
- Textile
- txt2tags
- UDO
- Wikitext
Data serialization oriented
- Curl (programming language) (homoiconic, but also reads JSON; every object serializes)
- JSON
- OGDL
- Simple Declarative Language
- YAML
Comparison of language features [1]
Language | Implementation language or platf. | HTML export tool | HTML import tool | Tables | Link titles | class attribute | id attribute | Exportable formats | License |
---|---|---|---|---|---|---|---|---|---|
BBCode | PHP, C# | No | No | No | No | No | No | HTML, XHTML | Public Domain |
declarative Curl | ? | ? | ? | Yes | Yes | ? | ? | Implement as macros, text formats, procedures in packages or as objects or anonymous functions | Commercial Curl Inc. and Sumisho |
Creole | ? | ? | ? | Yes | No | No | No | Depends on impl. | CC-by-SA 1.0 |
Markdown | PHP, C#, JavaScript | Yes | Yes | No | Yes | No | No | XHTML | BSD-style & GPL (both) |
Markdown Extra | PHP, Ruby | Yes | Yes | Yes[2] | Yes | No | No | XHTML | BSD-style & GPL (both) |
MediaWiki | PHP | Yes | Yes | Yes | Yes | Yes | Yes | XHTML | GNU GPL |
PmWiki | PHP | No | Yes | Yes | Yes | Yes | Yes | XHTML 1.0 Transitional | GNU GPL |
POD | Perl | Yes | ? | No | Yes | ? | ? | HTML, XHTML, XML, UNIX man, LaTeX, plain text, RTF, DocBook | Artistic License, Perl's license |
reStructuredText | Python, Haskell, Java, | Yes | No | Yes | Yes | Yes | auto | Latex, XML, PseudoXML, HTML (w3c valid), PDF | Python License |
Textile | PHP, Java, Perl, Python, Rubu, ASP, C# | Yes | No | Yes | Yes | Yes | Yes | XHTML | Textile License |
Texy! | PHP, C#; Java in progress | Yes | Yes | Yes | Yes | Yes | Yes | XHTML or HTML | GNU GPL v2 License |
txt2tags | Python | Yes | ? | Yes[3] | Yes | ? | ? | HTML, XHTML, SGML, LaTeX, Lout, UNIX man, Wikipedia, Google Code Wiki, DokuWiki, MoinMoin, MagicPoint, PageMaker | GPL |
Comparison of lightweight markup language syntax
Text/font-face formatting
Language | Bold | Italic | Monospace (teletype) | Notes | |
---|---|---|---|---|---|
AsciiDoc | *bold text*
|
_italic text_
|
+monospace text+
|
Can double operators to ignore special characters (for example **bold _text** yields bold _text).
| |
BBCode | [b]bold text[/b]
|
[i]italic text[/i]
|
[code]monospace text[/code]
|
Formatting works across line breaks. | |
declarative Curl | {bold text}
|
{italic text}
|
{monospace text}
|
text formats accept options like any Curl Visual object | |
Creole | **bold text**
|
//italic text//
|
{{{monospace text}}}
|
Triple curly braces are for nowiki which is optionally monospace in Creole (the choice of the implementor). Future Creole additions may introduce double hash marks (##) for monospace. | |
Markdown | **bold text** or |
*italic text* or |
Non-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, or enclosing text in backticks: |
|
MediaWiki | '''bold text'''
|
''italic text''
|
<code>monospace text</code>
|
||
PmWiki | '''bold text'''
|
''italic text''
|
@@monospace text@@
|
||
POD | B<bold text>
|
I<italic text>
|
C<monospace text>
|
Indented text is also shown as monospaced code. | |
reStructuredText | **bold text**
|
*italic text*
|
``monospace text``
|
||
Textile | *bold text*
or |
_italic text_
or |
@monospace text@
|
Textile uses em (typically italic) and strong (typically bold) tags
on single symbols (and | |
Texy! | **bold text**
|
*italic text* or
|
`monospace text`
|
Texy uses by default em (typically italic) and strong (typically bold) tags. It is possible to configure library to use another tags.
| |
txt2tags | **bold text**
|
//italic text//
|
``monospace text``
|
Section headers
Language | Format | Notes |
---|---|---|
AsciiDoc | = Level 1 Header
or |
Close equals signs are optional (ignored if present). Level 1 is document/page title. |
BBCode | Does not support section headers | |
declarative Curl | {heading level=1 Header}
|
Usual options available for a Curl Visual obbject. |
Creole | = Level 1 Header
|
Close equals signs are optional (ignored if present). |
Markdown | # Level 1 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. |
MediaWiki | == Level 2 Header ==
|
= is available for level 1 header, but its use is discouraged in Wikipedia (reserved for page title). More = are possible, up to 6. |
PmWiki | !! Level 2 Header
|
! is available for level 1 header, but its use is discouraged in PmWiki (used for the page title). More ! are possible, up to 6. |
POD | =head1 Level 1 heading
|
|
reStructuredText | Chapter 1 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
|
Up to 6 levels |
Texy! | ### Level 1 Header
|
You can optionally "close" the #-style headers with an equal number of #'s. The #-style headers support up to 6 levels. The underlined style headers support four levels (### *** === ----). Resulting absolute levels numbers are calculated dynamically. Optionally, less chars can denote higher header level. |
txt2tags | = Level 1 Header =
|
Up to 6 levels. Using + characters instead of = characters creates numbered headers (the default being unnumbered).
|
Link syntax
Language | Syntax | Notes |
---|---|---|
AsciiDoc | http://www.example.com
|
|
BBCode | [url]http://www.example.com[/url]
|
Some BBCode implementations can auto-parse URLs as well and convert them to a elements.
|
declarative Curl | {link href={url "http://www.example.com"}, Link text}
|
An option is target="" Note that {url } is itself a Curl macro |
Creole | [[Internal Page]]
|
Free standing URL's are also detected. |
Markdown | [Link text](http://www.example.com "optional title attribute")
or |
Allows for an optional title attribute.
|
MediaWiki | [[Internal page]]
|
Wikitext can auto-parse URLs as well and convert them to a elements.
|
PmWiki | [[Internal page]]
|
Wikitext can auto-parse URLs without spaces in them as well and convert them to a elements.
|
POD | L</Internal Link>
|
The core POD standard does not support external links with titles. |
reStructuredText | `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 (optional title attribute)":http://www.example.com
or |
Allows for an optional title attribute.
|
Texy! | "Link text .(optional title)[opt. class or ID]{opt. style}":http://www.example.com
or |
Texy! modifiers allows for an optional title attribute, CSS classes, ID, inline style and HTML element attributes. Example: "Link .(title)[class#id]{color: blue;rel:nofollow}"
|
txt2tags | [Link text www.example.com]
|
Txt2tags can auto-parse URLs as well and convert them to a elements. Also has support for targeting references within the same text, not just URLs.
|
See also
References
External links
- Interesting notes with many links
- C2's list
- Curl Markup to replace HTML+CSS+JS
- Inhabitants of the authoring ecosphere
- List at otl website
- A comparison
- Pandoc: a versatile inter-format converter
- wikibooks Curl
es:Lenguaje de marcas ligero fr::Langage de balisage léger ja:軽量マークアップ言語 ru:Язык разметки#Легковесные языки разметки
If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...