165257be5f4b1c98f83928e9ce319a04aaed4cd0
[openafs-wiki.git] / TWiki / TextFormattingRules.mdwn
1 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.
2
3 **LINKS**
4
5 The Collaborative Work Area is a bunch of related links that are editable through your web browser.
6
7 The %WIKITOOLNAME% web has the following types of **_internal links:_**
8
9 - [[GoodStyle]] is a [[WikiWord]] that links to the GoodStyle topic located in the current %WIKITOOLNAME% web.
10 - [[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!)
11
12 **_External links:_**
13
14 - `http://...`, `https://...`, `ftp://...` and `mailto:...@...` are linked automatically.
15 - Email addresses like `name@domain.com` are linked automatically.
16
17 **EDITING**
18
19 - CapitalizedWordsStuckTogether (or [[WikiWords]]) will produce a link automatically. In case you want to link to a topic in a different %WIKITOOLNAME% web write `Web.TopicName`, i.e. write `Know.ReadmeFirst` to link to [[ReadmeFirst]] located in the Know web.
20 - You can create a forced internal link by enclosing words in double square brackets, i.e. write `[[text formatting FAQ]]` to get [[text formatting FAQ|Main/TextFormattingFAQ]] that links to topic [[TextFormattingFAQ]]. Text within the brackets may contain optional spaces; the topic name is formed by capitalizing the initial letter and by removing the spaces. You can also refer to a different web, i.e. `[[Main.TWiki users]]` points to [[TWikiUsers]] in the Main web.
21 - Blank lines will create new paragraphs.
22 - Words get **bold** by enclosing them in **\*** asterisks
23 - Words get _italic_ by enclosing them in **\_** underscores
24 - Words get **_bold italic_** by enclosing them in **\_\_** double-underscores
25 - Words get shown in `fixed font` by enclosing them in = equal signs
26 - Note for **bold** , _italic_ , **_bold italic_** and `fixed font` text:
27   - Make sure to "stick" the `* _ =` signs to the characters, e.g.
28     - _This works_
29     - \_This does not get italic because there is a space between the last word and the underline character \_
30   - Example text to enter:
31     - Writing \*bold text\* , \_italic text\_ and =fixed== monospaced text
32   - Example text gets rendered as:
33     - Writing **bold text** , _italic text_ and `fixed=` monospaced text
34 - Separator: at least four dashes at the beginning of a line: <-------->
35 - List Item: 3 spaces and an asterisk: <   \*>
36 - Nested Item: 6 spaces and an asterisk: <      \*>
37 - Ordered List: 3 spaces and a number: <   1>
38 - Definition: 3 spaces, the term, a colon, followed by the definition: &lt;   term: definition&gt; <br /> Note that 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 non-breaking-space entity, i.e. write `Character&nbsp;Set:` to get `Character Set:`.
39 - Table: Optional spaces followed by the cells enclosed in vertical bars: &lt;   | cell 1 | cell 2 | cell 3 | ... |&gt;
40
41 **HTML**
42
43 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.
44
45 - Overview of all HTML elements at <http://www.htmlhelp.com/reference/wilbur/overview.html>
46 - HTML 3.2 Reference Specification at <http://www.w3.org/TR/REC-html32.html>
47
48 **WIKI VARIABLES**
49
50 Variables are names that are enclosed in percent signs; they get expanded on the fly.
51
52 - `%WEB%` : The current web, is **%WEB%** .
53 - `%TOPIC%` : The current topic name, is **%TOPIC%** .
54 - `%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.
55 - `%INCLUDE{"SomeTopic"}%` : Server side include, includes another topic. The current %WIKITOOLNAME% web is the default web. Example: <code>**%INCLUDE\{"TWiki.TWikiWebsTable"\}%**</code>
56 - There are many more variables, see [[TWikiVariables]].