Changes between Version 1 and Version 2 of WikiFormatting


Ignore:
Timestamp:
Jul 17, 2008 10:45:00 AM (12 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v1 v2  
    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 {{{#!th rowspan=3 
    26 [#FontStyles Font Styles] 
    27 }}} 
    28 || `'''bold'''`, `''italic''`, `'''''Wikipedia style'''''` || \ 
    29 || '''bold''', ''italic'', '''''Wikipedia style''''' || 
    30 || {{{`monospaced (''other markup ignored'')`}}} || \ 
    31 || `monospaced (''other markup ignored'')` || 
    32 || `**bold**`, `//italic//`, `**//!WikiCreole style//**` || \ 
    33 || **bold**, //italic//, **//!WikiCreole style//** || 
    34 |----------------------------------------------------------- 
    35 ||= [#Headings Headings] =||\ 
    36 {{{#!td  
    37  {{{ 
    38  == Level 2 == 
    39  === Level 3 ^([#hn note])^ 
    40  }}} 
    41 }}} 
    42 {{{#!td style="padding-left: 2em" 
    43 == Level 2 == 
    44 === Level 3 ^([#hn note])^ 
    45 }}} 
    46 |----------------------------------------------------------- 
    47 ||= [#Paragraphs Paragraphs]  =||\ 
    48 {{{#!td 
    49  {{{ 
    50  First paragraph 
    51  on multiple lines. 
    52  
    53  Second paragraph. 
    54  }}} 
    55 }}} 
    56 {{{#!td 
    57 First paragraph 
    58 on multiple lines. 
    59  
    60 Second paragraph. 
    61 }}} 
    62 |----------------------------------------------------------- 
    63 ||= [#Lists Lists] =||\ 
    64 {{{#!td 
    65  {{{ 
    66  * bullets list 
    67    on multiple lines 
    68    1. nested list 
    69      a. different numbering  
    70         styles 
    71  }}} 
    72 }}} 
    73 {{{#!td 
    74 * bullets list 
    75   on multiple lines 
    76   1. nested list 
    77     a. different numbering 
    78        styles 
    79 }}} 
    80 |----------------------------------------------------------- 
    81 {{{#!th 
    82 [#DefinitionLists Definition Lists] 
    83 }}} 
    84 {{{#!td 
    85  {{{ 
    86   term:: definition on 
    87          multiple lines 
    88  }}} 
    89 }}} 
    90 {{{#!td 
    91  term:: definition on 
    92         multiple lines 
    93 }}} 
    94 |----------------------------------------------------------- 
    95 ||= [#PreformattedText Preformatted Text] =||\ 
    96 {{{#!td 
    97  {{{ 
    98  {{{ 
    99  multiple lines, ''no wiki'' 
    100        white space respected 
    101  }}} 
    102  }}} 
    103 }}} 
    104 {{{#!td 
    105  {{{ 
    106  multiple lines, ''no wiki'' 
    107        white space respected 
    108  }}} 
    109 }}} 
    110 |----------------------------------------------------------- 
    111 ||= [#Blockquotes Blockquotes] =||\ 
    112 {{{#!td 
    113  {{{ 
    114    if there's some leading 
    115    space the text is quoted 
    116  }}} 
    117 }}} 
    118 {{{#!td 
    119  if there's some leading 
    120  space the text is quoted 
    121 }}} 
    122 |----------------------------------------------------------- 
    123 ||= [#DiscussionCitations Discussion Citations] =||\ 
    124 {{{#!td 
    125  {{{ 
    126  >> ... (I said) 
    127  > (he replied) 
    128  }}} 
    129 }}} 
    130 {{{#!td 
    131 >>... (I said) 
    132 > (he replied) 
    133 }}} 
    134 |----------------------------------------------------------- 
    135 ||= [#Tables Tables] =||\ 
    136 {{{#!td 
    137  {{{ 
    138  ||= Table Header =|| Cell || 
    139  ||||  (details below)  || 
    140  }}} 
    141 }}} 
    142 {{{#!td 
    143 ||= Table Header =|| Cell || 
    144 ||||  (details below)  || 
    145 }}} 
    146 |----------------------------------------------------------- 
    147 {{{#!th rowspan=2 
    148 [#Links Links] 
    149 }}} 
    150 || `http://trac.edgewall.org` ||\ 
    151 || http://trac.edgewall.org || 
    152 || `WikiFormatting (CamelCase)` ||\ 
    153 || WikiFormatting (CamelCase) || 
    154 |----------------------------------------------------------- 
    155 {{{#!th rowspan=5 
    156 [#TracLinks TracLinks] 
    157 }}} 
    158 || `wiki:WikiFormatting`, `wiki:"WikiFormatting"` ||\ 
    159 || wiki:WikiFormatting, wiki:"WikiFormatting" || 
    160 || `#1 (ticket)`, `[1] (changeset)`, `{1} (report)` ||\ 
    161 || #1 (ticket), [1] (changeset), {1} (report) || 
    162 || `ticket:1, ticket:1#comment:1` ||\ 
    163 || ticket:1, ticket:1#comment:1 || 
    164 || `Ticket [ticket:1]`, `[ticket:1 ticket one]` ||\ 
    165 || Ticket [ticket:1], [ticket:1 ticket one] || 
    166 || `Ticket [[ticket:1]]`, `[[ticket:1|ticket one]]` ||\ 
    167 || Ticket [[ticket:1]], [[ticket:1|ticket one]] || 
    168 |----------------------------------------------------------- 
    169 {{{#!th rowspan=2  
    170 [#SettingAnchors Setting Anchors] 
    171 }}} 
    172 || `[=#point1 (1)] First...` ||\ 
    173 || [=#point1 (1)] First... || 
    174 || `see [#point1 (1)]` ||\ 
    175 || see [#point1 (1)] || 
    176 |----------------------------------------------------------- 
    177 {{{#!th rowspan=3 
    178 [#Escaping Escaping Markup] 
    179 }}} 
    180 || `!'' doubled quotes` ||\ 
    181 || !'' doubled quotes || 
    182 || `!wiki:WikiFormatting`, `!WikiFormatting` ||\ 
    183 || !wiki:WikiFormatting, !WikiFormatting || 
    184 || {{{`}}}`{{{-}}}`{{{`}}}` triple curly brackets` ||\ 
    185 || `{{{-}}}` triple curly brackets || 
    186 |----------------------------------------------------------- 
    187 ||= [#Images Images] =|| `[[Image(`''link''`)]]` || [[Image(htdocs:../common/trac_logo_mini.png)]] || 
    188 |----------------------------------------------------------- 
    189 {{{#!th rowspan=2 
    190 [#Macros Macros] 
    191 }}} 
    192 || `[[MacroList(*)]]` ||  ''(short list of all available macros)''  || 
    193 || `[[Image?]]` ||  ''(help for the Image macro)''  || 
    194 |----------------------------------------------------------- 
    195 ||= [#Processors Processors] =||\ 
    196 {{{#!td 
    197  {{{ 
    198  {{{ 
    199  #!div style="font-size: 80%" 
    200  Code highlighting: 
    201    {{{#!python 
    202    hello = lambda: "world" 
    203    }}} 
    204  }}} 
    205  }}} 
    206 }}} 
    207 {{{#!td style="padding-left: 2em" 
    208  {{{ 
    209  #!div style="font-size: 80%" 
    210  Code highlighting: 
    211    {{{#!python  
    212    hello = lambda: "world" 
    213    }}} 
    214  }}} 
    215 }}} 
    216 |----------------------------------------------------------- 
    217 ||= [#Comments Comments] =||\ 
    218 {{{#!td 
    219  {{{ 
    220  {{{#!comment 
    221  Note to Editors: ... 
    222  }}} 
    223  }}} 
    224 }}} 
    225 {{{#!td style="padding-left: 2em" 
    226  {{{#!comment 
    227  Note to Editors: ... 
    228  }}} 
    229 }}} 
    230 |----------------------------------------------------------- 
    231 ||= [#Miscellaneous Miscellaneous] =||\ 
    232 {{{#!td 
    233  {{{ 
    234  Line [[br]] break  
    235  Line \\ break 
    236  ---- 
    237  }}} 
    238 }}} 
    239 {{{#!td style="padding-left: 2em" 
    240 Line [[br]] break 
    241 Line \\ break 
    242 ---- 
    243 }}} 
     7especially [http://moinmoin.wikiwikiweb.de/ MoinMoin].  
     8 
     9 
     10This page demonstrates the formatting syntax available anywhere WikiFormatting is allowed. 
    24411 
    24512 
     
    24714 
    24815The Trac wiki supports the following font styles: 
    249 ||= Wiki Markup =||= Display =|| 
    250 {{{#!td 
    251   {{{ 
    252    * '''bold''',  
    253      ''' triple quotes !'''  
    254      can be bold too if prefixed by ! ''',  
    255    * ''italic'' 
    256    * '''''bold italic''''' or ''italic and 
    257      ''' italic bold ''' '' 
    258    * __underline__ 
    259    * {{{monospace}}} or `monospace` 
    260      (hence `{{{` or {{{`}}} quoting) 
    261    * ~~strike-through~~ 
    262    * ^superscript^  
    263    * ,,subscript,, 
    264    * **also bold**, //italic as well//,  
    265      and **'' bold italic **'' //(since 0.12)// 
    266   }}} 
    267 }}} 
    268 {{{#!td 
    269  * '''bold''',  
    270    ''' triple quotes !'''  
    271    can be bold too if prefixed by ! ''',  
     16{{{ 
     17 * '''bold''', '''!''' can be bold too''', and '''! ''' 
    27218 * ''italic'' 
    273  * '''''bold italic''''' or ''italic and 
    274    ''' italic bold ''' '' 
     19 * '''''bold italic''''' 
    27520 * __underline__ 
    27621 * {{{monospace}}} or `monospace` 
    277    (hence `{{{` or {{{`}}} quoting) 
    27822 * ~~strike-through~~ 
    27923 * ^superscript^  
    28024 * ,,subscript,, 
    281  * **also bold**, //italic as well//,  
    282    and **'' bold italic **'' //(since 0.12)// 
    283 }}} 
     25}}} 
     26 
     27Display: 
     28 * '''bold''', '''!''' can be bold too''', and '''! ''' 
     29 * ''italic'' 
     30 * '''''bold italic''''' 
     31 * __underline__ 
     32 * {{{monospace}}} or `monospace` 
     33 * ~~strike-through~~ 
     34 * ^superscript^  
     35 * ,,subscript,, 
    28436 
    28537Notes: 
    28638 * `{{{...}}}` and {{{`...`}}} commands not only select a monospace font, but also treat their content as verbatim text, meaning that no further wiki processing is done on this text. 
    28739 * {{{ ! }}} 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. 
    288  * all the font styles marks have to be used in opening/closing pairs,  
    289    and they must nest properly (in particular, an `''` italic can't be paired  
    290    with a `//` one, and `'''` can't be paired with `**`) 
    291  
    29240 
    29341== Headings == 
    29442 
    295 You can create heading by starting a line with one up to six ''equal'' characters ("=") 
    296 followed by a single space and the headline text.  
    297  
    298 [=#hn] 
    299 The headline text can be followed by the same number of "=" characters, but this is no longer mandatory. 
    300  
    301 Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated. 
    302  
    303 ||= Wiki Markup =||= Display =|| 
    304 {{{#!td 
    305   {{{ 
    306   = Heading = 
    307   == Subheading 
    308   === About ''this'' === 
    309   === Explicit id === #using-explicit-id-in-heading 
    310   == Subheading #sub2 
    311 }}} 
    312 }}} 
    313 {{{#!td style="padding: 1em;" 
    314   {{{ 
    315   #!div 
    316   = Heading = 
    317   == Subheading 
    318   === About ''this'' === 
    319   === Explicit id === #using-explicit-id-in-heading 
    320   == Subheading #sub2 
    321   }}} 
    322 }}} 
     43You can create heading by starting a line with one up to five ''equal'' characters ("=") 
     44followed by a single space and the headline text. The line should end with a space  
     45followed by the same number of ''='' characters. 
     46The heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated. 
     47 
     48Example: 
     49{{{ 
     50= Heading = 
     51== Subheading == 
     52=== About ''this'' === 
     53=== Explicit id === #using-explicit-id-in-heading 
     54}}} 
     55 
     56Display: 
     57= Heading = 
     58== Subheading == 
     59=== About ''this'' === 
     60=== Explicit id === #using-explicit-id-in-heading 
    32361 
    32462== Paragraphs == 
     
    32765 
    32866A forced line break can also be inserted, using: 
    329 ||= Wiki Markup =||= Display =|| 
    330 {{{#!td 
    331   {{{ 
    332   Line 1[[BR]]Line 2 
    333   }}} 
    334   {{{ 
    335   Paragraph 
    336   one 
    337  
    338   Paragraph  
    339   two 
    340   }}} 
    341 }}} 
    342 {{{#!td 
    343   Line 1[[BR]]Line 2 
    344  
    345   Paragraph  
    346   one 
    347  
    348   Paragraph  
    349   two 
    350 }}} 
     67{{{ 
     68Line 1[[BR]]Line 2 
     69}}} 
     70Display: 
     71 
     72Line 1[[BR]]Line 2 
     73 
    35174 
    35275== Lists == 
     
    35578 
    35679Example: 
    357 ||= Wiki Markup =||= Display =|| 
    358 {{{#!td 
    359   {{{ 
    360    * Item 1 
    361      * Item 1.1 
    362         * Item 1.1.1    
    363         * Item 1.1.2 
    364         * Item 1.1.3 
    365      * Item 1.2 
    366    * Item 2 
    367   - items can start at the beginning of a line 
    368     and they can span multiple lines 
    369     - be careful though to continue the line  
    370     with the appropriate indentation, otherwise 
    371   that will start a new paragraph... 
    372    
    373    1. Item 1 
    374      a. Item 1.a 
    375      a. Item 1.b 
    376         i. Item 1.b.i 
    377         i. Item 1.b.ii 
    378    1. Item 2 
    379   And numbered lists can also be restarted 
    380   with an explicit number: 
    381    3. Item 3 
    382   }}} 
    383 }}} 
    384 {{{#!td 
     80{{{ 
    38581 * Item 1 
    38682   * Item 1.1 
     
    39086   * Item 1.2 
    39187 * Item 2 
    392 - items can start at the beginning of a line 
    393   and they can span multiple lines 
    394   - be careful though to continue the line  
    395   with the appropriate indentation, otherwise 
    396 that will start a new paragraph... 
    39788 
    39889 1. Item 1 
     
    40293      i. Item 1.b.ii 
    40394 1. Item 2 
    404 And numbered lists can also be restarted with an explicit number: 
     95And numbered lists can also be given an explicit number: 
    40596 3. Item 3 
    40697}}} 
    40798 
     99Display: 
     100 * Item 1 
     101   * Item 1.1 
     102      * Item 1.1.1 
     103      * Item 1.1.2 
     104      * Item 1.1.3 
     105   * Item 1.2 
     106 * Item 2 
     107 
     108 1. Item 1 
     109   a. Item 1.a 
     110   a. Item 1.b 
     111      i. Item 1.b.i 
     112      i. Item 1.b.ii 
     113 1. Item 2 
     114And numbered lists can also be given an explicit number: 
     115 3. Item 3 
     116 
     117Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph. 
     118 
    408119 
    409120== Definition Lists == 
    410121 
     122 
    411123The wiki also supports definition lists. 
    412124 
    413 ||= Wiki Markup =||= Display =|| 
    414 {{{#!td 
    415   {{{ 
    416    llama:: 
    417      some kind of mammal, with hair 
    418    ppython:: 
    419      some kind of reptile, without hair 
    420      (can you spot the typo?) 
    421   }}} 
    422 }}} 
    423 {{{#!td 
     125Example: 
     126{{{ 
    424127 llama:: 
    425128   some kind of mammal, with hair 
     
    429132}}} 
    430133 
     134Display: 
     135 llama:: 
     136   some kind of mammal, with hair 
     137 ppython:: 
     138   some kind of reptile, without hair 
     139   (can you spot the typo?) 
     140 
    431141Note that you need a space in front of the defined term. 
    432142 
     
    436146Block 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. 
    437147   
    438 ||= Wiki Markup =||= Display =|| 
    439 {{{#!td 
    440   {{{ 
    441   {{{ 
     148Example: 
     149{{{ 
     150 {{{ 
    442151  def HelloWorld(): 
    443       print '''Hello World''' 
    444   }}} 
    445   }}} 
    446 }}} 
    447 {{{#!td 
    448   {{{ 
    449   def HelloWorld(): 
    450       print '''Hello World''' 
    451   }}} 
    452 }}} 
    453  
    454 Note that this kind of block is also used for selecting lines that should be processed through WikiProcessors. 
     152      print "Hello World" 
     153 }}} 
     154}}} 
     155 
     156Display: 
     157{{{ 
     158 def HelloWorld(): 
     159     print "Hello World" 
     160}}} 
     161 
    455162 
    456163== Blockquotes == 
     
    458165In order to mark a paragraph as blockquote, indent that paragraph with two spaces. 
    459166 
    460 ||= Wiki Markup =||= Display =|| 
    461 {{{#!td 
    462 {{{ 
    463 Paragraph 
     167Example: 
     168{{{ 
    464169  This text is a quote from someone else. 
    465170}}} 
    466 }}} 
    467 {{{#!td 
    468 Paragraph 
     171 
     172Display: 
    469173  This text is a quote from someone else. 
    470 }}} 
    471174 
    472175== Discussion Citations == 
     
    474177To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used.   
    475178 
    476 ||= Wiki Markup =||= Display =|| 
    477 {{{#!td 
    478   {{{ 
    479   >> Someone's original text 
    480   > Someone else's reply text 
    481   >  - which can be any kind of Wiki markup 
    482   My reply text 
    483   }}} 
    484 }}} 
    485 {{{#!td 
     179Example: 
     180{{{ 
    486181>> Someone's original text 
    487182> Someone else's reply text 
    488 >  - which can be any kind of Wiki markup 
    489183My reply text 
    490184}}} 
    491185 
     186Display: 
     187>> Someone's original text 
     188> Someone else's reply text 
     189My reply text 
     190 
     191''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.'' 
    492192 
    493193== Tables == 
    494 === Simple Tables === 
     194 
    495195Simple tables can be created like this: 
    496 ||= Wiki Markup =||= Display =|| 
    497 {{{#!td 
    498   {{{ 
    499   ||Cell 1||Cell 2||Cell 3|| 
    500   ||Cell 4||Cell 5||Cell 6|| 
    501   }}} 
    502 }}} 
    503 {{{#!td style="padding: 2em;" 
     196{{{ 
    504197||Cell 1||Cell 2||Cell 3|| 
    505198||Cell 4||Cell 5||Cell 6|| 
    506199}}} 
    507200 
    508 Cell headings can be specified by wrapping the content in a pair of '=' characters. 
    509 Note that the '=' characters have to stick to the cell separators, like this: 
    510 ||= Wiki Markup =||= Display =|| 
    511 {{{#!td 
    512   {{{ 
    513   ||        ||= stable =||= latest =|| 
    514   ||= 0.10 =||  0.10.5  || 0.10.6dev|| 
    515   ||= 0.11 =||  0.11.6  || 0.11.7dev|| 
    516   }}} 
    517 }}} 
    518 {{{#!td style="padding: 2em;" 
    519 ||        ||= stable =||= latest =|| 
    520 ||= 0.10 =||  0.10.5  || 0.10.6dev|| 
    521 ||= 0.11 =||  0.11.6  || 0.11.7dev|| 
    522 }}} 
    523  
    524 Finally, specifying an empty cell means that the next non empty cell will span the empty cells. For example: 
    525 ||= Wiki Markup =||= Display =|| 
    526 {{{#!td 
    527   {{{ 
    528   || 1 || 2 || 3 || 
    529   |||| 1-2 || 3 || 
    530   || 1 |||| 2-3 || 
    531   |||||| 1-2-3 || 
    532   }}} 
    533 }}} 
    534 {{{#!td style="padding: 2em;" 
    535 || 1 || 2 || 3 || 
    536 |||| 1-2 || 3 || 
    537 || 1 |||| 2-3 || 
    538 |||||| 1-2-3 || 
    539 }}} 
    540  
    541 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: 
    542 ||= Wiki Markup =||= Display =|| 
    543 {{{#!td 
    544   {{{ 
    545   ||=Text =||= Numbers =|| 
    546   ||left align    ||        1.0|| 
    547   ||  center      ||        4.5|| 
    548   ||      right align||     4.5|| 
    549   || default alignment ||   2.5|| 
    550   ||default||         2.5|| 
    551   ||  default ||      2.5|| 
    552   || default ||       2.5|| 
    553   }}} 
    554 }}} 
    555 {{{#!td style="padding: 2em;" 
    556 ||=Text =||= Numbers =|| 
    557 ||left align    ||        1.0|| 
    558 ||  center      ||        4.5|| 
    559 ||      right align||     4.5|| 
    560 || default alignment ||   2.5|| 
    561 ||default||         2.5|| 
    562 ||  default ||      2.5|| 
    563 || default ||       2.5|| 
    564 }}} 
    565  
    566 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. 
    567  
    568 ||= Wiki Markup =|| 
    569 {{{#!td 
    570   {{{ 
    571   || this is column 1 [http://trac.edgewall.org/newticket new ticket] || \ 
    572   || this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \ 
    573   || that's column 3 and last one || 
    574   }}} 
    575 }}} 
    576 |------------- 
    577 ||= Display =|| 
    578 {{{#!td style="padding: 2em;" 
    579 || this is column 1 [http://trac.edgewall.org/newticket new ticket] || \ 
    580 || this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \ 
    581 || that's column 3 and last one || 
    582 }}} 
    583  
    584 === Complex Tables === 
    585  
    586 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]. 
     201Display: 
     202||Cell 1||Cell 2||Cell 3|| 
     203||Cell 4||Cell 5||Cell 6|| 
     204 
     205Note that more complex tables can be created using 
     206[wiki:WikiRestructuredText#BiggerReSTExample reStructuredText]. 
    587207 
    588208 
     
    591211Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}. 
    592212 
    593 ||= Wiki Markup =||= Display =|| 
    594 {{{#!td 
    595   {{{ 
    596   TitleIndex, http://www.edgewall.com/, !NotAlink 
    597   }}} 
    598 }}} 
    599 {{{#!td 
    600 TitleIndex, http://www.edgewall.com/, !NotAlink 
    601 }}} 
    602  
    603 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.  
    604 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. 
    605  
    606 ||= Wiki Markup =||= Display =|| 
    607 {{{#!td 
    608   {{{ 
    609    * [http://www.edgewall.com Edgewall Software] 
    610    * [wiki:TitleIndex Title Index]  
    611    * [wiki:TitleIndex]  
    612    * [wiki:ISO9000] 
    613   }}} 
    614 }}} 
    615 {{{#!td 
    616    * [http://www.edgewall.com Edgewall Software] 
    617    * [wiki:TitleIndex Title Index]  
    618    * [wiki:TitleIndex]  
    619    * [wiki:ISO9000] 
    620 }}} 
    621  
    622 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.  
    623  
    624 {{{#!td 
    625   {{{ 
    626    * [[http://www.edgewall.com|Edgewall Software]] 
    627    * [[wiki:TitleIndex|Title Index]] 
    628      or even [[TitleIndex|Title Index]] 
    629    * [[wiki:TitleIndex]] 
    630      ''' but not ![[TitleIndex]]! ''' 
    631    * [[ISO9000]] 
    632   }}} 
    633 }}} 
    634 {{{#!td 
    635    * [[http://www.edgewall.com|Edgewall Software]] 
    636    * [[wiki:TitleIndex|Title Index]] 
    637      or even [[TitleIndex|Title Index]] 
    638    * [[wiki:TitleIndex]] 
    639      ''' but not ![[TitleIndex]]! ''' 
    640    * [[ISO9000]] 
    641 }}} 
    642  
    643 '''Note''': the [trac:WikiCreole] style for links is quick to type and 
    644 certainly looks familiar as it's the one used on Wikipedia and in many 
    645 other wikis. Unfortunately it conflicts with the syntax for [#Macros macros]. 
    646 So in the rare case when you need to refer to a page which is named after 
    647 a macro (typical examples being TitleIndex, InterTrac and InterWiki),  
    648 by writing `[[TitleIndex]]` you will actually call the macro instead of linking 
    649 to the page. 
     213Example: 
     214{{{ 
     215 TitleIndex, http://www.edgewall.com/, !NotAlink 
     216}}} 
     217 
     218Display: 
     219 TitleIndex, http://www.edgewall.com/, !NotAlink 
     220 
     221Links 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. 
     222 
     223Example: 
     224{{{ 
     225 * [http://www.edgewall.com/ Edgewall Software] 
     226 * [wiki:TitleIndex Title Index] 
     227 * [wiki:ISO9000] 
     228}}} 
     229 
     230Display: 
     231 * [http://www.edgewall.com/ Edgewall Software] 
     232 * [wiki:TitleIndex Title Index] 
     233 * [wiki:ISO9000] 
    650234 
    651235== Trac Links == 
    652236 
    653237Wiki 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: 
    654  
    655 ||= Wiki Markup =||= Display =|| 
    656 {{{#!td 
    657   {{{ 
    658    * Tickets: #1 or ticket:1 
    659    * Reports: {1} or report:1 
    660    * Changesets: r1, [1] or changeset:1 
    661    * ... 
    662    * targeting other Trac instances,  
    663      so called InterTrac links: 
    664      - Tickets: #Trac1 or Trac:ticket:1 
    665      - Changesets: [Trac1] or Trac:changeset:1 
    666   }}} 
    667 }}} 
    668 {{{#!td 
     238{{{ 
     239 * Tickets: #1 or ticket:1 
     240 * Reports: {1} or report:1 
     241 * Changesets: r1, [1] or changeset:1 
     242 * ... 
     243}}} 
     244 
     245Display: 
    669246 * Tickets: #1 or ticket:1 
    670247 * Reports: {1} or report:1 
    671248 * Changesets: r1, [1] or changeset:1 
    672249 * ...  
    673  * targeting other Trac instances,  
    674    so called InterTrac links: 
    675    - Tickets: #Trac1 or Trac:ticket:1 
    676    - Changesets: [Trac1] or Trac:changeset:1 
    677 }}} 
    678  
    679 There are many more flavors of Trac links, see TracLinks for more in-depth information and a reference for all the default link resolvers. 
    680  
    681  
    682 == Setting Anchors == 
    683  
    684 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: 
    685  
    686 {{{ 
    687 [=#point1] 
    688 }}} 
    689  
    690 This syntax was chosen to match the format for explicitly naming the header id [#Headings documented above]. For example: 
    691 {{{ 
    692 == Long title == #title 
    693 }}} 
    694  
    695 It's also very close to the syntax for the corresponding link to that anchor: 
    696 {{{ 
    697 [#point1] 
    698 }}} 
    699  
    700 Optionally, a label can be given to the anchor: 
    701 {{{ 
    702 [[=#point1 '''Point 1''']] 
    703 }}} 
    704  
    705 ||= Wiki Markup =||= Display =|| 
    706 |---------------------------------- 
    707 {{{#!td 
    708   {{{ 
    709   [#point2 jump to the second point] 
    710  
    711   ... 
    712  
    713   Point2:  [=#point2] Jump here 
    714   }}} 
    715 }}} 
    716 {{{#!td 
    717   [#point2 jump to the second point] 
    718  
    719   ... 
    720  
    721   Point2:  [=#point2] Jump here 
    722 }}} 
    723  
    724 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)^)]]`. 
    725  
    726  
    727 == Escaping Links, WikiPageNames and other Markup == #Escaping 
     250 
     251There are many more flavors of Trac links, see TracLinks for more in-depth information. 
     252 
     253 
     254== Escaping Links and WikiPageNames == 
    728255 
    729256You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark). 
    730257 
    731 ||= Wiki Markup =||= Display =|| 
    732 {{{#!td 
    733   {{{ 
    734    !NoHyperLink 
    735    !#42 is not a link 
    736   }}} 
    737   {{{ 
    738 Various forms of escaping for list markup: 
    739  `-` escaped minus sign \\ 
    740  ``1. escaped number  \\ 
    741  {{{*}}} escaped asterisk sign 
    742   }}} 
    743 }}} 
    744 {{{#!td 
     258Example: 
     259{{{ 
    745260 !NoHyperLink 
    746261 !#42 is not a link 
    747  
    748 Various forms of escaping for list markup: 
    749  `-` escaped minus sign \\ 
    750  ``1. escaped number  \\ 
    751  {{{*}}} escaped asterisk sign 
    752 }}} 
     262}}} 
     263 
     264Display: 
     265 !NoHyperLink 
     266 !#42 is not a link 
     267 
    753268 
    754269== Images == 
     
    761276 * `[[Image(wiki:WikiFormatting:picture.gif)]]` (referring to attachment on another page) 
    762277 * `[[Image(ticket:1:picture.gif)]]` (file attached to a ticket) 
    763  * `[[Image(htdocs:picture.gif)]]` (referring to a file inside the [TracEnvironment environment] `htdocs` directory) 
     278 * `[[Image(htdocs:picture.gif)]]` (referring to a file inside project htdocs) 
    764279 * `[[Image(source:/trunk/trac/htdocs/trac_logo_mini.png)]]` (a file in repository) 
    765280 
    766 ||= Wiki Markup =||= Display =|| 
    767 {{{#!td 
    768   {{{ 
    769   [[Image(htdocs:../common/trac_logo_mini.png)]] 
    770   }}} 
    771 }}} 
    772 {{{#!td 
    773 [[Image(htdocs:../common/trac_logo_mini.png)]] 
    774 }}} 
    775  
    776 See WikiMacros for further documentation on the `[[Image()]]` macro, which has several useful options (`title=`, `link=`, etc.) 
     281Example display: [[Image(htdocs:../common/trac_logo_mini.png)]] 
     282 
     283 
     284See WikiMacros for further documentation on the `[[Image()]]` macro. 
    777285 
    778286 
     
    781289Macros are ''custom functions'' to insert dynamic content in a page. 
    782290 
    783 ||= Wiki Markup =||= Display =|| 
    784 {{{#!td 
    785   {{{ 
    786   [[RecentChanges(Trac,3)]] 
    787   }}} 
    788 }}} 
    789 {{{#!td style="padding-left: 2em" 
    790 [[RecentChanges(Trac,3)]] 
    791 }}} 
     291Example: 
     292{{{ 
     293 [[RecentChanges(Trac,3)]] 
     294}}} 
     295 
     296Display: 
     297 [[RecentChanges(Trac,3)]] 
    792298 
    793299See WikiMacros for more information, and a list of installed macros. 
    794  
    795 The detailed help for a specific macro can also be obtained more directly by appending a "?" to the macro name. 
    796  
    797 ||= Wiki Markup =||= Display =|| 
    798 {{{#!td 
    799   {{{ 
    800   [[MacroList?]] 
    801   }}} 
    802 }}} 
    803 {{{#!td style="padding-left: 2em" 
    804 [[MacroList?]] 
    805 }}} 
    806300 
    807301 
     
    811305[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].  
    812306 
    813 ||= Wiki Markup =||= Display =|| 
    814 |-------------------------------------------------------- 
    815 {{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%" 
    816  
    817    [=#Processors-example-html Example 1:] HTML 
    818  
    819 }}} 
    820 |-------------------------------------------------------- 
    821 {{{#!td style="border: 0px" 
    822   {{{ 
    823   {{{ 
    824   #!html 
    825   <h1 style="text-align: right; color: blue"> 
    826    HTML Test 
    827   </h1> 
    828   }}} 
    829   }}} 
    830 }}} 
    831 {{{#!td valign="top"  style="border: 0px" 
    832  
     307Example 1: 
     308{{{ 
     309#!html 
     310<pre class="wiki">{{{ 
     311#!html 
     312&lt;h1 style="text-align: right; color: blue"&gt;HTML Test&lt;/h1&gt; 
     313}}}</pre> 
     314}}} 
     315 
     316Display: 
    833317{{{ 
    834318#!html 
     
    836320}}} 
    837321 
    838 }}} 
    839 |-------------------------------------------------------- 
    840 {{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%" 
    841  
    842    [=#Processors-example-highlight Example 2:] Code Highlighting 
    843  
    844 }}} 
    845 |-------------------------------------------------------- 
    846 {{{#!td style="border: 0px" 
    847   {{{ 
    848   {{{ 
    849   #!python 
    850   class Test: 
    851    
    852       def __init__(self): 
    853           print "Hello World" 
    854   if __name__ == '__main__': 
    855      Test() 
    856   }}} 
    857   }}} 
    858 }}} 
    859 {{{ 
    860 #!td valign="top"  style="border: 0px" 
    861  
     322Example: 
     323{{{ 
     324#!html 
     325<pre class="wiki">{{{ 
     326#!python 
     327class Test: 
     328 
     329    def __init__(self): 
     330        print "Hello World" 
     331if __name__ == '__main__': 
     332   Test() 
     333}}}</pre> 
     334}}} 
     335 
     336Display: 
    862337{{{ 
    863338#!python 
     
    869344}}} 
    870345 
    871 }}} 
    872 |-------------------------------------------------------- 
    873 {{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%" 
    874  
    875        [=#Processors-example-tables Example 3:] Complex Tables 
    876  
    877 }}} 
    878 |-------------------------------------------------------- 
    879 {{{#!td style="border: 0px" 
    880   {{{ 
    881   {{{#!th rowspan=4 align=justify 
    882   With the `#td` and `#th` processors, 
    883   table cells can contain any content: 
    884   }}} 
    885   |---------------- 
    886   {{{#!td 
    887     - lists 
    888     - embedded tables 
    889     - simple multiline content 
    890   }}} 
    891   |---------------- 
    892   {{{#!td 
    893   As processors can be easily nested,  
    894   so can be tables: 
    895     {{{#!th 
    896     Example: 
    897     }}} 
    898     {{{#!td style="background: #eef" 
    899     || must be at the third level now... || 
    900     }}} 
    901   }}} 
    902   |---------------- 
    903   {{{#!td 
    904   Even when you don't have complex markup, 
    905   this form of table cells can be convenient 
    906   to write content on multiple lines. 
    907   }}} 
    908   }}} 
    909 }}} 
    910 {{{ 
    911 #!td  valign="top"  style="border: 0px" 
    912  
    913   {{{#!th rowspan=4 align=justify 
    914   With the `#td` and `#th` processors, 
    915   table cells can contain any content: 
    916   }}} 
    917   |---------------- 
    918   {{{#!td 
    919     - lists 
    920     - embedded tables 
    921     - simple multiline content 
    922   }}} 
    923   |---------------- 
    924   {{{#!td 
    925   As processors can be easily nested,  
    926   so can be tables: 
    927     {{{#!th 
    928     Example: 
    929     }}} 
    930     {{{#!td style="background: #eef" 
    931     || must be at the third level now... || 
    932     }}} 
    933   }}} 
    934   |---------------- 
    935   {{{#!td 
    936   Even when you don't have complex markup, 
    937   this form of table cells can be convenient 
    938   to write content on multiple lines. 
    939   }}} 
    940  
     346Perl: 
     347{{{ 
     348#!perl 
     349my ($test) = 0; 
     350if ($test > 0) { 
     351    print "hello"; 
     352} 
    941353}}} 
    942354 
     
    947359 
    948360Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text. 
    949  
    950 ||= Wiki Markup =||= Display =|| 
    951 {{{#!td 
    952   {{{ 
    953   Nothing to 
    954   {{{ 
    955   #!comment 
    956   Your comment for editors here 
    957   }}} 
    958   see ;-) 
    959   }}} 
    960 }}} 
    961 {{{#!td 
    962   Nothing to 
    963   {{{ 
    964   #!comment 
    965   Your comment for editors here 
    966   }}} 
    967   see ;-) 
    968 }}} 
     361{{{ 
     362{{{ 
     363#!comment 
     364Your comment here 
     365}}} 
     366}}} 
     367 
    969368 
    970369== Miscellaneous == 
    971370 
    972 An horizontal line can be used to separated different parts of your page: 
    973  
    974 ||= Wiki Markup =||= Display =|| 
    975 {{{#!td 
    976   {{{ 
    977   Four or more dashes will be replaced  
    978   by an horizontal line (<HR>) 
    979   ---- 
    980   See? 
    981   }}} 
    982 }}} 
    983 {{{#!td 
    984 Four or more dashes will be replaced 
    985 by an horizontal line (<HR>) 
     371Four or more dashes will be replaced by a horizontal line (<HR>) 
     372 
     373Example: 
     374{{{ 
     375 ---- 
     376}}} 
     377 
     378Display: 
    986379---- 
    987 See? 
    988 }}} 
    989 |---------------------------------- 
    990 {{{#!td 
    991   {{{ 
    992   "macro" style [[br]] line break 
    993   }}} 
    994 }}} 
    995 {{{#!td 
    996 "macro" style [[br]] line break 
    997 }}} 
    998 |---------------------------------- 
    999 {{{#!td 
    1000   {{{ 
    1001   !WikiCreole style \\ line\\break 
    1002   }}} 
    1003 }}} 
    1004 {{{#!td 
    1005 !WikiCreole style \\ line\\break 
    1006 }}} 
    1007  
     380 
     381 
     382 
     383---- 
     384See also: TracLinks, TracGuide, WikiHtml, WikiMacros, WikiProcessors, TracSyntaxColoring.