--- # From http://thresholdstate.com/articles/4312/the-textile-reference-manual name: paragraph desc: Paragraphs are separated by blank lines. Each paragraph of text is transformed into a XHTML
paragraph block. in: |- A paragraph. Another paragraph. html: |-
A paragraph.
Another paragraph.
--- name: line breaks desc: Line breaks within paragraphs are transformed into XHTML line breaks. in: |- A paragraph with a line break. html: |-A paragraph with
a line break.
Here’s some bold text.
--- name: no paragraph tags desc: A line beginning with a space will be left untouched, and not wrapped intags. in: " No paragraph tags here." html: "No paragraph tags here." valid_html: false --- name: smart quotes desc: Single and double typewriter quotation marks ' and " are transformed into typographically correct “curly” quote marks. in: '"Proceed!" said he to the host.' html: '
“Proceed!” said he to the host.
' --- name: smart quotes 2 in: "'Proceed!' said he to the host." html: "‘Proceed!’ said he to the host.
" --- name: nested quotation marks desc: Single and double quotation marks may be nested one inside the other. in: |- "'I swear, captain,' replied I." html: |-“‘I swear, captain,’ replied I.”
--- name: nested quotation marks 2 in: |- '"I swear, captain," replied I.' html: |-‘“I swear, captain,” replied I.’
--- name: apostrophe glyphs desc: Single quotation marks ' will be turned into apostrophe glyphs when used as such. in: Greengrocers' apostrophe's. html:Greengrocers’ apostrophe’s.
--- name: em-dash glyphs desc: Double -- dashes become an em-dash glyph. in: You know the Italian proverb -- Chi ha compagno ha padrone. html:You know the Italian proverb — Chi ha compagno ha padrone.
--- name: em-dash glyphs 2 in: You know the Italian proverb--Chi ha compagno ha padrone. html:You know the Italian proverb—Chi ha compagno ha padrone.
--- name: en-dash glyphs desc: Single - dashes are replaced with en-dashes. in: You know the Italian proverb - Chi ha compagno ha padrone. html:You know the Italian proverb – Chi ha compagno ha padrone.
--- name: ellipsis character desc: Three period marks become an ellipsis character. in: Meanwhile... html:Meanwhile…
--- name: dimension character desc: An “x” is replaced with the dimension character when used between numbers. in: 1 x 2 x 3 = 6 html:1 × 2 × 3 = 6
--- name: dimension character 2 in: 1x2x3 = 6 html:1×2×3 = 6
--- name: trademark register copyright desc: Trademark, Registered and Copyright symbols are represented by their common plain text equivalents. in: Registered(r) Trademark(tm) Copyright (c). html:Registered® Trademark™ Copyright ©.
--- name: acronyms desc: Acronyms consist of three or more uppercase characters, followed immediately by words in parentheses. in: ABC(Always Be Closing) html:ABC
no_span_caps_html:ABC
--- name: uppercase desc: Uppercase words of three or more characters are enclosed with a special span element. in: IBM or HAL html:IBM or HAL
no_span_caps_html:IBM or HAL
--- name: emphasis desc: Emphasis is added with _ underscores. in: The _underlying_ cause. html:The underlying cause.
--- name: strong text desc: Strong text is indicated by * asterisks. in: The *underlying* cause. html:The underlying cause.
--- name: italic text desc: em is a semantic tag, usually represented by browsers as italic text. To produce italic tags instead, use double underscores. in: The __underlying__ cause. html:The underlying cause.
--- name: bold text desc: strong is a semantic tag, usually represented by browsers as bold text. To produce bold tags instead, use double asterisks. in: The **underlying** cause. html:The underlying cause.
--- name: citation desc: Double question marks represent a citation, like the title of a book. in: ??The Count of Monte Cristo??, by Dumas. html:The Count of Monte Cristo, by Dumas.
--- name: inserted and deleted text desc: Inserted and deleted text is represented by + plus and - minus symbols. in: Scratch -that-, replace with +this+. html:Scratch that, replace with this.
log 2 n
--- name: superscript desc: Superscript text is indicated by ^ caret characters. in: 2 ^x^ html:2 x
--- name: span tag desc: Percentage marks will enclose text with a XHTML span tag. in: The %underlying% cause. html:The underlying cause.
--- name: code desc: 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. in: About the @About the <hr />
tag.
Here’s a link, and
# another link to the same site.
A paragraph.
Continued.
Also a paragraph.
--- name: block quote desc: bq. indicates a quoted block of text. in: |- bq. A quotation. Continued. Regular paragraph. html: |-A quotation.
Continued.
Regular paragraph.
--- name: block quote citation desc: Block quotes may include a citation URL immediately following the period. in: bq.:http://thresholdstate.com/ A cited quotation. html: |---- name: footnotes desc: Footnotes are represented by the fn1., fn2., … block modifiers. in: |- A footnote reference[1]. fn1. The footnote. html: |-A cited quotation.
A footnote reference1.
1 The footnote.
# html: |- #A footnote reference1.
#1 The footnote.
--- name: block code desc: Code such as XHTML, Javascript or PHP may be displayed using the bc. “block code” modifier. XHTML significant characters such as < and > will be escaped within code blocks – bc is used for displaying code to the reader, not for executing it. note: Note that Textile will interpret any blank lines within the code as indicating the end of the code block. See Extended Blocks below for an explanation of how to display longer blocks of code. in: |- bc. html: |-<script>
// a Javascript example
alert("Hello World");
</script>
---
name: preformatted text
desc: Use the pre. block modifier for pre-formatted text. XHTML significant characters within the block will be escaped.
note: pre. is almost identical to bc., with the exception that ...
tags are not used within the block. in: |- pre. Pre-formatted text html: |-Pre-formatted text--- name: notextile desc: The notextile. block modifier applies no Textile processing at all to a block. Raw XHTML characters are passed through untouched, so this may be used to insert explicit XHTML markup, or execute Javascript or PHP code. in: |- notextile. html: |- valid_html: false --- name: class attribute desc: CSS classes are specified with () parentheses. in: p(myclass). My classy paragraph. html:My classy paragraph.
--- name: id attribute desc: CSS IDs are specified with () parentheses. in: p(#myid). My ID paragraph. html:My ID paragraph.
--- name: style attribute desc: CSS styles are specified with {} braces. in: p{color:red}. Red rum. html:Red rum.
--- name: lang attribute desc: Languages are specified with [] brackets. in: p[fr-fr]. En français. html:En français.
--- name: phrase modifiers desc: The same syntax may be applied to phrase modifiers. in: A *(myclass)classy* phrase. html:A classy phrase.
--- name: phrase modifiers 2 in: An _(#myid2)ID_ phrase. html:An ID phrase.
--- name: phrase modifiers 3 in: The %{color:blue}blue% room. html:The blue room.
--- name: block and phrase attributes combined desc: Block and phrase attributes may be combined. in: p(myclass#myid3){color:green}[de-de]. A complex paragraph. html:A complex paragraph.
--- name: block and phrase attributes combined 2 in: A ??(myclass#myid4){color:green}[de-de]complex?? phrase. html:A complex phrase.
--- name: extended blocks desc: Normally a block modifier covers a single block of text, and ends at the first blank line. To extend a block over multiple paragraphs that include blank lines, use a block modifier with two period marks instead of one. To close the extended block, use a different block modifier on the next paragraph. in: |- bq.. A quote. The quote continued. p. Back to paragraph text. html: |-A quote.
The quote continued.
Back to paragraph text.
--- name: extended block code desc: Extended blocks are useful for displaying longer examples of code that contain blank lines. in: |- A PHP code example. bc.. p. Following paragraph. html: |-A PHP code example.
<?php function hello() { // display a hello message
print "Hello, World"; } ?>
Following paragraph.
--- name: extended block attributes desc: Any block attributes on an extended block will be included on each following block. in: |- p(myclass).. A classy paragraph. Another classy paragraph. p. Not so classy. html: |-A classy paragraph.
Another classy paragraph.
Not so classy.
--- name: extended block quote attributes desc: Attributes on bq.. extended blocks will be included on both the inner and outer blocks. in: |- bq(myclass).. Quote paragraph 1. Paragraph 2. html: |---- name: extended block code attributes desc: Attributes on bc.. extended blocks will be included on both the inner and outer blocks. in: |- bc(myclass).. Code block 1. Code block 2. html: |-Quote paragraph 1.
Paragraph 2.
--- name: raw xhtml left in tact desc: Raw XHTML tags are generally left untouched by Textile. Span tags that enclose only part of a block of text will be left intact, while the block itself is treated normally. in: bold and italic, the hard way. html:Code block 1.
Code block 2.
bold and italic, the hard way.
--- name: paragraphs entirely raw xhtml desc: Paragraphs that consist entirely of raw XHTML block tags will not be enclosed in...
tags. in:My divhtml:My div--- name: paragraphs with inline xhtml desc: Paragraphs that consist only of inline XHTML tags, will be enclosed in...
tags. in: html: --- name: paragraphs with inline xhtml 2 in: I'll make my own way. html: 'I’ll make my own way.
' --- name: paragraphs partly enclosed in xhtml block tags desc: Paragraphs that are only partly enclosed in block tags will be enclosed in...
tags. in:insideand outside. html:insideand outside.
# html:insideand outside. --- name: complex xhtml blocks desc: Textile can’t always identify the beginning and end of long or complex blocks of XHTML. To prevent Textile from enclosing complex XHTML blocks in paragraph tags, either use a space at the beginning of each line... in: "\n My div\n" html: "\nMy div\n" --- name: complex xhtml blocks 2 desc: ...or a notexile.. extended block. in: |- notextile..My divhtml: |-My div--- name: complex xhtml blocks with inline formatting desc: Textile will not wrap lines that start with a space in paragraph tags, but it should parse inline signatures in: "\n My *div*\n" html: "\nMy div\n" --- name: explicit pre escapement desc: The contents of explicit...tags are escaped for display. in: |-A HTML examplehtml: |-A HTML <b>example</b>note: This syntax is supported for backwards compatibility only, and doesn’t always work as expected. The block modifier pre. should be used instead. --- name: explicit code escapement desc: The contents of explicit...
tags are escaped for display. in: |-Another HTML example
html: |-note: This syntax is supported for backwards compatibility only, and doesn’t always work as expected. The block modifier bc. should be used instead. --- name: notextile tags desc: Blocks enclosed by the pseudo tag
Another HTML <b>example</b>
... will be left untouched. in: |-p. Leave me alone html: |- p. Leave me alone # html: |- ## p. Leave me alone #
note: This syntax is supported for backwards compatibility only, and doesn’t always work as expected. The block modifier notextile. should be used instead. valid_html: false --- name: left aligned text desc: Left alignment is specified with a < less than symbol. in: p<. Left-aligned paragraph. html:Left-aligned paragraph.
--- name: right aligned text desc: Right alignment is specified with a > greater than symbol. in: h3>. Right-aligned heading. html:Right-aligned heading.
--- name: justified text desc: Use both <> symbols for justified text. in: p<>. Justified paragraph. html:Justified paragraph.
--- name: centered text desc: An = equals symbol represents centered text. in: h3=. Centered heading. html:Centered heading.
--- name: padding desc: Use empty ( and ) parentheses to add padding to blocks, in multiples of 1 em. in: p(. Left pad 1em. html:Left pad 1em.
--- name: padding 2 in: p)). Right pad 2em. html:Right pad 2em.
--- name: padding 3 in: p(). Left and right pad 1em. html:Left and right pad 1em.
--- name: numeric lists desc: Numeric lists are represented by lines beginning with #. in: |- # Item one # Item two # Item three html: |---- name: bulleted lists desc: Bulleted lists are represented by lines beginning with *. in: |- * Item A * Item B * Item C html: |-
- Item one
- Item two
- Item three
a | simple | table |
a | table | heading |
---|---|---|
a | table | row |
a | styled | cell |
a | classy | row |
a | classy | table |
a | classy | table |
top alignment |
middle alignment |
bottom alignment |
spans two cols | |
col 1 | col 2 |
spans 3 rows | row a |
row b | |
row c |
this*won’t*work
--- name: modifier without whitespace desc: To use these without whitespace, surround the modifier with [] square brackets. in: this[*will*]work html:thiswillwork
--- name: modifier without whitespace 2 desc: This is particularly useful in conjunction with superscript and subscript. in: 1[^st^], 2[^nd^], 3[^rd^]. html:1st, 2nd, 3rd.
--- name: modifier without whitespace 3 in: 2 log[~n~] html:2 logn
--- name: modifier without whitespace 4 desc: It can also be used to include links and images without surrounding whitespace. in: |- A close[!/img.gif!]image. A tight["text":http://thresholdstate.com/]link. A ["footnoted link":http://thresholdstate.com/][1]. html: |-A closeimage.
A tighttextlink.
A footnoted link1.
A closeimage.
# A tighttextlink.
# A footnoted link1.