3 <li><a href="#TWiki Text Formatting"> TWiki Text Formatting</a><ul>
4 <li><a href="#TWiki Editing Shorthand"> TWiki Editing Shorthand</a></li>
5 <li><a href="#Using HTML"> Using HTML</a></li>
6 <li><a href="#Hyperlinks"> Hyperlinks</a><ul>
7 <li><a href="#Internal Links"> Internal Links</a></li>
8 <li><a href="#External Links"> External Links</a></li>
11 <li><a href="#TWiki Variables"> TWiki Variables</a></li>
12 <li><a href="#Common Editing Errors"> Common Editing Errors</a></li>
13 <li><a href="#TWiki Plugins"> TWiki Plugins</a></li>
19 # <a name="TWiki Text Formatting"></a> TWiki Text Formatting
21 Working in TWiki is as easy as typing in text - exactly like email. You don't need to know HTML, though you can use it if you prefer. Links to topics are created automatically when you enter [[WikiWords]]. And TWiki shorthand gives you all the power of HTML with a simple coding system that takes no time to learn. It's all layed out below - refer back to this page in a pop-up window from the **Edit** screen.
23 <a name="TWikiShorthand"></a>
25 ## <a name="TWiki Editing Shorthand"></a> TWiki Editing Shorthand
27 <table bgcolor="#000000" border="0" cellpadding="3" cellspacing="1">
28 <tr bgcolor="#ffffff">
29 <td><strong>Formatting Command:</strong></td>
30 <td><strong>Example: You write:</strong></td>
31 <td><strong>You get:</strong></td>
33 <tr bgcolor="#ffffff">
34 <td valign="top"><strong>Paragraphs:</strong><br /> Blank lines will create new paragraphs. </td>
35 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
39 </pre> </font></span></td>
40 <td valign="top"> 1st paragraph <p> 2nd paragraph </p>
43 <tr bgcolor="#ffffff">
44 <td valign="top"><strong>Headings:</strong><br /> At least three dashes at the beginning of a line, followed by plus signs and the heading text. One plus creates a level 1 heading (most important), two pluses a level 2 heading; the maximum is level 6. <strong><em>Note:</em></strong> A Table of Content can be created automatically with the <code>%TOC%</code> variable, see [[Main/TWikiVariables]]. </td>
45 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
49 </pre> </font></span></td>
57 <tr bgcolor="#ffffff">
58 <td valign="top"><strong>Bold Text:</strong><br /> Words get <strong>bold</strong> by enclosing them in <code>*</code> asterisks. </td>
59 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
61 </pre> </font></span></td>
62 <td valign="top"><strong>Bold</strong></td>
64 <tr bgcolor="#ffffff">
65 <td valign="top"><strong>Italic Text:</strong><br /> Words get <em>italic</em> by enclosing them in <code>_</code> underscores. </td>
66 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
68 </pre> </font></span></td>
69 <td valign="top"><em>Italic</em></td>
71 <tr bgcolor="#ffffff">
72 <td valign="top"><strong>Bold Italic:</strong><br /> Words get <em>_bold italic</em> by enclosing them in <code>_</code> double-underscores. </td>
73 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
75 </pre> </font></span></td>
76 <td valign="top"><strong><em>Bold italic</em></strong></td>
78 <tr bgcolor="#ffffff">
79 <td valign="top"><strong>Fixed Font:</strong><br /> Words get shown in <code>fixed font</code> by enclosing them in <code>=</code> equal signs. </td>
80 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
82 </pre> </font></span></td>
83 <td valign="top"><code>Fixed font</code></td>
85 <tr bgcolor="#ffffff">
86 <td valign="top"><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>
87 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
89 </pre> </font></span></td>
90 <td valign="top"><code><b>Bold fixed</b></code></td>
92 <tr bgcolor="#ffffff">
93 <td valign="top"><strong><em>Note:</em></strong> Make sure to "stick" the <code>* _ = ==</code> signs to the words, e.g. take away spaces. </td>
94 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
97 </pre> </font></span></td>
98 <td valign="top"><em>This works</em>, _this not _ </td>
100 <tr bgcolor="#ffffff">
101 <td valign="top"><strong>Verbatim Mode:</strong><br /> Surround code excerpts and other formatted text with <code><verbatim></code> and <code></verbatim></code> tags. <br /><strong><em>Note:</em></strong> Use <code><pre></code> and <code></pre></code> tags instead if you want that HTML code is interpreted. <br /><strong><em>Note:</em></strong> Each tag must be on a line by itself. </td>
102 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
110 </pre> </font></span></td>
111 <td valign="top"><pre>
119 <tr bgcolor="#ffffff">
120 <td valign="top"><strong>Separator:</strong><br /> At least three dashes at the beginning of a line. </td>
121 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
123 </pre> </font></span></td>
128 <tr bgcolor="#ffffff">
129 <td valign="top"><strong>List Item:</strong><br /> Three spaces and an asterisk. </td>
130 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
132 </pre> </font></span></td>
135 <li> bullet item </li>
139 <tr bgcolor="#ffffff">
140 <td valign="top"><strong>Nested List Item:</strong><br /> Six, nine, ... spaces and an asterisk. </td>
141 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
143 </pre> </font></span></td>
148 <li> nested stuff </li>
154 <tr bgcolor="#ffffff">
155 <td valign="top"><strong>Ordered List:</strong><br /> Three spaces and a number. </td>
156 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
159 </pre> </font></span></td>
167 <tr bgcolor="#ffffff">
168 <td valign="top"><strong>Definition List:</strong><br /> Three spaces, the term, a colon, a space, followed by the definition. <br /><strong><em>Note:</em></strong> Terms with spaces are not supported. In case you do have a term with more then one word, separate the words with dashes or with the <code>&nbsp;</code> non-breaking-space entity. </td>
169 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
171 Dim&nbsp;Sum: S.F.
172 </pre> </font></span></td>
182 <tr bgcolor="#ffffff">
183 <td valign="top"><strong>Table:</strong><br /> Optional spaces followed by the cells enclosed in vertical bars. <br /><strong><em>Note:</em></strong> <code>| *bold* |</code> cells are rendered as table headers. <br /><strong><em>Note:</em></strong> <code>| spaced |</code> cells are rendered center aligned. <br /><strong><em>Note:</em></strong> <code>| spaced |</code> cells are rendered right aligned. <br /><strong><em>Note:</em></strong> <code>| 2 colspan ||</code> cells are rendered as multi-span columns. <br /><strong><em>Note:</em></strong> In case you have a long row and you want it to be more readable when you edit the table you can split the row into lines that end with a <code>'\'</code> backslash character. <br />
185 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
190 | A4 \ | next \ | next |
191 </pre> </font></span></td>
193 <table border="1" cellpadding="0" cellspacing="0">
195 <th bgcolor="#99CCCC"><strong> L </strong></th>
196 <th bgcolor="#99CCCC"><strong> C </strong></th>
197 <th bgcolor="#99CCCC"><strong> R </strong></th>
201 <td align="center"> 2 </td>
202 <td align="right"> 2 </td>
206 <td align="center"> 3 </td>
207 <td align="right"> 3 </td>
210 <td colspan="3"> multi span </td>
220 <tr bgcolor="#ffffff">
221 <td valign="top"><strong>WikiWord Links:</strong><br /> CapitalizedWordsStuckTogether (or [[Main/WikiWords]]) will produce a link automatically. <br /><strong><em>Note:</em></strong> In case you want to link to a topic in a different %WIKITOOLNAME% web write <code>Webname.TopicName</code>. </td>
222 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
226 </pre> </font></span></td>
227 <td valign="top">[[Main/WebNotify]]<p>[[Know/ReadmeFirst]]</p>
230 <tr bgcolor="#ffffff">
231 <td valign="top"><a name="SquareBrackets"></a> <strong>Forced Links:</strong><br /> You can create a forced internal link by enclosing words in double square brackets. <br /><strong><em>Note:</em></strong> Text within the brackets may contain optional spaces; the topic name is formed by capitalizing the initial letter and by removing the spaces; i.e. <code>[[text formatting FAQ]]</code> links to topic [[Main/TextFormattingFAQ]]. You can also refer to a different web and use anchors. </td>
232 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
236 </pre> </font></span></td>
237 <td valign="top">[[Main/WikiSyntax]]<p>[[Main/TWikiUsers]]</p>
240 <tr bgcolor="#ffffff">
241 <td valign="top"><strong>Specific Links:</strong><br /> Create a link where you can specify the link text and the link reference separately, using nested square brackets like <code>[[reference][text]]</code>. Internal link references (i.e. [[Main/WikiSyntax]]) and external link references (i.e. <a href="http://TWiki.org/" target="_top">http://TWiki.org/</a>) are supported. The same <strong><em>Forced Links</em></strong> rules apply for internal link references. Anchor names can be added as well, like <code>[[WebHome#MyAnchor][go home]]</code> and <code>[[http://www.yahoo.com/#somewhere][Yahoo!]]</code>. </td>
242 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
243 [[WikiSyntax][syntax]]
245 [[http://gnu.org][GNU]]
246 </pre> </font></span></td>
247 <td valign="top">[[Main/WikiSyntax]]<p><a href="http://gnu.org" target="_top">GNU</a></p>
250 <tr bgcolor="#ffffff">
251 <td valign="top"><strong>Anchors:</strong><br /> You can define a link reference inside a %WIKITOOLNAME% 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>
252 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
258 </pre> </font></span></td>
259 <td valign="top">[[Main/WebHome#NotThere]]<p>[[Main/WebHome#MyAnchor]]</p>
260 <p><a name="MyAnchor"></a> To here </p>
263 <tr bgcolor="#ffffff">
264 <td valign="top"><strong>Prevent a Link:</strong><br /> Prevent a [[Main/WikiWord]] from being linked by prepending it with the <code><nop></code> tag. </td>
265 <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
267 </pre> </font></span></td>
268 <td valign="top"> SunOS </td>
272 ## <a name="Using HTML"></a> Using HTML
274 You can use just about any HTML tag without a problem - however, to keep in mind:
276 - On collaboration pages, it's preferable NOT to use HTML, and to use [[TWiki shorthand|Main/WebHome#TWikiShorthand]] instead - this keeps the text uncluttered and easy to edit.
277 - **_NOTE:_** TWiki converts shorthand notation to XHTML 1.0 for display. To copy a fully marked-up page, simply view source in your browser and save the contents.
278 - **_NOTE:_** The standard installation TWiki is compatible across a wide range of browsers and computer platforms. If this is important to you, remember that using browser-specific tags or any other mark-up that doesn't degrade well will reduce compatibility.
280 ## <a name="Hyperlinks"></a> Hyperlinks
282 Being able to create links without any formatting required is a core TWiki feature, made possible with [[WikiWords]]. New TWiki linking rules are a simple extension of the syntax that provide a new set of flexible options.
284 ### <a name="Internal Links"></a> Internal Links
286 - [[GoodStyle]] is a [[WikiWord]] that links to the GoodStyle topic located in the current %WIKITOOLNAME% web.
288 - [[NotExistingYet]] is a topic waiting to be written. Create the topic by clicking on the **?**. (Try clicking, but then, **Cancel** - creating the topic would wreck this example!)
290 ### <a name="External Links"></a> External Links
292 - `http://...`, `https://...`, `ftp://...` and `mailto:...@...` are linked automatically.
294 - Email addresses like `name@domain.com` are linked automatically.
296 - `[[Square bracket rules]]` let you easily create [[non-WikiWord links|Main/WebHome#SquareBrackets]].
298 ## <a name="TWiki Variables"></a> TWiki Variables
300 Variables are names that are enclosed in percent signs `%` that are expanded on the fly.
302 - `%TOC%` : Automatically generates a table of contents based on headings in a topic - see the top of this page for an example.
304 - `%WEB%` : The current web, is **%WEB%**.
306 - `%TOPIC%` : The current topic name, is **%TOPIC%**.
308 - `%ATTACHURL%` : The attachment URL of the current topic. Example usage: If you attach a file to a topic you can refer to it as <code>**%ATTACHURL%/image.gif**</code> to show the URL of the file or the image in your text.
310 - `%INCLUDE{"SomeTopic"}%` : Server side include, includes another topic. The current %WIKITOOLNAME% web is the default web. Example: <code>**%INCLUDE\{"TWiki.TWikiWebsTable"\}%**</code>
312 - There are many more variables, see **[[TWikiVariables]]**.
314 ## <a name="Common Editing Errors"></a> Common Editing Errors
316 TWiki formatting rules are fairly simple to use and quick to type. However, there are some things to watch out for, taken from the [[TextFormattingFAQ]]:
318 - **Q:** Text enclosed in angle brackets like `<filename>` is not displayed. How can I show it as it is?
319 - **A:** The `'<'` and `'>'` characters have a special meaning in HTML, they define HTML tags. You need to escape them, so write `'<'` instead of `'<'`, and `'>'` instead of `'>'`. <br /> Example: Type `'prog <filename>'` to get `'prog <filename>'`.
321 - **Q:** Why is the `'&'` character sometimes not displayed?
322 - **A:** The `'&'` character has a special meaning in HTML, it starts a so called character entity, i.e. `'©'` is the `©` copyright character. You need to escape `'&'` to see it as it is, so write `'&'` instead of `'&'`. <br /> Example: Type `'This & that'` to get `'This & that'`.
324 ## <a name="TWiki Plugins"></a> TWiki Plugins
326 Plugins provide additional text formatting capabilities and can extend the functionality of %WIKITOOLNAME% into many other areas. For example, one optional Plugin lets you create a basic spreadsheet in a similar way to tables. Available Plugins are located in the [[Plugins|Main/TWiki:Plugins]] web on TWiki.org. Currently enabled plugins on here:
328 - [[SpreadSheetPlugin]] <span>(any TWiki, 10197)</span>:
329 - [[CommentPlugin]] <span>(Dakar, 11359)</span>: Allows users to quickly post comments to a page without an edit/preview/save cycle
330 - [[EditTablePlugin]] <span>(any TWiki, 11646)</span>:
331 - [[InterwikiPlugin]] <span>(Dakar, $Rev: 11935$)</span>:
332 - [[PreferencesPlugin]] <span>(Dakar, 9839)</span>:
333 - [[SlideShowPlugin]] <span>(Any TWiki, $Rev: 12847$)</span>:
334 - [[SmiliesPlugin]] <span>(Dakar, 8154)</span>:
335 - [[TablePlugin]] <span>(1.020, 12339)</span>:
336 - [[TwistyPlugin]] <span>(1.2.0, $Rev: 12154$)</span>:
338 Check on current Plugin status and settings for this site in [[TWikiPreferences]].
340 -- [[MikeMannix]] - 30 Aug 2001