buildrelease
[openafs-wiki.git] / TWiki / TWikiEditingShorthand.mdwn
1 ## <a name="TWiki Editing Shorthand&#39;"></a> TWiki Editing Shorthand'
2
3 <table bgcolor="#ffffff" border="1" cellpadding="3">
4   <tr bgcolor="#ffffff">
5     <th width="50%"> Formatting Command: </th>
6     <th width="25%"> You write: </th>
7     <th width="25%"> You get: </th>
8   </tr>
9   <tr valign="top">
10     <td><strong>Paragraphs:</strong> %BR% Blank lines will create new paragraphs. </td>
11     <td><pre>
12 1st paragraph
13
14 2nd paragraph
15 </pre></td>
16     <td> 1st paragraph <p> 2nd paragraph </p>
17     </td>
18   </tr>
19   <tr valign="top">
20     <td><strong>Headings:</strong> %BR% Three or more dashes at the beginning of a line, followed by plus signs and the heading text. One plus creates a top level heading, two pluses a second level heading, etc. The maximum heading depth is 6. <p> You can create a table of contents with the [[Main/VarTOC]] variable. If you want to <strong>exclude</strong> a heading from the TOC, put <code>!!</code> after the <code>---+</code>. </p>
21       <p> %X% Empty headings are allowed, but won't appear in the table of contents. </p>
22     </td>
23     <td><pre>
24 ---++ Sushi
25 ---+++ Maguro
26 ---+++!! Not in TOC
27 </pre></td>
28     <td>
29       <h2>Sushi</h2>
30       <h3>Maguro</h3>
31       <h3>Not in TOC</h3>
32     </td>
33   </tr>
34   <tr valign="top">
35     <td><strong>Bold Text:</strong> %BR% Words get shown in <strong>bold</strong> by enclosing them in <code>*</code> asterisks. </td>
36     <td><pre>
37 *Bold*
38 </pre></td>
39     <td><strong>Bold</strong></td>
40   </tr>
41   <tr valign="top">
42     <td><strong>Italic Text:</strong> %BR% Words get shown in <em>italic</em> by enclosing them in <code>_</code> underscores. </td>
43     <td><pre>
44 _Italic_
45 </pre></td>
46     <td><em>Italic</em></td>
47   </tr>
48   <tr valign="top">
49     <td><strong>Bold Italic:</strong> %BR% Words get shown in <strong><em>bold italic</em></strong> by enclosing them in <code>__</code> double-underscores. </td>
50     <td><pre>
51 __Bold italic__
52 </pre></td>
53     <td><strong><em>Bold italic</em></strong></td>
54   </tr>
55   <tr valign="top">
56     <td><strong>Fixed Font:</strong> %BR% Words get shown in <code>fixed font</code> by enclosing them in <code>=</code> equal signs. </td>
57     <td><pre>
58 =Fixed font=
59 </pre></td>
60     <td><code>Fixed font</code><p>
61       </p>
62     </td>
63   </tr>
64   <tr valign="top">
65     <td><strong>Bold Fixed Font:</strong> %BR% Words get shown in <code><b>bold fixed font</b></code> by enclosing them in <code><b></b></code> double equal signs. </td>
66     <td><pre>
67 ==Bold fixed==
68 </pre></td>
69     <td><code><b>Bold fixed</b></code></td>
70   </tr>
71   <tr valign="top">
72     <td> %T% You can follow the closing bold, italic, or other (<code>* _ __ = ==</code>) indicator with normal punctuation, such as commas and full stops. <p> %X% Make sure there is no space between the text and the indicators. </p>
73     </td>
74     <td><pre>
75 _This works_,
76 _this does not _
77 </pre></td>
78     <td><em>This works</em>,%BR% _this does not _ </td>
79   </tr>
80   <tr valign="top">
81     <td><strong>Verbatim (Literal) Text:</strong> %BR% Surround code excerpts and other formatted text with <code>&lt;verbatim&gt;</code> and <code>&lt;/verbatim&gt;</code> tags.%BR% %T% <code>verbatim</code> tags disable HTML code. Use <code>&lt;pre&gt;</code> and <code>&lt;/pre&gt;</code> tags instead if you want the HTML code within the tags to be interpreted.%BR% <strong><em>%X% NOTE:</em></strong> Preferences variables (* Set NAME = value) are set within verbatim tags. </td>
82     <td><pre>
83 &lt;verbatim&gt;
84 class CatAnimal {
85   void purr() {
86     &lt;code here&gt;
87   }
88 }
89 &lt;/verbatim&gt;
90 </pre></td>
91     <td><pre>
92 class CatAnimal {
93   void purr() {
94     &lt;code here&gt;
95   }
96 }
97 </pre></td>
98   </tr>
99   <tr valign="top">
100     <td><strong>Separator (Horizontal Rule):</strong> %BR% Three or more three dashes at the beginning of a line.. </td>
101     <td><pre>
102 -------
103 </pre></td>
104     <td>
105       <hr />
106     </td>
107   </tr>
108   <tr valign="top">
109     <td><strong>Bulleted List:</strong> %BR% Multiple of three spaces, an asterisk, and another space.%BR% %H% For all the list types, you can break a list item over several lines by indenting lines after the first one by <strong>at least 3 spaces</strong>. </td>
110     <td><pre>
111    * level 1
112       * level 2
113    * back on 1
114    * A bullet
115      broken over
116      three lines
117    * last bullet
118 </pre></td>
119     <td>
120       <ul>
121         <li> level 1 <ul>
122             <li> level 2 </li>
123           </ul>
124         </li>
125         <li> back on 1 </li>
126         <li> A bullet broken over three lines </li>
127         <li> last bullet </li>
128       </ul>
129     </td>
130   </tr>
131   <tr valign="top">
132     <td><strong>Numbered List:</strong> %BR% Multiple of three spaces, a type character, a dot, and another space. Several types are available besides a number: <table border="1" cellpadding="0" cellspacing="0" style="border-width: 1px">
133         <tr>
134           <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=0;table=1;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Type</font></a></th>
135           <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=1;table=1;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Generated Style</font></a></th>
136           <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=2;table=1;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Sample Sequence</font></a></th>
137         </tr>
138         <tr>
139           <td bgcolor="#ecf2f8" style=""> 1. </td>
140           <td bgcolor="#ecf2f8" style=""> Arabic numerals </td>
141           <td bgcolor="#ecf2f8" style=""> 1, 2, 3, 4... </td>
142         </tr>
143         <tr>
144           <td bgcolor="#ffffff" style=""> A. </td>
145           <td bgcolor="#ffffff" style=""> Uppercase letters </td>
146           <td bgcolor="#ffffff" style=""> A, B, C, D... </td>
147         </tr>
148         <tr>
149           <td bgcolor="#ecf2f8" style=""> a. </td>
150           <td bgcolor="#ecf2f8" style=""> Lowercase letters </td>
151           <td bgcolor="#ecf2f8" style=""> a, b, c, d... </td>
152         </tr>
153         <tr>
154           <td bgcolor="#ffffff" style=""> I. </td>
155           <td bgcolor="#ffffff" style=""> Uppercase Roman Numerals </td>
156           <td bgcolor="#ffffff" style=""> I, II, III, IV... </td>
157         </tr>
158         <tr>
159           <td bgcolor="#ecf2f8" style=""> i. </td>
160           <td bgcolor="#ecf2f8" style=""> Lowercase Roman Numerals </td>
161           <td bgcolor="#ecf2f8" style=""> i, ii, iii, iv... </td>
162         </tr>
163       </table>
164     </td>
165     <td><pre>
166    1. Sushi
167    1. Dim Sum
168    1. Fondue
169
170    A. Sushi
171    A. Dim Sum
172    A. Fondue
173
174    i. Sushi
175    i. Dim Sum
176    i. Fondue
177 </pre></td>
178     <td>
179       <ol>
180         <li> Sushi </li>
181         <li> Dim Sum </li>
182         <li> Fondue </li>
183       </ol>
184       <p>
185       </p>
186       <ol>
187         <li type="A"> Sushi </li>
188         <li type="A"> Dim Sum </li>
189         <li type="A"> Fondue </li>
190       </ol>
191       <p>
192       </p>
193       <ol>
194         <li type="i"> Sushi </li>
195         <li type="i"> Dim Sum </li>
196         <li type="i"> Fondue </li>
197       </ol>
198     </td>
199   </tr>
200   <tr valign="top">
201     <td><strong>Definition List:</strong> %BR% Three spaces, a dollar sign, the term, a colon, a space, followed by the definition. </td>
202     <td><pre>
203    $ Sushi: Japan
204    $ Dim Sum: S.F.
205 </pre></td>
206     <td>
207       <dl>
208         <dt> Sushi </dt>
209         <dd> Japan </dd>
210         <dt> Dim Sum </dt>
211         <dd> S.F. </dd>
212       </dl>
213     </td>
214   </tr>
215   <tr valign="top">
216     <td><strong>Table:</strong> %BR% Each row of the table is a line containing of one or more cells. Each cell starts and ends with a vertical bar '|'. Any spaces at the beginning of a line are ignored. <ul>
217         <li><code>| *bold* |</code> header cell with text in asterisks </li>
218         <li><code>|   center-aligned   |</code> cell with at least two, and equal number of spaces on either side </li>
219         <li><code>|      right-aligned |</code> cell with more spaces on the left </li>
220         <li><code>| 2 colspan ||</code> and multi-span columns with multiple <tt>|</tt>'s right next to each other </li>
221         <li><code>|^|</code> cell with caret indicating follow-up row of multi-span rows </li>
222         <li> You can split rows over multiple lines by putting a backslash <code>'\'</code> at the end of each line </li>
223         <li> Contents of table cells wrap automatically as determined by the browser </li>
224       </ul> %T% The [[TWiki/TablePlugin]] provides the <code>|^|</code> multiple-span row functionality and additional rendering features </td>
225     <td><pre>
226 | *L* | *C* | *R* |
227 | A2 |  B2  |  C2 |
228 | A3 |  B3  |  C3 |
229 | multi span |||
230 | A5-7 |  5  |  5 |
231 |^| six | six |
232 |^| seven | seven |
233 | split\
234   | over\
235   | 3 lines |
236 | A9 |  B9  |  C9 |
237 </pre></td>
238     <td>
239       <table border="1" cellpadding="0" cellspacing="0" style="border-width: 1px">
240         <tr>
241           <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=0;table=2;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">L</font></a></th>
242           <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=1;table=2;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">C</font></a></th>
243           <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=2;table=2;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">R</font></a></th>
244         </tr>
245         <tr>
246           <td bgcolor="#ecf2f8" style=""> A2 </td>
247           <td align="center" bgcolor="#ecf2f8" style=""> B2 </td>
248           <td align="right" bgcolor="#ecf2f8" style=""> C2 </td>
249         </tr>
250         <tr>
251           <td bgcolor="#ffffff" style=""> A3 </td>
252           <td align="center" bgcolor="#ffffff" style=""> B3 </td>
253           <td align="right" bgcolor="#ffffff" style=""> C3 </td>
254         </tr>
255         <tr>
256           <td bgcolor="#ecf2f8" colspan="3" style=""> multi span </td>
257         </tr>
258         <tr>
259           <td bgcolor="#ffffff" rowspan="3" style=""> A5-7 </td>
260           <td align="center" bgcolor="#ffffff" style=""> 5 </td>
261           <td align="right" bgcolor="#ffffff" style=""> 5 </td>
262         </tr>
263         <tr>
264           <td bgcolor="#ecf2f8" style=""> six </td>
265           <td bgcolor="#ecf2f8" style=""> six </td>
266         </tr>
267         <tr>
268           <td bgcolor="#ffffff" style=""> seven </td>
269           <td bgcolor="#ffffff" style=""> seven </td>
270         </tr>
271         <tr>
272           <td bgcolor="#ecf2f8" style=""> split </td>
273           <td bgcolor="#ecf2f8" style=""> over </td>
274           <td bgcolor="#ecf2f8" style=""> 3 lines </td>
275         </tr>
276         <tr>
277           <td bgcolor="#ffffff" style=""> A9 </td>
278           <td align="center" bgcolor="#ffffff" style=""> B9 </td>
279           <td align="right" bgcolor="#ffffff" style=""> C9 </td>
280         </tr>
281       </table>
282     </td>
283   </tr>
284   <tr valign="top">
285     <td><strong>WikiWord Links:</strong> %BR% CapitalizedWordsStuckTogether (or [[Main/WikiWords]]) will produce a link automatically if preceded by whitespace or parenthesis. %BR% %T% If you want to link to a topic in a different web write <code>Otherweb.TopicName</code>. %BR% %H% The link label excludes the name of the web, e.g. only the topic name is shown. As an exception, the name of the web is shown for the WebHome topic. <p> It's generally a good idea to use the [[Main/TWikiVariables]] %TWIKIWEB% and %MAINWEB% instead of TWiki and Main. </p>
286     </td>
287     <td><pre>
288 WebStatistics
289
290 Sandbox.WebNotify
291
292 Sandbox.WebHome
293 </pre></td>
294     <td>[[Main/WebStatistics]]<p>[[Sandbox/WebNotify]]</p>
295       <p>[[Sandbox/WebHome]]</p>
296     </td>
297   </tr>
298   <tr valign="top">
299     <td><strong>Anchors:</strong> %BR% You can define a reference inside a TWiki topic (called an anchor name) and link to that. To <strong><em>define</em></strong> an anchor write <code>#AnchorName</code> at the beginning of a line. The anchor name must be a [[Main/WikiWord]]. To <strong><em>link to</em></strong> an anchor name use the <code>[[MyTopic#MyAnchor]]</code> syntax. You can omit the topic name if you want to link within the same topic. </td>
300     <td><pre>
301 [[WikiWord#NotThere]]
302
303 [[#MyAnchor][Jump]]
304
305 #MyAnchor To here
306 </pre></td>
307     <td>[[Main/WikiWord#NotThere]]<p>[[Main/WebHome#MyAnchor]]</p>
308       <p><a name="MyAnchor"></a> To here </p>
309     </td>
310   </tr>
311   <tr valign="top">
312     <td><a name="HeRe"></a> <strong>Forced Links:</strong> %BR% You can create a forced internal link by enclosing words in double square brackets. %BR% Text within the brackets may contain optional spaces; the topic name is formed by capitalizing the initial letter and by removing the spaces; for example, <code>[[text formatting FAQ]]</code> links to topic [[Main/TextFormattingFAQ]]. You can also refer to a different web and use anchors. %BR% %T% To "escape" double square brackets that would otherwise make a link, prefix the leading left square bracket with an exclamation point. </td>
313     <td><pre>
314 [[wiki syntax]]
315
316 [[Main.TWiki users]]
317
318 escaped:
319 ![[wiki syntax]]
320 </pre></td>
321     <td>[[Main/WikiSyntax]]<p>[[Main/TWikiUsers]]</p>
322       <p> escaped: [[wiki syntax]] </p>
323     </td>
324   </tr>
325   <tr valign="top">
326     <td><strong>Specific Links:</strong> %BR% You can create a link where you specify the link text and the URL separately using nested square brackets <code>[[reference][text]]</code>. Internal link references (e.g. [[Main/WikiSyntax]]) and URLs (e.g. <a href="http://TWiki.org/" target="_top">http://TWiki.org/</a>) are both supported. The rules described under <strong><em>Forced Links</em></strong> apply for internal link references. %BR% %T% Anchor names can be added as well, to create a link to a specific place in a topic. </td>
327     <td><pre>
328 [[WikiSyntax][wiki syntax]]
329
330 [[http://gnu.org][GNU]]
331 </pre></td>
332     <td>[[Main/WikiSyntax]]<p><a href="http://gnu.org" target="_top">GNU</a></p>
333     </td>
334   </tr>
335   <tr valign="top">
336     <td><strong>Prevent a Link:</strong> %BR% Prevent a [[Main/WikiWord]] from being linked by prepending it with an exclamation point. </td>
337     <td><pre>
338 !SunOS
339 </pre></td>
340     <td> SunOS </td>
341   </tr>
342   <tr valign="top">
343     <td><strong>Disable Links:</strong> %BR% You can disable automatic linking of [[Main/WikiWords]] by surrounding text with <code>&lt;noautolink&gt;</code> and <code>&lt;/noautolink&gt;</code> tags.%BR% %H% It is possible to turn off all auto-linking with a NOAUTOLINK preferences setting. </td>
344     <td><pre>
345  &lt;noautolink&gt;
346  RedHat &amp;
347  SuSE
348  &lt;/noautolink&gt;
349 </pre></td>
350     <td> RedHat &amp; SuSE </td>
351   </tr>
352   <tr valign="top">
353     <td><strong>Mailto Links:</strong> %BR% E-mail addresses are linked automatically. To create e-mail links that have more descriptive link text, specify subject lines or message bodies, or omit the e-mail address, you can write <code>[[mailto:user@domain][descriptive text]]</code>. </td>
354     <td><pre>
355 a@b.com
356
357 [[mailto:a@b.com]\
358 [Mail]]
359
360 [[mailto:?subject=\
361 Hi][Hi]]
362 </pre></td>
363     <td><a href="mailto:a@b.com">a@b.com</a><p><a href="mailto:a@b.com">Mail</a></p>
364       <p><a href="mailto:?subject=Hi">Hi</a></p>
365     </td>
366   </tr>
367 </table>