X-Git-Url: https://git.openafs.org/?p=openafs-wiki.git;a=blobdiff_plain;f=TWiki%2FTextFormattingRules.mdwn;h=cb25b66d180e07ac8538cdc8ca4cbd2c8ea004f5;hp=8a90054280efaf4af3ce8d5e19c5a9d0c5c6eee6;hb=b61faabd28741af5d80d08293dff5b14c798fb9b;hpb=ef135cd524a41523dc98e4fda17631f1a792a7f9 diff --git a/TWiki/TextFormattingRules.mdwn b/TWiki/TextFormattingRules.mdwn index 8a90054..cb25b66 100644 --- a/TWiki/TextFormattingRules.mdwn +++ b/TWiki/TextFormattingRules.mdwn @@ -22,20 +22,20 @@ # TWiki Text Formatting -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. +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. ## TWiki Editing Shorthand - +
- + - + - + - + - + - + - + - + - + - + @@ -130,7 +130,7 @@ class CatAnimal { - + @@ -141,7 +141,7 @@ class CatAnimal { - + @@ -156,7 +156,7 @@ class CatAnimal { - + - + - +
Formatting Command: Example: You write: You get:
Paragraphs:
Blank lines will create new paragraphs.
Paragraphs: %BR% Blank lines will create new paragraphs.
 1st paragraph
 
@@ -45,7 +45,7 @@ Working in TWiki is as easy as typing in text - exactly like email. You don't ne
     
Headings:
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. Note: A Table of Content can be created automatically with the %TOC% variable, see [[Main/TWikiVariables]]. Any heading text after !! is excluded from the TOC; for example, write ---+!! text if you do not want to list a header in the TOC.
Headings: %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. Note: A Table of Content can be created automatically with the %TOC% variable, see [[Main/TWikiVariables]]. Any heading text after !! is excluded from the TOC; for example, write ---+!! text if you do not want to list a header in the TOC.
 ---++ Sushi
 
@@ -59,42 +59,42 @@ Working in TWiki is as easy as typing in text - exactly like email. You don't ne
     
Bold Text:
Words get bold by enclosing them in * asterisks.
Bold Text: %BR% Words get bold by enclosing them in * asterisks.
 *Bold*
 
Bold
Italic Text:
Words get italic by enclosing them in _ underscores.
Italic Text: %BR% Words get italic by enclosing them in _ underscores.
 _Italic_
 
Italic
Bold Italic:
Words get _bold italic by enclosing them in _ double-underscores.
Bold Italic: %BR% Words get _bold italic by enclosing them in _ double-underscores.
 __Bold italic__
 
Bold italic
Fixed Font:
Words get shown in fixed font by enclosing them in = equal signs.
Fixed Font: %BR% Words get shown in fixed font by enclosing them in = equal signs.
 =Fixed font=
 
Fixed font
Bold Fixed Font:
Words get shown in bold fixed font by enclosing them in double equal signs.
Bold Fixed Font: %BR% Words get shown in bold fixed font by enclosing them in double equal signs.
 ==Bold fixed==
 
Bold fixed
Note: Make sure to "stick" the * _ = == signs to the words, e.g. take away spaces. Note: Make sure to "stick" the * _ = == signs to the words, that is, take away spaces.
 _This works_,
 _this not _
@@ -102,7 +102,7 @@ _this not _
     
This works, _this not _
Verbatim Mode:
Surround code excerpts and other formatted text with <verbatim> and </verbatim> tags.
Note: Use <pre> and </pre> tags instead if you want that HTML code is interpreted.
Note: Each tag must be on a line by itself.
Verbatim Mode: %BR% Surround code excerpts and other formatted text with <verbatim> and </verbatim> tags. %BR% Note: Use <pre> and </pre> tags instead if you want that HTML code is interpreted. %BR% Note: Each tag must be on a line by itself.
 <verbatim>
 class CatAnimal {
@@ -121,7 +121,7 @@ class CatAnimal {
 
Separator:
At least three dashes at the beginning of a line.
Separator: %BR% At least three dashes at the beginning of a line.
 -------
 
List Item:
Three spaces and an asterisk.
List Item: %BR% Three spaces and an asterisk.
 	* bullet item
 
Nested List Item:
Six, nine, ... spaces and an asterisk.
Nested List Item: %BR% Six, nine, ... spaces and an asterisk.
 		* nested stuff
 
Ordered List:
Three spaces and a number.
Ordered List: %BR% Three spaces and a number.
 	1 Sushi
 	1 Dim Sum
@@ -169,7 +169,7 @@ class CatAnimal {
     
Definition List:
Three spaces, the term, a colon, a space, followed by the definition.
Note: 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 &nbsp; non-breaking-space entity.
Definition List: %BR% Three spaces, the term, a colon, a space, followed by the definition. %BR% Note: 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 &nbsp; non-breaking-space entity.
 	Sushi: Japan
 	Dim&nbsp;Sum: S.F.
@@ -184,14 +184,13 @@ class CatAnimal {
     
Table:
Optional spaces followed by the cells enclosed in vertical bars.
Note: | *bold* | cells are rendered as table headers.
Note: |   spaced   | cells are rendered center aligned.
Note: |     spaced | cells are rendered right aligned.
Note: | 2 colspan || cells are rendered as multi-span columns.
Note: 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 '\' backslash character.
-
Table: %BR% Optional spaces followed by the cells enclosed in vertical bars. %BR% Note: | *bold* | cells are rendered as table headers. %BR% Note: |   spaced   | cells are rendered center aligned. %BR% Note: |     spaced | cells are rendered right aligned. %BR% Note: | 2 colspan || cells are rendered as multi-span columns. %BR% Note: 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 '\' backslash character. %BR%
 | *L* | *C* | *R* |
 | A2 |  2  |  2 |
 | A3 |  3  |  3 |
 | multi span |||
-| A4 \  | next \  | next |
+| A4 | next | next |
 
@@ -222,7 +221,7 @@ class CatAnimal { - + - + - + - - - - - - + - + + + + + +
WikiWord Links:
CapitalizedWordsStuckTogether (or [[Main/WikiWords]]) will produce a link automatically.
Note: In case you want to link to a topic in a different %WIKITOOLNAME% web write Webname.TopicName.
WikiWord Links: %BR% CapitalizedWordsStuckTogether (or [[Main/WikiWords]]) will produce a link automatically. %BR% Note: In case you want to link to a topic in a different %WIKITOOLNAME% web write Webname.TopicName.
 WebNotify
 
@@ -232,7 +231,7 @@ Know.ReadmeFirst
     
Forced Links:
You can create a forced internal link by enclosing words in double square brackets.
Note: 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. [[text formatting FAQ]] links to topic [[Main/TextFormattingFAQ]]. You can also refer to a different web and use anchors.
Forced Links: %BR% You can create a forced internal link by enclosing words in double square brackets. %BR% Note: 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, [[text formatting FAQ]] links to topic [[Main/TextFormattingFAQ]]. You can also refer to a different web and use anchors.
 [[wiki syntax]]
 
@@ -242,24 +241,20 @@ Know.ReadmeFirst
     
Specific Links:
Create a link where you can specify the link text and the link reference separately, using nested square brackets like [[reference][text]]. Internal link references (i.e. [[Main/WikiSyntax]]) and external link references (i.e. http://TWiki.org/) are supported. The same Forced Links rules apply for internal link references. Anchor names can be added as well, like [[WebHome#MyAnchor][go home]] and [[http://www.yahoo.com/#somewhere][Yahoo!]].
Specific Links: %BR% Create a link where you can specify the link text and the link reference separately, using nested square brackets like [[reference][text]]. Internal link references (e.g. [[Main/WikiSyntax]]) and external link references (e.g. http://TWiki.org/) are supported. %BR% Note: The same Forced Links rules apply for internal link references. %BR% Note: For external link references, you can simply use a space instead of ][ to separate the link URL from the descriptive text. %BR% Note: Anchor names can be added as well, like [[WebHome#MyAnchor][go home]] and [[http://gnu.org/#Action][GNU Action]].
 [[WikiSyntax][syntax]]
 
 [[http://gnu.org][GNU]]
+
+[[http://xml.org XML]]
 
[[Main/WikiSyntax]]

GNU

+

XML

Easier External Links:
An easier syntax for external links is now available: [[externalURL text]] - just hit the spacebar to separate the link URL from the descriptive text, e.g. [[http://gnu.org/ GNU]]. This also supports anchors, e.g. [[http://www.yahoo.com/#somewhere Yahoo!]].
-[[http://gnu.org GNU]]
-
GNU
Anchors:
You can define a link reference inside a %WIKITOOLNAME% topic (called an anchor name) and link to that. To define an anchor write #AnchorName at the beginning of a line. The anchor name must be a [[Main/WikiWord]]. To link to an anchor name use the [[MyTopic#MyAnchor]] syntax. You can omit the topic name if you want to link within the same topic.
Anchors: %BR% You can define a link reference inside a %WIKITOOLNAME% topic (called an anchor name) and link to that. To define an anchor write #AnchorName at the beginning of a line. The anchor name must be a [[Main/WikiWord]]. To link to an anchor name use the [[MyTopic#MyAnchor]] syntax. You can omit the topic name if you want to link within the same topic.
 [[WebHome#NotThere]]
 
@@ -279,7 +274,7 @@ Know.ReadmeFirst
     
SunOS
Disable Links: %BR% You can disable automatic linking of [[Main/WikiWords]] by surrounding text with <noautolink> and </noautolink> tags. %BR% Note: Each tag must be on a line by itself.%BR% Note: This also works for TWiki tables, but only if you add a blank line between the end of the table and the closing </noautolink> tag (known issue of the [[Main/TablePlugin]]). Disable Links: %BR% You can disable automatic linking of [[Main/WikiWords]] by surrounding text with <noautolink> and </noautolink> tags. %BR% Note: Each tag must be on a line by itself. %BR% Note: This also works for TWiki tables, but only if you add a blank line between the end of the table and the closing </noautolink> tag (known issue of the [[Main/TablePlugin]]).
  <noautolink>
  RedHat &
@@ -288,6 +283,16 @@ Know.ReadmeFirst
 
RedHat & SuSE
Mailto: Links: %BR% To create 'mailto:' links that have more descriptive link text, specify subject lines or message bodies, or omit the email address, you can write [[mailto:user@domain descriptive text]].
+[[mailto:a@z.com Mail]]
+
+[[mailto:?subject=Hi Hi]]
+
Mail

Hi

+
## Using HTML @@ -324,7 +329,7 @@ Being able to create links without any formatting required is a core TWiki featu - Email addresses like `name@domain.com` are linked automatically. - `[[Square bracket rules]]` let you easily create [[non-WikiWord links|Main/WebHome#SquareBrackets]]. - - You can also write `[[http://yahoo.com Yahoo home page]]` as an easier way of doing external links with descriptive text for the link, such as [Yahoo home page](http://yahoo.com). + - You can also write `[[http://yahoo.com Yahoo home page]]` as an easier way of doing external links with descriptive text for the link, such as [Yahoo home page](http://yahoo.com/). ## TWiki Variables @@ -340,9 +345,14 @@ Variables are names that are enclosed in percent signs `%` that are expanded on - `%INCLUDE{"SomeTopic"}%` : Server side include, includes another topic. The current %WIKITOOLNAME% web is the default web. Example: **%INCLUDE\{"TWiki.SiteMap"\}%** -- There are many more variables, see **[[TWikiVariables]]**. +- `%SEARCH{"sushi"}%` : Inline search showing the search result embedded in a topic. [[FormattedSearch]] gives you control over formatting, used to create web-based applications. + +- [[TWikiPreferences]] defines site-wide variables. Among others: + - **Line break:** Write %BR% to start a new line. + - **Colored text:** Write: %RED% Red %ENDCOLOR% and %BLUE% blue %ENDCOLOR% colors to get: %RED% Red %ENDCOLOR% and %BLUE% blue %ENDCOLOR% colors. + - **Documentation Graphics:** Write: %H% Help, %T% Tip, %X% Alert to get: %H% Help, %T% Tip, %X% Alert. For more info see [[TWikiDocGraphics]]. -- [[TWikiPreferences]] defines site-wide variables like colors. For example, write: %RED% Red %ENDCOLOR% and %BLUE% blue %ENDCOLOR% colors to get: %RED% Red %ENDCOLOR% and %BLUE% blue %ENDCOLOR% colors. +- There are many more variables, see **[[TWikiVariables]]**. ## TWikiPlugin Formatting Extensions @@ -372,4 +382,4 @@ TWiki formatting rules are fairly simple to use and quick to type. However, ther - **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. `'©'` is the `©` copyright character. You need to escape `'&'` to see it as it is, so write `'&'` instead of `'&'`.
Example: Type `'This & that'` to get `'This & that'`. --- [[MikeMannix]] - 02 Dec 2001
-- [[PeterThoeny]] - 02 May 2002 +-- [[MikeMannix]] - 02 Dec 2001
-- [[PeterThoeny]] - 01 Feb 2003