Changes between Initial Version and Version 1 of WikiFormatting


Ignore:
Timestamp:
Dec 26, 2014, 10:35:15 AM (9 years ago)
Author:
Intelaida
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v1 v1  
     1= WikiFormatting =
     2[[TracGuideToc]]
     3[[TranslatedPages]]
     4
     5Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole.
     6
     7Trac 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,
     8especially [http://moinmo.in/ MoinMoin] and [trac:WikiCreole].
     9
     10
     11This page will give you an in-depth explanation of the wiki markup available anywhere WikiFormatting is allowed.
     12
     13The ''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.
     14
     15A few other wiki pages present the advanced features of the Trac wiki markup in more depth:
     16 - TracLinks covers all the possible ways to refer precisely to any Trac resource or parts thereof,
     17 - WikiPageNames talks about the various names a wiki page can take, CamelCase or not
     18 - WikiMacros lists the macros available for generating dynamic content,
     19 - WikiProcessors and WikiHtml details how parts of the wiki text can be processed in special ways
     20
     21
     22== Cheat sheet ==
     23
     24||= '''Category''' =||= '''Wiki Markup''' =||= '''Display''' =||
     25|-----------------------------------------------------------
     26{{{#!th rowspan=3
     27[#FontStyles Font Styles]
     28}}}
     29|| `'''bold'''`, `''italic''`, `'''''Wikipedia style'''''` || \
     30|| '''bold''', ''italic'', '''''Wikipedia style''''' ||
     31|| {{{`monospaced (''other markup ignored'')`}}} || \
     32|| `monospaced (''other markup ignored'')` ||
     33|| `**bold**`, `//italic//`, `**//!WikiCreole style//**` || \
     34|| **bold**, //italic//, **//!WikiCreole style//** ||
     35|-----------------------------------------------------------
     36||= [#Headings Headings] =||\
     37{{{#!td
     38 {{{
     39 == Level 2 ==
     40 === Level 3 ^([#hn note])^
     41 }}}
     42}}}
     43{{{#!td style="padding-left: 2em"
     44== Level 2 ==
     45=== Level 3 ^([#hn note])^
     46}}}
     47|-----------------------------------------------------------
     48||= [#Paragraphs Paragraphs]  =||\
     49{{{#!td
     50 {{{
     51 First paragraph
     52 on multiple lines.
     53
     54 Second paragraph.
     55 }}}
     56}}}
     57{{{#!td
     58First paragraph
     59on multiple lines.
     60
     61Second paragraph.
     62}}}
     63|-----------------------------------------------------------
     64||= [#Lists Lists] =||\
     65{{{#!td
     66 {{{
     67 * bullets list
     68   on multiple lines
     69   1. nested list
     70     a. different numbering
     71        styles
     72 }}}
     73}}}
     74{{{#!td
     75* bullets list
     76  on multiple lines
     77  1. nested list
     78    a. different numbering
     79       styles
     80}}}
     81|-----------------------------------------------------------
     82{{{#!th
     83[#DefinitionLists Definition Lists]
     84}}}
     85{{{#!td
     86 {{{
     87  term:: definition on
     88         multiple lines
     89 }}}
     90}}}
     91{{{#!td
     92 term:: definition on
     93        multiple lines
     94}}}
     95|-----------------------------------------------------------
     96||= [#PreformattedText Preformatted Text] =||\
     97{{{#!td
     98 {{{
     99 {{{
     100 multiple lines, ''no wiki''
     101       white space respected
     102 }}}
     103 }}}
     104}}}
     105{{{#!td
     106 {{{
     107 multiple lines, ''no wiki''
     108       white space respected
     109 }}}
     110}}}
     111|-----------------------------------------------------------
     112||= [#Blockquotes Blockquotes] =||\
     113{{{#!td
     114 {{{
     115   if there's some leading
     116   space the text is quoted
     117 }}}
     118}}}
     119{{{#!td
     120 if there's some leading
     121 space the text is quoted
     122}}}
     123|-----------------------------------------------------------
     124||= [#DiscussionCitations Discussion Citations] =||\
     125{{{#!td
     126 {{{
     127 >> ... (I said)
     128 > (he replied)
     129 }}}
     130}}}
     131{{{#!td
     132>>... (I said)
     133> (he replied)
     134}}}
     135|-----------------------------------------------------------
     136||= [#Tables Tables] =||\
     137{{{#!td
     138 {{{
     139 ||= Table Header =|| Cell ||
     140 ||||  (details below)  ||
     141 }}}
     142}}}
     143{{{#!td
     144||= Table Header =|| Cell ||
     145||||  (details below)  ||
     146}}}
     147|-----------------------------------------------------------
     148{{{#!th rowspan=2
     149[#Links Links]
     150}}}
     151|| `http://trac.edgewall.org` ||\
     152|| http://trac.edgewall.org ||
     153|| `WikiFormatting (CamelCase)` ||\
     154|| WikiFormatting (CamelCase) ||
     155|-----------------------------------------------------------
     156{{{#!th rowspan=5
     157[#TracLinks TracLinks]
     158}}}
     159|| `wiki:WikiFormatting`, `wiki:"WikiFormatting"` ||\
     160|| wiki:WikiFormatting, wiki:"WikiFormatting" ||
     161|| `#1 (ticket)`, `[1] (changeset)`, `{1} (report)` ||\
     162|| #1 (ticket), [1] (changeset), {1} (report) ||
     163|| `ticket:1, ticket:1#comment:1` ||\
     164|| ticket:1, ticket:1#comment:1 ||
     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|| Ticket [[ticket:1]], [[ticket:1|ticket one]] ||
     169|-----------------------------------------------------------
     170{{{#!th rowspan=2
     171[#SettingAnchors Setting Anchors]
     172}}}
     173|| `[=#point1 (1)] First...` ||\
     174|| [=#point1 (1)] First... ||
     175|| `see [#point1 (1)]` ||\
     176|| see [#point1 (1)] ||
     177|-----------------------------------------------------------
     178{{{#!th rowspan=3
     179[#Escaping Escaping Markup]
     180}}}
     181|| `!'' doubled quotes` ||\
     182|| !'' doubled quotes ||
     183|| `!wiki:WikiFormatting`, `!WikiFormatting` ||\
     184|| !wiki:WikiFormatting, !WikiFormatting ||
     185|| {{{`}}}`{{{-}}}`{{{`}}}` triple curly brackets` ||\
     186|| `{{{-}}}` triple curly brackets ||
     187|-----------------------------------------------------------
     188||= [#Images Images] =|| `[[Image(`''link''`)]]` || [[Image(htdocs:../common/trac_logo_mini.png)]] ||
     189|-----------------------------------------------------------
     190{{{#!th rowspan=2
     191[#Macros Macros]
     192}}}
     193|| `[[MacroList(*)]]` ||  ''(short list of all available macros)''  ||
     194|| `[[Image?]]` ||  ''(help for the Image macro)''  ||
     195|-----------------------------------------------------------
     196||= [#Processors Processors] =||\
     197{{{#!td
     198 {{{
     199 {{{
     200 #!div style="font-size: 80%"
     201 Code highlighting:
     202   {{{#!python
     203   hello = lambda: "world"
     204   }}}
     205 }}}
     206 }}}
     207}}}
     208{{{#!td style="padding-left: 2em"
     209 {{{
     210 #!div style="font-size: 80%"
     211 Code highlighting:
     212   {{{#!python
     213   hello = lambda: "world"
     214   }}}
     215 }}}
     216}}}
     217|-----------------------------------------------------------
     218||= [#Comments Comments] =||\
     219{{{#!td
     220 {{{
     221 {{{#!comment
     222 Note to Editors: ...
     223 }}}
     224 }}}
     225}}}
     226{{{#!td style="padding-left: 2em"
     227 {{{#!comment
     228 Note to Editors: ...
     229 }}}
     230}}}
     231|-----------------------------------------------------------
     232||= [#Miscellaneous Miscellaneous] =||\
     233{{{#!td
     234 {{{
     235 Line [[br]] break
     236 Line \\ break
     237 ----
     238 }}}
     239}}}
     240{{{#!td style="padding-left: 2em"
     241Line [[br]] break
     242Line \\ break
     243----
     244}}}
     245
     246
     247== Font Styles ==
     248
     249The Trac wiki supports the following font styles:
     250||= Wiki Markup =||= Display =||
     251{{{#!td
     252  {{{
     253   * '''bold''',
     254     ''' triple quotes !'''
     255     can be bold too if prefixed by ! ''',
     256   * ''italic''
     257   * '''''bold italic''''' or ''italic and
     258     ''' italic bold ''' ''
     259   * __underline__
     260   * {{{monospace}}} or `monospace`
     261     (hence `{{{` or {{{`}}} quoting)
     262   * ~~strike-through~~
     263   * ^superscript^
     264   * ,,subscript,,
     265   * **also bold**, //italic as well//,
     266     and **'' bold italic **'' //(since 0.12)//
     267   * [[span(style=color: #FF0000, a red text )]]
     268  }}}
     269}}}
     270{{{#!td
     271 * '''bold''',
     272   ''' triple quotes !'''
     273   can be bold too if prefixed by ! ''',
     274 * ''italic''
     275 * '''''bold italic''''' or ''italic and
     276   ''' italic bold ''' ''
     277 * __underline__
     278 * {{{monospace}}} or `monospace`
     279   (hence `{{{` or {{{`}}} quoting)
     280 * ~~strike-through~~
     281 * ^superscript^
     282 * ,,subscript,,
     283 * **also bold**, //italic as well//,
     284   and **'' bold italic **'' //(since 0.12)//
     285 * [[span(style=color: #FF0000, a red text )]]
     286}}}
     287
     288Notes:
     289 * `{{{...}}}` 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.
     290 * {{{ ! }}} 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.
     291 * all the font styles marks have to be used in opening/closing pairs,
     292   and they must nest properly (in particular, an `''` italic can't be paired
     293   with a `//` one, and `'''` can't be paired with `**`)
     294
     295
     296== Headings ==
     297
     298You can create heading by starting a line with one up to six ''equal'' characters ("=")
     299followed by a single space and the headline text.
     300
     301[=#hn]
     302The headline text can be followed by the same number of "=" characters, but this is no longer mandatory.
     303
     304Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
     305
     306||= Wiki Markup =||= Display =||
     307{{{#!td
     308  {{{
     309  = Heading =
     310  == Subheading
     311  === About ''this'' ===
     312  === Explicit id === #using-explicit-id-in-heading
     313  == Subheading #sub2
     314}}}
     315}}}
     316{{{#!td style="padding: 1em;"
     317  {{{
     318  #!div
     319  = Heading =
     320  == Subheading
     321  === About ''this'' ===
     322  === Explicit id === #using-explicit-id-in-heading
     323  == Subheading #sub2
     324  }}}
     325}}}
     326
     327== Paragraphs ==
     328
     329A new text paragraph is created whenever two blocks of text are separated by one or more empty lines.
     330
     331A forced line break can also be inserted, using:
     332||= Wiki Markup =||= Display =||
     333{{{#!td
     334  {{{
     335  Line 1[[BR]]Line 2
     336  }}}
     337  {{{
     338  Paragraph
     339  one
     340
     341  Paragraph
     342  two
     343  }}}
     344}}}
     345{{{#!td
     346  Line 1[[BR]]Line 2
     347
     348  Paragraph
     349  one
     350
     351  Paragraph
     352  two
     353}}}
     354
     355== Lists ==
     356
     357The wiki supports both ordered/numbered and unordered lists.
     358
     359Example:
     360||= Wiki Markup =||= Display =||
     361{{{#!td
     362  {{{
     363   * Item 1
     364     * Item 1.1
     365        * Item 1.1.1   
     366        * Item 1.1.2
     367        * Item 1.1.3
     368     * Item 1.2
     369   * Item 2
     370  - items can start at the beginning of a line
     371    and they can span multiple lines
     372    - be careful though to continue the line
     373    with the appropriate indentation, otherwise
     374  that will start a new paragraph...
     375 
     376   1. Item 1
     377     a. Item 1.a
     378     a. Item 1.b
     379        i. Item 1.b.i
     380        i. Item 1.b.ii
     381   1. Item 2
     382  And numbered lists can also be restarted
     383  with an explicit number:
     384   3. Item 3
     385  }}}
     386}}}
     387{{{#!td
     388 * Item 1
     389   * Item 1.1
     390      * Item 1.1.1   
     391      * Item 1.1.2
     392      * Item 1.1.3
     393   * Item 1.2
     394 * Item 2
     395- items can start at the beginning of a line
     396  and they can span multiple lines
     397  - be careful though to continue the line
     398  with the appropriate indentation, otherwise
     399that will start a new paragraph...
     400
     401 1. Item 1
     402   a. Item 1.a
     403   a. Item 1.b
     404      i. Item 1.b.i
     405      i. Item 1.b.ii
     406 1. Item 2
     407And numbered lists can also be restarted with an explicit number:
     408 3. Item 3
     409}}}
     410
     411
     412== Definition Lists ==
     413
     414The wiki also supports definition lists.
     415
     416||= Wiki Markup =||= Display =||
     417{{{#!td
     418  {{{
     419   llama::
     420     some kind of mammal, with hair
     421   ppython::
     422     some kind of reptile, without hair
     423     (can you spot the typo?)
     424  }}}
     425}}}
     426{{{#!td
     427 llama::
     428   some kind of mammal, with hair
     429 ppython::
     430   some kind of reptile, without hair
     431   (can you spot the typo?)
     432}}}
     433
     434Note that you need a space in front of the defined term.
     435
     436
     437== Preformatted Text ==
     438
     439Block 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.
     440 
     441||= Wiki Markup =||= Display =||
     442{{{#!td
     443  {{{
     444  {{{
     445  def HelloWorld():
     446      print '''Hello World'''
     447  }}}
     448  }}}
     449}}}
     450{{{#!td
     451  {{{
     452  def HelloWorld():
     453      print '''Hello World'''
     454  }}}
     455}}}
     456
     457Note that this kind of block is also used for selecting lines that should be processed through WikiProcessors.
     458
     459== Blockquotes ==
     460
     461In order to mark a paragraph as blockquote, indent that paragraph with two spaces.
     462
     463||= Wiki Markup =||= Display =||
     464{{{#!td
     465{{{
     466Paragraph
     467  This text is a quote from someone else.
     468}}}
     469}}}
     470{{{#!td
     471Paragraph
     472  This text is a quote from someone else.
     473}}}
     474
     475== Discussion Citations ==
     476
     477To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 
     478
     479||= Wiki Markup =||= Display =||
     480{{{#!td
     481  {{{
     482  >> Someone's original text
     483  > Someone else's reply text
     484  >  - which can be any kind of Wiki markup
     485  My reply text
     486  }}}
     487}}}
     488{{{#!td
     489>> Someone's original text
     490> Someone else's reply text
     491>  - which can be any kind of Wiki markup
     492My reply text
     493}}}
     494
     495
     496== Tables ==
     497=== Simple Tables ===
     498Simple tables can be created like this:
     499||= Wiki Markup =||= Display =||
     500{{{#!td
     501  {{{
     502  ||Cell 1||Cell 2||Cell 3||
     503  ||Cell 4||Cell 5||Cell 6||
     504  }}}
     505}}}
     506{{{#!td style="padding: 2em;"
     507||Cell 1||Cell 2||Cell 3||
     508||Cell 4||Cell 5||Cell 6||
     509}}}
     510
     511Cell headings can be specified by wrapping the content in a pair of '=' characters.
     512Note that the '=' characters have to stick to the cell separators, like this:
     513||= Wiki Markup =||= Display =||
     514{{{#!td
     515  {{{
     516  ||        ||= stable =||= latest =||
     517  ||= 0.10 =||  0.10.5  || 0.10.6dev||
     518  ||= 0.11 =||  0.11.6  || 0.11.7dev||
     519  }}}
     520}}}
     521{{{#!td style="padding: 2em;"
     522||        ||= stable =||= latest =||
     523||= 0.10 =||  0.10.5  || 0.10.6dev||
     524||= 0.11 =||  0.11.6  || 0.11.7dev||
     525}}}
     526
     527Finally, specifying an empty cell means that the next non empty cell will span the empty cells. For example:
     528||= Wiki Markup =||= Display =||
     529{{{#!td
     530  {{{
     531  || 1 || 2 || 3 ||
     532  |||| 1-2 || 3 ||
     533  || 1 |||| 2-3 ||
     534  |||||| 1-2-3 ||
     535  }}}
     536}}}
     537{{{#!td style="padding: 2em;"
     538|| 1 || 2 || 3 ||
     539|||| 1-2 || 3 ||
     540|| 1 |||| 2-3 ||
     541|||||| 1-2-3 ||
     542}}}
     543
     544Note 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:
     545||= Wiki Markup =||= Display =||
     546{{{#!td
     547  {{{
     548  ||=Text =||= Numbers =||
     549  ||left align    ||        1.0||
     550  ||  center      ||        4.5||
     551  ||      right align||     4.5||
     552  || default alignment ||   2.5||
     553  ||default||         2.5||
     554  ||  default ||      2.5||
     555  || default ||       2.5||
     556  }}}
     557}}}
     558{{{#!td style="padding: 2em;"
     559||=Text =||= Numbers =||
     560||left align    ||        1.0||
     561||  center      ||        4.5||
     562||      right align||     4.5||
     563|| default alignment ||   2.5||
     564||default||         2.5||
     565||  default ||      2.5||
     566|| default ||       2.5||
     567}}}
     568
     569If 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.
     570
     571||= Wiki Markup =||
     572{{{#!td
     573  {{{
     574  || this is column 1 [http://trac.edgewall.org/newticket new ticket] || \
     575  || this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \
     576  || that's column 3 and last one ||
     577  }}}
     578}}}
     579|-------------
     580||= Display =||
     581{{{#!td style="padding: 2em;"
     582|| this is column 1 [http://trac.edgewall.org/newticket new ticket] || \
     583|| this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \
     584|| that's column 3 and last one ||
     585}}}
     586
     587=== Complex Tables ===
     588
     589If 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].
     590
     591
     592== Links ==
     593
     594Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.
     595
     596||= Wiki Markup =||= Display =||
     597{{{#!td
     598  {{{
     599  TitleIndex, http://www.edgewall.com/, !NotAlink
     600  }}}
     601}}}
     602{{{#!td
     603TitleIndex, http://www.edgewall.com/, !NotAlink
     604}}}
     605
     606Links can be given a more descriptive title by writing the link followed by a space and a title and all this inside square brackets.
     607If 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.
     608
     609||= Wiki Markup =||= Display =||
     610{{{#!td
     611  {{{
     612   * [http://www.edgewall.com Edgewall Software]
     613   * [wiki:TitleIndex Title Index]
     614   * [wiki:TitleIndex]
     615   * [wiki:ISO9000]
     616  }}}
     617}}}
     618{{{#!td
     619   * [http://www.edgewall.com Edgewall Software]
     620   * [wiki:TitleIndex Title Index]
     621   * [wiki:TitleIndex]
     622   * [wiki:ISO9000]
     623}}}
     624
     625Following 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.
     626
     627{{{#!td
     628  {{{
     629   * [[http://www.edgewall.com|Edgewall Software]]
     630   * [[wiki:TitleIndex|Title Index]]
     631     or even [[TitleIndex|Title Index]]
     632   * [[wiki:TitleIndex]]
     633     ''' but not ![[TitleIndex]]! '''
     634   * [[ISO9000]]
     635  }}}
     636}}}
     637{{{#!td
     638   * [[http://www.edgewall.com|Edgewall Software]]
     639   * [[wiki:TitleIndex|Title Index]]
     640     or even [[TitleIndex|Title Index]]
     641   * [[wiki:TitleIndex]]
     642     ''' but not ![[TitleIndex]]! '''
     643   * [[ISO9000]]
     644}}}
     645
     646'''Note''': the [trac:WikiCreole] style for links is quick to type and
     647certainly looks familiar as it's the one used on Wikipedia and in many
     648other wikis. Unfortunately it conflicts with the syntax for [#Macros macros].
     649So in the rare case when you need to refer to a page which is named after
     650a macro (typical examples being TitleIndex, InterTrac and InterWiki),
     651by writing `[[TitleIndex]]` you will actually call the macro instead of linking
     652to the page.
     653
     654== Trac Links ==
     655
     656Wiki 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:
     657
     658||= Wiki Markup =||= Display =||
     659{{{#!td
     660  {{{
     661   * Tickets: #1 or ticket:1
     662   * Reports: {1} or report:1
     663   * Changesets: r1, [1] or changeset:1
     664   * ...
     665   * targeting other Trac instances,
     666     so called InterTrac links:
     667     - Tickets: #Trac1 or Trac:ticket:1
     668     - Changesets: [Trac1] or Trac:changeset:1
     669  }}}
     670}}}
     671{{{#!td
     672 * Tickets: #1 or ticket:1
     673 * Reports: {1} or report:1
     674 * Changesets: r1, [1] or changeset:1
     675 * ...
     676 * targeting other Trac instances,
     677   so called InterTrac links:
     678   - Tickets: #Trac1 or Trac:ticket:1
     679   - Changesets: [Trac1] or Trac:changeset:1
     680}}}
     681
     682There are many more flavors of Trac links, see TracLinks for more in-depth information and a reference for all the default link resolvers.
     683
     684
     685== Setting Anchors ==
     686
     687An 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:
     688
     689{{{
     690[=#point1]
     691}}}
     692
     693This syntax was chosen to match the format for explicitly naming the header id [#Headings documented above]. For example:
     694{{{
     695== Long title == #title
     696}}}
     697
     698It's also very close to the syntax for the corresponding link to that anchor:
     699{{{
     700[#point1]
     701}}}
     702
     703Optionally, a label can be given to the anchor:
     704{{{
     705[[=#point1 '''Point 1''']]
     706}}}
     707
     708||= Wiki Markup =||= Display =||
     709|----------------------------------
     710{{{#!td
     711  {{{
     712  [#point2 jump to the second point]
     713
     714  ...
     715
     716  Point2:  [=#point2] Jump here
     717  }}}
     718}}}
     719{{{#!td
     720  [#point2 jump to the second point]
     721
     722  ...
     723
     724  Point2:  [=#point2] Jump here
     725}}}
     726
     727For 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)^)]]`.
     728
     729
     730== Escaping Links, WikiPageNames and other Markup == #Escaping
     731
     732You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
     733
     734||= Wiki Markup =||= Display =||
     735{{{#!td
     736  {{{
     737   !NoHyperLink
     738   !#42 is not a link
     739  }}}
     740  {{{
     741Various forms of escaping for list markup:
     742 ^^- escaped minus sign \\
     743 ^^1. escaped number  \\
     744 ^^* escaped asterisk sign
     745  }}}
     746}}}
     747{{{#!td
     748 !NoHyperLink
     749 !#42 is not a link
     750
     751Various forms of escaping for list markup:
     752 ^^- escaped minus sign \\
     753 ^^1. escaped number  \\
     754 ^^* escaped asterisk sign
     755}}}
     756
     757== Images ==
     758
     759Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags.
     760
     761You 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)]]`.
     762
     763In addition to the current page, it is possible to refer to other resources:
     764 * `[[Image(wiki:WikiFormatting:picture.gif)]]` (referring to attachment on another page)
     765 * `[[Image(ticket:1:picture.gif)]]` (file attached to a ticket)
     766 * `[[Image(htdocs:picture.gif)]]` (referring to a file inside the [TracEnvironment environment] `htdocs` directory)
     767 * `[[Image(source:/trunk/trac/htdocs/trac_logo_mini.png)]]` (a file in repository)
     768
     769||= Wiki Markup =||= Display =||
     770{{{#!td
     771  {{{
     772  [[Image(htdocs:../common/trac_logo_mini.png)]]
     773  }}}
     774}}}
     775{{{#!td
     776[[Image(htdocs:../common/trac_logo_mini.png)]]
     777}}}
     778
     779See WikiMacros for further documentation on the `[[Image()]]` macro, which has several useful options (`title=`, `link=`, etc.)
     780
     781
     782== Macros ==
     783
     784Macros are ''custom functions'' to insert dynamic content in a page.
     785
     786||= Wiki Markup =||= Display =||
     787{{{#!td
     788  {{{
     789  [[RecentChanges(Trac,3)]]
     790  }}}
     791}}}
     792{{{#!td style="padding-left: 2em"
     793[[RecentChanges(Trac,3)]]
     794}}}
     795
     796See WikiMacros for more information, and a list of installed macros.
     797
     798The detailed help for a specific macro can also be obtained more directly by appending a "?" to the macro name.
     799
     800||= Wiki Markup =||= Display =||
     801{{{#!td
     802  {{{
     803  [[MacroList?]]
     804  }}}
     805}}}
     806{{{#!td style="padding-left: 2em"
     807[[MacroList?]]
     808}}}
     809
     810
     811== Processors ==
     812
     813Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in
     814[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].
     815
     816||= Wiki Markup =||= Display =||
     817|--------------------------------------------------------
     818{{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"
     819
     820   [=#Processors-example-html Example 1:] HTML
     821
     822}}}
     823|--------------------------------------------------------
     824{{{#!td style="border: 0px"
     825  {{{
     826  {{{
     827  #!html
     828  <h1 style="text-align: right; color: blue">
     829   HTML Test
     830  </h1>
     831  }}}
     832  }}}
     833}}}
     834{{{#!td valign="top"  style="border: 0px"
     835
     836{{{
     837#!html
     838<h1 style="text-align: right; color: blue">HTML Test</h1>
     839}}}
     840
     841}}}
     842|--------------------------------------------------------
     843{{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"
     844
     845   [=#Processors-example-highlight Example 2:] Code Highlighting
     846
     847}}}
     848|--------------------------------------------------------
     849{{{#!td style="border: 0px"
     850  {{{
     851  {{{
     852  #!python
     853  class Test:
     854 
     855      def __init__(self):
     856          print "Hello World"
     857  if __name__ == '__main__':
     858     Test()
     859  }}}
     860  }}}
     861}}}
     862{{{
     863#!td valign="top"  style="border: 0px"
     864
     865{{{
     866#!python
     867class Test:
     868    def __init__(self):
     869        print "Hello World"
     870if __name__ == '__main__':
     871   Test()
     872}}}
     873
     874}}}
     875|--------------------------------------------------------
     876{{{#!td align="center" colspan=2 style="border: 0px; font-size: 90%"
     877
     878       [=#Processors-example-tables Example 3:] Complex Tables
     879
     880}}}
     881|--------------------------------------------------------
     882{{{#!td style="border: 0px"
     883  {{{
     884  {{{#!th rowspan=4 align=justify
     885  With the `#td` and `#th` processors,
     886  table cells can contain any content:
     887  }}}
     888  |----------------
     889  {{{#!td
     890    - lists
     891    - embedded tables
     892    - simple multiline content
     893  }}}
     894  |----------------
     895  {{{#!td
     896  As processors can be easily nested,
     897  so can be tables:
     898    {{{#!th
     899    Example:
     900    }}}
     901    {{{#!td style="background: #eef"
     902    || must be at the third level now... ||
     903    }}}
     904  }}}
     905  |----------------
     906  {{{#!td
     907  Even when you don't have complex markup,
     908  this form of table cells can be convenient
     909  to write content on multiple lines.
     910  }}}
     911  }}}
     912}}}
     913{{{
     914#!td  valign="top"  style="border: 0px"
     915
     916  {{{#!th rowspan=4 align=justify
     917  With the `#td` and `#th` processors,
     918  table cells can contain any content:
     919  }}}
     920  |----------------
     921  {{{#!td
     922    - lists
     923    - embedded tables
     924    - simple multiline content
     925  }}}
     926  |----------------
     927  {{{#!td
     928  As processors can be easily nested,
     929  so can be tables:
     930    {{{#!th
     931    Example:
     932    }}}
     933    {{{#!td style="background: #eef"
     934    || must be at the third level now... ||
     935    }}}
     936  }}}
     937  |----------------
     938  {{{#!td
     939  Even when you don't have complex markup,
     940  this form of table cells can be convenient
     941  to write content on multiple lines.
     942  }}}
     943
     944}}}
     945
     946See WikiProcessors for more information.
     947
     948
     949== Comments ==
     950
     951Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text.
     952
     953||= Wiki Markup =||= Display =||
     954{{{#!td
     955  {{{
     956  Nothing to
     957  {{{
     958  #!comment
     959  Your comment for editors here
     960  }}}
     961  see ;-)
     962  }}}
     963}}}
     964{{{#!td
     965  Nothing to
     966  {{{
     967  #!comment
     968  Your comment for editors here
     969  }}}
     970  see ;-)
     971}}}
     972
     973== Miscellaneous ==
     974
     975An horizontal line can be used to separated different parts of your page:
     976
     977||= Wiki Markup =||= Display =||
     978{{{#!td
     979  {{{
     980  Four or more dashes will be replaced
     981  by an horizontal line (<HR>)
     982  ----
     983  See?
     984  }}}
     985}}}
     986{{{#!td
     987Four or more dashes will be replaced
     988by an horizontal line (<HR>)
     989----
     990See?
     991}}}
     992|----------------------------------
     993{{{#!td
     994  {{{
     995  "macro" style [[br]] line break
     996  }}}
     997}}}
     998{{{#!td
     999"macro" style [[br]] line break
     1000}}}
     1001|----------------------------------
     1002{{{#!td
     1003  {{{
     1004  !WikiCreole style \\ line\\break
     1005  }}}
     1006}}}
     1007{{{#!td
     1008!WikiCreole style \\ line\\break
     1009}}}