434 lines
9.8 KiB
Plaintext
434 lines
9.8 KiB
Plaintext
%META:TOPICINFO{author="TWikiContributor" date="1153796460" format="1.1" version="2"}%
|
|
---++ TWiki Editing Shorthand
|
|
|
|
%STARTINCLUDE%
|
|
|
|
%TABLE{}%
|
|
<table class="twikiTable" border="1" cellpadding="3" bgcolor="#ffffff">
|
|
<tr bgcolor="#ffffff">
|
|
<th width="50%">
|
|
Formatting Command:
|
|
</th>
|
|
<th width="25%">
|
|
You write:
|
|
</th>
|
|
<th width="25%">
|
|
You get:
|
|
</th>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Paragraphs:* %BR%
|
|
Blank lines will create new paragraphs.
|
|
</td><td>
|
|
<verbatim>
|
|
1st paragraph
|
|
|
|
2nd paragraph
|
|
</verbatim>
|
|
</td><td>
|
|
1st paragraph
|
|
|
|
2nd paragraph
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Headings:* %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.
|
|
|
|
You can create a table of contents with the [[VarTOC][%<nop>TOC%]] variable. If you want to *exclude* a heading from the TOC, put =!!= after the =---+=.
|
|
|
|
%X% Empty headings are allowed, but won't appear in the table of contents.
|
|
</td><td>
|
|
<verbatim>
|
|
---++ Sushi
|
|
---+++ Maguro
|
|
---+++!! Not in TOC
|
|
</verbatim>
|
|
</td><td>
|
|
<nop><h2>Sushi</h2>
|
|
<nop><h3>Maguro</h3>
|
|
<nop><h3>Not in TOC</h3>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Bold Text:* %BR%
|
|
Words get shown in *bold* by enclosing them in =*= asterisks.
|
|
</td><td>
|
|
<verbatim>
|
|
*Bold*
|
|
</verbatim>
|
|
</td><td>
|
|
*Bold*
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Italic Text:* %BR%
|
|
Words get shown in _italic_ by enclosing them in =_= underscores.
|
|
</td><td>
|
|
<verbatim>
|
|
_Italic_
|
|
</verbatim>
|
|
</td><td>
|
|
_Italic_
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Bold Italic:* %BR%
|
|
Words get shown in __bold italic__ by enclosing them in =__= double-underscores.
|
|
</td><td>
|
|
<verbatim>
|
|
__Bold italic__
|
|
</verbatim>
|
|
</td><td>
|
|
__Bold italic__
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Fixed Font:* %BR%
|
|
Words get shown in =fixed font= by enclosing them in =<nop>=<nop>= equal signs.
|
|
</td><td>
|
|
<verbatim>
|
|
=Fixed font=
|
|
</verbatim>
|
|
</td><td>
|
|
=Fixed font=
|
|
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Bold Fixed Font:* %BR%
|
|
Words get shown in ==bold fixed font== by enclosing them in ==<nop>== double equal signs.
|
|
</td><td>
|
|
<verbatim>
|
|
==Bold fixed==
|
|
</verbatim>
|
|
</td><td>
|
|
==Bold fixed==
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
%T% You can follow the closing bold, italic, or other (=* _ __ = ===) indicator
|
|
with normal punctuation, such as commas and full stops.
|
|
|
|
%X% Make sure there is no space between the text and the indicators.
|
|
</td><td>
|
|
<verbatim>
|
|
_This works_,
|
|
_this does not _
|
|
</verbatim>
|
|
</td><td>
|
|
_This works_,%BR%
|
|
_this does not _
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Verbatim (Literal) Text:* %BR%
|
|
Surround code excerpts and other formatted text with =<verbatim>= and =</verbatim>= tags.%BR%
|
|
%T% =verbatim= tags disable HTML code. Use =<pre>= and =</pre>= tags instead if you want the HTML code within the tags to be interpreted.%BR%
|
|
__%X% NOTE:__ Preferences variables (* Set NAME = value) are set within verbatim tags.
|
|
</td><td>
|
|
<verbatim>
|
|
<verbatim>
|
|
class CatAnimal {
|
|
void purr() {
|
|
<code here>
|
|
}
|
|
}
|
|
</verbatim>
|
|
</verbatim>
|
|
</td><td>
|
|
<verbatim>
|
|
class CatAnimal {
|
|
void purr() {
|
|
<code here>
|
|
}
|
|
}
|
|
</verbatim>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Separator (Horizontal Rule):* %BR%
|
|
Three or more three dashes at the beginning of a line..
|
|
</td><td>
|
|
<verbatim>
|
|
-------
|
|
</verbatim>
|
|
</td><td>
|
|
-------
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Bulleted List:* %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 *at least 3 spaces*.
|
|
</td><td>
|
|
<verbatim>
|
|
* level 1
|
|
* level 2
|
|
* back on 1
|
|
* A bullet
|
|
broken over
|
|
three lines
|
|
* last bullet
|
|
</verbatim>
|
|
</td><td>
|
|
* level 1
|
|
* level 2
|
|
* back on 1
|
|
* A bullet
|
|
broken over
|
|
three lines
|
|
* last bullet
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Numbered List:* %BR%
|
|
Multiple of three spaces, a type character, a dot, and another space. Several types are available besides a number:
|
|
| *Type* | *Generated Style* | *Sample Sequence* |
|
|
| 1. | Arabic numerals | 1, 2, 3, 4... |
|
|
| A. | Uppercase letters | A, B, C, D... |
|
|
| a. | Lowercase letters | a, b, c, d... |
|
|
| I. | Uppercase Roman Numerals | I, II, III, IV... |
|
|
| i. | Lowercase Roman Numerals | i, ii, iii, iv... |
|
|
</td><td>
|
|
<verbatim>
|
|
1. Sushi
|
|
1. Dim Sum
|
|
1. Fondue
|
|
|
|
A. Sushi
|
|
A. Dim Sum
|
|
A. Fondue
|
|
|
|
i. Sushi
|
|
i. Dim Sum
|
|
i. Fondue
|
|
</verbatim>
|
|
</td><td>
|
|
1. Sushi
|
|
1. Dim Sum
|
|
1. Fondue
|
|
|
|
A. Sushi
|
|
A. Dim Sum
|
|
A. Fondue
|
|
|
|
i. Sushi
|
|
i. Dim Sum
|
|
i. Fondue
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Definition List:* %BR%
|
|
Three spaces, a dollar sign, the term, a colon, a space, followed by the definition.
|
|
</td><td>
|
|
<verbatim>
|
|
$ Sushi: Japan
|
|
$ Dim Sum: S.F.
|
|
</verbatim>
|
|
</td><td>
|
|
$ Sushi: Japan
|
|
$ Dim Sum: S.F.
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Table:* %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.
|
|
* =| <nop>*bold*<nop> |= header cell with text in asterisks
|
|
* =| center-aligned |= cell with at least two, and equal number of spaces on either side
|
|
* =| right-aligned |= cell with more spaces on the left
|
|
* =| 2 colspan ||= and multi-span columns with multiple <tt>|</tt>'s right next to each other
|
|
* =|^|= cell with caret indicating follow-up row of multi-span rows
|
|
* You can split rows over multiple lines by putting a backslash ='\'= at the end of each line
|
|
* Contents of table cells wrap automatically as determined by the browser
|
|
* Use =&#124;= or =%<nop>VBAR%= to add =|= characters in tables.
|
|
%T% The %TWIKIWEB%.TablePlugin provides the =|^|= multiple-span row functionality and additional rendering features
|
|
</td><td>
|
|
<verbatim>
|
|
| *L* | *C* | *R* |
|
|
| A2 | B2 | C2 |
|
|
| A3 | B3 | C3 |
|
|
| multi span |||
|
|
| A5-7 | 5 | 5 |
|
|
|^| six | six |
|
|
|^| seven | seven |
|
|
| split\
|
|
| over\
|
|
| 3 lines |
|
|
| A9 | B9 | C9 |
|
|
</verbatim>
|
|
</td><td>
|
|
| *L* | *C* | *R* |
|
|
| A2 | B2 | C2 |
|
|
| A3 | B3 | C3 |
|
|
| multi span |||
|
|
| A5-7 | 5 | 5 |
|
|
|^| six | six |
|
|
|^| seven | seven |
|
|
| split\
|
|
| over\
|
|
| 3 lines |
|
|
| A9 | B9 | C9 |
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*<nop>WikiWord Links:* %BR%
|
|
<nop>CapitalizedWordsStuckTogether (or 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 =Otherweb.TopicName=. %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 <nop>%HOMETOPIC% topic.
|
|
|
|
It's generally a good idea to use the TWikiVariables %<nop>TWIKIWEB% and %<nop>MAINWEB% instead of TWiki and Main.
|
|
</td><td>
|
|
<verbatim>
|
|
WebStatistics
|
|
|
|
Sandbox.WebNotify
|
|
|
|
Sandbox.WebHome
|
|
</verbatim>
|
|
</td><td>
|
|
WebStatistics
|
|
|
|
Sandbox.WebNotify
|
|
|
|
Sandbox.%HOMETOPIC%
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Anchors:* %BR%
|
|
You can define a reference inside a TWiki 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 WikiWord. To __link to__ an anchor name use the =[<nop>[MyTopic#MyAnchor]]= syntax. You can omit the topic name if you want to link within the same topic.
|
|
</td><td>
|
|
<verbatim>
|
|
[[WikiWord#NotThere]]
|
|
|
|
[[#MyAnchor][Jump]]
|
|
|
|
#MyAnchor To here
|
|
</verbatim>
|
|
</td><td>
|
|
[[WikiWord#NotThere]]
|
|
|
|
[[#MyAnchor][Jump]]
|
|
|
|
#MyAnchor To here
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
#HeRe
|
|
*Forced Links:* %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, =[<nop>[text formatting FAQ]]= links to topic 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><td>
|
|
<verbatim>
|
|
[[wiki syntax]]
|
|
|
|
[[Main.TWiki users]]
|
|
|
|
escaped:
|
|
![[wiki syntax]]
|
|
</verbatim>
|
|
</td><td>
|
|
[[wiki syntax]]
|
|
|
|
[[%MAINWEB%.TWiki users]]
|
|
|
|
escaped:
|
|
![[wiki syntax]]
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Specific Links:* %BR%
|
|
You can create a link where you specify the link text and the URL separately using nested square brackets =[<nop>[reference][text]]=. Internal link references (e.g. WikiSyntax) and URLs (e.g. http://TWiki.org/) are both supported.
|
|
The rules described under __Forced Links__ 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><td>
|
|
<verbatim>
|
|
[[WikiSyntax][wiki syntax]]
|
|
|
|
[[http://gnu.org][GNU]]
|
|
</verbatim>
|
|
</td><td>
|
|
[[WikiSyntax][wiki syntax]]
|
|
|
|
[[http://gnu.org][GNU]]
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Prevent a Link:* %BR%
|
|
Prevent a WikiWord from being linked by prepending it with an exclamation point.
|
|
</td><td>
|
|
<verbatim>
|
|
!SunOS
|
|
</verbatim>
|
|
</td><td>
|
|
!SunOS
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Disable Links:* %BR%
|
|
You can disable automatic linking of WikiWords by surrounding text with =<noautolink>= and =</noautolink>= tags.%BR%
|
|
%H% It is possible to turn off all auto-linking with a NOAUTOLINK preferences setting.
|
|
</td><td>
|
|
<verbatim>
|
|
<noautolink>
|
|
RedHat &
|
|
SuSE
|
|
</noautolink>
|
|
</verbatim>
|
|
</td><td>
|
|
<noautolink>
|
|
RedHat &
|
|
SuSE
|
|
</noautolink>
|
|
</td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<td>
|
|
*Mailto Links:* %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 =[<nop>[mailto:user@domain][descriptive text]]=.
|
|
</td><td>
|
|
<verbatim>
|
|
a@b.com
|
|
|
|
[[mailto:a@b.com]\
|
|
[Mail]]
|
|
|
|
[[mailto:?subject=\
|
|
Hi][Hi]]
|
|
</verbatim>
|
|
</td><td>
|
|
a@b.com
|
|
|
|
[[mailto:a@b.com]\
|
|
[Mail]]
|
|
|
|
[[mailto:?subject=Hi][Hi]]
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
%STOPINCLUDE%
|