The official reference manual for Textile 2. Textile is the lightweight, humane web text generator included in Textpattern and many other web applications.
Within a single paragraph, common ASCII representations of emphasis will be transformed into XHTML equivalents.
Emphasis is added with _ underscores.
The _underlying_ cause. | The underlying cause. |
<p>The <em>underlying</em> cause.</p> |
Strong text is indicated by * asterisks.
The *underlying* cause. | The underlying cause. |
<p>The <strong>underlying</strong> cause.</p> |
em and strong are semantic tags, usually represented by browsers as italic and bold text. To produce italic and bold tags instead, use double underscores and asterisks.
The __underlying__ cause. | The underlying cause. |
<p>The <i>underlying</i> cause.</p> |
The **underlying** cause. | The underlying cause. |
<p>The <b>underlying</b> cause.</p> |
Double question marks represent a citation, like the title of a book.
??The Count of Monte Cristo??, by Dumas. | The Count of Monte Cristo, by Dumas. |
<p><cite>The Count of Monte Cristo</cite>, by Dumas.</p> |
Inserted and deleted text is represented by + plus and - minus symbols.
Scratch -that-, replace with +this+. | Scratch |
<p>Scratch <del>that</del>, replace with <ins>this</ins>.</p> |
Subscript and superscript text is indicated by ~ tilde and ^ caret characters.
log ~2~ n | log 2 n |
<p>log <sub>2</sub> n</p> |
2 ^x^ | 2 x |
<p>2 <sup>x</sup></p> |
Percentage marks will enclose text with a XHTML span tag.
The %underlying% cause. | The underlying cause. |
<p>The <span>underlying</span> cause.</p> |
To include a short snippet of code such as XHTML or Javascript, surround it with @ “at” symbols. XHTML significant characters within a code phrase will be escaped for display to the reader.
About the @<hr />@ tag. | About the |
<p>About the <code><hr /></code> tag.</p> |
Links are represented by double quotes and a colon.
"link text":http://example.com/ | |
<p><a href="http://example.com/">link text</a></p> |
The host name may be ommitted for local links.
"link text":/example | |
<p><a href="/example">link text</a></p> |
A title may be placed in () parentheses.
"link text(with title)":http://example.com/ | |
<p><a href="http://example.com/" title="with title">link text</a></p> |
For frequent linking to a single URL, you can specify a link alias with [] square brackets.
Here's "a link":tstate, and "another link":tstate to the same site. [tstate]http://thresholdstate.com/ | Here’s a link, and |
<p>Here’s <a href="http://thresholdstate.com/">a link</a>, and<br /> <a href="http://thresholdstate.com/">another link</a> to the same site.</p> |
Use ! exclamation marks to insert an image tag.
!/img.gif! |
|
<p><img src="/img.gif" alt="" /></p> |
!http://thresholdstate.com/img.gif! |
|
<p><img src="http://thresholdstate.com/img.gif" alt="" /></p> |
Use () parentheses to include “alt” text.
!/img.gif(alt text)! |
|
<p><img src="/img.gif" title="alt text" alt="alt text" /></p> |
Images may be combined with links by using an !image! in place of the link text.
!/img.gif!:http://textpattern.com/ | |
<p><a href="http://textpattern.com/"><img src="/img.gif" title="" alt="" /></a></p> |
Previous: Paragraph text Next: Blocks
29 April 2007, 11:49 by Alex ·
Commenting is closed for this article.
Awesome, thank you so much Alex for taking the time to do this. This is the Textile guide I’ve been waiting for.
— Robin Apr 29, 06:32 pm #
Great manual!
This is the “All you ever wanted to know about Textile but you were afraid to ask” guide!
I think I spot a typo error in the link alias explanation, in the [textile] code.
— Maniquà Apr 30, 02:26 pm #
Outstanding! This is a great guide to the new version. Just one small bug report — the canonical reference guide lacks some of the styles applied to examples in this blog post. It’s a little thing, but it really improves readability.
Thanks for the documentation. :-)
— Adam Messinger Apr 30, 03:14 pm #
Great manual!
A tiny note: when you click on Link to the latest Textile Reference, some of the formatting seems to be gone (esp. the light red & green boxes)
— Gerhard Apr 30, 11:48 pm #
Thanks for the manual! Could you also add a table of contents?
— Jon-Michael May 4, 03:14 am #
I’ve have to warn you i’ve seen quite a few links going here…
http://textile.thresholdstate.com/reference/
You may want to redirect those here until that one is ready.
— Robin May 11, 10:59 pm #
Thanks Robin – redirected.
— Alex May 12, 09:01 am #
Very timely. This is very useful, just as I am trying to learn Textpattern. Thank you.
P.S. Any chance of a PDF version? It is usable but a bit broken in Opera 9.20.
— David Hucklesby May 14, 03:16 pm #
Is it possible to make a link that opens up a new window? Any chance to add such a feature?
— Andreas Cahen May 27, 08:20 pm #