Changes between Version 1 and Version 2 of WikiFormatting


Ignore:
Timestamp:
08/11/15 13:16:01 (9 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://moinmoin.wikiwikiweb.de/ MoinMoin].
    8 
    9 
    10 This page demonstrates the formatting syntax available anywhere WikiFormatting is allowed.
     7especially [http://moinmo.in/ MoinMoin] and [trac:WikiCreole].
     8
     9
     10This page will give you an in-depth explanation of the wiki markup available anywhere WikiFormatting is allowed.
     11
     12The ''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
     14A 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
     57First paragraph
     58on multiple lines.
     59
     60Second 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"
     240Line [[br]] break
     241Line \\ break
     242----
     243}}}
    11244
    12245
     
    14247
    15248The Trac wiki supports the following font styles:
    16 {{{
    17  * '''bold''', '''!''' can be bold too''', and '''! '''
     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   * [[span(style=color: #FF0000, a red text )]]
     267  }}}
     268}}}
     269{{{#!td
     270 * '''bold''',
     271   ''' triple quotes !'''
     272   can be bold too if prefixed by ! ''',
    18273 * ''italic''
    19  * '''''bold italic'''''
     274 * '''''bold italic''''' or ''italic and
     275   ''' italic bold ''' ''
    20276 * __underline__
    21277 * {{{monospace}}} or `monospace`
     278   (hence `{{{` or {{{`}}} quoting)
    22279 * ~~strike-through~~
    23280 * ^superscript^
    24281 * ,,subscript,,
    25 }}}
    26 
    27 Display:
    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,,
     282 * **also bold**, //italic as well//,
     283   and **'' bold italic **'' //(since 0.12)//
     284 * [[span(style=color: #FF0000, a red text )]]
     285}}}
    36286
    37287Notes:
    38288 * `{{{...}}}` 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.
    39289 * {{{ ! }}} 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.
     290 * all the font styles marks have to be used in opening/closing pairs,
     291   and they must nest properly (in particular, an `''` italic can't be paired
     292   with a `//` one, and `'''` can't be paired with `**`)
     293
    40294
    41295== Headings ==
    42296
    43 You can create heading by starting a line with one up to five ''equal'' characters ("=")
    44 followed by a single space and the headline text. The line should end with a space
    45 followed by the same number of ''='' characters.
    46 The heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
     297You can create heading by starting a line with one up to six ''equal'' characters ("=")
     298followed by a single space and the headline text.
     299
     300[=#hn]
     301The headline text can be followed by the same number of "=" characters, but this is no longer mandatory.
     302
     303Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
     304
     305||= Wiki Markup =||= Display =||
     306{{{#!td
     307  {{{
     308  = Heading =
     309  == Subheading
     310  === About ''this'' ===
     311  === Explicit id === #using-explicit-id-in-heading
     312  == Subheading #sub2
     313}}}
     314}}}
     315{{{#!td style="padding: 1em;"
     316  {{{
     317  #!div
     318  = Heading =
     319  == Subheading
     320  === About ''this'' ===
     321  === Explicit id === #using-explicit-id-in-heading
     322  == Subheading #sub2
     323  }}}
     324}}}
     325
     326== Paragraphs ==
     327
     328A new text paragraph is created whenever two blocks of text are separated by one or more empty lines.
     329
     330A forced line break can also be inserted, using:
     331||= Wiki Markup =||= Display =||
     332{{{#!td
     333  {{{
     334  Line 1[[BR]]Line 2
     335  }}}
     336  {{{
     337  Paragraph
     338  one
     339
     340  Paragraph
     341  two
     342  }}}
     343}}}
     344{{{#!td
     345  Line 1[[BR]]Line 2
     346
     347  Paragraph
     348  one
     349
     350  Paragraph
     351  two
     352}}}
     353
     354== Lists ==
     355
     356The wiki supports both ordered/numbered and unordered lists.
    47357
    48358Example:
    49 {{{
    50 = Heading =
    51 == Subheading ==
    52 === About ''this'' ===
    53 === Explicit id === #using-explicit-id-in-heading
    54 }}}
    55 
    56 Display:
    57 = Heading =
    58 == Subheading ==
    59 === About ''this'' ===
    60 === Explicit id === #using-explicit-id-in-heading
    61 
    62 == Paragraphs ==
    63 
    64 A new text paragraph is created whenever two blocks of text are separated by one or more empty lines.
    65 
    66 A forced line break can also be inserted, using:
    67 {{{
    68 Line 1[[BR]]Line 2
    69 }}}
    70 Display:
    71 
    72 Line 1[[BR]]Line 2
    73 
    74 
    75 == Lists ==
    76 
    77 The wiki supports both ordered/numbered and unordered lists.
    78 
    79 Example:
    80 {{{
     359||= Wiki Markup =||= Display =||
     360{{{#!td
     361  {{{
     362   * Item 1
     363     * Item 1.1
     364        * Item 1.1.1   
     365        * Item 1.1.2
     366        * Item 1.1.3
     367     * Item 1.2
     368   * Item 2
     369  - items can start at the beginning of a line
     370    and they can span multiple lines
     371    - be careful though to continue the line
     372    with the appropriate indentation, otherwise
     373  that will start a new paragraph...
     374 
     375   1. Item 1
     376     a. Item 1.a
     377     a. Item 1.b
     378        i. Item 1.b.i
     379        i. Item 1.b.ii
     380   1. Item 2
     381  And numbered lists can also be restarted
     382  with an explicit number:
     383   3. Item 3
     384  }}}
     385}}}
     386{{{#!td
    81387 * Item 1
    82388   * Item 1.1
     389      * Item 1.1.1   
     390      * Item 1.1.2
     391      * Item 1.1.3
     392   * Item 1.2
    83393 * Item 2
     394- items can start at the beginning of a line
     395  and they can span multiple lines
     396  - be careful though to continue the line
     397  with the appropriate indentation, otherwise
     398that will start a new paragraph...
    84399
    85400 1. Item 1
     
    89404      i. Item 1.b.ii
    90405 1. Item 2
    91 And numbered lists can also be given an explicit number:
     406And numbered lists can also be restarted with an explicit number:
    92407 3. Item 3
    93408}}}
    94409
    95 Display:
    96  * Item 1
    97    * Item 1.1
    98  * Item 2
    99 
    100  1. Item 1
    101    a. Item 1.a
    102    a. Item 1.b
    103       i. Item 1.b.i
    104       i. Item 1.b.ii
    105  1. Item 2
    106 And numbered lists can also be given an explicit number:
    107  3. Item 3
    108 
    109 Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph.
    110 
    111410
    112411== Definition Lists ==
    113412
    114 
    115413The wiki also supports definition lists.
    116414
    117 Example:
    118 {{{
     415||= Wiki Markup =||= Display =||
     416{{{#!td
     417  {{{
     418   llama::
     419     some kind of mammal, with hair
     420   ppython::
     421     some kind of reptile, without hair
     422     (can you spot the typo?)
     423  }}}
     424}}}
     425{{{#!td
    119426 llama::
    120427   some kind of mammal, with hair
     
    124431}}}
    125432
    126 Display:
    127  llama::
    128    some kind of mammal, with hair
    129  ppython::
    130    some kind of reptile, without hair
    131    (can you spot the typo?)
    132 
    133433Note that you need a space in front of the defined term.
    134434
     
    138438Block 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.
    139439 
    140 Example:
     440||= Wiki Markup =||= Display =||
     441{{{#!td
     442  {{{
     443  {{{
     444  def HelloWorld():
     445      print '''Hello World'''
     446  }}}
     447  }}}
     448}}}
     449{{{#!td
     450  {{{
     451  def HelloWorld():
     452      print '''Hello World'''
     453  }}}
     454}}}
     455
     456Note that this kind of block is also used for selecting lines that should be processed through WikiProcessors.
     457
     458== Blockquotes ==
     459
     460In order to mark a paragraph as blockquote, indent that paragraph with two spaces.
     461
     462||= Wiki Markup =||= Display =||
     463{{{#!td
    141464{{{
    142  {{{
    143   def HelloWorld():
    144       print "Hello World"
    145  }}}
    146 }}}
    147 
    148 Display:
    149 {{{
    150  def HelloWorld():
    151      print "Hello World"
    152 }}}
    153 
    154 
    155 == Blockquotes ==
    156 
    157 In order to mark a paragraph as blockquote, indent that paragraph with two spaces.
    158 
    159 Example:
    160 {{{
     465Paragraph
    161466  This text is a quote from someone else.
    162467}}}
    163 
    164 Display:
     468}}}
     469{{{#!td
     470Paragraph
    165471  This text is a quote from someone else.
     472}}}
    166473
    167474== Discussion Citations ==
     
    169476To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 
    170477
    171 Example:
    172 {{{
     478||= Wiki Markup =||= Display =||
     479{{{#!td
     480  {{{
     481  >> Someone's original text
     482  > Someone else's reply text
     483  >  - which can be any kind of Wiki markup
     484  My reply text
     485  }}}
     486}}}
     487{{{#!td
    173488>> Someone's original text
    174489> Someone else's reply text
     490>  - which can be any kind of Wiki markup
    175491My reply text
    176492}}}
    177493
    178 Display:
    179 >> Someone's original text
    180 > Someone else's reply text
    181 My reply text
    182 
    183 ''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.''
    184494
    185495== Tables ==
    186 
     496=== Simple Tables ===
    187497Simple tables can be created like this:
    188 {{{
     498||= Wiki Markup =||= Display =||
     499{{{#!td
     500  {{{
     501  ||Cell 1||Cell 2||Cell 3||
     502  ||Cell 4||Cell 5||Cell 6||
     503  }}}
     504}}}
     505{{{#!td style="padding: 2em;"
    189506||Cell 1||Cell 2||Cell 3||
    190507||Cell 4||Cell 5||Cell 6||
    191508}}}
    192509
    193 Display:
    194 ||Cell 1||Cell 2||Cell 3||
    195 ||Cell 4||Cell 5||Cell 6||
    196 
    197 Note that more complex tables can be created using
    198 [wiki:WikiRestructuredText#BiggerReSTExample reStructuredText].
     510Cell headings can be specified by wrapping the content in a pair of '=' characters.
     511Note that the '=' characters have to stick to the cell separators, like this:
     512||= Wiki Markup =||= Display =||
     513{{{#!td
     514  {{{
     515  ||        ||= stable =||= latest =||
     516  ||= 0.10 =||  0.10.5  || 0.10.6dev||
     517  ||= 0.11 =||  0.11.6  || 0.11.7dev||
     518  }}}
     519}}}
     520{{{#!td style="padding: 2em;"
     521||        ||= stable =||= latest =||
     522||= 0.10 =||  0.10.5  || 0.10.6dev||
     523||= 0.11 =||  0.11.6  || 0.11.7dev||
     524}}}
     525
     526Finally, specifying an empty cell means that the next non empty cell will span the empty cells. For example:
     527||= Wiki Markup =||= Display =||
     528{{{#!td
     529  {{{
     530  || 1 || 2 || 3 ||
     531  |||| 1-2 || 3 ||
     532  || 1 |||| 2-3 ||
     533  |||||| 1-2-3 ||
     534  }}}
     535}}}
     536{{{#!td style="padding: 2em;"
     537|| 1 || 2 || 3 ||
     538|||| 1-2 || 3 ||
     539|| 1 |||| 2-3 ||
     540|||||| 1-2-3 ||
     541}}}
     542
     543Note 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:
     544||= Wiki Markup =||= Display =||
     545{{{#!td
     546  {{{
     547  ||=Text =||= Numbers =||
     548  ||left align    ||        1.0||
     549  ||  center      ||        4.5||
     550  ||      right align||     4.5||
     551  || default alignment ||   2.5||
     552  ||default||         2.5||
     553  ||  default ||      2.5||
     554  || default ||       2.5||
     555  }}}
     556}}}
     557{{{#!td style="padding: 2em;"
     558||=Text =||= Numbers =||
     559||left align    ||        1.0||
     560||  center      ||        4.5||
     561||      right align||     4.5||
     562|| default alignment ||   2.5||
     563||default||         2.5||
     564||  default ||      2.5||
     565|| default ||       2.5||
     566}}}
     567
     568If 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.
     569
     570||= Wiki Markup =||
     571{{{#!td
     572  {{{
     573  || this is column 1 [http://trac.edgewall.org/newticket new ticket] || \
     574  || this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \
     575  || that's column 3 and last one ||
     576  }}}
     577}}}
     578|-------------
     579||= Display =||
     580{{{#!td style="padding: 2em;"
     581|| this is column 1 [http://trac.edgewall.org/newticket new ticket] || \
     582|| this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \
     583|| that's column 3 and last one ||
     584}}}
     585
     586=== Complex Tables ===
     587
     588If 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].
    199589
    200590
     
    203593Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.
    204594
    205 Example:
    206 {{{
    207  TitleIndex, http://www.edgewall.com/, !NotAlink
    208 }}}
    209 
    210 Display:
    211  TitleIndex, http://www.edgewall.com/, !NotAlink
    212 
    213 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.  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.
    214 
    215 Example:
    216 {{{
    217  * [http://www.edgewall.com/ Edgewall Software]
    218  * [wiki:TitleIndex Title Index]
    219  * [wiki:ISO9000]
    220 }}}
    221 
    222 Display:
    223  * [http://www.edgewall.com/ Edgewall Software]
    224  * [wiki:TitleIndex Title Index]
    225  * [wiki:ISO9000]
    226 
    227 
    228 === Trac Links ===
     595||= Wiki Markup =||= Display =||
     596{{{#!td
     597  {{{
     598  TitleIndex, http://www.edgewall.com/, !NotAlink
     599  }}}
     600}}}
     601{{{#!td
     602TitleIndex, http://www.edgewall.com/, !NotAlink
     603}}}
     604
     605Links can be given a more descriptive title by writing the link followed by a space and a title and all this inside square brackets.
     606If 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.
     607
     608||= Wiki Markup =||= Display =||
     609{{{#!td
     610  {{{
     611   * [http://www.edgewall.com Edgewall Software]
     612   * [wiki:TitleIndex Title Index]
     613   * [wiki:TitleIndex]
     614   * [wiki:ISO9000]
     615  }}}
     616}}}
     617{{{#!td
     618   * [http://www.edgewall.com Edgewall Software]
     619   * [wiki:TitleIndex Title Index]
     620   * [wiki:TitleIndex]
     621   * [wiki:ISO9000]
     622}}}
     623
     624Following 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.
     625
     626{{{#!td
     627  {{{
     628   * [[http://www.edgewall.com|Edgewall Software]]
     629   * [[wiki:TitleIndex|Title Index]]
     630     or even [[TitleIndex|Title Index]]
     631   * [[wiki:TitleIndex]]
     632     ''' but not ![[TitleIndex]]! '''
     633   * [[ISO9000]]
     634  }}}
     635}}}
     636{{{#!td
     637   * [[http://www.edgewall.com|Edgewall Software]]
     638   * [[wiki:TitleIndex|Title Index]]
     639     or even [[TitleIndex|Title Index]]
     640   * [[wiki:TitleIndex]]
     641     ''' but not ![[TitleIndex]]! '''
     642   * [[ISO9000]]
     643}}}
     644
     645'''Note''': the [trac:WikiCreole] style for links is quick to type and
     646certainly looks familiar as it's the one used on Wikipedia and in many
     647other wikis. Unfortunately it conflicts with the syntax for [#Macros macros].
     648So in the rare case when you need to refer to a page which is named after
     649a macro (typical examples being TitleIndex, InterTrac and InterWiki),
     650by writing `[[TitleIndex]]` you will actually call the macro instead of linking
     651to the page.
     652
     653== Trac Links ==
    229654
    230655Wiki 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:
    231 {{{
    232  * Tickets: #1 or ticket:1
    233  * Reports: {1} or report:1
    234  * Changesets: r1, [1] or changeset:1
    235  * ...
    236 }}}
    237 
    238 Display:
     656
     657||= Wiki Markup =||= Display =||
     658{{{#!td
     659  {{{
     660   * Tickets: #1 or ticket:1
     661   * Reports: {1} or report:1
     662   * Changesets: r1, [1] or changeset:1
     663   * ...
     664   * targeting other Trac instances,
     665     so called InterTrac links:
     666     - Tickets: #Trac1 or Trac:ticket:1
     667     - Changesets: [Trac1] or Trac:changeset:1
     668  }}}
     669}}}
     670{{{#!td
    239671 * Tickets: #1 or ticket:1
    240672 * Reports: {1} or report:1
    241673 * Changesets: r1, [1] or changeset:1
    242674 * ...
    243 
    244 See TracLinks for more in-depth information.
    245 
    246 
    247 == Escaping Links and WikiPageNames ==
     675 * targeting other Trac instances,
     676   so called InterTrac links:
     677   - Tickets: #Trac1 or Trac:ticket:1
     678   - Changesets: [Trac1] or Trac:changeset:1
     679}}}
     680
     681There are many more flavors of Trac links, see TracLinks for more in-depth information and a reference for all the default link resolvers.
     682
     683
     684== Setting Anchors ==
     685
     686An 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:
     687
     688{{{
     689[=#point1]
     690}}}
     691
     692This syntax was chosen to match the format for explicitly naming the header id [#Headings documented above]. For example:
     693{{{
     694== Long title == #title
     695}}}
     696
     697It's also very close to the syntax for the corresponding link to that anchor:
     698{{{
     699[#point1]
     700}}}
     701
     702Optionally, a label can be given to the anchor:
     703{{{
     704[[=#point1 '''Point 1''']]
     705}}}
     706
     707||= Wiki Markup =||= Display =||
     708|----------------------------------
     709{{{#!td
     710  {{{
     711  [#point2 jump to the second point]
     712
     713  ...
     714
     715  Point2:  [=#point2] Jump here
     716  }}}
     717}}}
     718{{{#!td
     719  [#point2 jump to the second point]
     720
     721  ...
     722
     723  Point2:  [=#point2] Jump here
     724}}}
     725
     726For 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)^)]]`.
     727
     728
     729== Escaping Links, WikiPageNames and other Markup == #Escaping
    248730
    249731You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
    250732
    251 Example:
    252 {{{
     733||= Wiki Markup =||= Display =||
     734{{{#!td
     735  {{{
     736   !NoHyperLink
     737   !#42 is not a link
     738  }}}
     739  {{{
     740Various forms of escaping for list markup:
     741 ^^- escaped minus sign \\
     742 ^^1. escaped number  \\
     743 ^^* escaped asterisk sign
     744  }}}
     745}}}
     746{{{#!td
    253747 !NoHyperLink
    254748 !#42 is not a link
    255 }}}
    256 
    257 Display:
    258  !NoHyperLink
    259  !#42 is not a link
    260 
     749
     750Various forms of escaping for list markup:
     751 ^^- escaped minus sign \\
     752 ^^1. escaped number  \\
     753 ^^* escaped asterisk sign
     754}}}
    261755
    262756== Images ==
     
    264758Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags.
    265759
    266 You now have to use the ![[Image]] macro (see below).
     760You now have to use the ![[Image]] macro. The simplest way to include an image is to upload it as attachment to the current page, and put the filename in a macro call like `[[Image(picture.gif)]]`.
     761
     762In addition to the current page, it is possible to refer to other resources:
     763 * `[[Image(wiki:WikiFormatting:picture.gif)]]` (referring to attachment on another page)
     764 * `[[Image(ticket:1:picture.gif)]]` (file attached to a ticket)
     765 * `[[Image(htdocs:picture.gif)]]` (referring to a file inside the [TracEnvironment environment] `htdocs` directory)
     766 * `[[Image(source:/trunk/trac/htdocs/trac_logo_mini.png)]]` (a file in repository)
     767
     768||= Wiki Markup =||= Display =||
     769{{{#!td
     770  {{{
     771  [[Image(htdocs:../common/trac_logo_mini.png)]]
     772  }}}
     773}}}
     774{{{#!td
     775[[Image(htdocs:../common/trac_logo_mini.png)]]
     776}}}
     777
     778See WikiMacros for further documentation on the `[[Image()]]` macro, which has several useful options (`title=`, `link=`, etc.)
    267779
    268780
     
    271783Macros are ''custom functions'' to insert dynamic content in a page.
    272784
    273 Example:
    274 {{{
    275  [[Timestamp]]
    276 }}}
    277 
    278 Display:
    279  [[Timestamp]]
     785||= Wiki Markup =||= Display =||
     786{{{#!td
     787  {{{
     788  [[RecentChanges(Trac,3)]]
     789  }}}
     790}}}
     791{{{#!td style="padding-left: 2em"
     792[[RecentChanges(Trac,3)]]
     793}}}
    280794
    281795See WikiMacros for more information, and a list of installed macros.
     796
     797The detailed help for a specific macro can also be obtained more directly by appending a "?" to the macro name.
     798
     799||= Wiki Markup =||= Display =||
     800{{{#!td
     801  {{{
     802  [[MacroList?]]
     803  }}}
     804}}}
     805{{{#!td style="padding-left: 2em"
     806[[MacroList?]]
     807}}}
    282808
    283809
     
    287813[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].
    288814
    289 Example 1:
    290 {{{
    291 #!html
    292 <pre class="wiki">{{{
    293 #!html
    294 &lt;h1 style="text-align: right; color: blue"&gt;HTML Test&lt;/h1&gt;
    295 }}}</pre>
    296 }}}
    297 
    298 Display:
     815||= Wiki Markup =||= Display =||
     816|--------------------------------------------------------
     817{{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"
     818
     819   [=#Processors-example-html Example 1:] HTML
     820
     821}}}
     822|--------------------------------------------------------
     823{{{#!td style="border: 0px"
     824  {{{
     825  {{{
     826  #!html
     827  <h1 style="text-align: right; color: blue">
     828   HTML Test
     829  </h1>
     830  }}}
     831  }}}
     832}}}
     833{{{#!td valign="top"  style="border: 0px"
     834
    299835{{{
    300836#!html
     
    302838}}}
    303839
    304 Example:
     840}}}
     841|--------------------------------------------------------
     842{{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"
     843
     844   [=#Processors-example-highlight Example 2:] Code Highlighting
     845
     846}}}
     847|--------------------------------------------------------
     848{{{#!td style="border: 0px"
     849  {{{
     850  {{{
     851  #!python
     852  class Test:
     853 
     854      def __init__(self):
     855          print "Hello World"
     856  if __name__ == '__main__':
     857     Test()
     858  }}}
     859  }}}
     860}}}
    305861{{{
    306 #!html
    307 <pre class="wiki">{{{
    308 #!python
    309 class Test:
    310 
    311     def __init__(self):
    312         print "Hello World"
    313 if __name__ == '__main__':
    314    Test()
    315 }}}</pre>
    316 }}}
    317 
    318 Display:
     862#!td valign="top"  style="border: 0px"
     863
    319864{{{
    320865#!python
     
    326871}}}
    327872
    328 Perl:
     873}}}
     874|--------------------------------------------------------
     875{{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"
     876
     877       [=#Processors-example-tables Example 3:] Complex Tables
     878
     879}}}
     880|--------------------------------------------------------
     881{{{#!td style="border: 0px"
     882  {{{
     883  {{{#!th rowspan=4 align=justify
     884  With the `#td` and `#th` processors,
     885  table cells can contain any content:
     886  }}}
     887  |----------------
     888  {{{#!td
     889    - lists
     890    - embedded tables
     891    - simple multiline content
     892  }}}
     893  |----------------
     894  {{{#!td
     895  As processors can be easily nested,
     896  so can be tables:
     897    {{{#!th
     898    Example:
     899    }}}
     900    {{{#!td style="background: #eef"
     901    || must be at the third level now... ||
     902    }}}
     903  }}}
     904  |----------------
     905  {{{#!td
     906  Even when you don't have complex markup,
     907  this form of table cells can be convenient
     908  to write content on multiple lines.
     909  }}}
     910  }}}
     911}}}
    329912{{{
    330 #!perl
    331 my ($test) = 0;
    332 if ($test > 0) {
    333     print "hello";
    334 }
     913#!td  valign="top"  style="border: 0px"
     914
     915  {{{#!th rowspan=4 align=justify
     916  With the `#td` and `#th` processors,
     917  table cells can contain any content:
     918  }}}
     919  |----------------
     920  {{{#!td
     921    - lists
     922    - embedded tables
     923    - simple multiline content
     924  }}}
     925  |----------------
     926  {{{#!td
     927  As processors can be easily nested,
     928  so can be tables:
     929    {{{#!th
     930    Example:
     931    }}}
     932    {{{#!td style="background: #eef"
     933    || must be at the third level now... ||
     934    }}}
     935  }}}
     936  |----------------
     937  {{{#!td
     938  Even when you don't have complex markup,
     939  this form of table cells can be convenient
     940  to write content on multiple lines.
     941  }}}
     942
    335943}}}
    336944
     
    338946
    339947
     948== Comments ==
     949
     950Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text.
     951
     952||= Wiki Markup =||= Display =||
     953{{{#!td
     954  {{{
     955  Nothing to
     956  {{{
     957  #!comment
     958  Your comment for editors here
     959  }}}
     960  see ;-)
     961  }}}
     962}}}
     963{{{#!td
     964  Nothing to
     965  {{{
     966  #!comment
     967  Your comment for editors here
     968  }}}
     969  see ;-)
     970}}}
     971
    340972== Miscellaneous ==
    341973
    342 Four or more dashes will be replaced by a horizontal line (<HR>)
    343 
    344 Example:
    345 {{{
    346  ----
    347 }}}
    348 
    349 Display:
     974An horizontal line can be used to separated different parts of your page:
     975
     976||= Wiki Markup =||= Display =||
     977{{{#!td
     978  {{{
     979  Four or more dashes will be replaced
     980  by an horizontal line (<HR>)
     981  ----
     982  See?
     983  }}}
     984}}}
     985{{{#!td
     986Four or more dashes will be replaced
     987by an horizontal line (<HR>)
    350988----
    351 
    352 
    353 ----
    354 See also: TracLinks, TracGuide, WikiHtml, WikiMacros, WikiProcessors, TracSyntaxColoring.
     989See?
     990}}}
     991|----------------------------------
     992{{{#!td
     993  {{{
     994  "macro" style [[br]] line break
     995  }}}
     996}}}
     997{{{#!td
     998"macro" style [[br]] line break
     999}}}
     1000|----------------------------------
     1001{{{#!td
     1002  {{{
     1003  !WikiCreole style \\ line\\break
     1004  }}}
     1005}}}
     1006{{{#!td
     1007!WikiCreole style \\ line\\break
     1008}}}