--- name: paragraphs desc: Textile looks for paragraphs in your text. Paragraphs are separated by one blank line. Every paragraph is translated as an HTML paragraph. in: |- A single paragraph. Followed by another. html: |-
A single paragraph.
Followed by another.
--- name: block containing block start in: |- I saw a ship. It ate my elephant. html: |-I saw a ship. It ate my elephant.
--- name: extended block containing block start in: |- p.. I saw a ship. It ate my elephant. When the elephant comes to take a p. you... html: |-I saw a ship. It ate my elephant.
When the elephant comes to take a p. you…
--- name: blockquote containing block start in: |- bq. I saw a ship. It ate my elephant. html: |---- name: extended blockquote containing block start in: |- bq.. I saw a ship. It ate my elephant. When the elephant comes to take a p. you... html: |-I saw a ship. It ate my elephant.
--- name: notextile block containing block start in: |- notextile. I saw a ship. It ate my elephant. html: |- I saw a ship. It ate my elephant. valid_html: false --- name: extended notextile block containing block start in: |- notextile.. I saw a ship. It ate my elephant. When the elephant comes to take a p. you... html: |- I saw a ship. It ate my elephant. When the elephant comes to take a p. you... valid_html: false --- name: pre block containing block start in: |- pre. I saw a ship. It ate my elephant. html: |-I saw a ship. It ate my elephant.
When the elephant comes to take a p. you…
I saw a ship. It ate my elephant.--- name: extended pre block containing block start in: |- pre.. I saw a ship. It ate my elephant. When the elephant comes to take a p. you... html: |-
I saw a ship. It ate my elephant.
When the elephant comes to take a p. you...--- name: html tags desc: You can certainly use HTML tags inside your Textile documents. HTML will only be escaped if it’s found in a
pre
or code
block.
in: |-
I am very serious.
I am very serious.html: |-
I am very serious.
I am <b>very</b> serious.--- name: line breaks desc: Line breaks are converted to HTML breaks. in: |- I spoke. And none replied. html: |-
I spoke.
And none replied.
I spoke. And none replied.
lite_mode_html: |- I spoke.“Observe!”
--- name: quotes contained in multi-paragraph quotes in: |- "I first learned about this thing called "Redcloth" several years ago. "It's wonderful." html: |-“I first learned about this thing called “Redcloth” several years ago.
“It’s wonderful.”
--- name: double hyphens desc: Double hyphens are replaced with an em-dash. in: Observe--very nice! html:Observe—very nice!
latex: "Observe---very nice!\n\n" --- name: double hyphens with spaces desc: Double hyphens are replaced with an em-dash and surrounding spaces are preserved. in: Observe -- very nice! html:Observe — very nice!
latex: "Observe --- very nice!\n\n" --- name: parenthetical phrase set off with em dashes desc: Sentences with two em dashes should not turn them into strikethroughs in: An emdash indicates a parenthetical thought--like this one--which is set apart from the rest of a sentence. html: "An emdash indicates a parenthetical thought—like this one—which is set apart from the rest of a sentence.
" latex: "An emdash indicates a parenthetical thought---like this one---which is set apart from the rest of a sentence.\n\n" --- name: parenthetical phrase set off with em dashes surrounded by spaces desc: Sentences with two em dashes should not turn them into strikethroughs in: An emdash indicates a parenthetical thought -- like this one -- which is set apart from the rest of a sentence. html: "An emdash indicates a parenthetical thought — like this one — which is set apart from the rest of a sentence.
" latex: "An emdash indicates a parenthetical thought --- like this one --- which is set apart from the rest of a sentence.\n\n" --- name: single hyphens with spaces desc: Single hyphens are replaced with en-dashes if they are surrounded by spaces. in: Observe - tiny and brief. html:Observe – tiny and brief.
latex: "Observe--tiny and brief.\n\n" --- name: midword hyphens desc: Single hyphens are left alone if not surrounded by spaces. in: Observe the nicely-done hyphen. html:Observe the nicely-done hyphen.
--- name: ellipses desc: Triplets of periods become an ellipsis. in: Observe... html:Observe…
lite_mode_html: Observe… --- name: dimension sign desc: The letter 'x' becomes a dimension sign when used between digits. in: "Observe: 2x3." html: "Observe: 2×3.
" --- name: dimension sign with space after in: "The room is 2x3 inches big." html: "The room is 2×3 inches big.
" --- name: dimension sign with spaces in: "Observe: 2 x 4." html: "Observe: 2 × 4.
" --- name: dimension signs chained in: "Observe: 2x3x4." html: "Observe: 2×3×4.
" lite_mode_html: "Observe: 2×3×4." --- name: dimension signs with double primes in: 'My mouse: 2.5" x 4".' html: 'My mouse: 2.5″ × 4″.
' --- name: dimension signs with single primes in: "My office: 5' x 4.5'." html: "My office: 5′ × 4.5′.
" --- name: trademark and copyright desc: Conversion of trademark and copyright symbols. in: one(TM), two(R), three(C). html:one™, two®, three©.
lite_mode_html: one™, two®, three©. --- name: headers desc: To make an entire paragraph into a Header, place “hn.” at its beginning, where n is a number from 1-6. in: h3. Header 3 html:Any old text
A block quotation.
Any old text
--- name: footnote reference desc: Numeric references within text to footnotes appear between square brackets. in: This is covered elsewhere[1]. html:This is covered elsewhere1.
--- name: footnote desc: To create the footnote that corresponds to its reference within the text, begin a new paragraph with fn and the footnote’s number, followed by a dot and a space. in: fn1. Down here, in fact. html:1 Down here, in fact.
--- name: em desc: Emphasis to text is added by surrounding a phrase with underscores. In HTML, this often appears as italics. in: I _believe_ every word. html:I believe every word.
lite_mode_html: "I believe every word." --- name: strong desc: Strength can be give to text by surrounding with asterisks. In HTML, this strength appears as bold. in: And then? She *fell*! html:And then? She fell!
lite_mode_html: "And then? She fell!" --- name: strong phrase beginning with a number desc: A strong phrase at the beginning of a line that begins with a number should not be recognized as a ul with a start value (no such thing) in: "*10 times as many*" html: "10 times as many
" --- name: force bold italics desc: Both italics and bold can be forced by doubling the underscores or asterisks. in: |- I __know__. I **really** __know__. html: |-I know.
I really know.
Cat’s Cradle by Vonnegut
--- name: code phrases desc: Code phrases can be surrounded by at-symbols. in: Convert with @r.to_html@ html:Convert with r.to_html
r.to_html
---
name: code phrases not created with multiple email addresses
in: Please email why@domain.com or jason@domain.com.
html: Please email why@domain.com or jason@domain.com.
--- name: del desc: To indicate a passage which has been deleted, surround the passage with hypens. in: I'm -sure- not sure. html:I’m sure not sure.
You are a pleasant child.
--- name: superscript desc: To superscript a phrase, surround with carets. in: a ^2^ + b ^2^ = c ^2^ html:a 2 + b 2 = c 2
--- name: parenthetical superscript phrase in: '^(image courtesy NASA)^' html: '(image courtesy NASA)
' --- name: subscript desc: To subscript, surround with tildes. in: log ~2~ x html:log 2 x
--- name: parenthetical subscript phrase in: '~(image courtesy NASA)~' html: '(image courtesy NASA)
' --- name: tight superscript and subscript desc: if you want your superscript or subscript to not be surrounded by spaces, you must use square brackets in: f(x, n) = log[~4~]x[^n^] html: 'f(x, n) = log4xn
' --- name: span desc: Lastly, if you find yourself needing to customize the style of a passage, use percent symbols to translate the passage as an HTML span. in: I'm %unaware% of most soft drinks. html:I’m unaware of most soft drinks.
--- name: style span desc: This way, you can apply style settings, as described in the next section to arbitrary phrases. in: |- I'm %{color:red}unaware% of most soft drinks. html: |-I’m unaware
of most soft drinks.
http://blah.com/one%20two%20three
(min)5%-95%(max)
An example
--- name: css id desc: An element ID can be given by prefixing the ID with a pound symbol and using it in place of the class. in: p(#big-red). Red here html:Red here
--- name: class and id combined desc: Class and ID can be combined by placing the class first. in: p(example1#big-red2). Red here html:Red here
--- name: css style desc: Style settings can be provided directly by surrounding them in curly braces. in: p{color:blue;margin:30px}. Spacey blue html:Spacey blue
--- name: language designations desc: Language designations can be given between angel brackets. in: p[fr]. rouge html:rouge
--- name: block attributes on phrase modifiers desc: All block attributes can be applied to phrases as well by placing them just inside the opening modifier. in: |- I seriously *{color:red}blushed* when I _(big)sprouted_ that corn stalk from my %[es]cabeza%. html: |-I seriously blushed
when I sprouted that
corn stalk from my
cabeza.
I seriously {color:red}blushed
when I first (big)sprouted that
corn stalk from my
grande [es]cabeza.
justified
--- name: indentation desc: Indentation can also be specified by provide a single left paren for every 1em to the left. A single right paren for every 1em to the right. in: p))). right ident 3em html:right ident 3em
--- name: indentation and alignment desc: Identation may be coupled with alignment. in: h2()>. Bingo. html:pre
and code
tags. Please also indent your code inside the tags to be sure that all Textile processors out there will ignore the contents.
in: |
a.gsub!( /, '' )
html: |-
a.gsub!( /</, '' )
---
name: div tags
desc: You may also choose to surround sections with div
tags to separate your document into sections. Instiki uses this technique to float a sidebar to the right.
in: |
The main text of the page goes here and will stay to the left of the sidebar.
--- name: numbered list desc: To make a numbered list, place each item in its own paragraph, preceded by ”#”. in: |- # A first item # A second item # A third html: |-I searched Google.
lite_mode_html: I searched Google. --- name: link aliases desc: If you are using the same link several times in your document, or you’d just like to be a tad more organized, you can use a link alias. Place the URL anywhere in your document, beginning with its alias in square brackets. Then, use the alias in place of the URL, using the link format above. in: |- I am crazy about "Hobix":hobix and "it's":hobix "all":hobix I ever "link to":hobix! [hobix]http://hobix.com html: |-I am crazy about Hobix
and it’s all I ever
link to!
And others sat all round the small
machine and paid it to sing to them.
We use CSS.
lite_mode_html: We use CSS. no_span_caps_html:We use CSS.
--- name: tables desc: Simple tables can be built by separating fields with pipe characters in: |- | name | age | sex | | joan | 24 | f | | archie | 29 | m | | bella | 45 | f | html: |-name | age | sex |
joan | 24 | f |
archie | 29 | m |
bella | 45 | f |
name | age | sex |
---|---|---|
joan | 24 | f |
archie | 29 | m |
bella | 45 | f |
attribute list |
---|
align left |
align right |
center |
justify |
valign top |
bottom |
spans two cols | |
col 1 | col 2 |
spans 3 rows | a |
b | |
c |
Grey cell |
This | is | a | row |
This | is | a | row |
table
modifier and following it by a period.
in: |-
|This|is|a|row|
{background:#ddd}. |This|is|grey|row|
html: |-
This | is | a | row |
This | is | grey | row |
A pre block ends it.--- name: extended block followed by blockquote in: |- div.. Just a test. Second div. bq. A blockquote ends it. html: |-
--- name: extended block followed by block code in: |- div.. Just a test. Second div. bc. A blockcode ends it. html: |-A blockquote ends it.
A blockcode ends it.
---
name: extended block followed by notextile block
in: |-
div.. Just a test.
Second div.
notextile. A notextile block ends it.
html: |-
before (in parens) after
--- name: parentheses in underscores in: |- before _(in parens)_ after html: |-before (in parens) after
--- name: parentheses in asterisks in: |- before *(in parens)* after html: |-before (in parens) after
--- name: parentheses in underscores in quotes in: |- "before _(in parens)_ after" html: |-“before (in parens) after”
--- name: underscores in parentheses in: |- one _two three_ (four _five six_) seven html: |-one two three (four five six) seven
--- name: underscores in parentheses in quotes in: |- "one _two three_ (four _five six_) seven" html: |-“one two three (four five six) seven”
--- name: underscores in parentheses 2 in: |- one (two _three four_) five html: |-one (two three four) five
--- name: underscores in parentheses in quotes 2 in: |- "one (two _three four_) five" html: |-“one (two three four) five”
--- name: caps in parentheses desc: Uppercase words of three or more characters that are in parentheses should be recognized as well as those not in parentheses. in: IBM or (HAL) html:IBM or (HAL)
no_span_caps_html:IBM or (HAL)
--- name: phrase modifiers in parentheses desc: Inline modifiers are expected to work in parentheses as well. in: |- __Amanita__s are mushrooms. Lungworts (__Lobaria__) are lichens. Blah blah (normal text **bold**) blah. html: |-__Amanita__s are mushrooms.
Lungworts (Lobaria) are lichens.
Blah blah (normal text bold) blah.
citation [“(Berk.) Hilton”], see
[Papers “blah blah.”]
Just some * text
Some more text.
--- name: horizontal rule using more than three asterisks in: |- Just some **** text **** Some more text. html: |-Just some **** text
Some more text.
--- name: horizontal rule using dashes in: |- Just some --- text --- Some more text. html: |-Just some - text
Some more text.
--- name: horizontal rule using underscores in: |- Just some ___ text ___ Some more text. html: |-Just some _ text
Some more text.
--- name: lang attribute cannot contain square brackets in: "some @[[code]]@" html: "some [[code]]