Edgewall Software

Changes between Initial Version and Version 1 of 1.2/WikiFormatting


Ignore:
Timestamp:
Oct 15, 2019, 6:33:05 AM (5 years ago)
Author:
trac
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • 1.2/WikiFormatting

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