Changes between Version 4 and Version 5 of WikiFormatting


Ignore:
Timestamp:
Apr 13, 2010, 3:53:03 AM (10 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://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 == Cheatsheet ==
    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 and ''nowiki''`}}} || \
    31 || `monospaced and nowiki` ||
    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 paragraphs
    68    1. nested list
    69      a. different numbering
    70         styles
    71  }}}
    72 }}}
    73 {{{#!td
    74 * bullets list
    75   on multiple paragraphs
    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 paragraphs
    88  }}}
    89 }}}
    90 {{{#!td
    91  term:: definition on
    92         multiple paragraphs
    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 [#EscapingLinksandWikiPageNames Escaping Markup]
    171 }}}
    172 || `!'' doubled quotes` ||\
    173 || !'' doubled quotes ||
    174 || `!wiki:WikiFormatting`, `!WikiFormatting` ||\
    175 || !wiki:WikiFormatting, !WikiFormatting ||
    176 |-----------------------------------------------------------
    177 ||= [#Images Images] =|| `[[Image(`''link''`)]]` || [[Image(htdocs:../common/trac_logo_mini.png)]] ||
    178 |-----------------------------------------------------------
    179 {{{#!th rowspan=2
    180 [#Macros Macros]
    181 }}}
    182 || `[[MacroList(*)]]` ||  ''(short list of all available macros)''  ||
    183 || `[[Image?]]` ||  ''(help for the Image macro)''  ||
    184 |-----------------------------------------------------------
    185 ||= [#Processors Processors] =||\
    186 {{{#!td
    187  {{{
    188  {{{
    189  #!div style="font-size: 80%"
    190  Code highlighting:
    191    {{{#!python
    192    hello = lambda: "world"
    193    }}}
    194  }}}
    195  }}}
    196 }}}
    197 {{{#!td style="padding-left: 2em"
    198  {{{
    199  #!div style="font-size: 80%"
    200  Code highlighting:
    201    {{{#!python
    202    hello = lambda: "world"
    203    }}}
    204  }}}
    205 }}}
    206 |-----------------------------------------------------------
    207 ||= [#Comments Comments] =||\
    208 {{{#!td
    209  {{{
    210  {{{#!comment
    211  Note to Editors: ...
    212  }}}
    213  }}}
    214 }}}
    215 {{{#!td style="padding-left: 2em"
    216  {{{#!comment
    217  Note to Editors: ...
    218  }}}
    219 }}}
    220 |-----------------------------------------------------------
    221 ||= [#Miscellaneous Miscellaneous] =||\
    222 {{{#!td
    223  {{{
    224  Line [[br]] break
    225  Line \\ break
    226  ----
    227  }}}
    228 }}}
    229 {{{#!td style="padding-left: 2em"
    230 Line [[br]] break
    231 Line \\ break
    232 ----
    233 }}}
     7especially [http://moinmoin.wikiwikiweb.de/ MoinMoin].
     8
     9
     10This page demonstrates the formatting syntax available anywhere WikiFormatting is allowed.
    23411
    23512
     
    23714
    23815The Trac wiki supports the following font styles:
    239 ||= Wiki Markup =||= Display =||
    240 {{{#!td
    241   {{{
    242    * '''bold''',
    243      ''' triple quotes !'''
    244      can be bold too if prefixed by ! ''',
    245    * ''italic''
    246    * '''''bold italic''''' or ''italic and
    247      ''' italic bold ''' ''
    248    * __underline__
    249    * {{{monospace}}} or `monospace`
    250      (hence `{{{` or {{{`}}} quoting)
    251    * ~~strike-through~~
    252    * ^superscript^
    253    * ,,subscript,,
    254    * **also bold**, //italic as well//,
    255      and **'' bold italic **'' //(since 0.12)//
    256   }}}
    257 }}}
    258 {{{#!td
    259  * '''bold''',
    260    ''' triple quotes !'''
    261    can be bold too if prefixed by ! ''',
     16{{{
     17 * '''bold''', '''!''' can be bold too''', and '''! '''
    26218 * ''italic''
    263  * '''''bold italic''''' or ''italic and
    264    ''' italic bold ''' ''
     19 * '''''bold italic'''''
    26520 * __underline__
    26621 * {{{monospace}}} or `monospace`
    267    (hence `{{{` or {{{`}}} quoting)
    26822 * ~~strike-through~~
    26923 * ^superscript^
    27024 * ,,subscript,,
    271  * **also bold**, //italic as well//,
    272    and **'' bold italic **'' //(since 0.12)//
    273 }}}
     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,,
    27436
    27537Notes:
    27638 * `{{{...}}}` 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.
    27739 * {{{ ! }}} 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.
    278  * all the font styles marks have to be used in opening/closing pairs,
    279    and they must nest properly (in particular, an `''` italic can't be paired
    280    with a `//` one, and `'''` can't be paired with `**`)
    281 
    28240
    28341== Headings ==
    28442
    285 You can create heading by starting a line with one up to six ''equal'' characters ("=")
    286 followed by a single space and the headline text.
    287 
    288 [=#hn] The headline text can be followed by the same number of "=" characters, but this is no longer mandatory.
    289 
    290 Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
    291 
    292 ||= Wiki Markup =||= Display =||
    293 {{{#!td
    294   {{{
    295   = Heading =
    296   == Subheading
    297   === About ''this'' ===
    298   === Explicit id === #using-explicit-id-in-heading
    299   == Subheading #sub2
    300 }}}
    301 }}}
    302 {{{#!td style="padding: 1em;"
    303   {{{
    304   #!div
    305   == Subheading
    306   === About ''this'' ===
    307   === Explicit id === #using-explicit-id-in-heading
    308   == Subheading #sub2
    309   }}}
    310 }}}
     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
    31161
    31262== Paragraphs ==
     
    31565
    31666A forced line break can also be inserted, using:
    317 ||= Wiki Markup =||= Display =||
    318 {{{#!td
    319   {{{
    320   Line 1[[BR]]Line 2
    321   }}}
    322   {{{
    323   Paragraph
    324   one
    325 
    326   Paragraph
    327   two
    328   }}}
    329 }}}
    330 {{{#!td
    331   Line 1[[BR]]Line 2
    332 
    333   Paragraph
    334   one
    335 
    336   Paragraph
    337   two
    338 }}}
     67{{{
     68Line 1[[BR]]Line 2
     69}}}
     70Display:
     71
     72Line 1[[BR]]Line 2
     73
    33974
    34075== Lists ==
     
    34378
    34479Example:
    345 ||= Wiki Markup =||= Display =||
    346 {{{#!td
    347   {{{
    348    * Item 1
    349      * Item 1.1
    350         * Item 1.1.1   
    351         * Item 1.1.2
    352         * Item 1.1.3
    353      * Item 1.2
    354    * Item 2
    355   - items can start at the beginning of a line
    356     and they can span multiple lines
    357     - be careful though to continue the line
    358     with the appropriate indentation, otherwise
    359   that will start a new paragraph...
    360  
    361    1. Item 1
    362      a. Item 1.a
    363      a. Item 1.b
    364         i. Item 1.b.i
    365         i. Item 1.b.ii
    366    1. Item 2
    367   And numbered lists can also be restarted
    368   with an explicit number:
    369    3. Item 3
    370   }}}
    371 }}}
    372 {{{#!td
     80{{{
    37381 * Item 1
    37482   * Item 1.1
     
    37886   * Item 1.2
    37987 * Item 2
    380 - items can start at the beginning of a line
    381   and they can span multiple lines
    382   - be careful though to continue the line
    383   with the appropriate indentation, otherwise
    384 that will start a new paragraph...
    38588
    38689 1. Item 1
     
    39093      i. Item 1.b.ii
    39194 1. Item 2
    392 And numbered lists can also be restarted with an explicit number:
     95And numbered lists can also be given an explicit number:
    39396 3. Item 3
    39497}}}
    39598
     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
    396119
    397120== Definition Lists ==
    398121
     122
    399123The wiki also supports definition lists.
    400124
    401 ||= Wiki Markup =||= Display =||
    402 {{{#!td
    403   {{{
    404    llama::
    405      some kind of mammal, with hair
    406    ppython::
    407      some kind of reptile, without hair
    408      (can you spot the typo?)
    409   }}}
    410 }}}
    411 {{{#!td
     125Example:
     126{{{
    412127 llama::
    413128   some kind of mammal, with hair
     
    417132}}}
    418133
     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
    419141Note that you need a space in front of the defined term.
    420142
     
    424146Block 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.
    425147 
    426 ||= Wiki Markup =||= Display =||
    427 {{{#!td
    428   {{{
    429   {{{
     148Example:
     149{{{
     150 {{{
    430151  def HelloWorld():
    431       print '''Hello World'''
    432   }}}
    433   }}}
    434 }}}
    435 {{{#!td
    436   {{{
    437   def HelloWorld():
    438       print '''Hello World'''
    439   }}}
    440 }}}
    441 
    442 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
    443162
    444163== Blockquotes ==
     
    446165In order to mark a paragraph as blockquote, indent that paragraph with two spaces.
    447166
    448 ||= Wiki Markup =||= Display =||
    449 {{{#!td
    450 {{{
    451 Paragraph
     167Example:
     168{{{
    452169  This text is a quote from someone else.
    453170}}}
    454 }}}
    455 {{{#!td
    456 Paragraph
     171
     172Display:
    457173  This text is a quote from someone else.
    458 }}}
    459174
    460175== Discussion Citations ==
     
    462177To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 
    463178
    464 ||= Wiki Markup =||= Display =||
    465 {{{#!td
    466   {{{
    467   >> Someone's original text
    468   > Someone else's reply text
    469   >  - which can be any kind of Wiki markup
    470   My reply text
    471   }}}
    472 }}}
    473 {{{#!td
     179Example:
     180{{{
    474181>> Someone's original text
    475182> Someone else's reply text
    476 >  - which can be any kind of Wiki markup
    477183My reply text
    478184}}}
    479185
     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.''
    480192
    481193== Tables ==
    482 === Simple Tables ===
     194
    483195Simple tables can be created like this:
    484 ||= Wiki Markup =||= Display =||
    485 {{{#!td
    486   {{{
    487   ||Cell 1||Cell 2||Cell 3||
    488   ||Cell 4||Cell 5||Cell 6||
    489   }}}
    490 }}}
    491 {{{#!td style="padding: 2em;"
     196{{{
    492197||Cell 1||Cell 2||Cell 3||
    493198||Cell 4||Cell 5||Cell 6||
    494199}}}
    495200
    496 Cell headings can be specified by wrapping the content in a pair of '=' characters.
    497 Note that the '=' characters have to stick to the cell separators, like this:
    498 ||= Wiki Markup =||= Display =||
    499 {{{#!td
    500   {{{
    501   ||        ||= stable =||= latest =||
    502   ||= 0.10 =||  0.10.5  || 0.10.6dev||
    503   ||= 0.11 =||  0.11.6  || 0.11.7dev||
    504   }}}
    505 }}}
    506 {{{#!td style="padding: 2em;"
    507 ||        ||= stable =||= latest =||
    508 ||= 0.10 =||  0.10.5  || 0.10.6dev||
    509 ||= 0.11 =||  0.11.6  || 0.11.7dev||
    510 }}}
    511 
    512 Finally, specifying an empty cell means that the next non empty cell will span the empty cells. For example:
    513 ||= Wiki Markup =||= Display =||
    514 {{{#!td
    515   {{{
    516   || 1 || 2 || 3 ||
    517   |||| 1-2 || 3 ||
    518   || 1 |||| 2-3 ||
    519   |||||| 1-2-3 ||
    520   }}}
    521 }}}
    522 {{{#!td style="padding: 2em;"
    523 || 1 || 2 || 3 ||
    524 |||| 1-2 || 3 ||
    525 || 1 |||| 2-3 ||
    526 |||||| 1-2-3 ||
    527 }}}
    528 
    529 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:
    530 ||= Wiki Markup =||= Display =||
    531 {{{#!td
    532   {{{
    533   ||=Text =||= Numbers =||
    534   ||left align    ||        1.0||
    535   ||  center      ||        4.5||
    536   ||      right align||     4.5||
    537   || default alignment ||   2.5||
    538   ||default||         2.5||
    539   ||  default ||      2.5||
    540   || default ||       2.5||
    541   }}}
    542 }}}
    543 {{{#!td style="padding: 2em;"
    544 ||=Text =||= Numbers =||
    545 ||left align    ||        1.0||
    546 ||  center      ||        4.5||
    547 ||      right align||     4.5||
    548 || default alignment ||   2.5||
    549 ||default||         2.5||
    550 ||  default ||      2.5||
    551 || default ||       2.5||
    552 }}}
    553 
    554 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.
    555 
    556 ||= Wiki Markup =||
    557 {{{#!td
    558   {{{
    559   || this is column 1 [http://trac.edgewall.org/newticket new ticket] || \
    560   || this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \
    561   || that's column 3 and last one ||
    562   }}}
    563 }}}
    564 |-------------
    565 ||= Display =||
    566 {{{#!td style="padding: 2em;"
    567 || this is column 1 [http://trac.edgewall.org/newticket new ticket] || \
    568 || this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \
    569 || that's column 3 and last one ||
    570 }}}
    571 
    572 === Complex Tables ===
    573 
    574 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].
    575207
    576208
     
    579211Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.
    580212
    581 ||= Wiki Markup =||= Display =||
    582 {{{#!td
    583   {{{
    584   TitleIndex, http://www.edgewall.com/, !NotAlink
    585   }}}
    586 }}}
    587 {{{#!td
    588 TitleIndex, http://www.edgewall.com/, !NotAlink
    589 }}}
    590 
    591 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.
    592 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.
    593 
    594 ||= Wiki Markup =||= Display =||
    595 {{{#!td
    596   {{{
    597    * [http://www.edgewall.com Edgewall Software]
    598    * [wiki:TitleIndex Title Index]
    599    * [wiki:TitleIndex]
    600    * [wiki:ISO9000]
    601   }}}
    602 }}}
    603 {{{#!td
    604    * [http://www.edgewall.com Edgewall Software]
    605    * [wiki:TitleIndex Title Index]
    606    * [wiki:TitleIndex]
    607    * [wiki:ISO9000]
    608 }}}
    609 
    610 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.
    611 
    612 {{{#!td
    613   {{{
    614    * [[http://www.edgewall.com|Edgewall Software]]
    615    * [[wiki:TitleIndex|Title Index]]
    616      or even [[TitleIndex|Title Index]]
    617    * [[wiki:TitleIndex]]
    618      ''' but not ![[TitleIndex]]! '''
    619    * [[ISO9000]]
    620   }}}
    621 }}}
    622 {{{#!td
    623    * [[http://www.edgewall.com|Edgewall Software]]
    624    * [[wiki:TitleIndex|Title Index]]
    625      or even [[TitleIndex|Title Index]]
    626    * [[wiki:TitleIndex]]
    627      ''' but not ![[TitleIndex]]! '''
    628    * [[ISO9000]]
    629 }}}
    630 
    631 '''Note''': the [trac:WikiCreole] style for links is quick to type and
    632 certainly looks familiar as it's the one used on Wikipedia and in many
    633 other wikis. Unfortunately it conflicts with the syntax for [#Macros macros].
    634 So in the rare case when you need to refer to a page which is named after
    635 a macro (typical examples being TitleIndex, InterTrac and InterWiki),
    636 by writing `[[TitleIndex]]` you will actually call the macro instead of linking
    637 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]
    638234
    639235== Trac Links ==
    640236
    641237Wiki 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:
    642 
    643 ||= Wiki Markup =||= Display =||
    644 {{{#!td
    645   {{{
    646    * Tickets: #1 or ticket:1
    647    * Reports: {1} or report:1
    648    * Changesets: r1, [1] or changeset:1
    649    * ...
    650    * targeting other Trac instances,
    651      so called InterTrac links:
    652      - Tickets: #Trac1 or Trac:ticket:1
    653      - Changesets: [Trac1] or Trac:changeset:1
    654   }}}
    655 }}}
    656 {{{#!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:
    657246 * Tickets: #1 or ticket:1
    658247 * Reports: {1} or report:1
    659248 * Changesets: r1, [1] or changeset:1
    660249 * ...
    661  * targeting other Trac instances,
    662    so called InterTrac links:
    663    - Tickets: #Trac1 or Trac:ticket:1
    664    - Changesets: [Trac1] or Trac:changeset:1
    665 }}}
    666 
    667 There are many more flavors of Trac links, see TracLinks for more in-depth information and a reference for all the default link resolvers.
     250
     251There are many more flavors of Trac links, see TracLinks for more in-depth information.
    668252
    669253
     
    672256You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
    673257
    674 ||= Wiki Markup =||= Display =||
    675 {{{#!td
    676   {{{
    677    !NoHyperLink
    678    !#42 is not a link
    679   }}}
    680 }}}
    681 {{{#!td
     258Example:
     259{{{
    682260 !NoHyperLink
    683261 !#42 is not a link
    684262}}}
     263
     264Display:
     265 !NoHyperLink
     266 !#42 is not a link
     267
    685268
    686269== Images ==
     
    696279 * `[[Image(source:/trunk/trac/htdocs/trac_logo_mini.png)]]` (a file in repository)
    697280
    698 ||= Wiki Markup =||= Display =||
    699 {{{#!td
    700   {{{
    701   [[Image(htdocs:../common/trac_logo_mini.png)]]
    702   }}}
    703 }}}
    704 {{{#!td
    705 [[Image(htdocs:../common/trac_logo_mini.png)]]
    706 }}}
     281Example display: [[Image(htdocs:../common/trac_logo_mini.png)]]
     282
    707283
    708284See WikiMacros for further documentation on the `[[Image()]]` macro.
     
    713289Macros are ''custom functions'' to insert dynamic content in a page.
    714290
    715 ||= Wiki Markup =||= Display =||
    716 {{{#!td
    717   {{{
    718   [[RecentChanges(Trac,3)]]
    719   }}}
    720 }}}
    721 {{{#!td style="padding-left: 2em"
    722 [[RecentChanges(Trac,3)]]
    723 }}}
     291Example:
     292{{{
     293 [[RecentChanges(Trac,3)]]
     294}}}
     295
     296Display:
     297 [[RecentChanges(Trac,3)]]
    724298
    725299See WikiMacros for more information, and a list of installed macros.
    726 
    727 The detailed help for a specific macro can also be obtained more directly by appending a "?" to the macro name.
    728 
    729 ||= Wiki Markup =||= Display =||
    730 {{{#!td
    731   {{{
    732   [[MacroList?]]
    733   }}}
    734 }}}
    735 {{{#!td style="padding-left: 2em"
    736 [[MacroList?]]
    737 }}}
    738300
    739301
     
    743305[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].
    744306
    745 ||= Wiki Markup =||= Display =||
    746 |--------------------------------------------------------
    747 {{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"
    748 
    749    [=#Processors-example-html Example 1:] HTML
    750 
    751 }}}
    752 |--------------------------------------------------------
    753 {{{#!td style="border: 0px"
    754   {{{
    755   {{{
    756   #!html
    757   <h1 style="text-align: right; color: blue">
    758    HTML Test
    759   </h1>
    760   }}}
    761   }}}
    762 }}}
    763 {{{#!td valign="top"  style="border: 0px"
    764 
     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:
    765317{{{
    766318#!html
     
    768320}}}
    769321
    770 }}}
    771 |--------------------------------------------------------
    772 {{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"
    773 
    774    [=#Processors-example-highlight Example 2:] Code Highlighting
    775 
    776 }}}
    777 |--------------------------------------------------------
    778 {{{#!td style="border: 0px"
    779   {{{
    780   {{{
    781   #!python
    782   class Test:
    783  
    784       def __init__(self):
    785           print "Hello World"
    786   if __name__ == '__main__':
    787      Test()
    788   }}}
    789   }}}
    790 }}}
    791 {{{
    792 #!td valign="top"  style="border: 0px"
    793 
     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:
    794337{{{
    795338#!python
     
    801344}}}
    802345
    803 }}}
    804 |--------------------------------------------------------
    805 {{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"
    806 
    807        [=#Processors-example-tables Example 3:] Complex Tables
    808 
    809 }}}
    810 |--------------------------------------------------------
    811 {{{#!td style="border: 0px"
    812   {{{
    813   {{{#!th rowspan=4 align=justify
    814   With the `#td` and `#th` processors,
    815   table cells can contain any content:
    816   }}}
    817   |----------------
    818   {{{#!td
    819     - lists
    820     - embedded tables
    821     - simple multiline content
    822   }}}
    823   |----------------
    824   {{{#!td
    825   As processors can be easily nested,
    826   so can be tables:
    827     {{{#!th
    828     Example:
    829     }}}
    830     {{{#!td style="background: #eef"
    831     || must be at the third level now... ||
    832     }}}
    833   }}}
    834   |----------------
    835   {{{#!td
    836   Even when you don't have complex markup,
    837   this form of table cells can be convenient
    838   to write content on multiple lines.
    839   }}}
    840   }}}
    841 }}}
    842 {{{
    843 #!td  valign="top"  style="border: 0px"
    844 
    845   {{{#!th rowspan=4 align=justify
    846   With the `#td` and `#th` processors,
    847   table cells can contain any content:
    848   }}}
    849   |----------------
    850   {{{#!td
    851     - lists
    852     - embedded tables
    853     - simple multiline content
    854   }}}
    855   |----------------
    856   {{{#!td
    857   As processors can be easily nested,
    858   so can be tables:
    859     {{{#!th
    860     Example:
    861     }}}
    862     {{{#!td style="background: #eef"
    863     || must be at the third level now... ||
    864     }}}
    865   }}}
    866   |----------------
    867   {{{#!td
    868   Even when you don't have complex markup,
    869   this form of table cells can be convenient
    870   to write content on multiple lines.
    871   }}}
    872 
     346Perl:
     347{{{
     348#!perl
     349my ($test) = 0;
     350if ($test > 0) {
     351    print "hello";
     352}
    873353}}}
    874354
     
    879359
    880360Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text.
    881 
    882 ||= Wiki Markup =||= Display =||
    883 {{{#!td
    884   {{{
    885   Nothing to
    886   {{{
    887   #!comment
    888   Your comment for editors here
    889   }}}
    890   see ;-)
    891   }}}
    892 }}}
    893 {{{#!td
    894   Nothing to
    895   {{{
    896   #!comment
    897   Your comment for editors here
    898   }}}
    899   see ;-)
    900 }}}
     361{{{
     362{{{
     363#!comment
     364Your comment here
     365}}}
     366}}}
     367
    901368
    902369== Miscellaneous ==
    903370
    904 An horizontal line can be used to separated different parts of your page:
    905 
    906 ||= Wiki Markup =||= Display =||
    907 {{{#!td
    908   {{{
    909   Four or more dashes will be replaced
    910   by an horizontal line (<HR>)
    911   ----
    912   See?
    913   }}}
    914 }}}
    915 {{{#!td
    916 Four or more dashes will be replaced
    917 by an horizontal line (<HR>)
     371Four or more dashes will be replaced by a horizontal line (<HR>)
     372
     373Example:
     374{{{
     375 ----
     376}}}
     377
     378Display:
    918379----
    919 See?
    920 }}}
    921 |----------------------------------
    922 {{{#!td
    923   {{{
    924   "macro" style [[br]] line break
    925   }}}
    926 }}}
    927 {{{#!td
    928 "macro" style [[br]] line break
    929 }}}
    930 |----------------------------------
    931 {{{#!td
    932   {{{
    933   !WikiCreole style \\ line\\break
    934   }}}
    935 }}}
    936 {{{#!td
    937 !WikiCreole style \\ line\\break
    938 }}}
     380
     381
     382
     383----
     384See also: TracLinks, TracGuide, WikiHtml, WikiMacros, WikiProcessors, TracSyntaxColoring.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png