Changes between Version 4 and Version 5 of WikiFormatting


Ignore:
Timestamp:
Apr 6, 2012, 4:33:19 PM (12 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v4 v5  
    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{{{
     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
     66First paragraph
     67on multiple lines.
     68
     69Second 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"
     292Line [[br]] break
     293Line \\ break
     294----
     295}}}
    11296
    12297
     
    14299
    15300The Trac wiki supports the following font styles:
    16 {{{
    17  * '''bold''', '''!''' can be bold too''', and '''! '''
     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   * {{{
     313monospace
     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 ! ''',
    18331 * ''italic''
    19  * '''''bold italic'''''
     332 * '''''bold italic''''' or ''italic and
     333   ''' italic bold ''' ''
    20334 * __underline__
    21335 * {{{
    22336monospace
    23337}}} or `monospace`
     338   (hence `{{{
     339` or {{{`
     340}}} quoting)
    24341 * ~~strike-through~~
    25342 * ^superscript^
    26343 * ,,subscript,,
    27 }}}
    28 
    29 Display:
    30  * '''bold''', '''!''' can be bold too''', and '''! '''
    31  * ''italic''
    32  * '''''bold italic'''''
    33  * __underline__
    34  * {{{
    35 monospace
    36 }}} or `monospace`
    37  * ~~strike-through~~
    38  * ^superscript^
    39  * ,,subscript,,
     344 * **also bold**, //italic as well//,
     345   and **'' bold italic **'' //(since 0.12)//
     346}}}
    40347
    41348Notes:
     
    48355!
    49356}}} 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
    50361
    51362== Headings ==
    52363
    53 You can create heading by starting a line with one up to five ''equal'' characters ("=")
    54 followed by a single space and the headline text. The line should end with a space
    55 followed by the same number of ''='' characters.
    56 The heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
     364You can create heading by starting a line with one up to six ''equal'' characters ("=")
     365followed 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
     369Finally, 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}}}
     393
     394== Paragraphs ==
     395
     396A new text paragraph is created whenever two blocks of text are separated by one or more empty lines.
     397
     398A 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}}}
     425
     426== Lists ==
     427
     428The wiki supports both ordered/numbered and unordered lists.
    57429
    58430Example:
    59 {{{
    60 = Heading =
    61 == Subheading ==
    62 === About ''this'' ===
    63 === Explicit id === #using-explicit-id-in-heading
    64 }}}
    65 
    66 Display:
    67 = Heading =
    68 == Subheading ==
    69 === About ''this'' ===
    70 === Explicit id === #using-explicit-id-in-heading
    71 
    72 == Paragraphs ==
    73 
    74 A new text paragraph is created whenever two blocks of text are separated by one or more empty lines.
    75 
    76 A forced line break can also be inserted, using:
    77 {{{
    78 Line 1[[BR]]Line 2
    79 }}}
    80 Display:
    81 
    82 Line 1[[BR]]Line 2
    83 
    84 
    85 == Lists ==
    86 
    87 The wiki supports both ordered/numbered and unordered lists.
    88 
    89 Example:
    90 {{{
     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
    91462 * Item 1
    92463   * Item 1.1
     
    96467   * Item 1.2
    97468 * 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
     473that will start a new paragraph...
    98474
    99475 1. Item 1
     
    103479      i. Item 1.b.ii
    104480 1. Item 2
    105 And numbered lists can also be given an explicit number:
     481And numbered lists can also be restarted with an explicit number:
    106482 3. Item 3
    107483}}}
    108484
    109 Display:
    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
    124 And numbered lists can also be given an explicit number:
    125  3. Item 3
    126 
    127 Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph.
    128 
    129485
    130486== Definition Lists ==
    131487
    132 
    133488The wiki also supports definition lists.
    134489
    135 Example:
    136 {{{
     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
    137504 llama::
    138505   some kind of mammal, with hair
     
    142509}}}
    143510
    144 Display:
    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 
    151511Note that you need a space in front of the defined term.
    152512
     
    156516Block 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.
    157517 
    158 Example:
    159 {{{
    160  {{{
     518||= Wiki Markup =||= Display =||
     519{{{
     520#!td
     521  {{{
     522  {{{
    161523  def HelloWorld():
    162       print "Hello World"
    163  
    164 }}}
    165 }}}
    166 
    167 Display:
    168 {{{
    169  def HelloWorld():
    170      print "Hello World"
    171 }}}
    172 
     524      print '''Hello World'''
     525 
     526}}}
     527 
     528}}}
     529}}}
     530{{{
     531#!td
     532  {{{
     533  def HelloWorld():
     534      print '''Hello World'''
     535 
     536}}}
     537}}}
     538
     539Note that this kind of block is also used for selecting lines that should be processed through WikiProcessors.
    173540
    174541== Blockquotes ==
     
    176543In order to mark a paragraph as blockquote, indent that paragraph with two spaces.
    177544
    178 Example:
    179 {{{
     545||= Wiki Markup =||= Display =||
     546{{{
     547#!td
     548{{{
     549Paragraph
    180550  This text is a quote from someone else.
    181551}}}
    182 
    183 Display:
     552}}}
     553{{{
     554#!td
     555Paragraph
    184556  This text is a quote from someone else.
     557}}}
    185558
    186559== Discussion Citations ==
     
    188561To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 
    189562
    190 Example:
    191 {{{
     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
    192576>> Someone's original text
    193577> Someone else's reply text
     578>  - which can be any kind of Wiki markup
    194579My reply text
    195580}}}
    196581
    197 Display:
    198 >> Someone's original text
    199 > Someone else's reply text
    200 My 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.''
    203582
    204583== Tables ==
    205 
     584=== Simple Tables ===
    206585Simple tables can be created like this:
    207 {{{
     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;"
    208597||Cell 1||Cell 2||Cell 3||
    209598||Cell 4||Cell 5||Cell 6||
    210599}}}
    211600
    212 Display:
    213 ||Cell 1||Cell 2||Cell 3||
    214 ||Cell 4||Cell 5||Cell 6||
    215 
    216 Note that more complex tables can be created using
    217 [wiki:WikiRestructuredText#BiggerReSTExample reStructuredText].
     601Cell headings can be specified by wrapping the content in a pair of '=' characters.
     602Note 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
     620Finally, 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
     640Note 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
     668If 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
     691If 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].
    218692
    219693
     
    224698}}}.
    225699
    226 Example:
    227 {{{
    228  TitleIndex, http://www.edgewall.com/, !NotAlink
    229 }}}
    230 
    231 Display:
    232  TitleIndex, http://www.edgewall.com/, !NotAlink
    233 
    234 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.
    235 
    236 Example:
    237 {{{
    238  * [http://www.edgewall.com/ Edgewall Software]
    239  * [wiki:TitleIndex Title Index]
    240  * [wiki:ISO9000]
    241 }}}
    242 
    243 Display:
    244  * [http://www.edgewall.com/ Edgewall Software]
    245  * [wiki:TitleIndex Title Index]
    246  * [wiki:ISO9000]
     700||= Wiki Markup =||= Display =||
     701{{{
     702#!td
     703  {{{
     704  TitleIndex, http://www.edgewall.com/, !NotAlink
     705 
     706}}}
     707}}}
     708{{{
     709#!td
     710TitleIndex, http://www.edgewall.com/, !NotAlink
     711}}}
     712
     713Links can be given a more descriptive title by writing the link followed by a space and a title and all this inside square brackets.
     714If 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
     735Following 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
     760certainly looks familiar as it's the one used on Wikipedia and in many
     761other wikis. Unfortunately it conflicts with the syntax for [#Macros macros].
     762So in the rare case when you need to refer to a page which is named after
     763a macro (typical examples being TitleIndex, InterTrac and InterWiki),
     764by writing `[[TitleIndex]]` you will actually call the macro instead of linking
     765to the page.
    247766
    248767== Trac Links ==
    249768
    250769Wiki 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:
    251 {{{
    252  * Tickets: #1 or ticket:1
    253  * Reports: {1} or report:1
    254  * Changesets: r1, [1] or changeset:1
    255  * ...
    256 }}}
    257 
    258 Display:
     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
    259788 * Tickets: #1 or ticket:1
    260789 * Reports: {1} or report:1
    261790 * Changesets: r1, [1] or changeset:1
    262791 * ...
    263 
    264 There are many more flavors of Trac links, see TracLinks for more in-depth information.
     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
     798There 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
     803An 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
     809This 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
     814It's also very close to the syntax for the corresponding link to that anchor:
     815{{{
     816[#point1]
     817}}}
     818
     819Optionally, 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
     846For 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)^)]]`.
    265847
    266848
     
    269851You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
    270852
    271 Example:
    272 {{{
     853||= Wiki Markup =||= Display =||
     854{{{
     855#!td
     856  {{{
     857   !NoHyperLink
     858   !#42 is not a link
     859 
     860}}}
     861}}}
     862{{{
     863#!td
    273864 !NoHyperLink
    274865 !#42 is not a link
    275866}}}
    276 
    277 Display:
    278  !NoHyperLink
    279  !#42 is not a link
    280 
    281867
    282868== Images ==
     
    292878 * `[[Image(source:/trunk/trac/htdocs/trac_logo_mini.png)]]` (a file in repository)
    293879
    294 Example display: [[Image(htdocs:../common/trac_logo_mini.png)]]
    295 
     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}}}
    296892
    297893See WikiMacros for further documentation on the `[[Image()]]` macro.
     
    302898Macros are ''custom functions'' to insert dynamic content in a page.
    303899
    304 Example:
    305 {{{
    306  [[RecentChanges(Trac,3)]]
    307 }}}
    308 
    309 Display:
    310  [[RecentChanges(Trac,3)]]
     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}}}
    311912
    312913See WikiMacros for more information, and a list of installed macros.
     914
     915The 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}}}
    313929
    314930
     
    318934[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].
    319935
    320 Example 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 
    329 Display:
     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
    330961{{{
    331962#!html
     
    333964}}}
    334965
    335 Example:
    336 {{{
    337 #!html
    338 <pre class="wiki">{{{
    339 #!python
    340 class Test:
    341 
    342     def __init__(self):
    343         print "Hello World"
    344 if __name__ == '__main__':
    345    Test()
    346 }}}</pre>
    347 }}}
    348 
    349 Display:
     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
    350994{{{
    351995#!python
     
    3571001}}}
    3581002
    359 Perl:
    360 {{{
    361 #!perl
    362 my ($test) = 0;
    363 if ($test > 0) {
    364     print "hello";
    365 }
     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
    3661100}}}
    3671101
     
    3721106
    3731107Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text.
    374 {{{
    375 {{{
    376 #!comment
    377 Your comment here
    378 }}}
    379 }}}
    380 
     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}}}
    3811133
    3821134== Miscellaneous ==
    3831135
    384 Four or more dashes will be replaced by a horizontal line (<HR>)
    385 
    386 Example:
    387 {{{
    388  ----
    389 }}}
    390 
    391 Display:
     1136An 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
     1151Four or more dashes will be replaced
     1152by an horizontal line (<HR>)
    3921153----
    393 
    394 
    395 
    396 ----
    397 See also: TracLinks, TracGuide, WikiHtml, WikiMacros, WikiProcessors, TracSyntaxColoring.
     1154See?
     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