Textile (markup language)
Textile is a lightweight markup language originally developed by Dean Allen and billed as a "humane web text generator". Textile converts its marked-up text input to valid, well-formed XHTML and also inserts character entity references for apostrophes, opening and closing single and double quotation marks, ellipses and em dashes.
Textile was originally implemented in PHP, but has been translated into other programming languages including Perl, Python, Ruby, ASP, Java and C#.
Textile is distributed under a BSD-style license and is included with, or available as a plugin for, several content-management systems.
- Version 2.0 beta was released in 2004 as part of the Textpattern content management system.
- Version 2.0 was released in 2006.
- Version 2.2 was subsequently released in 2010.
- Version 2.4 was upgraded in 2012[1] and released with Textpattern v4.5.0 on August 27, 2012.[2]
Contents |
Textile syntax examples [edit]
This is not an exhaustive listing of Textile's syntax. For a list of all available options in Textile 2, see
- a full reference and example list of Textile v2.0,
- a sandbox for Textile v2.0 and 2.2 with explanation, and
- Textile v.2.4 documentation with real-time conversion.
Emphasized text [edit]
_emphasized_ (e.g., italics)
*strongly emphasized* (e.g., boldface)
Lists [edit]
* An item in a bulleted (unordered) list * Another item in a bulleted list ** Second Level ** Second Level Items *** Third level
# An item in an enumerated (ordered) list xxxxxxx # Another item in an enumerated list yyyyyy ## Another level in an enumerated list vvvvvvvv
#8 Enumerated list, starting by number eight # List item No. 9 Some text paragraph #_ Continuing list item, numbered as 10 # Item 11
* This is a bullet *# this is the start of an enumerated list within a bulleted list *# this is another item list of an enumerated list within a bulleted list **# this is another level of an enumerated list within a bulleted list * This is another bullet
; Definition list term : Definition list data item : Another data item
- coffee := Hot _and_ black - tea := Also hot, but a little less black - milk := Nourishing beverage for baby cows. Cold drink that goes great with cookies. =:
Tables [edit]
A | character must be at the beginning and end of every row.
|_. Header |_. Header |_. Header | | Cell 1 | Cell 2 | Cell 3 | | Cell 1 | Cell 2 | Cell 3 |
Code [edit]
Generic example:
@your code here@
Blocks of code:
bc.. puts "This style (notice the double dot) handles blank lines." puts "This is the second line of code." puts "This is the fourth."
Or alternatively you can use this syntax for small blocks:
bc. puts "This style (notice the single dot) stops at the first blank line." puts "This is the second line of code." This is not code.
Headings [edit]
You must leave a blank line after each heading.
h1(#id). An HTML first-level heading h2. An HTML second-level heading h3. An HTML third-level heading h4. An HTML fourth-level heading h5. An HTML fifth-level heading h6. An HTML sixth-level heading
Blockquotes [edit]
bq. This text will be enclosed in an HTML blockquote element.
Notes [edit]
Text with a link to some reference[1] fn1. Footnote explanation
Text with a link to some reference[#mylabel] notelist. note#mylabel Explanation as an auto-numbered endnote
Links [edit]
"(classname)link text(title tooltip)":link_address
Email links [edit]
"(classname)link text(title tooltip)":mailto:someone@example.com
Images [edit]
!imageurl(alt text)!
Formatting help table [edit]
This table summarizes the available textile markers
| Textile | Visual result | |
|---|---|---|
| *bold text* | bold text | |
| _italic text_ | italic text | |
| *_bold italic text_* | bold italic text | |
| -strikethrough text- | ||
| *-bold strikethrough text-* | ||
| *_-bold italic strikethrough text-_* | ||
| +underlined text+ | underlined text | |
| *+bold underlined text+* | bold underlined text | |
| _+italic underlined text+_ | italic underlined text | |
| *_+bold italic underlined text+_* | bold italic underlined text | |
| *_-+bold italic strikethrough underlined text+-_* | ||
| %{font-size:18pt}font size% | font size | |
| %{color:red}text in red% | text in red | |
| Link to click for the list of colours | ||
| # Chapter 1 |
|
|
| * bulleted list |
|
|
|
* bulleted list ** 2-level |
|
|
|
|Table | with two columns | |and two | rows | |
Table | with two columns |
| and two | rows | |
"Link to Wikipedia":http://www.wikipedia.org |
Link to Wikipedia | |
!http://commons.wikimedia.org/wiki/Special:Filepath/Wikipedia-logo-en.png! |
![]() |
|
| Brand ^TM^ | Brand TM | |
| Text ~subscript~ | Text subscript | |
Users [edit]
See also [edit]
- Comparison of document markup languages
- Comparison of notetaking software
- Comparison of documentation generators
- Textpattern, a content-management system, also originally by Dean Allen, which uses Textile.
- Setext, an old lightweight markup language (1992).
- Markdown, a widespread lightweight markup language.
- MultiMarkdown, an improved Markdown.
- Org-mode, a similar lightweight markup.
- Asciidoc, a similar lightweight markup language supporting many types of documents.
- reStructuredText, a similar lightweight markup (also used to produce Python documentations).
- txt2tags, another similar lightweight markup language.
External links [edit]
- Textile Homepage, updated 2011, as well as examples of an implementation in PHP
- TxStyle, Textile 2.4 reference for Textpattern CMS
- Textile2 Manual, for Movable Type CMS
- hobix.com Textile Reference, an example-based Textile reference.
- Text::Textile, an implementation of Textile in Perl.
- PyTextile, an implementation of Textile in Python.
- RedCloth, an implementation of Textile in Ruby.
- vbsTextile, an implementation of Textile for Microsoft Active Server Pages
- Textile UDF, an implementation of Textile in ColdFusion.
- JTextile, an implementation of Textile in Java
- Textile4j, an implementation of Textile in Java
- Textile-j, an implementation of Textile in Java that includes components for SWT and JFace and an Eclipse editor plugin
- Xilize, a superset of Textile for generating webpages, documents, and websites with any plain-text editor (plugin for jEdit available). Opensource.
- Textile.NET, an implementation of Textile in C#/.NET
- octalforty Brushie Text, one more implementation of Textile in C#/.NET
- Textile Markup with MediaWiki, a way to use Textile on MediaWiki sites like Wikipedia
- Textile.js, a modern implementation in Javascript; Supports Node.js, AMD, and CommonJS Spec.
- Textile JS, an implementation of Textile in Javascript
- JQtextile, an implementation of Textile using the jQuery Javascript framework
- Mylyn WikiText, an implementation of Textile in Java that includes components for SWT and JFace, Ant tasks and an Eclipse editor plugin
- Textile Module, a module which allows Textile to be implemented in Drupal sites
- TiddlyWiki Textile Formatter Plugin, a plugin which allows the use of Textile in the open source application TiddlyWiki
- Textile 2.2 announcement
- Textile fork Changes to original textpattern-based PHP textile implementation as forked from Textpattern at r3359
