parity-RedCloth 4.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/.gemtest +0 -0
  3. data/.rspec +1 -0
  4. data/CHANGELOG +265 -0
  5. data/COPYING +18 -0
  6. data/Gemfile +7 -0
  7. data/README.rdoc +215 -0
  8. data/Rakefile +18 -0
  9. data/bin/redcloth +28 -0
  10. data/doc/textile_reference.html +631 -0
  11. data/ext/redcloth_scan/extconf.rb +6 -0
  12. data/ext/redcloth_scan/redcloth.h +220 -0
  13. data/ext/redcloth_scan/redcloth_attributes.c +650 -0
  14. data/ext/redcloth_scan/redcloth_inline.c +8153 -0
  15. data/ext/redcloth_scan/redcloth_scan.c +24407 -0
  16. data/lib/case_sensitive_require/RedCloth.rb +6 -0
  17. data/lib/redcloth/erb_extension.rb +27 -0
  18. data/lib/redcloth/formatters/base.rb +63 -0
  19. data/lib/redcloth/formatters/html.rb +352 -0
  20. data/lib/redcloth/formatters/latex.rb +331 -0
  21. data/lib/redcloth/formatters/latex_entities.yml +2414 -0
  22. data/lib/redcloth/textile_doc.rb +113 -0
  23. data/lib/redcloth/version.rb +34 -0
  24. data/lib/redcloth.rb +45 -0
  25. data/lib/tasks/pureruby.rake +17 -0
  26. data/redcloth.gemspec +54 -0
  27. data/spec/benchmark_spec.rb +15 -0
  28. data/spec/custom_tags_spec.rb +50 -0
  29. data/spec/erb_spec.rb +10 -0
  30. data/spec/extension_spec.rb +26 -0
  31. data/spec/fixtures/basic.yml +1028 -0
  32. data/spec/fixtures/code.yml +257 -0
  33. data/spec/fixtures/definitions.yml +82 -0
  34. data/spec/fixtures/extra_whitespace.yml +64 -0
  35. data/spec/fixtures/filter_html.yml +177 -0
  36. data/spec/fixtures/filter_pba.yml +20 -0
  37. data/spec/fixtures/html.yml +348 -0
  38. data/spec/fixtures/images.yml +279 -0
  39. data/spec/fixtures/instiki.yml +38 -0
  40. data/spec/fixtures/links.yml +291 -0
  41. data/spec/fixtures/lists.yml +462 -0
  42. data/spec/fixtures/poignant.yml +89 -0
  43. data/spec/fixtures/sanitize_html.yml +42 -0
  44. data/spec/fixtures/table.yml +434 -0
  45. data/spec/fixtures/textism.yml +509 -0
  46. data/spec/fixtures/threshold.yml +762 -0
  47. data/spec/formatters/class_filtered_html_spec.rb +7 -0
  48. data/spec/formatters/filtered_html_spec.rb +7 -0
  49. data/spec/formatters/html_no_breaks_spec.rb +9 -0
  50. data/spec/formatters/html_spec.rb +13 -0
  51. data/spec/formatters/id_filtered_html_spec.rb +7 -0
  52. data/spec/formatters/latex_spec.rb +13 -0
  53. data/spec/formatters/lite_mode_html_spec.rb +7 -0
  54. data/spec/formatters/no_span_caps_html_spec.rb +7 -0
  55. data/spec/formatters/sanitized_html_spec.rb +7 -0
  56. data/spec/formatters/style_filtered_html_spec.rb +7 -0
  57. data/spec/parser_spec.rb +102 -0
  58. data/spec/spec_helper.rb +36 -0
  59. data/tasks/compile.rake +47 -0
  60. data/tasks/gems.rake +37 -0
  61. data/tasks/ragel_extension_task.rb +127 -0
  62. data/tasks/release.rake +15 -0
  63. data/tasks/rspec.rake +13 -0
  64. data/tasks/rvm.rake +79 -0
  65. metadata +239 -0
@@ -0,0 +1,631 @@
1
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5
+ <head>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <title>Textile Reference</title>
8
+ <style type="text/css">
9
+ BODY {
10
+ margin: 10px 30px;
11
+ }
12
+ TABLE {
13
+ font-family: georgia, serif;
14
+ font-size: 11pt;
15
+ padding: 15px;
16
+ }
17
+ TH {
18
+ border-bottom: solid 1px black;
19
+ font-size: 24pt;
20
+ font-weight: bold;
21
+ padding-top: 30px;
22
+ }
23
+ H1 {
24
+ font-size: 42pt;
25
+ }
26
+ H4 {
27
+ color: #666;
28
+ background-color: #fee;
29
+ border: solid 1px #caa;
30
+ margin: 10px 0px 5px 0px;
31
+ padding: 5px;
32
+ }
33
+ P {
34
+ margin: 10px 15px 5px 15px;
35
+ }
36
+ TD.sections {
37
+ background: black;
38
+ color: white;
39
+ font-family: georgia, serif;
40
+ font-weight: bold;
41
+ font-size: 9pt;
42
+ padding: 5px;
43
+ }
44
+ TD.sections A { color: #CCEEFF; }
45
+ TD.sections A:link { color: #CCEEFF; }
46
+ TD.sections A:visited { color: #CCEEFF; }
47
+ TD.sections A:active { color: #EEEEEE; }
48
+ TD.sections A:hover { color: #EEEEEE; }
49
+
50
+ TD.example1 PRE {
51
+ background-color: #B30;
52
+ color: white;
53
+ font-family: georgia, serif;
54
+ font-weight: bold;
55
+ font-size: 9pt;
56
+ padding: 5px;
57
+ }
58
+ TD.example2 P {
59
+ border: solid 1px #DDD;
60
+ background-color: #EEE;
61
+ font-family: georgia, serif;
62
+ font-size: 9pt;
63
+ padding: 5px;
64
+ }
65
+ TD.example3 {
66
+ border: solid 1px #EED;
67
+ background-color: #FFE;
68
+ padding: 5px;
69
+ }
70
+ .big {
71
+ font-size: 15pt;
72
+ }
73
+ #big-red {
74
+ font-size: 15pt;
75
+ color: red
76
+ }
77
+ </style>
78
+ <script type="text/javascript">
79
+ function quickRedReference() {
80
+ window.open(
81
+ "quick.html",
82
+ "redRef",
83
+ "height=600,width=550,channelmode=0,dependent=0," +
84
+ "directories=0,fullscreen=0,location=0,menubar=0," +
85
+ "resizable=0,scrollbars=1,status=1,toolbar=0"
86
+ );
87
+ }
88
+ </script>
89
+ </head>
90
+ <body>
91
+ <table>
92
+ <tr><th colspan='3'><h1>A Textile Reference</h1></th></tr>
93
+ <tr><td class='sections' colspan='3'>Sections: <a href='#writing-in-textile'>Writing&nbsp;in&nbsp;Textile</a> | <a href='#quick-block-modifiers'>Quick&nbsp;Block&nbsp;Modifiers</a> | <a href='#quick-phrase-modifiers'>Quick&nbsp;Phrase&nbsp;Modifiers</a> | <a href='#attributes'>Attributes</a> | <a href='#lists'>Lists</a> | <a href='#external-references'>External&nbsp;References</a> | <a href='#tables'>Tables</a></td></tr>
94
+ <tr><td class='explain' colspan='3'>
95
+ <p>Textile is a simple text markup. Simple symbols mark words&#8217; emphasis. Blocks of text can be easily tagged as headers, quotes, or lists. A Textile document can then be converted to <acronym title="Hypertext Markup Language">HTML</acronym> for viewing on the web.</p>
96
+ </td></tr>
97
+ <tr><td class='explain' colspan='3'>
98
+ <p>You can try Textile out on the <a href="http://www.textism.com/tools/textile/">Textile home page</a>.
99
+ Textile is also available as <a href="http://github.com/codesponge/redcloth/">RedCloth</a> for Ruby or <a href="http://dealmeida.net/projects/textile">PyTextile</a> for Python.</p>
100
+ </td></tr>
101
+ <tr><td class='explain' colspan='3'>
102
+ <p>Also refer to the <a href="javascript:quickRedReference();"><strong>Quick Reference</strong></a> for this guide.</p>
103
+ <p>Note: This file was originally authored by _why, this version has been modified by codesponge(billychamp) to fix broken links. The examples that use github.com used to point to hobix.com
104
+ The broken links in the image examples have not (yet) been replaced.
105
+ </p>
106
+
107
+ </td></tr>
108
+ <tr><td class='explain' colspan='3'>
109
+ <h4>Reading the Examples</h4>
110
+ </td></tr>
111
+ <tr><td class='explain' colspan='3'>
112
+ <p>In each section below, examples are provided to clearly illustrate. In each example, the Textile example is followed by the raw <span class="caps">HTML</span> it is translated into, followed by how the <span class="caps">HTML</span> appears in the browser.</p>
113
+ </td></tr>
114
+ <tr><td class='example1' valign='top'><pre>Textile example</pre></td><td>&rarr;</td><td class='example2'><p>Converted to HTML</p></td></tr><tr><td colspan='2'></td><td class='example3'>Browser-view</td></tr>
115
+ <tr><th colspan='3'><a name='writing-in-textile'><small>1.</small></a><br />Writing in Textile</th></tr>
116
+ <tr><td class='explain' colspan='3'>
117
+ <p>Textile looks for paragraphs in your text. Paragraphs are separated by one blank line. Every paragraph is translated as an <span class="caps">HTML</span> paragraph.</p>
118
+ </td></tr>
119
+ <tr><td class='example1' valign='top'><pre>A single paragraph.<br /><br />Followed by another.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;A single paragraph.&lt;/p&gt;<br /><br /> &lt;p&gt;Followed by another.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>A single paragraph.</p>
120
+
121
+ <p>Followed by another.</p></td></tr>
122
+ <tr><td class='explain' colspan='3'>
123
+ <h4>Using <span class="caps">HTML</span> in Textile</h4>
124
+ </td></tr>
125
+ <tr><td class='explain' colspan='3'>
126
+ <p>You can certainly use <span class="caps">HTML</span> tags inside your Textile documents. <span class="caps">HTML</span> will only be escaped if it&#8217;s found in a <code>pre</code> or <code>code</code> block.</p>
127
+ </td></tr>
128
+ <tr><td class='example1' valign='top'><pre>I am &lt;b&gt;very&lt;/b&gt; serious.<br /><br />&lt;pre&gt;<br /> I am &lt;b&gt;very&lt;/b&gt; serious.<br />&lt;/pre&gt;</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;I am &lt;b&gt;very&lt;/b&gt; serious.&lt;/p&gt;<br /><br /><br />&lt;pre&gt;<br /> I am &amp;lt; b&amp;gt; very&amp;lt;/b&amp;gt; serious.<br />&lt;/pre&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I am <b>very</b> serious.</p>
129
+
130
+
131
+ <pre>
132
+ I am &lt;b&gt;very&lt;/b&gt; serious.
133
+ </pre></td></tr>
134
+ <tr><td class='explain' colspan='3'>
135
+ <h4>Line Breaks</h4>
136
+ </td></tr>
137
+ <tr><td class='explain' colspan='3'>
138
+ <p>Line breaks are converted to <span class="caps">HTML</span> breaks.</p>
139
+ </td></tr>
140
+ <tr><td class='example1' valign='top'><pre>I spoke.<br />And none replied.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;I spoke.<br />And none replied.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I spoke.
141
+ And none replied.</p></td></tr>
142
+ <tr><td class='explain' colspan='3'>
143
+ <p>Line breaks can be disabled in RedCloth by turning on <code>fold_lines</code>.</p>
144
+ </td></tr>
145
+ <tr><td class='explain' colspan='3'>
146
+ <h4>Entities</h4>
147
+ </td></tr>
148
+ <tr><td class='explain' colspan='3'>
149
+ <p>Single- and double-quotes around words or phrases are converted to curly quotations, much easier on the eye.</p>
150
+ </td></tr>
151
+ <tr><td class='example1' valign='top'><pre>"Observe!"</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;&amp;#8220; Observe!&amp;#8221;&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>&#8220;Observe!&#8221;</p></td></tr>
152
+ <tr><td class='explain' colspan='3'>
153
+ <p>Double hyphens are replaced with an em-dash.</p>
154
+ </td></tr>
155
+ <tr><td class='example1' valign='top'><pre>Observe -- very nice!</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;Observe&amp;#8212; very nice!&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>Observe&#8212;very nice!</p></td></tr>
156
+ <tr><td class='explain' colspan='3'>
157
+ <p>Single hyphens are replaced with en-dashes.</p>
158
+ </td></tr>
159
+ <tr><td class='example1' valign='top'><pre>Observe - tiny and brief.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;Observe &amp;#8211; tiny and brief.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>Observe &#8211; tiny and brief.</p></td></tr>
160
+ <tr><td class='explain' colspan='3'>
161
+ <p>Triplets of periods become an ellipsis.</p>
162
+ </td></tr>
163
+ <tr><td class='example1' valign='top'><pre>Observe...</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;Observe&amp;#8230;&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>Observe&#8230;</p></td></tr>
164
+ <tr><td class='explain' colspan='3'>
165
+ <p>The letter &#8216;x&#8217; becomes a dimension sign when used alone.</p>
166
+ </td></tr>
167
+ <tr><td class='example1' valign='top'><pre>Observe: 2 x 2.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;Observe: 2&amp;#215; 2.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>Observe: 2&#215;2.</p></td></tr>
168
+ <tr><td class='explain' colspan='3'>
169
+ <p>Conversion of trademark and copyright symbols.</p>
170
+ </td></tr>
171
+ <tr><td class='example1' valign='top'><pre>one(TM), two(R), three(C).</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;one&amp;#8482;, two&amp;#174;, three&amp;#169;.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>one&#8482;, two&#174;, three&#169;.</p></td></tr>
172
+ <tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
173
+ <tr><th colspan='3'><a name='quick-block-modifiers'><small>2.</small></a><br />Quick Block Modifiers</th></tr>
174
+ <tr><td class='explain' colspan='3'>
175
+ <p>Blocks of text default to being treated as paragraphs. But modifers can be affixed to the beginning of a block to change its treatment.</p>
176
+ </td></tr>
177
+ <tr><td class='explain' colspan='3'>
178
+ <h4>Headers</h4>
179
+ </td></tr>
180
+ <tr><td class='explain' colspan='3'>
181
+ <p>To make an entire paragraph into a Header, place &#8220;h<em>n</em>.&#8221; at its beginning, where <em>n</em> is a number from 1-6.</p>
182
+ </td></tr>
183
+ <tr><td class='example1' valign='top'><pre>h1. Header 1</pre></td><td>&rarr;</td><td class='example2'><p>&lt;h1&gt;Header 1&lt;/h1&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><h1>Header 1</h1></td></tr>
184
+ <tr><td class='example1' valign='top'><pre>h2. Header 2</pre></td><td>&rarr;</td><td class='example2'><p>&lt;h2&gt;Header 2&lt;/h2&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><h2>Header 2</h2></td></tr>
185
+ <tr><td class='example1' valign='top'><pre>h3. Header 3</pre></td><td>&rarr;</td><td class='example2'><p>&lt;h3&gt;Header 3&lt;/h3&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><h3>Header 3</h3></td></tr>
186
+ <tr><td class='explain' colspan='3'>
187
+ <h4>Block Quotes</h4>
188
+ </td></tr>
189
+ <tr><td class='explain' colspan='3'>
190
+ <p>To make an entire paragraph into a block quotation, place &#8220;bq.&#8221; before it.</p>
191
+ </td></tr>
192
+ <tr><td class='example1' valign='top'><pre>An old text<br /><br />bq. A block quotation.<br /><br />Any old text</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;An old text&lt;/p&gt;<br /><br /> &lt;blockquote&gt;<br /> &lt;p&gt;A block quotation.&lt;/p&gt;<br /> &lt;/blockquote&gt;<br /><br /> &lt;p&gt;Any old text&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>An old text</p>
193
+
194
+ <blockquote>
195
+ <p>A block quotation.</p>
196
+ </blockquote>
197
+
198
+ <p>Any old text</p></td></tr>
199
+ <tr><td class='explain' colspan='3'>
200
+ <h4>Footnotes</h4>
201
+ </td></tr>
202
+ <tr><td class='explain' colspan='3'>
203
+ <p>Numeric references within text to footnotes appear between square brackets.</p>
204
+ </td></tr>
205
+ <tr><td class='example1' valign='top'><pre>This is covered elsewhere[1].</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;This is covered elsewhere&lt;sup&gt;&lt;a href="#fn1"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>This is covered elsewhere<sup><a href="#fn1">1</a></sup>.</p></td></tr>
206
+ <tr><td class='explain' colspan='3'>
207
+ <p>To create the footnote that corresponds to its reference within the text, begin a new paragraph with fn and the footnote&#8217;s number, followed by a dot and a space.</p>
208
+ </td></tr>
209
+ <tr><td class='example1' valign='top'><pre>fn1. Down here, in fact.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p id="fn1"&gt;&lt;sup&gt;1&lt;/sup&gt; Down here, in fact.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p id="fn1"><sup>1</sup> Down here, in fact.</p></td></tr>
210
+ <tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
211
+ <tr><th colspan='3'><a name='quick-phrase-modifiers'><small>3.</small></a><br />Quick Phrase Modifiers</th></tr>
212
+ <tr><td class='explain' colspan='3'>
213
+ <h4>Structural Emphasis</h4>
214
+ </td></tr>
215
+ <tr><td class='explain' colspan='3'>
216
+ <p>Emphasis to text is added by surrounding a phrase with underscores. In <span class="caps">HTML</span>, this often appears as <em>italics</em>.</p>
217
+ </td></tr>
218
+ <tr><td class='example1' valign='top'><pre>I _believe_ every word.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;I &lt;em&gt;believe&lt;/em&gt; every word.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I <em>believe</em> every word.</p></td></tr>
219
+ <tr><td class='explain' colspan='3'>
220
+ <p>Strength can be give to text by surrounding with asterisks. In <span class="caps">HTML</span>, this strength appears as <strong>bold</strong>.</p>
221
+ </td></tr>
222
+ <tr><td class='example1' valign='top'><pre>And then? She *fell*!</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;And then? She &lt;strong&gt;fell&lt;/strong&gt;!&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>And then? She <strong>fell</strong>!</p></td></tr>
223
+ <tr><td class='explain' colspan='3'>
224
+ <p>Both italics and bold can be forced by doubling the underscores or asterisks.</p>
225
+ </td></tr>
226
+ <tr><td class='example1' valign='top'><pre>I __know__.<br />I **really** __know__.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;I &lt;i&gt;know&lt;/i&gt;.<br />I &lt;b&gt;really&lt;/b&gt; &lt;i&gt;know&lt;/i&gt;.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I <i>know</i>.
227
+ I <b>really</b> <i>know</i>.</p></td></tr>
228
+ <tr><td class='explain' colspan='3'>
229
+ <p>Use double question marks to indicate <em>citation</em>. The title of a book, for instance.</p>
230
+ </td></tr>
231
+ <tr><td class='example1' valign='top'><pre>??Cat's Cradle?? by Vonnegut</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;&lt;cite&gt;Cat&amp;#8217; s Cradle&lt;/cite&gt; by Vonnegut&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p><cite>Cat&#8217;s Cradle</cite> by Vonnegut</p></td></tr>
232
+ <tr><td class='explain' colspan='3'>
233
+ <p>Code phrases can be surrounded by at-symbols.</p>
234
+ </td></tr>
235
+ <tr><td class='example1' valign='top'><pre>Convert with @r.to_html@</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;Convert with &lt;code&gt;r.to_html&lt;/code&gt;&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>Convert with <code>r.to_html</code></p></td></tr>
236
+ <tr><td class='explain' colspan='3'>
237
+ <p>To indicate a passage which has been deleted, surround the passage with hypens.</p>
238
+ </td></tr>
239
+ <tr><td class='example1' valign='top'><pre>I'm -sure- not sure.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;I&amp;#8217; m &lt;del&gt;sure&lt;/del&gt; not sure.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I&#8217;m <del>sure</del> not sure.</p></td></tr>
240
+ <tr><td class='explain' colspan='3'>
241
+ <p>Pluses around a passage indicate its insertion.</p>
242
+ </td></tr>
243
+ <tr><td class='example1' valign='top'><pre>You are a +pleasant+ child.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;You are a &lt;ins&gt;pleasant&lt;/ins&gt; child.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>You are a <ins>pleasant</ins> child.</p></td></tr>
244
+ <tr><td class='explain' colspan='3'>
245
+ <p>To superscript a phrase, surround with carets.</p>
246
+ </td></tr>
247
+ <tr><td class='example1' valign='top'><pre>a ^2^ + b ^2^ = c ^2^</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;a &lt;sup&gt;2&lt;/sup&gt; + b &lt;sup&gt;2&lt;/sup&gt; = c &lt;sup&gt;2&lt;/sup&gt;&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>a <sup>2</sup> + b <sup>2</sup> = c <sup>2</sup></p></td></tr>
248
+ <tr><td class='explain' colspan='3'>
249
+ <p>To subscript, surround with tildes.</p>
250
+ </td></tr>
251
+ <tr><td class='example1' valign='top'><pre>log ~2~ x</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;log &lt;sub&gt;2&lt;/sub&gt; x&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>log <sub>2</sub> x</p></td></tr>
252
+ <tr><td class='explain' colspan='3'>
253
+ <h4><span class="caps">HTML</span>-Specific</h4>
254
+ </td></tr>
255
+ <tr><td class='explain' colspan='3'>
256
+ <p>Lastly, if you find yourself needing to customize the style of a passage, use percent symbols to translate the passage as an <span class="caps">HTML</span> span.</p>
257
+ </td></tr>
258
+ <tr><td class='example1' valign='top'><pre>I'm %unaware% of most soft drinks.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;I&amp;#8217; m &lt;span&gt;unaware&lt;/span&gt; of most soft drinks.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I&#8217;m <span>unaware</span> of most soft drinks.</p></td></tr>
259
+ <tr><td class='explain' colspan='3'>
260
+ <p>This way, you can apply style settings, as described in the next section to arbitrary phrases.</p>
261
+ </td></tr>
262
+ <tr><td class='example1' valign='top'><pre>I'm %{color:red}unaware%<br />of most soft drinks.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;I&amp;#8217; m &lt;span style="color:red;"&gt;unaware&lt;/span&gt;<br />of most soft drinks.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I&#8217;m <span style="color:red;">unaware</span>
263
+ of most soft drinks.</p></td></tr>
264
+ <tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
265
+ <tr><th colspan='3'><a name='attributes'><small>4.</small></a><br />Attributes</th></tr>
266
+ <tr><td class='explain' colspan='3'>
267
+ <p>Tailoring Textile to suit your needs is quite easy. Attributes allow you to provide <acronym title="Cascading Style Sheets">CSS</acronym> information about any phrase.</p>
268
+ </td></tr>
269
+ <tr><td class='explain' colspan='3'>
270
+ <h4>Block Attributes</h4>
271
+ </td></tr>
272
+ <tr><td class='explain' colspan='3'>
273
+ <p>A block can be tagged with a <span class="caps">CSS</span> class by circling the class in parentheses and placing it just before the period which marks the block.</p>
274
+ </td></tr>
275
+ <tr><td class='example1' valign='top'><pre>p(example1). An example</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p class="example1"&gt;An example&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p class="example1">An example</p></td></tr>
276
+ <tr><td class='explain' colspan='3'>
277
+ <p>An element ID can be given by prefixing the ID with a pound symbol and using it in place of the class.</p>
278
+ </td></tr>
279
+ <tr><td class='example1' valign='top'><pre>p(#big-red). Red here</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p id="big-red"&gt;Red here&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p id="big-red">Red here</p></td></tr>
280
+ <tr><td class='explain' colspan='3'>
281
+ <p>Class and ID can be combined by placing the class first.</p>
282
+ </td></tr>
283
+ <tr><td class='example1' valign='top'><pre>p(example1#big-red2). Red here</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p class="example1" id="big-red2"&gt;Red here&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p class="example1" id="big-red2">Red here</p></td></tr>
284
+ <tr><td class='explain' colspan='3'>
285
+ <p>Style settings can be provided directly by surrounding them in curly braces.</p>
286
+ </td></tr>
287
+ <tr><td class='example1' valign='top'><pre>p{color:blue;margin:30px}. Spacey blue</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p style="color:blue; margin:30px;"&gt;Spacey blue&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="color:blue;margin:30px;">Spacey blue</p></td></tr>
288
+ <tr><td class='explain' colspan='3'>
289
+ <p>Language designations can be given between angel brackets.</p>
290
+ </td></tr>
291
+ <tr><td class='example1' valign='top'><pre>p[fr]. rouge</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p lang="fr"&gt;rouge&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p lang="fr">rouge</p></td></tr>
292
+ <tr><td class='explain' colspan='3'>
293
+ <h4>Phrase Attributes</h4>
294
+ </td></tr>
295
+ <tr><td class='explain' colspan='3'>
296
+ <p>All block attributes can be applied to phrases as well by placing them just inside the opening modifier.</p>
297
+ </td></tr>
298
+ <tr><td class='example1' valign='top'><pre>I seriously *{color:red}blushed*<br />when I _(big)sprouted_ that<br />corn stalk from my<br />%[es]cabeza%.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;I seriously &lt;strong style="color:red;"&gt;blushed&lt;/strong&gt;<br />when I &lt;em class="big"&gt;sprouted&lt;/em&gt; that<br />corn stalk from my<br />&lt;span lang="es"&gt;cabeza&lt;/span&gt;.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I seriously <strong style="color:red;">blushed</strong>
299
+ when I <em class="big">sprouted</em> that
300
+ corn stalk from my
301
+ <span lang="es">cabeza</span>.</p></td></tr>
302
+ <tr><td class='explain' colspan='3'>
303
+ <h4>Block Alignments</h4>
304
+ </td></tr>
305
+ <tr><td class='explain' colspan='3'>
306
+ <p>Text inside blocks can be aligned in four basic ways.</p>
307
+ </td></tr>
308
+ <tr><td class='example1' valign='top'><pre>p&lt;. align left</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p style="text-align:left;"&gt;align left&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="text-align:left;">align left</p></td></tr>
309
+ <tr><td class='example1' valign='top'><pre>p&gt;. align right</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p style="text-align:right;"&gt;align right&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="text-align:right;">align right</p></td></tr>
310
+ <tr><td class='example1' valign='top'><pre>p=. centered</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p style="text-align:center;"&gt;centered&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="text-align:center;">centered</p></td></tr>
311
+ <tr><td class='example1' valign='top'><pre>p&lt;&gt;. justified</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p style="text-align:justify;"&gt;justified&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="text-align:justify;">justified</p></td></tr>
312
+ <tr><td class='explain' colspan='3'>
313
+ <p>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.</p>
314
+ </td></tr>
315
+ <tr><td class='example1' valign='top'><pre>p(. left ident 1em</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p style="padding-left:1em;"&gt;left ident 1em&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="padding-left:1em;">left ident 1em</p></td></tr>
316
+ <tr><td class='example1' valign='top'><pre>p((. left ident 2em</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p style="padding-left:2em;"&gt;left ident 2em&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="padding-left:2em;">left ident 2em</p></td></tr>
317
+ <tr><td class='example1' valign='top'><pre>p))). right ident 3em</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p style="padding-right:3em;"&gt;right ident 3em&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="padding-right:3em;">right ident 3em</p></td></tr>
318
+ <tr><td class='explain' colspan='3'>
319
+ <h4>Combining Alignments</h4>
320
+ </td></tr>
321
+ <tr><td class='explain' colspan='3'>
322
+ <p>Identation may be coupled with alignment.</p>
323
+ </td></tr>
324
+ <tr><td class='example1' valign='top'><pre>h2()&gt;. Bingo.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;h2 style="padding-left:1em; padding-right:1em; text-align:right;"&gt;Bingo.&lt;/h2&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><h2 style="padding-left:1em;padding-right:1em;text-align:right;">Bingo.</h2></td></tr>
325
+ <tr><td class='explain' colspan='3'>
326
+ <p>And, furthermore, coupled with language settings and <span class="caps">CSS</span> styles.</p>
327
+ </td></tr>
328
+ <tr><td class='example1' valign='top'><pre>h3()&gt;[no]{color:red}. Bingo</pre></td><td>&rarr;</td><td class='example2'><p>&lt;h3 style="color:red; padding-left:1em; padding-right:1em; text-align:right;" lang="no"&gt;Bingo&lt;/h3&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><h3 style="color:red;padding-left:1em;padding-right:1em;text-align:right;" lang="no">Bingo</h3></td></tr>
329
+ <tr><td class='explain' colspan='3'>
330
+ <h4><span class="caps">HTML</span> in Textile</h4>
331
+ </td></tr>
332
+ <tr><td class='explain' colspan='3'>
333
+ <p>Textile is designed for quickening the simple markups. For more complex formatting, you are encouraged to break out into <span class="caps">HTML</span>.</p>
334
+ </td></tr>
335
+ <tr><td class='explain' colspan='3'>
336
+ <p>For example, long code blocks belong between <code>pre</code> and <code>code</code> tags. Please also indent your code inside the tags to be sure that all Textile processors out there will ignore the contents.</p>
337
+ </td></tr>
338
+ <tr><td class='example1' valign='top'><pre>&lt;pre&gt;<br />&lt;code&gt;<br /> a.gsub!( /&lt;/, '' )<br />&lt;/code&gt;<br />&lt;/pre&gt;<br /></pre></td><td>&rarr;</td><td class='example2'><p>&lt;pre&gt;<br />&lt;code&gt;<br /> a.gsub!( /&amp;lt;/, '' )<br />&lt;/code&gt;<br />&lt;/pre&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><pre>
339
+ <code>
340
+ a.gsub!( /&lt;/, '' )
341
+ </code>
342
+ </pre></td></tr>
343
+ <tr><td class='explain' colspan='3'>
344
+ <p>You may also choose to surround sections with <code>div</code> tags to separate your document into sections. <a href="http://www.instiki.org/">Instiki</a> uses this technique to float a sidebar to the right.</p>
345
+ </td></tr>
346
+ <tr><td class='example1' valign='top'><pre>&lt;div style="float:right;"&gt;<br /><br />h3. Sidebar<br /><br />"GitHub":http://github.com/<br />"Ruby":http://ruby-lang.org/<br /><br />&lt;/div&gt;<br /><br />The main text of the<br />page goes here and will <br />stay to the left of the <br />sidebar.<br /></pre></td><td>&rarr;</td><td class='example2'><p>&lt;div style="float:right;"&gt;<br /> &lt;h3&gt;Sidebar&lt;/h3&gt;<br /><br /> &lt;p&gt;&lt;a href="http://hobix.com/"&gt;GitHub&lt;/a&gt;<br />&lt;a href="http://ruby-lang.org/"&gt;Ruby&lt;/a&gt;&lt;/p&gt;<br /><br /><br />&lt;/div&gt;<br /> &lt;p&gt;The main text of the<br />page goes here and will <br />stay to the left of the <br />sidebar.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><div style="float:right;">
347
+ <h3>Sidebar</h3>
348
+
349
+ <p><a href="http://github.com/">GitHub</a>
350
+ <a href="http://ruby-lang.org/">Ruby</a></p>
351
+
352
+
353
+ </div>
354
+ <p>The main text of the
355
+ page goes here and will
356
+ stay to the left of the
357
+ sidebar.</p></td></tr>
358
+ <tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
359
+ <tr><th colspan='3'><a name='lists'><small>5.</small></a><br />Lists</th></tr>
360
+ <tr><td class='explain' colspan='3'>
361
+ <h4>Numeric Lists</h4>
362
+ </td></tr>
363
+ <tr><td class='explain' colspan='3'>
364
+ <p>To make a numbered list, place each item in its own paragraph, preceded by &#8221;#&#8221;.</p>
365
+ </td></tr>
366
+ <tr><td class='example1' valign='top'><pre># A first item<br /># A second item<br /># A third</pre></td><td>&rarr;</td><td class='example2'><p>&lt;ol&gt;<br /> &lt;li&gt;A first item&lt;/li&gt;<br /> &lt;li&gt;A second item&lt;/li&gt;<br /> &lt;li&gt;A third&lt;/li&gt;<br /> &lt;/ol&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><ol>
367
+ <li>A first item</li>
368
+ <li>A second item</li>
369
+ <li>A third</li>
370
+ </ol></td></tr>
371
+ <tr><td class='explain' colspan='3'>
372
+ <p>These lists may be nested by increasing the number of pound symbols preceding child entries.</p>
373
+ </td></tr>
374
+ <tr><td class='example1' valign='top'><pre># Fuel could be:<br />## Coal<br />## Gasoline<br />## Electricity<br /># Humans need only:<br />## Water<br />## Protein</pre></td><td>&rarr;</td><td class='example2'><p>&lt;ol&gt;<br /> &lt;li&gt;Fuel could be:<br /> &lt;ol&gt;<br /> &lt;li&gt;Coal&lt;/li&gt;<br /> &lt;li&gt;Gasoline&lt;/li&gt;<br /> &lt;li&gt;Electricity&lt;/li&gt;<br /> &lt;/ol&gt;<br /> &lt;/li&gt;<br /> &lt;li&gt;Humans need only:<br /> &lt;ol&gt;<br /> &lt;li&gt;Water&lt;/li&gt;<br /> &lt;li&gt;Protein&lt;/li&gt;<br /> &lt;/ol&gt;&lt;/li&gt;<br /> &lt;/ol&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><ol>
375
+ <li>Fuel could be:
376
+ <ol>
377
+ <li>Coal</li>
378
+ <li>Gasoline</li>
379
+ <li>Electricity</li>
380
+ </ol>
381
+ </li>
382
+ <li>Humans need only:
383
+ <ol>
384
+ <li>Water</li>
385
+ <li>Protein</li>
386
+ </ol></li>
387
+ </ol></td></tr>
388
+ <tr><td class='explain' colspan='3'>
389
+ <h4>Bulleted Lists</h4>
390
+ </td></tr>
391
+ <tr><td class='explain' colspan='3'>
392
+ <p>Bulleted lists use an asterisk in place of the pound.</p>
393
+ </td></tr>
394
+ <tr><td class='example1' valign='top'><pre>* A first item<br />* A second item<br />* A third</pre></td><td>&rarr;</td><td class='example2'><p>&lt;ul&gt;<br /> &lt;li&gt;A first item&lt;/li&gt;<br /> &lt;li&gt;A second item&lt;/li&gt;<br /> &lt;li&gt;A third&lt;/li&gt;<br /> &lt;/ul&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><ul>
395
+ <li>A first item</li>
396
+ <li>A second item</li>
397
+ <li>A third</li>
398
+ </ul></td></tr>
399
+ <tr><td class='explain' colspan='3'>
400
+ <p>These lists may be nested in like manner.</p>
401
+ </td></tr>
402
+ <tr><td class='example1' valign='top'><pre>* Fuel could be:<br />** Coal<br />** Gasoline<br />** Electricity<br />* Humans need only:<br />** Water<br />** Protein</pre></td><td>&rarr;</td><td class='example2'><p>&lt;ul&gt;<br /> &lt;li&gt;Fuel could be:<br /> &lt;ul&gt;<br /> &lt;li&gt;Coal&lt;/li&gt;<br /> &lt;li&gt;Gasoline&lt;/li&gt;<br /> &lt;li&gt;Electricity&lt;/li&gt;<br /> &lt;/ul&gt;<br /> &lt;/li&gt;<br /> &lt;li&gt;Humans need only:<br /> &lt;ul&gt;<br /> &lt;li&gt;Water&lt;/li&gt;<br /> &lt;li&gt;Protein&lt;/li&gt;<br /> &lt;/ul&gt;&lt;/li&gt;<br /> &lt;/ul&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><ul>
403
+ <li>Fuel could be:
404
+ <ul>
405
+ <li>Coal</li>
406
+ <li>Gasoline</li>
407
+ <li>Electricity</li>
408
+ </ul>
409
+ </li>
410
+ <li>Humans need only:
411
+ <ul>
412
+ <li>Water</li>
413
+ <li>Protein</li>
414
+ </ul></li>
415
+ </ul></td></tr>
416
+ <tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
417
+ <tr><th colspan='3'><a name='external-references'><small>6.</small></a><br />External References</th></tr>
418
+ <tr><td class='explain' colspan='3'>
419
+ <h4>Hypertext Links</h4>
420
+ </td></tr>
421
+ <tr><td class='explain' colspan='3'>
422
+ <p>Basic links are comprised of a phrase which is linked to a <acronym title="Universal Resource Locator">URL</acronym>. Place the descriptive phrase in quotation marks. Follow it immediately by a colon and the <span class="caps">URL</span>.</p>
423
+ </td></tr>
424
+ <tr><td class='example1' valign='top'><pre>I searched "Google":http://google.com.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;I searched &lt;a href="http://google.com"&gt;Google&lt;/a&gt;.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I searched <a href="http://google.com">Google</a>.</p></td></tr>
425
+ <tr><td class='explain' colspan='3'>
426
+ <p>Notice, the link won&#8217;t include any trailing punctuation.</p>
427
+ </td></tr>
428
+ <tr><td class='explain' colspan='3'>
429
+ <h4>Link Aliases</h4>
430
+ </td></tr>
431
+ <tr><td class='explain' colspan='3'>
432
+ <p>If you are using the same link several times in your document, or you&#8217;d just like to be a tad more organized, you can use a link alias. Place the <span class="caps">URL</span> anywhere in your document, beginning with its alias in square brackets. Then, use the alias in place of the <span class="caps">URL</span>, using the link format above.</p>
433
+ </td></tr>
434
+ <tr><td class='example1' valign='top'><pre>I am crazy about "GitHub":github<br />and "it's":github "all":github I ever<br />"link to":github!<br /><br />[github]http://github.com<br /></pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;I am crazy about &lt;a href="http://github.com"&gt;GitHub&lt;/a&gt;<br />and &lt;a href="http://github.com"&gt;it&amp;#8217; s&lt;/a&gt; &lt;a href="http://github.com"&gt;all&lt;/a&gt; I ever<br />&lt;a href="http://github.com"&gt;link to&lt;/a&gt;!&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I am crazy about <a href="http://github.com">GitHub</a>
435
+ and <a href="http://github.com">it&#8217;s</a> <a href="http://github.com">all</a> I ever
436
+ <a href="http://github.com">link to</a>!</p></td></tr>
437
+ <tr><td class='explain' colspan='3'>
438
+ <h4>Embedded Images</h4>
439
+ </td></tr>
440
+ <tr><td class='explain' colspan='3'>
441
+ <p>You can embed an image in your Textile document by surrounding its <span class="caps">URL</span> with exclamation marks.</p>
442
+ </td></tr>
443
+ <tr><td class='example1' valign='top'><pre>!http://hobix.com/sample.jpg!</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;&lt;img src="http://hobix.com/sample.jpg" alt="" /&gt;&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p><img src="http://hobix.com/sample.jpg" alt="" /></p></td></tr>
444
+ <tr><td class='explain' colspan='3'>
445
+ <p>URLs may be relative.</p>
446
+ </td></tr>
447
+ <tr><td class='explain' colspan='3'>
448
+ <p>A title for the image can also be provided in parens, just before the closing exclamation.</p>
449
+ </td></tr>
450
+ <tr><td class='example1' valign='top'><pre>!openwindow1.gif(Bunny.)!</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;&lt;img src="openwindow1.gif" title="Bunny." alt="Bunny." /&gt;&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p><img src="openwindow1.gif" title="Bunny." alt="Bunny." /></p></td></tr>
451
+ <tr><td class='explain' colspan='3'>
452
+ <p>The title also acts as <strong>alt</strong> text should the image not be found.</p>
453
+ </td></tr>
454
+ <tr><td class='explain' colspan='3'>
455
+ <p>Links can be attached to images with a colon.</p>
456
+ </td></tr>
457
+ <tr><td class='example1' valign='top'><pre>!openwindow1.gif!:http://hobix.com/</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;&lt;a href="http://hobix.com/"&gt;&lt;img src="openwindow1.gif" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p><a href="http://hobix.com/"><img src="openwindow1.gif" alt="" /></a></p></td></tr>
458
+ <tr><td class='explain' colspan='3'>
459
+ <h4>Image Alignments</h4>
460
+ </td></tr>
461
+ <tr><td class='explain' colspan='3'>
462
+ <p>Alignments can be applied as well to images.</p>
463
+ </td></tr>
464
+ <tr><td class='example1' valign='top'><pre>!&gt;obake.gif!<br /><br />And others sat all round the small<br />machine and paid it to sing to them.</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p style="float:right"&gt;&lt;img src="obake.gif" alt="" /&gt;&lt;/p&gt;<br /><br /> &lt;p&gt;And others sat all round the small<br />machine and paid it to sing to them.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="float:right"><img src="obake.gif" alt="" /></p>
465
+
466
+ <p>And others sat all round the small
467
+ machine and paid it to sing to them.</p></td></tr>
468
+ <tr><td class='explain' colspan='3'>
469
+ <h4>Acronyms</h4>
470
+ </td></tr>
471
+ <tr><td class='explain' colspan='3'>
472
+ <p>Definitions for acronyms can be provided by following an acronym with its definition in parens.</p>
473
+ </td></tr>
474
+ <tr><td class='example1' valign='top'><pre>We use CSS(Cascading Style Sheets).</pre></td><td>&rarr;</td><td class='example2'><p>&lt;p&gt;We use &lt;acronym title="Cascading Style Sheets"&gt;CSS&lt;/acronym&gt;.&lt;/p&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><p>We use <acronym title="Cascading Style Sheets">CSS</acronym>.</p></td></tr>
475
+ <tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
476
+ <tr><th colspan='3'><a name='tables'><small>7.</small></a><br />Tables</th></tr>
477
+ <tr><td class='explain' colspan='3'>
478
+ <p>Simple tables can be built by separating fields with pipe characters</p>
479
+ </td></tr>
480
+ <tr><td class='example1' valign='top'><pre>| name | age | sex |<br />| joan | 24 | f |<br />| archie | 29 | m |<br />| bella | 45 | f |</pre></td><td>&rarr;</td><td class='example2'><p>&lt;table&gt;<br /> &lt;tr&gt;<br /> &lt;td&gt; name &lt;/td&gt;<br /> &lt;td&gt; age &lt;/td&gt;<br /> &lt;td&gt; sex &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td&gt; joan &lt;/td&gt;<br /> &lt;td&gt; 24 &lt;/td&gt;<br /> &lt;td&gt; f &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td&gt; archie &lt;/td&gt;<br /> &lt;td&gt; 29 &lt;/td&gt;<br /> &lt;td&gt; m &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td&gt; bella &lt;/td&gt;<br /> &lt;td&gt; 45 &lt;/td&gt;<br /> &lt;td&gt; f &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;/table&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
481
+ <tr>
482
+ <td> name </td>
483
+ <td> age </td>
484
+ <td> sex </td>
485
+ </tr>
486
+ <tr>
487
+ <td> joan </td>
488
+ <td> 24 </td>
489
+ <td> f </td>
490
+ </tr>
491
+ <tr>
492
+ <td> archie </td>
493
+ <td> 29 </td>
494
+ <td> m </td>
495
+ </tr>
496
+ <tr>
497
+ <td> bella </td>
498
+ <td> 45 </td>
499
+ <td> f </td>
500
+ </tr>
501
+ </table></td></tr>
502
+ <tr><td class='explain' colspan='3'>
503
+ <p>Specify header cells by marking them with an underscore and period.</p>
504
+ </td></tr>
505
+ <tr><td class='example1' valign='top'><pre>|_. name |_. age |_. sex |<br />| joan | 24 | f |<br />| archie | 29 | m |<br />| bella | 45 | f |</pre></td><td>&rarr;</td><td class='example2'><p>&lt;table&gt;<br /> &lt;tr&gt;<br /> &lt;th&gt;name &lt;/th&gt;<br /> &lt;th&gt;age &lt;/th&gt;<br /> &lt;th&gt;sex &lt;/th&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td&gt; joan &lt;/td&gt;<br /> &lt;td&gt; 24 &lt;/td&gt;<br /> &lt;td&gt; f &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td&gt; archie &lt;/td&gt;<br /> &lt;td&gt; 29 &lt;/td&gt;<br /> &lt;td&gt; m &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td&gt; bella &lt;/td&gt;<br /> &lt;td&gt; 45 &lt;/td&gt;<br /> &lt;td&gt; f &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;/table&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
506
+ <tr>
507
+ <th>name </th>
508
+ <th>age </th>
509
+ <th>sex </th>
510
+ </tr>
511
+ <tr>
512
+ <td> joan </td>
513
+ <td> 24 </td>
514
+ <td> f </td>
515
+ </tr>
516
+ <tr>
517
+ <td> archie </td>
518
+ <td> 29 </td>
519
+ <td> m </td>
520
+ </tr>
521
+ <tr>
522
+ <td> bella </td>
523
+ <td> 45 </td>
524
+ <td> f </td>
525
+ </tr>
526
+ </table></td></tr>
527
+ <tr><td class='explain' colspan='3'>
528
+ <h4>Cell Attributes</h4>
529
+ </td></tr>
530
+ <tr><td class='explain' colspan='3'>
531
+ <p>The period used above marks the end of a cell&#8217;s attributes. Other attributes can be applied as well.</p>
532
+ </td></tr>
533
+ <tr><td class='example1' valign='top'><pre>|_. attribute list |<br />|&lt;. align left |<br />|&gt;. align right|<br />|=. center |<br />|&lt;&gt;. justify |<br />|^. valign top |<br />|~. bottom |</pre></td><td>&rarr;</td><td class='example2'><p>&lt;table&gt;<br /> &lt;tr&gt;<br /> &lt;th&gt;attribute list &lt;/th&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td style="text-align:left;"&gt;align left &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td style="text-align:right;"&gt;align right&lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td style="text-align:center;"&gt;center &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td style="text-align:justify;"&gt;justify &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td style="vertical-align:top;"&gt;valign top &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td style="vertical-align:bottom;"&gt;bottom &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;/table&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
534
+ <tr>
535
+ <th>attribute list </th>
536
+ </tr>
537
+ <tr>
538
+ <td style="text-align:left;">align left </td>
539
+ </tr>
540
+ <tr>
541
+ <td style="text-align:right;">align right</td>
542
+ </tr>
543
+ <tr>
544
+ <td style="text-align:center;">center </td>
545
+ </tr>
546
+ <tr>
547
+ <td style="text-align:justify;">justify </td>
548
+ </tr>
549
+ <tr>
550
+ <td style="vertical-align:top;">valign top </td>
551
+ </tr>
552
+ <tr>
553
+ <td style="vertical-align:bottom;">bottom </td>
554
+ </tr>
555
+ </table></td></tr>
556
+ <tr><td class='explain' colspan='3'>
557
+ <p>You can also specify colspans with a backslash, followed by the cell width.</p>
558
+ </td></tr>
559
+ <tr><td class='example1' valign='top'><pre>|\2. spans two cols |<br />| col 1 | col 2 |</pre></td><td>&rarr;</td><td class='example2'><p>&lt;table&gt;<br /> &lt;tr&gt;<br /> &lt;td colspan="2"&gt;spans two cols &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td&gt; col 1 &lt;/td&gt;<br /> &lt;td&gt; col 2 &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;/table&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
560
+ <tr>
561
+ <td colspan="2">spans two cols </td>
562
+ </tr>
563
+ <tr>
564
+ <td> col 1 </td>
565
+ <td> col 2 </td>
566
+ </tr>
567
+ </table></td></tr>
568
+ <tr><td class='explain' colspan='3'>
569
+ <p>Rowspan is specified by a forward slash, followed by the row height.</p>
570
+ </td></tr>
571
+ <tr><td class='example1' valign='top'><pre>|/3. spans 3 rows | a |<br />| b |<br />| c |</pre></td><td>&rarr;</td><td class='example2'><p>&lt;table&gt;<br /> &lt;tr&gt;<br /> &lt;td rowspan="3"&gt;spans 3 rows &lt;/td&gt;<br /> &lt;td&gt; a &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td&gt; b &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td&gt; c &lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;/table&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
572
+ <tr>
573
+ <td rowspan="3">spans 3 rows </td>
574
+ <td> a </td>
575
+ </tr>
576
+ <tr>
577
+ <td> b </td>
578
+ </tr>
579
+ <tr>
580
+ <td> c </td>
581
+ </tr>
582
+ </table></td></tr>
583
+ <tr><td class='explain' colspan='3'>
584
+ <p>All block attributes can be applied to table cells as well.</p>
585
+ </td></tr>
586
+ <tr><td class='example1' valign='top'><pre>|{background:#ddd}. Grey cell|</pre></td><td>&rarr;</td><td class='example2'><p>&lt;table&gt;<br /> &lt;tr&gt;<br /> &lt;td style="background:#ddd;"&gt;Grey cell&lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;/table&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
587
+ <tr>
588
+ <td style="background:#ddd;">Grey cell</td>
589
+ </tr>
590
+ </table></td></tr>
591
+ <tr><td class='explain' colspan='3'>
592
+ <h4>Table and Row Attributes</h4>
593
+ </td></tr>
594
+ <tr><td class='explain' colspan='3'>
595
+ <p>Table-wide attributes can be applied before the first row of the table. On its own line, followed by a period.</p>
596
+ </td></tr>
597
+ <tr><td class='example1' valign='top'><pre>table{border:1px solid black}.<br />|This|is|a|row|<br />|This|is|a|row|</pre></td><td>&rarr;</td><td class='example2'><p>&lt;table style="border:1px solid black;"&gt;<br /> &lt;tr&gt;<br /> &lt;td&gt;This&lt;/td&gt;<br /> &lt;td&gt;is&lt;/td&gt;<br /> &lt;td&gt;a&lt;/td&gt;<br /> &lt;td&gt;row&lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br /> &lt;td&gt;This&lt;/td&gt;<br /> &lt;td&gt;is&lt;/td&gt;<br /> &lt;td&gt;a&lt;/td&gt;<br /> &lt;td&gt;row&lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;/table&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><table style="border:1px solid black;">
598
+ <tr>
599
+ <td>This</td>
600
+ <td>is</td>
601
+ <td>a</td>
602
+ <td>row</td>
603
+ </tr>
604
+ <tr>
605
+ <td>This</td>
606
+ <td>is</td>
607
+ <td>a</td>
608
+ <td>row</td>
609
+ </tr>
610
+ </table></td></tr>
611
+ <tr><td class='explain' colspan='3'>
612
+ <p>Attributes can be applied to a single row by supplying the attribute before the row starts, using a <code>table</code> modifier and following it by a period.</p>
613
+ </td></tr>
614
+ <tr><td class='example1' valign='top'><pre>|This|is|a|row|<br />{background:#ddd}. |This|is|grey|row|</pre></td><td>&rarr;</td><td class='example2'><p>&lt;table&gt;<br /> &lt;tr&gt;<br /> &lt;td&gt;This&lt;/td&gt;<br /> &lt;td&gt;is&lt;/td&gt;<br /> &lt;td&gt;a&lt;/td&gt;<br /> &lt;td&gt;row&lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr style="background:#ddd;"&gt;<br /> &lt;td&gt;This&lt;/td&gt;<br /> &lt;td&gt;is&lt;/td&gt;<br /> &lt;td&gt;grey&lt;/td&gt;<br /> &lt;td&gt;row&lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;/table&gt;</p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
615
+ <tr>
616
+ <td>This</td>
617
+ <td>is</td>
618
+ <td>a</td>
619
+ <td>row</td>
620
+ </tr>
621
+ <tr style="background:#ddd;">
622
+ <td>This</td>
623
+ <td>is</td>
624
+ <td>grey</td>
625
+ <td>row</td>
626
+ </tr>
627
+ </table></td></tr>
628
+ <tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
629
+ </table>
630
+ </body>
631
+ </html>