data/TWiki/TWikiEditingShorthand.txt
author Colas Nahaboo <colas@nahaboo.net>
Sat, 26 Jan 2008 15:50:53 +0100
changeset 0 414e01d06fd5
permissions -rw-r--r--
RELEASE 4.2.0 freetown
colas@0
     1
%META:TOPICINFO{author="TWikiContributor" date="1176595977" format="1.1" version="3"}%
colas@0
     2
---++ TWiki Editing Shorthand
colas@0
     3
colas@0
     4
%STARTINCLUDE%
colas@0
     5
colas@0
     6
%TABLE{}%
colas@0
     7
<table class="twikiTable" border="1" cellpadding="3" bgcolor="#ffffff">
colas@0
     8
<tr bgcolor="#ffffff">
colas@0
     9
<th width="50%" class="twikiFirstCol">
colas@0
    10
 Formatting Command:
colas@0
    11
</th>
colas@0
    12
<th width="25%">
colas@0
    13
 You write:
colas@0
    14
</th>
colas@0
    15
<th width="25%">
colas@0
    16
 You get:
colas@0
    17
</th>
colas@0
    18
</tr>
colas@0
    19
<tr valign="top">
colas@0
    20
<td>
colas@0
    21
 *Paragraphs:* %BR%
colas@0
    22
 Blank lines will create new paragraphs.
colas@0
    23
</td><td>
colas@0
    24
<verbatim>
colas@0
    25
1st paragraph
colas@0
    26
colas@0
    27
2nd paragraph
colas@0
    28
</verbatim>
colas@0
    29
</td><td>
colas@0
    30
colas@0
    31
1st paragraph
colas@0
    32
colas@0
    33
2nd paragraph
colas@0
    34
</td>
colas@0
    35
</tr>
colas@0
    36
<tr valign="top">
colas@0
    37
<td>
colas@0
    38
 *Headings:* %BR%
colas@0
    39
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.
colas@0
    40
colas@0
    41
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 =---+=.
colas@0
    42
colas@0
    43
%X% Empty headings are allowed, but won't appear in the table of contents.
colas@0
    44
</td><td>
colas@0
    45
<verbatim>
colas@0
    46
---++ Sushi
colas@0
    47
---+++ Maguro
colas@0
    48
---+++!! Not in TOC
colas@0
    49
</verbatim>
colas@0
    50
</td><td>
colas@0
    51
colas@0
    52
<nop><h2>Sushi</h2>
colas@0
    53
<nop><h3>Maguro</h3>
colas@0
    54
<nop><h3>Not in TOC</h3>
colas@0
    55
</td>
colas@0
    56
</tr>
colas@0
    57
<tr valign="top">
colas@0
    58
<td>
colas@0
    59
 *Bold Text:* %BR%
colas@0
    60
 Words get shown in *bold* by enclosing them in =*= asterisks.
colas@0
    61
</td><td>
colas@0
    62
<verbatim>
colas@0
    63
*Bold*
colas@0
    64
</verbatim>
colas@0
    65
</td><td>
colas@0
    66
colas@0
    67
*Bold*
colas@0
    68
</td>
colas@0
    69
</tr>
colas@0
    70
<tr valign="top">
colas@0
    71
<td>
colas@0
    72
 *Italic Text:* %BR%
colas@0
    73
 Words get shown in _italic_ by enclosing them in =_= underscores.
colas@0
    74
</td><td>
colas@0
    75
<verbatim>
colas@0
    76
_Italic_
colas@0
    77
</verbatim>
colas@0
    78
</td><td>
colas@0
    79
colas@0
    80
_Italic_
colas@0
    81
</td>
colas@0
    82
</tr>
colas@0
    83
<tr valign="top">
colas@0
    84
<td>
colas@0
    85
 *Bold Italic:* %BR%
colas@0
    86
 Words get shown in __bold italic__ by enclosing them in =__= double-underscores.
colas@0
    87
</td><td>
colas@0
    88
<verbatim>
colas@0
    89
__Bold italic__
colas@0
    90
</verbatim>
colas@0
    91
</td><td>
colas@0
    92
colas@0
    93
__Bold italic__
colas@0
    94
</td>
colas@0
    95
</tr>
colas@0
    96
<tr valign="top">
colas@0
    97
<td>
colas@0
    98
 *Fixed Font:* %BR%
colas@0
    99
 Words get shown in =fixed font= by enclosing them in =<nop>=<nop>= equal signs.
colas@0
   100
</td><td>
colas@0
   101
<verbatim>
colas@0
   102
=Fixed font=
colas@0
   103
</verbatim>
colas@0
   104
</td><td>
colas@0
   105
colas@0
   106
=Fixed font=
colas@0
   107
colas@0
   108
</td>
colas@0
   109
</tr>
colas@0
   110
<tr valign="top">
colas@0
   111
<td>
colas@0
   112
 *Bold Fixed Font:* %BR%
colas@0
   113
 Words get shown in ==bold fixed font== by enclosing them in ==<nop>== double equal signs.
colas@0
   114
</td><td>
colas@0
   115
<verbatim>
colas@0
   116
==Bold fixed==
colas@0
   117
</verbatim>
colas@0
   118
</td><td>
colas@0
   119
colas@0
   120
==Bold fixed==
colas@0
   121
</td>
colas@0
   122
</tr>
colas@0
   123
<tr valign="top">
colas@0
   124
<td>
colas@0
   125
%T% You can follow the closing bold, italic, or other (=* _ __ = ===) indicator
colas@0
   126
with normal punctuation, such as commas and full stops.
colas@0
   127
colas@0
   128
%X% Make sure there is no space between the text and the indicators.
colas@0
   129
</td><td>
colas@0
   130
<verbatim>
colas@0
   131
_This works_,
colas@0
   132
_this does not _
colas@0
   133
</verbatim>
colas@0
   134
</td><td>
colas@0
   135
colas@0
   136
_This works_,%BR%
colas@0
   137
_this does not _
colas@0
   138
</td>
colas@0
   139
</tr>
colas@0
   140
<tr valign="top">
colas@0
   141
<td>
colas@0
   142
 *Verbatim Text:* %BR%
colas@0
   143
 Surround code excerpts and other formatted text with =&lt;verbatim&gt;= and =&lt;/verbatim&gt;= tags.%BR%
colas@0
   144
%T% =verbatim= tags disable HTML code. Use =&lt;pre&gt;= and =&lt;/pre&gt;= tags instead if you want the HTML code within the tags to be interpreted.%BR%
colas@0
   145
__%X% NOTE:__ Preferences variables (* Set NAME = value) are set within verbatim tags.
colas@0
   146
</td><td>
colas@0
   147
<verbatim>
colas@0
   148
<verbatim>
colas@0
   149
class CatAnimal {
colas@0
   150
  void purr() {
colas@0
   151
    <code here>
colas@0
   152
  }
colas@0
   153
}
colas@0
   154
</verbatim>
colas@0
   155
</verbatim>
colas@0
   156
</td><td>
colas@0
   157
<verbatim>
colas@0
   158
class CatAnimal {
colas@0
   159
  void purr() {
colas@0
   160
    <code here>
colas@0
   161
  }
colas@0
   162
}
colas@0
   163
</verbatim>
colas@0
   164
</td>
colas@0
   165
</tr>
colas@0
   166
<tr valign="top">
colas@0
   167
<td>
colas@0
   168
 *Separator (Horizontal Rule):* %BR%
colas@0
   169
Three or more three dashes at the beginning of a line..
colas@0
   170
</td><td>
colas@0
   171
<verbatim>
colas@0
   172
-------
colas@0
   173
</verbatim>
colas@0
   174
</td><td>
colas@0
   175
colas@0
   176
-------
colas@0
   177
</td>
colas@0
   178
</tr>
colas@0
   179
<tr valign="top">
colas@0
   180
<td>
colas@0
   181
 *Bulleted List:* %BR%
colas@0
   182
Multiple of three spaces, an asterisk, and another space.%BR%
colas@0
   183
%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*.
colas@0
   184
</td><td>
colas@0
   185
<verbatim>
colas@0
   186
   * level 1
colas@0
   187
      * level 2
colas@0
   188
   * back on 1
colas@0
   189
   * A bullet
colas@0
   190
     broken over
colas@0
   191
     three lines
colas@0
   192
   * last bullet
colas@0
   193
</verbatim>
colas@0
   194
</td><td>
colas@0
   195
colas@0
   196
   * level 1
colas@0
   197
      * level 2
colas@0
   198
   * back on 1
colas@0
   199
   * A bullet
colas@0
   200
     broken over
colas@0
   201
     three lines
colas@0
   202
   * last bullet
colas@0
   203
</td>
colas@0
   204
</tr>
colas@0
   205
<tr valign="top">
colas@0
   206
<td>
colas@0
   207
*Numbered List:* %BR%
colas@0
   208
Multiple of three spaces, a type character, a dot, and another space. Several types are available besides a number:
colas@0
   209
| *Type* | *Generated Style* | *Sample Sequence* |
colas@0
   210
| 1. | Arabic numerals | 1, 2, 3, 4... |
colas@0
   211
| A. | Uppercase letters | A, B, C, D... |
colas@0
   212
| a. | Lowercase letters | a, b, c, d... |
colas@0
   213
| I. | Uppercase Roman Numerals | I, II, III, IV... |
colas@0
   214
| i. | Lowercase Roman Numerals | i, ii, iii, iv... |
colas@0
   215
</td><td>
colas@0
   216
<verbatim>
colas@0
   217
   1. Sushi
colas@0
   218
   1. Dim Sum
colas@0
   219
   1. Fondue
colas@0
   220
colas@0
   221
   A. Sushi
colas@0
   222
   A. Dim Sum
colas@0
   223
   A. Fondue
colas@0
   224
colas@0
   225
   i. Sushi
colas@0
   226
   i. Dim Sum
colas@0
   227
   i. Fondue
colas@0
   228
</verbatim>
colas@0
   229
</td><td>
colas@0
   230
colas@0
   231
   1. Sushi
colas@0
   232
   1. Dim Sum
colas@0
   233
   1. Fondue
colas@0
   234
colas@0
   235
   A. Sushi
colas@0
   236
   A. Dim Sum
colas@0
   237
   A. Fondue
colas@0
   238
colas@0
   239
   i. Sushi
colas@0
   240
   i. Dim Sum
colas@0
   241
   i. Fondue
colas@0
   242
</td>
colas@0
   243
</tr>
colas@0
   244
<tr valign="top">
colas@0
   245
<td>
colas@0
   246
 *Definition List:* %BR%
colas@0
   247
 Three spaces, a dollar sign, the term, a colon, a space, followed by the definition.
colas@0
   248
colas@0
   249
 Deprecated syntax: Three spaces, the term with no spaces, a colon, a space, followed by the definition.
colas@0
   250
</td><td>
colas@0
   251
<verbatim>
colas@0
   252
   $ Sushi: Japan
colas@0
   253
   $ Dim Sum: S.F.
colas@0
   254
</verbatim>
colas@0
   255
</td><td>
colas@0
   256
colas@0
   257
   $ Sushi: Japan
colas@0
   258
   $ Dim Sum: S.F.
colas@0
   259
</td>
colas@0
   260
</tr>
colas@0
   261
<tr valign="top">
colas@0
   262
<td>
colas@0
   263
 *Table:* %BR%
colas@0
   264
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.
colas@0
   265
   * =| <nop>*bold*<nop> |= header cell with text in asterisks
colas@0
   266
   * =|   center-aligned   |= cell with at least two, and equal number of spaces on either side
colas@0
   267
   * =|      right-aligned |= cell with more spaces on the left
colas@0
   268
   * =| 2 colspan ||= and multi-span columns with multiple <tt>|</tt>'s right next to each other
colas@0
   269
   * =|^|= cell with caret indicating follow-up row of multi-span rows
colas@0
   270
   * You can split rows over multiple lines by putting a backslash ='\'= at the end of each line
colas@0
   271
   * Contents of table cells wrap automatically as determined by the browser
colas@0
   272
   * Use =%<nop>VBAR%= or =&amp;#124;= to add =&#124;= characters in tables.
colas@0
   273
   * Use =%<nop>CARET%= or =&amp;#94;= to add =&#94;= characters in tables.
colas@0
   274
%T% The %SYSTEMWEB%.TablePlugin provides the =|^|= multiple-span row functionality and additional rendering features
colas@0
   275
</td><td>
colas@0
   276
<verbatim>
colas@0
   277
| *L* | *C* | *R* |
colas@0
   278
| A2 |  B2  |  C2 |
colas@0
   279
| A3 |  B3  |  C3 |
colas@0
   280
| multi span |||
colas@0
   281
| A5-7 |  5  |  5 |
colas@0
   282
|^| six | six |
colas@0
   283
|^| seven | seven |
colas@0
   284
| split\
colas@0
   285
  | over\
colas@0
   286
  | 3 lines |
colas@0
   287
| A9 |  B9  |  C9 |
colas@0
   288
</verbatim>
colas@0
   289
</td><td>
colas@0
   290
colas@0
   291
| *L* | *C* | *R* |
colas@0
   292
| A2 |  B2  |  C2 |
colas@0
   293
| A3 |  B3  |  C3 |
colas@0
   294
| multi span |||
colas@0
   295
| A5-7 |  5  |  5 |
colas@0
   296
|^| six | six |
colas@0
   297
|^| seven | seven |
colas@0
   298
| split\
colas@0
   299
  | over\
colas@0
   300
  | 3 lines |
colas@0
   301
| A9 |  B9  |  C9 |
colas@0
   302
</td>
colas@0
   303
</tr>
colas@0
   304
<tr valign="top">
colas@0
   305
<td>
colas@0
   306
 *<nop>WikiWord Links:* %BR%
colas@0
   307
 <nop>CapitalizedWordsStuckTogether (or WikiWords) will produce a link automatically if preceded by whitespace or parenthesis. %BR%
colas@0
   308
%T% If you want to link to a topic in a different web write =Otherweb.TopicName=. %BR%
colas@0
   309
To link to a topic in a subweb write =Otherweb.Subweb.TopicName=.%BR%
colas@0
   310
%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. %BR%
colas@0
   311
%X% Dots ='.'= are used to separate webs and subwebs from topic names and therefore cannot be used in topic names.
colas@0
   312
colas@0
   313
It's generally a good idea to use the TWikiVariables %<nop>SYSTEMWEB% and %<nop>USERSWEB% instead of TWiki and Main.
colas@0
   314
</td><td>
colas@0
   315
<verbatim>
colas@0
   316
WebStatistics
colas@0
   317
colas@0
   318
Sandbox.WebNotify
colas@0
   319
colas@0
   320
Sandbox.WebHome
colas@0
   321
colas@0
   322
Sandbox.Subweb.TopicName
colas@0
   323
</verbatim>
colas@0
   324
</td><td>
colas@0
   325
colas@0
   326
WebStatistics
colas@0
   327
colas@0
   328
Sandbox.WebNotify
colas@0
   329
colas@0
   330
Sandbox.%HOMETOPIC%
colas@0
   331
colas@0
   332
<a href="#MyAnchor" title="simulated link">TopicName</a>
colas@0
   333
</td>
colas@0
   334
</tr>
colas@0
   335
<tr valign="top">
colas@0
   336
<td>
colas@0
   337
 *Anchors:* %BR%
colas@0
   338
 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 of no more than 32 characters. 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.
colas@0
   339
</td><td>
colas@0
   340
<verbatim>
colas@0
   341
[[WikiWord#NotThere]]
colas@0
   342
colas@0
   343
[[#MyAnchor][Jump]]
colas@0
   344
colas@0
   345
#MyAnchor To here
colas@0
   346
</verbatim>
colas@0
   347
</td><td>
colas@0
   348
colas@0
   349
[[WikiWord#NotThere]]
colas@0
   350
colas@0
   351
[[#MyAnchor][Jump]]
colas@0
   352
colas@0
   353
#MyAnchor To here
colas@0
   354
</td>
colas@0
   355
</tr>
colas@0
   356
<tr valign="top">
colas@0
   357
<td>
colas@0
   358
#HeRe
colas@0
   359
 *Forced Links:* %BR%
colas@0
   360
 You can create a forced internal link by enclosing words in double square brackets.
colas@0
   361
%BR% 
colas@0
   362
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.
colas@0
   363
%BR%
colas@0
   364
%T% To "escape" double square brackets that would otherwise make a link, prefix the leading left square bracket with an exclamation point.
colas@0
   365
</td><td>
colas@0
   366
<verbatim>
colas@0
   367
[[wiki syntax]]
colas@0
   368
colas@0
   369
[[Main.TWiki groups]]
colas@0
   370
colas@0
   371
escaped:
colas@0
   372
![[wiki syntax]]
colas@0
   373
</verbatim>
colas@0
   374
</td><td>
colas@0
   375
colas@0
   376
[[wiki syntax]]
colas@0
   377
colas@0
   378
[[%USERSWEB%.TWiki groups]]
colas@0
   379
colas@0
   380
escaped:
colas@0
   381
![[wiki syntax]]
colas@0
   382
</td>
colas@0
   383
</tr>
colas@0
   384
<tr valign="top">
colas@0
   385
<td>
colas@0
   386
 *Specific Links:* %BR%
colas@0
   387
 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.
colas@0
   388
The rules described under __Forced Links__ apply for internal link references.
colas@0
   389
 %BR% %T% Anchor names can be added as well, to create a link to a specific place in a topic.
colas@0
   390
</td><td>
colas@0
   391
<verbatim>
colas@0
   392
[[WikiSyntax][wiki syntax]]
colas@0
   393
colas@0
   394
[[http://gnu.org][GNU]]
colas@0
   395
</verbatim>
colas@0
   396
</td><td>
colas@0
   397
colas@0
   398
[[WikiSyntax][wiki syntax]]
colas@0
   399
colas@0
   400
[[http://gnu.org][GNU]]
colas@0
   401
</td>
colas@0
   402
</tr>
colas@0
   403
<tr valign="top">
colas@0
   404
<td>
colas@0
   405
 *Prevent a Link:* %BR%
colas@0
   406
 Prevent a WikiWord from being linked by prepending it with an exclamation point.
colas@0
   407
</td><td>
colas@0
   408
<verbatim>
colas@0
   409
!SunOS
colas@0
   410
</verbatim>
colas@0
   411
</td><td>
colas@0
   412
!SunOS
colas@0
   413
</td>
colas@0
   414
</tr>
colas@0
   415
<tr valign="top">
colas@0
   416
<td>
colas@0
   417
 *Disable Links:* %BR%
colas@0
   418
 You can disable automatic linking of WikiWords by surrounding text with =&lt;noautolink&gt;= and =&lt;/noautolink&gt;= tags.%BR%
colas@0
   419
%H% It is possible to turn off all auto-linking with a NOAUTOLINK preferences setting.
colas@0
   420
</td><td>
colas@0
   421
<verbatim>
colas@0
   422
 <noautolink>
colas@0
   423
 RedHat & SuSE
colas@0
   424
 </noautolink>
colas@0
   425
</verbatim>
colas@0
   426
</td><td>
colas@0
   427
colas@0
   428
 <noautolink>
colas@0
   429
 RedHat & SuSE
colas@0
   430
 </noautolink>
colas@0
   431
</td>
colas@0
   432
</tr>
colas@0
   433
<tr valign="top">
colas@0
   434
<td>
colas@0
   435
*Mailto Links:* %BR%
colas@0
   436
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]]=.
colas@0
   437
</td><td>
colas@0
   438
<verbatim>
colas@0
   439
a@b.com
colas@0
   440
colas@0
   441
[[mailto:a@b.com]\
colas@0
   442
[Mail]]
colas@0
   443
colas@0
   444
[[mailto:?subject=\
colas@0
   445
Hi][Hi]]
colas@0
   446
</verbatim>
colas@0
   447
</td><td>
colas@0
   448
colas@0
   449
a@b.com
colas@0
   450
colas@0
   451
[[mailto:a@b.com]\
colas@0
   452
[Mail]]
colas@0
   453
colas@0
   454
[[mailto:?subject=Hi][Hi]]
colas@0
   455
</td>
colas@0
   456
</tr>
colas@0
   457
<tr>
colas@0
   458
<td>
colas@0
   459
 *Literal content:* %BR%
colas@0
   460
 TWiki generates HTML code from TWiki shorthand.
colas@0
   461
 *Experts* surround anything that must be output literally in the HTML code, without the application of
colas@0
   462
 TWiki shorthand rules, with =&lt;literal&gt;..&lt;/literal&gt;= tags. %X% any HTML
colas@0
   463
 within literal tags *must* be well formed i.e. all tags must be properly closed before
colas@0
   464
 the end of the literal block. %I% TWiki Variables are expanded within literal blocks.
colas@0
   465
</td><td>
colas@0
   466
<pre>
colas@0
   467
&lt;literal&gt;
colas@0
   468
| Not | A | Table |
colas@0
   469
&lt;literal&gt;
colas@0
   470
</pre>
colas@0
   471
</td>
colas@0
   472
<td>
colas@0
   473
<literal>
colas@0
   474
| Not | A | Table |
colas@0
   475
</literal>
colas@0
   476
</td>
colas@0
   477
</tr>
colas@0
   478
<tr>
colas@0
   479
<td>
colas@0
   480
 *Protected content:* %BR%
colas@0
   481
 *Experts* protect text from mangling by WYSIWYG editors using
colas@0
   482
 =&lt;sticky&gt;..&lt;/sticky&gt;= tags. Sticky tags don't have any effect on normal
colas@0
   483
 topic display; they are only relevant when content has to be
colas@0
   484
 protected from a WYSIWYG editor (usually because it isn't well-formed HTML, or because it
colas@0
   485
 is HTML that WYSIWYG would normally filter out or modify). Protected
colas@0
   486
 content appears as plain text in the WYSIWYG editor.
colas@0
   487
</td><td>
colas@0
   488
=&lt;sticky&gt;=
colas@0
   489
<verbatim>
colas@0
   490
<div>
colas@0
   491
This div is required
colas@0
   492
</div>
colas@0
   493
</verbatim>
colas@0
   494
=&lt;sticky&gt;=
colas@0
   495
</td>
colas@0
   496
<td>
colas@0
   497
<sticky>
colas@0
   498
<div>
colas@0
   499
This div is required
colas@0
   500
</div>
colas@0
   501
</sticky>
colas@0
   502
</td>
colas@0
   503
</tr>
colas@0
   504
</table>
colas@0
   505
colas@0
   506
%STOPINCLUDE%