none
[openafs-wiki.git] / TWiki / TextFormattingRules.mdwn
index 852e6e7..20e70ff 100644 (file)
@@ -1,20 +1,35 @@
-It is easy to collaborate; just type your text. You don't need to know HTML at all, though you can use it if you prefer. Links to topics will be created automatically, as long as you follow these simple Text Formatting Rules. [[TextFormattingFAQ]] has answers to frequently asked questions about text formatting.
+<div>
+  <ul>
+    <li><a href="#Links"> Links</a><ul>
+        <li><a href="#Internal Links"> Internal Links</a></li>
+        <li><a href="#External Links"> External Links</a></li>
+      </ul>
+    </li>
+    <li><a href="#Editing"> Editing</a></li>
+    <li><a href="#Using HTML"> Using HTML</a></li>
+    <li><a href="#TWiki Variables"> TWiki Variables</a></li>
+    <li><a href="#"Gotchas" when Editing Text"> "Gotchas" when Editing Text</a></li>
+    <li><a href="#TWiki Plugins"> TWiki Plugins</a></li>
+  </ul>
+</div>
+
+It is easy to collaborate: just type in your text. You don't need to know HTML at all, though you can use it if you prefer. Links to topics will be created automatically, as long as you follow these simple Text Formatting Rules. [[TextFormattingFAQ]] has answers to frequently asked questions about text formatting. This page is also available as quick reference pop-up window from a link in the Edit screen.
 
-**LINKS**
+## <a name="Links"></a> Links
 
-The Collaborative Work Area is a bunch of related links that are editable through your web browser.
+Being able to create links without any formatting required is a core TWiki feature, made possible using [[WikiNames]]. With the latest version of TWiki linking rules, a simple extension of the syntax provides an new set of flexible linking options.
 
-The %WIKITOOLNAME% web has the following types of **_internal links:_**
+### <a name="Internal Links"></a> Internal Links
 
 - [[GoodStyle]] is a [[WikiWord]] that links to the GoodStyle topic located in the current %WIKITOOLNAME% web.
 - [[NotExistingYet]] is a topic waiting to be written. You could create that topic by clicking on the question mark. (Do not create that topic; you would wreck this example!)
 
-**_External links:_**
+### <a name="External Links"></a> External Links
 
 - `http://...`, `https://...`, `ftp://...` and `mailto:...@...` are linked automatically.
 - Email addresses like `name@domain.com` are linked automatically.
 
-**EDITING**
+## <a name="Editing"></a> Editing
 
 <table border="3" cellpadding="2" cellspacing="2">
   <tr>
@@ -25,53 +40,67 @@ The %WIKITOOLNAME% web has the following types of **_internal links:_**
   <tr>
     <td valign="top"><strong>Paragraphs:</strong><br /> Blank lines will create new paragraphs. </td>
     <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
- 1st paragraph
+1st paragraph
 
- 2nd paragraph
+2nd paragraph
 </pre> </font></span></td>
     <td valign="top"> 1st paragraph <p> 2nd paragraph </p>
     </td>
   </tr>
   <tr>
+    <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>
+    <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
+---++ Sushi
+
+---+++ Maguro
+</pre> </font></span></td>
+    <td valign="top">
+      <h2>Sushi</h2>
+      <p>
+      </p>
+      <h3>Maguro</h3>
+    </td>
+  </tr>
+  <tr>
     <td valign="top"><strong>Bold Text:</strong><br /> Words get <strong>bold</strong> by enclosing them in <code>*</code> asterisks. </td>
     <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
- *Bold*
+*Bold*
 </pre> </font></span></td>
     <td valign="top"><strong>Bold</strong></td>
   </tr>
   <tr>
     <td valign="top"><strong>Italic Text:</strong><br /> Words get <em>italic</em> by enclosing them in <code>_</code> underscores. </td>
     <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
- _Italic_
+_Italic_
 </pre> </font></span></td>
     <td valign="top"><em>Italic</em></td>
   </tr>
   <tr>
     <td valign="top"><strong>Bold Italic:</strong><br /> Words get <em>_bold italic</em> by enclosing them in <code>_</code> double-underscores. </td>
     <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
- __Bold italic__
+__Bold italic__
 </pre> </font></span></td>
     <td valign="top"><strong><em>Bold italic</em></strong></td>
   </tr>
   <tr>
     <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>
     <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
- =Fixed font=
+=Fixed font=
 </pre> </font></span></td>
     <td valign="top"><code>Fixed font</code></td>
   </tr>
   <tr>
     <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>
     <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
- ==Bold fixed==
+==Bold fixed==
 </pre> </font></span></td>
     <td valign="top"><code><b>Bold fixed</b></code></td>
   </tr>
   <tr>
     <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>
     <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
- _This works_,
- _this not _
+_This works_,
+_this not _
 </pre> </font></span></td>
     <td valign="top"><em>This works</em>, _this not _ </td>
   </tr>
@@ -95,7 +124,7 @@ class CatAnimal {
 </pre></td>
   </tr>
   <tr>
-    <td valign="top"><strong>Separator:</strong><br /> At least four dashes at the beginning of a line. </td>
+    <td valign="top"><strong>Separator:</strong><br /> At least three dashes at the beginning of a line. </td>
     <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
 -------
 </pre> </font></span></td>
@@ -143,7 +172,7 @@ class CatAnimal {
     </td>
   </tr>
   <tr>
-    <td valign="top"><strong>Definition List:</strong><br /> Three spaces, the term, a colon, 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>&amp;nbsp;</code> non-breaking-space entity. </td>
+    <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>&amp;nbsp;</code> non-breaking-space entity. </td>
     <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
        Sushi: Japan
        Dim&amp;nbsp;Sum: S.F.
@@ -158,26 +187,37 @@ class CatAnimal {
     </td>
   </tr>
   <tr>
-    <td valign="top"><strong>Table:</strong><br /> Optional spaces followed by the cells enclosed in vertical bars. <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. </td>
+    <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 />
+    </td>
     <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
-| A1 | B1 | C1 |
-| A2 | B2 | C2 |
-| A3 \  | next \  | next |
+| *L* | *C* | *R* |
+| A2 |  2  |  2 |
+| A3 |  3  |  3 |
+| multi span |||
+| A4 \  | next \  | next |
 </pre> </font></span></td>
     <td valign="top">
       <table border="1" cellpadding="0" cellspacing="0">
         <tr>
-          <td> A1 </td>
-          <td> B1 </td>
-          <td> C1 </td>
+          <th bgcolor="#99CCCC"><strong> L </strong></th>
+          <th bgcolor="#99CCCC"><strong> C </strong></th>
+          <th bgcolor="#99CCCC"><strong> R </strong></th>
         </tr>
         <tr>
           <td> A2 </td>
-          <td> B2 </td>
-          <td> C2 </td>
+          <td align="center"> 2 </td>
+          <td align="right"> 2 </td>
         </tr>
         <tr>
           <td> A3 </td>
+          <td align="center"> 3 </td>
+          <td align="right"> 3 </td>
+        </tr>
+        <tr>
+          <td colspan="3"> multi span </td>
+        </tr>
+        <tr>
+          <td> A4 </td>
           <td> next </td>
           <td> next </td>
         </tr>
@@ -187,41 +227,99 @@ class CatAnimal {
   <tr>
     <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>
     <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
- WebNotify,
- Know.ReadmeFirst
+WebNotify
+
+Know.ReadmeFirst
 </pre> </font></span></td>
-    <td valign="top">[[Main/WebNotify]], [[Know/ReadmeFirst]]</td>
+    <td valign="top">[[Main/WebNotify]]<p>[[Know/ReadmeFirst]]</p>
+    </td>
   </tr>
   <tr>
-    <td valign="top"><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. </td>
+    <td valign="top"><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>
     <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
- [[wiki syntax]],
- [[Main.TWiki users]]
+[[wiki syntax]]
+
+[[Main.TWiki users]]
 </pre> </font></span></td>
-    <td valign="top">[[Main/WikiSyntax]], [[Main/TWikiUsers]]</td>
+    <td valign="top">[[Main/WikiSyntax]]<p>[[Main/TWikiUsers]]</p>
+    </td>
+  </tr>
+  <tr>
+    <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>
+    <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
+[[WikiSyntax][syntax]]
+
+[[http://gnu.org][GNU]]
+</pre> </font></span></td>
+    <td valign="top">[[Main/WikiSyntax]]<p><a href="http://gnu.org" target="_top">GNU</a></p>
+    </td>
+  </tr>
+  <tr>
+    <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>
+    <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
+[[WebHome#NotThere]]
+
+[[#MyAnchor][Jump]]
+
+#MyAnchor To here
+</pre> </font></span></td>
+    <td valign="top">[[Main/WebHome#NotThere]]<p>[[Main/WebHome#MyAnchor]]</p>
+      <p><a name="MyAnchor"></a> To here </p>
+    </td>
   </tr>
   <tr>
     <td valign="top"><strong>Prevent a Link:</strong><br /> Prevent a [[Main/WikiWord]] from being linked by prepending it with the <code>&lt;nop&gt;</code> tag. </td>
     <td valign="top"><span style="background: #FFFFCC"><font color="#990000"> <pre>
- &lt;nop&gt;SunOS
+&lt;nop&gt;SunOS
 </pre> </font></span></td>
     <td valign="top"> SunOS </td>
   </tr>
 </table>
 
-**HTML**
+## <a name="Using HTML"></a> Using HTML
 
 Most HTML tags will work, but it's almost always preferable not to use HTML, so that the markup remains easy for everyone to edit.
 
-- Overview of all HTML elements at <http://www.htmlhelp.com/reference/wilbur/overview.html>
-- HTML 3.2 Reference Specification at <http://www.w3.org/TR/REC-html32.html>
+- HTML 4.01 Reference Specification: <http://www.w3.org/TR/html4/>
+- Quick reference of all HTML elements: <http://werbach.com/barebones/barebones.html>
 
-**WIKI VARIABLES**
+## <a name="TWiki Variables"></a> TWiki Variables
 
 Variables are names that are enclosed in percent signs; they get expanded on the fly.
 
+- `%TOC%` : The table of content, is based on headings in a topic.
 - `%WEB%` : The current web, is **%WEB%** .
 - `%TOPIC%` : The current topic name, is **%TOPIC%** .
 - `%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.
 - `%INCLUDE{"SomeTopic"}%` : Server side include, includes another topic. The current %WIKITOOLNAME% web is the default web. Example: <code>**%INCLUDE\{"TWiki.TWikiWebsTable"\}%**</code>
 - There are many more variables, see [[TWikiVariables]].
+
+## <a name="&quot;Gotchas&quot; when Editing Text"></a> "Gotchas" when Editing Text
+
+The formatting rules are fairly simple to use and fast to type. However, there are some things to watch out for:
+
+- **Q:** Text enclosed in angle brackets like `<filename>` is not displayed. How can I show it as it is?
+  - **A:** The `'<'` and `'>'` characters have a special meaning in HTML, they define HTML tags. You need to escape them, so write `'&lt;'` instead of `'<'`, and `'&gt;'` instead of `'>'`. <br /> Example: Type `'prog &lt;filename&gt;'` to get `'prog <filename>'`.
+
+- **Q:** Why is the `'&'` character sometimes not displayed?
+  - **A:** The `'&'` character has a special meaning in HTML, it starts a so called character entity, i.e. `'&copy;'` is the `©` copyright character. You need to escape `'&'` to see it as it is, so write `'&amp;'` instead of `'&'`. <br /> Example: Type `'This &amp; that'` to get `'This & that'`.
+
+- See more [[TextFormattingFAQs]]
+
+## <a name="TWiki Plugins"></a> TWiki Plugins
+
+Plugins provide additional text formatting rules and can extend the functionality of %WIKITOOLNAME% into many other areas. Available Plugins are located in the [[Plugins|Main/TWiki:Plugins]] web. Currently enabled plugins on this site are:
+
+- [[SpreadSheetPlugin]] <span>(any TWiki, 10197)</span>:
+- [[CommentPlugin]] <span>(Dakar, 11359)</span>: Allows users to quickly post comments to a page without an edit/preview/save cycle
+- [[EditTablePlugin]] <span>(any TWiki, 11646)</span>:
+- [[InterwikiPlugin]] <span>(Dakar, $Rev: 11935$)</span>:
+- [[PreferencesPlugin]] <span>(Dakar, 9839)</span>:
+- [[SlideShowPlugin]] <span>(Any TWiki, $Rev: 12847$)</span>:
+- [[SmiliesPlugin]] <span>(Dakar, 8154)</span>:
+- [[TablePlugin]] <span>(1.020, 12339)</span>:
+- [[TwistyPlugin]] <span>(1.2.0, $Rev: 12154$)</span>:
+
+Check on current Plugin status and settings for this site in [[TWikiPreferences]].
+
+-- [[MikeMannix]] - 30 Aug 2001