Changes between Version 5 and Version 6 of WikiFormatting


Ignore:
Timestamp:
04/06/12 16:33:29 (8 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v5 v6  
    55
    66Trac has a built in small and powerful wiki rendering engine. This wiki engine implements an ever growing subset of the commands from other popular Wikis,
    7 especially [http://moinmo.in/ MoinMoin] and [trac:WikiCreole].
    8 
    9 
    10 This page will give you an in-depth explanation of the wiki markup available anywhere WikiFormatting is allowed.
    11 
    12 The ''Cheat sheet'' below gives you a quick overview for the most common syntax, each link in the ''Category'' column will lead you to the more detailed explanation later in this page.
    13 
    14 A few other wiki pages present the advanced features of the Trac wiki markup in more depth:
    15  - TracLinks covers all the possible ways to refer precisely to any Trac resource or parts thereof,
    16  - WikiPageNames talks about the various names a wiki page can take, CamelCase or not
    17  - WikiMacros lists the macros available for generating dynamic content,
    18  - WikiProcessors and WikiHtml details how parts of the wiki text can be processed in special ways
    19 
    20 
    21 == Cheat sheet ==
    22 
    23 ||= '''Category''' =||= '''Wiki Markup''' =||= '''Display''' =||
    24 |-----------------------------------------------------------
    25 {{{
    26 #!th rowspan=3
    27 [#FontStyles Font Styles]
    28 }}}
    29 || `'''bold'''`, `''italic''`, `'''''Wikipedia style'''''` || \
    30 || '''bold''', ''italic'', '''''Wikipedia style''''' ||
    31 || {{{
    32 `monospaced and ''nowiki''`
    33 }}} || \
    34 || `monospaced and nowiki` ||
    35 || `**bold**`, `//italic//`, `**//!WikiCreole style//**` || \
    36 || **bold**, //italic//, **//!WikiCreole style//** ||
    37 |-----------------------------------------------------------
    38 ||= [#Headings Headings] =||\
    39 {{{
    40 #!td
    41  {{{
    42  == Level 2 ==
    43  === Level 3 ^([#hn note])^
    44  
    45 }}}
    46 }}}
    47 {{{
    48 #!td style="padding-left: 2em"
    49 == Level 2
    50 === Level 3 ^([#hn note])^
    51 }}}
    52 |-----------------------------------------------------------
    53 ||= [#Paragraphs Paragraphs]  =||\
    54 {{{
    55 #!td
    56  {{{
    57  First paragraph
    58  on multiple lines.
    59 
    60  Second paragraph.
    61  
    62 }}}
    63 }}}
    64 {{{
    65 #!td
    66 First paragraph
    67 on multiple lines.
    68 
    69 Second paragraph.
    70 }}}
    71 |-----------------------------------------------------------
    72 ||= [#Lists Lists] =||\
    73 {{{
    74 #!td
    75  {{{
    76  * bullets list
    77    on multiple paragraphs
    78    1. nested list
    79      a. different numbering
    80         styles
    81  
    82 }}}
    83 }}}
    84 {{{
    85 #!td
    86 * bullets list
    87   on multiple paragraphs
    88   1. nested list
    89     a. different numbering
    90        styles
    91 }}}
    92 |-----------------------------------------------------------
    93 {{{
    94 #!th
    95 [#DefinitionLists Definition Lists]
    96 }}}
    97 {{{
    98 #!td
    99  {{{
    100   term:: definition on
    101          multiple paragraphs
    102  
    103 }}}
    104 }}}
    105 {{{
    106 #!td
    107  term:: definition on
    108         multiple paragraphs
    109 }}}
    110 |-----------------------------------------------------------
    111 ||= [#PreformattedText Preformatted Text] =||\
    112 {{{
    113 #!td
    114  {{{
    115  {{{
    116  multiple lines, ''no wiki''
    117        white space respected
    118  
    119 }}}
    120  
    121 }}}
    122 }}}
    123 {{{
    124 #!td
    125  {{{
    126  multiple lines, ''no wiki''
    127        white space respected
    128  
    129 }}}
    130 }}}
    131 |-----------------------------------------------------------
    132 ||= [#Blockquotes Blockquotes] =||\
    133 {{{
    134 #!td
    135  {{{
    136    if there's some leading
    137    space the text is quoted
    138  
    139 }}}
    140 }}}
    141 {{{
    142 #!td
    143  if there's some leading
    144  space the text is quoted
    145 }}}
    146 |-----------------------------------------------------------
    147 ||= [#DiscussionCitations Discussion Citations] =||\
    148 {{{
    149 #!td
    150  {{{
    151  >> ... (I said)
    152  > (he replied)
    153  
    154 }}}
    155 }}}
    156 {{{
    157 #!td
    158 >>... (I said)
    159 > (he replied)
    160 }}}
    161 |-----------------------------------------------------------
    162 ||= [#Tables Tables] =||\
    163 {{{
    164 #!td
    165  {{{
    166  ||= Table Header =|| Cell ||
    167  ||||  (details below)  ||
    168  
    169 }}}
    170 }}}
    171 {{{
    172 #!td
    173 ||= Table Header =|| Cell ||
    174 ||||  (details below)  ||
    175 }}}
    176 |-----------------------------------------------------------
    177 {{{
    178 #!th rowspan=2
    179 [#Links Links]
    180 }}}
    181 || `http://trac.edgewall.org` ||\
    182 || http://trac.edgewall.org ||
    183 || `WikiFormatting (CamelCase)` ||\
    184 || WikiFormatting (CamelCase) ||
    185 |-----------------------------------------------------------
    186 {{{
    187 #!th rowspan=5
    188 [#TracLinks TracLinks]
    189 }}}
    190 || `wiki:WikiFormatting`, `wiki:"WikiFormatting"` ||\
    191 || wiki:WikiFormatting, wiki:"WikiFormatting" ||
    192 || `#1 (ticket)`, `[1] (changeset)`, `{1} (report)` ||\
    193 || #1 (ticket), [1] (changeset), {1} (report) ||
    194 || `ticket:1, ticket:1#comment:1` ||\
    195 || ticket:1, ticket:1#comment:1 ||
    196 || `Ticket [ticket:1]`, `[ticket:1 ticket one]` ||\
    197 || Ticket [ticket:1], [ticket:1 ticket one] ||
    198 || `Ticket [[ticket:1]]`, `[[ticket:1|ticket one]]` ||\
    199 || Ticket [[ticket:1]], [[ticket:1|ticket one]] ||
    200 |-----------------------------------------------------------
    201 {{{
    202 #!th rowspan=2
    203 [#SettingAnchors Setting Anchors]
    204 }}}
    205 || `[=#point1 (1)] First...` ||\
    206 || [=#point1 (1)] First... ||
    207 || `see [#point1 (1)]` ||\
    208 || see [#point1 (1)] ||
    209 |-----------------------------------------------------------
    210 {{{
    211 #!th rowspan=2
    212 [#EscapingLinksandWikiPageNames Escaping Markup]
    213 }}}
    214 || `!'' doubled quotes` ||\
    215 || !'' doubled quotes ||
    216 || `!wiki:WikiFormatting`, `!WikiFormatting` ||\
    217 || !wiki:WikiFormatting, !WikiFormatting ||
    218 |-----------------------------------------------------------
    219 ||= [#Images Images] =|| `[[Image(`''link''`)]]` || [[Image(htdocs:../common/trac_logo_mini.png)]] ||
    220 |-----------------------------------------------------------
    221 {{{
    222 #!th rowspan=2
    223 [#Macros Macros]
    224 }}}
    225 || `[[MacroList(*)]]` ||  ''(short list of all available macros)''  ||
    226 || `[[Image?]]` ||  ''(help for the Image macro)''  ||
    227 |-----------------------------------------------------------
    228 ||= [#Processors Processors] =||\
    229 {{{
    230 #!td
    231  {{{
    232  {{{
    233  #!div style="font-size: 80%"
    234  Code highlighting:
    235    {{{
    236 #!python
    237    hello = lambda: "world"
    238    
    239 }}}
    240  
    241 }}}
    242  
    243 }}}
    244 }}}
    245 {{{
    246 #!td style="padding-left: 2em"
    247  {{{
    248  #!div style="font-size: 80%"
    249  Code highlighting:
    250    {{{
    251 #!python
    252    hello = lambda: "world"
    253    
    254 }}}
    255  
    256 }}}
    257 }}}
    258 |-----------------------------------------------------------
    259 ||= [#Comments Comments] =||\
    260 {{{
    261 #!td
    262  {{{
    263  {{{
    264 #!comment
    265  Note to Editors: ...
    266  
    267 }}}
    268  
    269 }}}
    270 }}}
    271 {{{
    272 #!td style="padding-left: 2em"
    273  {{{
    274 #!comment
    275  Note to Editors: ...
    276  
    277 }}}
    278 }}}
    279 |-----------------------------------------------------------
    280 ||= [#Miscellaneous Miscellaneous] =||\
    281 {{{
    282 #!td
    283  {{{
    284  Line [[br]] break
    285  Line \\ break
    286  ----
    287  
    288 }}}
    289 }}}
    290 {{{
    291 #!td style="padding-left: 2em"
    292 Line [[br]] break
    293 Line \\ break
    294 ----
    295 }}}
     7especially [http://moinmoin.wikiwikiweb.de/ MoinMoin].
     8
     9
     10This page demonstrates the formatting syntax available anywhere WikiFormatting is allowed.
    29611
    29712
     
    29914
    30015The Trac wiki supports the following font styles:
    301 ||= Wiki Markup =||= Display =||
    302 {{{
    303 #!td
    304   {{{
    305    * '''bold''',
    306      ''' triple quotes !'''
    307      can be bold too if prefixed by ! ''',
    308    * ''italic''
    309    * '''''bold italic''''' or ''italic and
    310      ''' italic bold ''' ''
    311    * __underline__
    312    * {{{
    313 monospace
    314 }}} or `monospace`
    315      (hence `{{{
    316 ` or {{{`
    317 }}} quoting)
    318    * ~~strike-through~~
    319    * ^superscript^
    320    * ,,subscript,,
    321    * **also bold**, //italic as well//,
    322      and **'' bold italic **'' //(since 0.12)//
    323  
    324 }}}
    325 }}}
    326 {{{
    327 #!td
    328  * '''bold''',
    329    ''' triple quotes !'''
    330    can be bold too if prefixed by ! ''',
     16{{{
     17 * '''bold''', '''!''' can be bold too''', and '''! '''
    33118 * ''italic''
    332  * '''''bold italic''''' or ''italic and
    333    ''' italic bold ''' ''
     19 * '''''bold italic'''''
    33420 * __underline__
    33521 * {{{
    33622monospace
    33723}}} or `monospace`
    338    (hence `{{{
    339 ` or {{{`
    340 }}} quoting)
    34124 * ~~strike-through~~
    34225 * ^superscript^
    34326 * ,,subscript,,
    344  * **also bold**, //italic as well//,
    345    and **'' bold italic **'' //(since 0.12)//
    346 }}}
     27}}}
     28
     29Display:
     30 * '''bold''', '''!''' can be bold too''', and '''! '''
     31 * ''italic''
     32 * '''''bold italic'''''
     33 * __underline__
     34 * {{{
     35monospace
     36}}} or `monospace`
     37 * ~~strike-through~~
     38 * ^superscript^
     39 * ,,subscript,,
    34740
    34841Notes:
     
    35548!
    35649}}} tells wiki parser to not take the following characters as wiki format, so pay attention to put a space after !, e.g. when ending bold.
    357  * all the font styles marks have to be used in opening/closing pairs,
    358    and they must nest properly (in particular, an `''` italic can't be paired
    359    with a `//` one, and `'''` can't be paired with `**`)
    360 
    36150
    36251== Headings ==
    36352
    364 You can create heading by starting a line with one up to six ''equal'' characters ("=")
    365 followed by a single space and the headline text.
    366 
    367 [=#hn] The headline text can be followed by the same number of "=" characters, but this is no longer mandatory.
    368 
    369 Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
    370 
    371 ||= Wiki Markup =||= Display =||
    372 {{{
    373 #!td
    374   {{{
    375   = Heading =
    376   == Subheading
    377   === About ''this'' ===
    378   === Explicit id === #using-explicit-id-in-heading
    379   == Subheading #sub2
    380 }}}
    381 }}}
    382 {{{
    383 #!td style="padding: 1em;"
    384   {{{
    385   #!div
    386   == Subheading
    387   === About ''this'' ===
    388   === Explicit id === #using-explicit-id-in-heading
    389   == Subheading #sub2
    390  
    391 }}}
    392 }}}
     53You can create heading by starting a line with one up to five ''equal'' characters ("=")
     54followed by a single space and the headline text. The line should end with a space
     55followed by the same number of ''='' characters.
     56The heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
     57
     58Example:
     59{{{
     60= Heading =
     61== Subheading ==
     62=== About ''this'' ===
     63=== Explicit id === #using-explicit-id-in-heading
     64}}}
     65
     66Display:
     67= Heading =
     68== Subheading ==
     69=== About ''this'' ===
     70=== Explicit id === #using-explicit-id-in-heading
    39371
    39472== Paragraphs ==
     
    39775
    39876A forced line break can also be inserted, using:
    399 ||= Wiki Markup =||= Display =||
    400 {{{
    401 #!td
    402   {{{
    403   Line 1[[BR]]Line 2
    404  
    405 }}}
    406   {{{
    407   Paragraph
    408   one
    409 
    410   Paragraph
    411   two
    412  
    413 }}}
    414 }}}
    415 {{{
    416 #!td
    417   Line 1[[BR]]Line 2
    418 
    419   Paragraph
    420   one
    421 
    422   Paragraph
    423   two
    424 }}}
     77{{{
     78Line 1[[BR]]Line 2
     79}}}
     80Display:
     81
     82Line 1[[BR]]Line 2
     83
    42584
    42685== Lists ==
     
    42988
    43089Example:
    431 ||= Wiki Markup =||= Display =||
    432 {{{
    433 #!td
    434   {{{
    435    * Item 1
    436      * Item 1.1
    437         * Item 1.1.1   
    438         * Item 1.1.2
    439         * Item 1.1.3
    440      * Item 1.2
    441    * Item 2
    442   - items can start at the beginning of a line
    443     and they can span multiple lines
    444     - be careful though to continue the line
    445     with the appropriate indentation, otherwise
    446   that will start a new paragraph...
    447  
    448    1. Item 1
    449      a. Item 1.a
    450      a. Item 1.b
    451         i. Item 1.b.i
    452         i. Item 1.b.ii
    453    1. Item 2
    454   And numbered lists can also be restarted
    455   with an explicit number:
    456    3. Item 3
    457  
    458 }}}
    459 }}}
    460 {{{
    461 #!td
     90{{{
    46291 * Item 1
    46392   * Item 1.1
     
    46796   * Item 1.2
    46897 * Item 2
    469 - items can start at the beginning of a line
    470   and they can span multiple lines
    471   - be careful though to continue the line
    472   with the appropriate indentation, otherwise
    473 that will start a new paragraph...
    47498
    47599 1. Item 1
     
    479103      i. Item 1.b.ii
    480104 1. Item 2
    481 And numbered lists can also be restarted with an explicit number:
     105And numbered lists can also be given an explicit number:
    482106 3. Item 3
    483107}}}
    484108
     109Display:
     110 * Item 1
     111   * Item 1.1
     112      * Item 1.1.1
     113      * Item 1.1.2
     114      * Item 1.1.3
     115   * Item 1.2
     116 * Item 2
     117
     118 1. Item 1
     119   a. Item 1.a
     120   a. Item 1.b
     121      i. Item 1.b.i
     122      i. Item 1.b.ii
     123 1. Item 2
     124And numbered lists can also be given an explicit number:
     125 3. Item 3
     126
     127Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph.
     128
    485129
    486130== Definition Lists ==
    487131
     132
    488133The wiki also supports definition lists.
    489134
    490 ||= Wiki Markup =||= Display =||
    491 {{{
    492 #!td
    493   {{{
    494    llama::
    495      some kind of mammal, with hair
    496    ppython::
    497      some kind of reptile, without hair
    498      (can you spot the typo?)
    499  
    500 }}}
    501 }}}
    502 {{{
    503 #!td
     135Example:
     136{{{
    504137 llama::
    505138   some kind of mammal, with hair
     
    509142}}}
    510143
     144Display:
     145 llama::
     146   some kind of mammal, with hair
     147 ppython::
     148   some kind of reptile, without hair
     149   (can you spot the typo?)
     150
    511151Note that you need a space in front of the defined term.
    512152
     
    516156Block containing preformatted text are suitable for source code snippets, notes and examples. Use three ''curly braces'' wrapped around the text to define a block quote. The curly braces need to be on a separate line.
    517157 
    518 ||= Wiki Markup =||= Display =||
    519 {{{
    520 #!td
    521   {{{
    522   {{{
     158Example:
     159{{{
     160 {{{
    523161  def HelloWorld():
    524       print '''Hello World'''
    525  
    526 }}}
    527  
    528 }}}
    529 }}}
    530 {{{
    531 #!td
    532   {{{
    533   def HelloWorld():
    534       print '''Hello World'''
    535  
    536 }}}
    537 }}}
    538 
    539 Note that this kind of block is also used for selecting lines that should be processed through WikiProcessors.
     162      print "Hello World"
     163 
     164}}}
     165}}}
     166
     167Display:
     168{{{
     169 def HelloWorld():
     170     print "Hello World"
     171}}}
     172
    540173
    541174== Blockquotes ==
     
    543176In order to mark a paragraph as blockquote, indent that paragraph with two spaces.
    544177
    545 ||= Wiki Markup =||= Display =||
    546 {{{
    547 #!td
    548 {{{
    549 Paragraph
     178Example:
     179{{{
    550180  This text is a quote from someone else.
    551181}}}
    552 }}}
    553 {{{
    554 #!td
    555 Paragraph
     182
     183Display:
    556184  This text is a quote from someone else.
    557 }}}
    558185
    559186== Discussion Citations ==
     
    561188To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 
    562189
    563 ||= Wiki Markup =||= Display =||
    564 {{{
    565 #!td
    566   {{{
    567   >> Someone's original text
    568   > Someone else's reply text
    569   >  - which can be any kind of Wiki markup
    570   My reply text
    571  
    572 }}}
    573 }}}
    574 {{{
    575 #!td
     190Example:
     191{{{
    576192>> Someone's original text
    577193> Someone else's reply text
    578 >  - which can be any kind of Wiki markup
    579194My reply text
    580195}}}
    581196
     197Display:
     198>> Someone's original text
     199> Someone else's reply text
     200My reply text
     201
     202''Note: Some WikiFormatting elements, such as lists and preformatted text, are  lost in the citation area.  Some reformatting may be necessary to create a clear citation.''
    582203
    583204== Tables ==
    584 === Simple Tables ===
     205
    585206Simple tables can be created like this:
    586 ||= Wiki Markup =||= Display =||
    587 {{{
    588 #!td
    589   {{{
    590   ||Cell 1||Cell 2||Cell 3||
    591   ||Cell 4||Cell 5||Cell 6||
    592  
    593 }}}
    594 }}}
    595 {{{
    596 #!td style="padding: 2em;"
     207{{{
    597208||Cell 1||Cell 2||Cell 3||
    598209||Cell 4||Cell 5||Cell 6||
    599210}}}
    600211
    601 Cell headings can be specified by wrapping the content in a pair of '=' characters.
    602 Note that the '=' characters have to stick to the cell separators, like this:
    603 ||= Wiki Markup =||= Display =||
    604 {{{
    605 #!td
    606   {{{
    607   ||        ||= stable =||= latest =||
    608   ||= 0.10 =||  0.10.5  || 0.10.6dev||
    609   ||= 0.11 =||  0.11.6  || 0.11.7dev||
    610  
    611 }}}
    612 }}}
    613 {{{
    614 #!td style="padding: 2em;"
    615 ||        ||= stable =||= latest =||
    616 ||= 0.10 =||  0.10.5  || 0.10.6dev||
    617 ||= 0.11 =||  0.11.6  || 0.11.7dev||
    618 }}}
    619 
    620 Finally, specifying an empty cell means that the next non empty cell will span the empty cells. For example:
    621 ||= Wiki Markup =||= Display =||
    622 {{{
    623 #!td
    624   {{{
    625   || 1 || 2 || 3 ||
    626   |||| 1-2 || 3 ||
    627   || 1 |||| 2-3 ||
    628   |||||| 1-2-3 ||
    629  
    630 }}}
    631 }}}
    632 {{{
    633 #!td style="padding: 2em;"
    634 || 1 || 2 || 3 ||
    635 |||| 1-2 || 3 ||
    636 || 1 |||| 2-3 ||
    637 |||||| 1-2-3 ||
    638 }}}
    639 
    640 Note that if the content of a cell "sticks" to one side of the cell and only one, then the text will be aligned on that side. Example:
    641 ||= Wiki Markup =||= Display =||
    642 {{{
    643 #!td
    644   {{{
    645   ||=Text =||= Numbers =||
    646   ||left align    ||        1.0||
    647   ||  center      ||        4.5||
    648   ||      right align||     4.5||
    649   || default alignment ||   2.5||
    650   ||default||         2.5||
    651   ||  default ||      2.5||
    652   || default ||       2.5||
    653  
    654 }}}
    655 }}}
    656 {{{
    657 #!td style="padding: 2em;"
    658 ||=Text =||= Numbers =||
    659 ||left align    ||        1.0||
    660 ||  center      ||        4.5||
    661 ||      right align||     4.5||
    662 || default alignment ||   2.5||
    663 ||default||         2.5||
    664 ||  default ||      2.5||
    665 || default ||       2.5||
    666 }}}
    667 
    668 If contrary to the example above, the cells in your table contain more text, it might be convenient to spread a table row over multiple lines of markup. The `\` character placed at the end of a line after a cell separator tells Trac to not start a new row for the cells on the next line.
    669 
    670 ||= Wiki Markup =||
    671 {{{
    672 #!td
    673   {{{
    674   || this is column 1 [http://trac.edgewall.org/newticket new ticket] || \
    675   || this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \
    676   || that's column 3 and last one ||
    677  
    678 }}}
    679 }}}
    680 |-------------
    681 ||= Display =||
    682 {{{
    683 #!td style="padding: 2em;"
    684 || this is column 1 [http://trac.edgewall.org/newticket new ticket] || \
    685 || this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \
    686 || that's column 3 and last one ||
    687 }}}
    688 
    689 === Complex Tables ===
    690 
    691 If the possibilities offered by the simple "pipe"-based markup for tables described above are not enough for your needs, you can create more elaborated tables by using [#Processors-example-tables WikiProcessor based tables].
     212Display:
     213||Cell 1||Cell 2||Cell 3||
     214||Cell 4||Cell 5||Cell 6||
     215
     216Note that more complex tables can be created using
     217[wiki:WikiRestructuredText#BiggerReSTExample reStructuredText].
    692218
    693219
     
    698224}}}.
    699225
    700 ||= Wiki Markup =||= Display =||
    701 {{{
    702 #!td
    703   {{{
    704   TitleIndex, http://www.edgewall.com/, !NotAlink
    705  
    706 }}}
    707 }}}
    708 {{{
    709 #!td
    710 TitleIndex, http://www.edgewall.com/, !NotAlink
    711 }}}
    712 
    713 Links can be given a more descriptive title by writing the link followed by a space and a title and all this inside square brackets.
    714 If the descriptive title is omitted, then the explicit prefix is discarded, unless the link is an external link. This can be useful for wiki pages not adhering to the WikiPageNames convention.
    715 
    716 ||= Wiki Markup =||= Display =||
    717 {{{
    718 #!td
    719   {{{
    720    * [http://www.edgewall.com Edgewall Software]
    721    * [wiki:TitleIndex Title Index]
    722    * [wiki:TitleIndex]
    723    * [wiki:ISO9000]
    724  
    725 }}}
    726 }}}
    727 {{{
    728 #!td
    729    * [http://www.edgewall.com Edgewall Software]
    730    * [wiki:TitleIndex Title Index]
    731    * [wiki:TitleIndex]
    732    * [wiki:ISO9000]
    733 }}}
    734 
    735 Following the [trac:WikiCreole] trend, the descriptive title can also be specified by writing the link followed by a pipe ('|') and a title and all this inside //double// square brackets.
    736 
    737 {{{
    738 #!td
    739   {{{
    740    * [[http://www.edgewall.com|Edgewall Software]]
    741    * [[wiki:TitleIndex|Title Index]]
    742      or even [[TitleIndex|Title Index]]
    743    * [[wiki:TitleIndex]]
    744      ''' but not ![[TitleIndex]]! '''
    745    * [[ISO9000]]
    746  
    747 }}}
    748 }}}
    749 {{{
    750 #!td
    751    * [[http://www.edgewall.com|Edgewall Software]]
    752    * [[wiki:TitleIndex|Title Index]]
    753      or even [[TitleIndex|Title Index]]
    754    * [[wiki:TitleIndex]]
    755      ''' but not ![[TitleIndex]]! '''
    756    * [[ISO9000]]
    757 }}}
    758 
    759 '''Note''': the [trac:WikiCreole] style for links is quick to type and
    760 certainly looks familiar as it's the one used on Wikipedia and in many
    761 other wikis. Unfortunately it conflicts with the syntax for [#Macros macros].
    762 So in the rare case when you need to refer to a page which is named after
    763 a macro (typical examples being TitleIndex, InterTrac and InterWiki),
    764 by writing `[[TitleIndex]]` you will actually call the macro instead of linking
    765 to the page.
     226Example:
     227{{{
     228 TitleIndex, http://www.edgewall.com/, !NotAlink
     229}}}
     230
     231Display:
     232 TitleIndex, http://www.edgewall.com/, !NotAlink
     233
     234Links can be given a more descriptive title by writing the link followed by a space and a title and all this inside square brackets.  If the descriptive title is omitted, then the explicit prefix is discarded, unless the link is an external link. This can be useful for wiki pages not adhering to the WikiPageNames convention.
     235
     236Example:
     237{{{
     238 * [http://www.edgewall.com/ Edgewall Software]
     239 * [wiki:TitleIndex Title Index]
     240 * [wiki:ISO9000]
     241}}}
     242
     243Display:
     244 * [http://www.edgewall.com/ Edgewall Software]
     245 * [wiki:TitleIndex Title Index]
     246 * [wiki:ISO9000]
    766247
    767248== Trac Links ==
    768249
    769250Wiki pages can link directly to other parts of the Trac system. Pages can refer to tickets, reports, changesets, milestones, source files and other Wiki pages using the following notations:
    770 
    771 ||= Wiki Markup =||= Display =||
    772 {{{
    773 #!td
    774   {{{
    775    * Tickets: #1 or ticket:1
    776    * Reports: {1} or report:1
    777    * Changesets: r1, [1] or changeset:1
    778    * ...
    779    * targeting other Trac instances,
    780      so called InterTrac links:
    781      - Tickets: #Trac1 or Trac:ticket:1
    782      - Changesets: [Trac1] or Trac:changeset:1
    783  
    784 }}}
    785 }}}
    786 {{{
    787 #!td
     251{{{
     252 * Tickets: #1 or ticket:1
     253 * Reports: {1} or report:1
     254 * Changesets: r1, [1] or changeset:1
     255 * ...
     256}}}
     257
     258Display:
    788259 * Tickets: #1 or ticket:1
    789260 * Reports: {1} or report:1
    790261 * Changesets: r1, [1] or changeset:1
    791262 * ...
    792  * targeting other Trac instances,
    793    so called InterTrac links:
    794    - Tickets: #Trac1 or Trac:ticket:1
    795    - Changesets: [Trac1] or Trac:changeset:1
    796 }}}
    797 
    798 There are many more flavors of Trac links, see TracLinks for more in-depth information and a reference for all the default link resolvers.
    799 
    800 
    801 == Setting Anchors ==
    802 
    803 An anchor, or more correctly speaking, an [http://www.w3.org/TR/REC-html40/struct/links.html#h-12.2.1 anchor name] can be added explicitly at any place in the Wiki page, in order to uniquely identify a position in the document:
    804 
    805 {{{
    806 [=#point1]
    807 }}}
    808 
    809 This syntax was chosen to match the format for explicitly naming the header id [#Headings documented above]. For example:
    810 {{{
    811 == Long title == #title
    812 }}}
    813 
    814 It's also very close to the syntax for the corresponding link to that anchor:
    815 {{{
    816 [#point1]
    817 }}}
    818 
    819 Optionally, a label can be given to the anchor:
    820 {{{
    821 [[=#point1 '''Point 1''']]
    822 }}}
    823 
    824 ||= Wiki Markup =||= Display =||
    825 |----------------------------------
    826 {{{
    827 #!td
    828   {{{
    829   [#point2 jump to the second point]
    830 
    831   ...
    832 
    833   Point2:  [=#point2] Jump here
    834  
    835 }}}
    836 }}}
    837 {{{
    838 #!td
    839   [#point2 jump to the second point]
    840 
    841   ...
    842 
    843   Point2:  [=#point2] Jump here
    844 }}}
    845 
    846 For more complex anchors (e.g. when a custom title is wanted), one can use the Span macro, e.g. `[[span(id=point2, class=wikianchor, title=Point 2, ^(2)^)]]`.
     263
     264There are many more flavors of Trac links, see TracLinks for more in-depth information.
    847265
    848266
     
    851269You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
    852270
    853 ||= Wiki Markup =||= Display =||
    854 {{{
    855 #!td
    856   {{{
    857    !NoHyperLink
    858    !#42 is not a link
    859  
    860 }}}
    861 }}}
    862 {{{
    863 #!td
     271Example:
     272{{{
    864273 !NoHyperLink
    865274 !#42 is not a link
    866275}}}
     276
     277Display:
     278 !NoHyperLink
     279 !#42 is not a link
     280
    867281
    868282== Images ==
     
    878292 * `[[Image(source:/trunk/trac/htdocs/trac_logo_mini.png)]]` (a file in repository)
    879293
    880 ||= Wiki Markup =||= Display =||
    881 {{{
    882 #!td
    883   {{{
    884   [[Image(htdocs:../common/trac_logo_mini.png)]]
    885  
    886 }}}
    887 }}}
    888 {{{
    889 #!td
    890 [[Image(htdocs:../common/trac_logo_mini.png)]]
    891 }}}
     294Example display: [[Image(htdocs:../common/trac_logo_mini.png)]]
     295
    892296
    893297See WikiMacros for further documentation on the `[[Image()]]` macro.
     
    898302Macros are ''custom functions'' to insert dynamic content in a page.
    899303
    900 ||= Wiki Markup =||= Display =||
    901 {{{
    902 #!td
    903   {{{
    904   [[RecentChanges(Trac,3)]]
    905  
    906 }}}
    907 }}}
    908 {{{
    909 #!td style="padding-left: 2em"
    910 [[RecentChanges(Trac,3)]]
    911 }}}
     304Example:
     305{{{
     306 [[RecentChanges(Trac,3)]]
     307}}}
     308
     309Display:
     310 [[RecentChanges(Trac,3)]]
    912311
    913312See WikiMacros for more information, and a list of installed macros.
    914 
    915 The detailed help for a specific macro can also be obtained more directly by appending a "?" to the macro name.
    916 
    917 ||= Wiki Markup =||= Display =||
    918 {{{
    919 #!td
    920   {{{
    921   [[MacroList?]]
    922  
    923 }}}
    924 }}}
    925 {{{
    926 #!td style="padding-left: 2em"
    927 [[MacroList?]]
    928 }}}
    929313
    930314
     
    934318[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].
    935319
    936 ||= Wiki Markup =||= Display =||
    937 |--------------------------------------------------------
    938 {{{
    939 #!td align="center" colspan=2 style="border: 0px; font-size: 90%"
    940 
    941    [=#Processors-example-html Example 1:] HTML
    942 
    943 }}}
    944 |--------------------------------------------------------
    945 {{{
    946 #!td style="border: 0px"
    947   {{{
    948   {{{
    949   #!html
    950   <h1 style="text-align: right; color: blue">
    951    HTML Test
    952   </h1>
    953  
    954 }}}
    955  
    956 }}}
    957 }}}
    958 {{{
    959 #!td valign="top"  style="border: 0px"
    960 
     320Example 1:
     321{{{
     322#!html
     323<pre class="wiki">{{{
     324#!html
     325&lt;h1 style="text-align: right; color: blue"&gt;HTML Test&lt;/h1&gt;
     326}}}</pre>
     327}}}
     328
     329Display:
    961330{{{
    962331#!html
     
    964333}}}
    965334
    966 }}}
    967 |--------------------------------------------------------
    968 {{{
    969 #!td align="center" colspan=2 style="border: 0px; font-size: 90%"
    970 
    971    [=#Processors-example-highlight Example 2:] Code Highlighting
    972 
    973 }}}
    974 |--------------------------------------------------------
    975 {{{
    976 #!td style="border: 0px"
    977   {{{
    978   {{{
    979   #!python
    980   class Test:
    981  
    982       def __init__(self):
    983           print "Hello World"
    984   if __name__ == '__main__':
    985      Test()
    986  
    987 }}}
    988  
    989 }}}
    990 }}}
    991 {{{
    992 #!td valign="top"  style="border: 0px"
    993 
     335Example:
     336{{{
     337#!html
     338<pre class="wiki">{{{
     339#!python
     340class Test:
     341
     342    def __init__(self):
     343        print "Hello World"
     344if __name__ == '__main__':
     345   Test()
     346}}}</pre>
     347}}}
     348
     349Display:
    994350{{{
    995351#!python
     
    1001357}}}
    1002358
    1003 }}}
    1004 |--------------------------------------------------------
    1005 {{{
    1006 #!td align="center" colspan=2 style="border: 0px; font-size: 90%"
    1007 
    1008        [=#Processors-example-tables Example 3:] Complex Tables
    1009 
    1010 }}}
    1011 |--------------------------------------------------------
    1012 {{{
    1013 #!td style="border: 0px"
    1014   {{{
    1015   {{{
    1016 #!th rowspan=4 align=justify
    1017   With the `#td` and `#th` processors,
    1018   table cells can contain any content:
    1019  
    1020 }}}
    1021   |----------------
    1022   {{{
    1023 #!td
    1024     - lists
    1025     - embedded tables
    1026     - simple multiline content
    1027  
    1028 }}}
    1029   |----------------
    1030   {{{
    1031 #!td
    1032   As processors can be easily nested,
    1033   so can be tables:
    1034     {{{
    1035 #!th
    1036     Example:
    1037    
    1038 }}}
    1039     {{{
    1040 #!td style="background: #eef"
    1041     || must be at the third level now... ||
    1042    
    1043 }}}
    1044  
    1045 }}}
    1046   |----------------
    1047   {{{
    1048 #!td
    1049   Even when you don't have complex markup,
    1050   this form of table cells can be convenient
    1051   to write content on multiple lines.
    1052  
    1053 }}}
    1054  
    1055 }}}
    1056 }}}
    1057 {{{
    1058 #!td  valign="top"  style="border: 0px"
    1059 
    1060   {{{
    1061 #!th rowspan=4 align=justify
    1062   With the `#td` and `#th` processors,
    1063   table cells can contain any content:
    1064  
    1065 }}}
    1066   |----------------
    1067   {{{
    1068 #!td
    1069     - lists
    1070     - embedded tables
    1071     - simple multiline content
    1072  
    1073 }}}
    1074   |----------------
    1075   {{{
    1076 #!td
    1077   As processors can be easily nested,
    1078   so can be tables:
    1079     {{{
    1080 #!th
    1081     Example:
    1082    
    1083 }}}
    1084     {{{
    1085 #!td style="background: #eef"
    1086     || must be at the third level now... ||
    1087    
    1088 }}}
    1089  
    1090 }}}
    1091   |----------------
    1092   {{{
    1093 #!td
    1094   Even when you don't have complex markup,
    1095   this form of table cells can be convenient
    1096   to write content on multiple lines.
    1097  
    1098 }}}
    1099 
     359Perl:
     360{{{
     361#!perl
     362my ($test) = 0;
     363if ($test > 0) {
     364    print "hello";
     365}
    1100366}}}
    1101367
     
    1106372
    1107373Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text.
    1108 
    1109 ||= Wiki Markup =||= Display =||
    1110 {{{
    1111 #!td
    1112   {{{
    1113   Nothing to
    1114   {{{
    1115   #!comment
    1116   Your comment for editors here
    1117  
    1118 }}}
    1119   see ;-)
    1120  
    1121 }}}
    1122 }}}
    1123 {{{
    1124 #!td
    1125   Nothing to
    1126   {{{
    1127   #!comment
    1128   Your comment for editors here
    1129  
    1130 }}}
    1131   see ;-)
    1132 }}}
     374{{{
     375{{{
     376#!comment
     377Your comment here
     378}}}
     379}}}
     380
    1133381
    1134382== Miscellaneous ==
    1135383
    1136 An horizontal line can be used to separated different parts of your page:
    1137 
    1138 ||= Wiki Markup =||= Display =||
    1139 {{{
    1140 #!td
    1141   {{{
    1142   Four or more dashes will be replaced
    1143   by an horizontal line (<HR>)
    1144   ----
    1145   See?
    1146  
    1147 }}}
    1148 }}}
    1149 {{{
    1150 #!td
    1151 Four or more dashes will be replaced
    1152 by an horizontal line (<HR>)
     384Four or more dashes will be replaced by a horizontal line (<HR>)
     385
     386Example:
     387{{{
     388 ----
     389}}}
     390
     391Display:
    1153392----
    1154 See?
    1155 }}}
    1156 |----------------------------------
    1157 {{{
    1158 #!td
    1159   {{{
    1160   "macro" style [[br]] line break
    1161  
    1162 }}}
    1163 }}}
    1164 {{{
    1165 #!td
    1166 "macro" style [[br]] line break
    1167 }}}
    1168 |----------------------------------
    1169 {{{
    1170 #!td
    1171   {{{
    1172   !WikiCreole style \\ line\\break
    1173  
    1174 }}}
    1175 }}}
    1176 {{{
    1177 #!td
    1178 !WikiCreole style \\ line\\break
    1179 }}}
    1180 
     393
     394
     395
     396----
     397See also: TracLinks, TracGuide, WikiHtml, WikiMacros, WikiProcessors, TracSyntaxColoring.