Textile mode

x
 
1
h1. Textile Mode
2
3
A paragraph without formatting.
4
5
p. A simple Paragraph.
6
7
8
h2. Phrase Modifiers
9
10
Here are some simple phrase modifiers: *strong*, _emphasis_, **bold**, and __italic__.
11
12
A ??citation??, -deleted text-, +inserted text+, some ^superscript^, and some ~subscript~.
13
14
A %span element% and @code element@
15
16
A "link":http://example.com, a "link with (alt text)":urlAlias
17
18
[urlAlias]http://example.com/
19
20
An image: !http://example.com/image.png! and an image with a link: !http://example.com/image.png!:http://example.com
21
22
A sentence with a footnote.[123]
23
24
fn123. The footnote is defined here.
25
26
Registered(r), Trademark(tm), and Copyright(c)
27
28
29
h2. Headers
30
31
h1. Top level
32
h2. Second level
33
h3. Third level
34
h4. Fourth level
35
h5. Fifth level
36
h6. Lowest level
37
38
39
h2.  Lists
40
41
* An unordered list
42
** foo bar
43
*** foo bar
44
**** foo bar
45
** foo bar
46
47
# An ordered list
48
## foo bar
49
### foo bar
50
#### foo bar
51
## foo bar
52
53
- definition list := description
54
- another item    := foo bar
55
- spanning ines   :=
56
                     foo bar
57
58
                     foo bar =:
59
60
61
h2. Attributes
62
63
Layouts and phrase modifiers can be modified with various kinds of attributes: alignment, CSS ID, CSS class names, language, padding, and CSS styles.
64
65
h3. Alignment
66
67
div<. left align
68
div>. right align
69
70
h3. CSS ID and class name
71
72
You are a %(my-id#my-classname) rad% person.
73
74
h3. Language
75
76
p[en_CA]. Strange weather, eh?
77
78
h3. Horizontal Padding
79
80
p(())). 2em left padding, 3em right padding
81
82
h3. CSS styling
83
84
p{background: red}. Fire!
85
86
87
h2. Table
88
89
|_.              Header 1               |_.      Header 2        |
90
|{background:#ddd}. Cell with background|         Normal         |
91
|\2.         Cell spanning 2 columns                             |
92
|/2.         Cell spanning 2 rows       |(cell-class). one       |
93
|                                                two             |
94
|>.                  Right aligned cell |<. Left aligned cell    |
95
96
97
h3. A table with attributes:
98
99
table(#prices).
100
|Adults|$5|
101
|Children|$2|
102
103
104
h2. Code blocks
105
106
bc.
107
function factorial(n) {
108
    if (n === 0) {
109
        return 1;
110
    }
111
    return n * factorial(n - 1);
112
}
113
114
pre..
115
                ,,,,,,
116
            o#'9MMHb':'-,o,
117
         .oH":HH$' "' ' -*R&o,
118
        dMMM*""'`'      .oM"HM?.
119
       ,MMM'          "HLbd< ?&H\
120
      .:MH ."\          ` MM  MM&b
121
     . "*H    -        &MMMMMMMMMH:
122
     .    dboo        MMMMMMMMMMMM.
123
     .   dMMMMMMb      *MMMMMMMMMP.
124
     .    MMMMMMMP        *MMMMMP .
125
          `#MMMMM           MM6P ,
126
       '    `MMMP"           HM*`,
127
        '    :MM             .- ,
128
         '.   `#?..  .       ..'
129
            -.   .         .-
130
              ''-.oo,oo.-''
131
132
\. _(9>
133
 \==_)
134
  -'=
135
136
h2. Temporarily disabling textile markup
137
138
notextile. Don't __touch this!__
139
140
Surround text with double-equals to disable textile inline. Example: Use ==*asterisks*== for *strong* text.
141
142
143
h2. HTML
144
145
Some block layouts are simply textile versions of HTML tags with the same name, like @div@, @pre@, and @p@. HTML tags can also exist on their own line:
146
147
<section>
148
  <h1>Title</h1>
149
  <p>Hello!</p>
150
</section>
151
152

MIME types defined: text/x-textile.

Parsing/Highlighting Tests: normal, verbose.