Changes between Initial Version and Version 1 of WikiFormatting


Ignore:
Timestamp:
11/09/21 15:59:44 (3 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

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