Changes between Version 6 and Version 7 of WikiFormatting


Ignore:
Timestamp:
Jun 27, 2010, 3:12:18 PM (12 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v6 v7  
    88
    99
    10 This page demonstrates the formatting syntax available anywhere WikiFormatting is allowed.
    11 
    12 
    13 [[PageOutline(2,Markup Categories,inline)]]
     10This page will give you an in-depth explanation of the wiki markup available anywhere WikiFormatting is allowed.
     11
     12The ''Cheat sheet'' below gives you a quick overview for the most common syntax, each link in the ''Category'' column will lead you to the more detailed explanation later in this page.
     13
     14A few other wiki pages present the advanced features of the Trac wiki markup in more depth:
     15 - TracLinks covers all the possible ways to refer precisely to any Trac resource or parts thereof,
     16 - WikiPageNames talks about the various names a wiki page can take, CamelCase or not
     17 - WikiMacros lists the macros available for generating dynamic content,
     18 - WikiProcessors and WikiHtml details how parts of the wiki text can be processed in special ways
     19
     20
     21== Cheat sheet ==
     22
     23||= '''Category''' =||= '''Wiki Markup''' =||= '''Display''' =||
     24|-----------------------------------------------------------
     25{{{#!th rowspan=3
     26[#FontStyles Font Styles]
     27}}}
     28|| `'''bold'''`, `''italic''`, `'''''Wikipedia style'''''` || \
     29|| '''bold''', ''italic'', '''''Wikipedia style''''' ||
     30|| {{{`monospaced and ''nowiki''`}}} || \
     31|| `monospaced and nowiki` ||
     32|| `**bold**`, `//italic//`, `**//!WikiCreole style//**` || \
     33|| **bold**, //italic//, **//!WikiCreole style//** ||
     34|-----------------------------------------------------------
     35||= [#Headings Headings] =||\
     36{{{#!td
     37 {{{
     38 == Level 2 ==
     39 === Level 3 ^([#hn note])^
     40 }}}
     41}}}
     42{{{#!td style="padding-left: 2em"
     43== Level 2
     44=== Level 3 ^([#hn note])^
     45}}}
     46|-----------------------------------------------------------
     47||= [#Paragraphs Paragraphs]  =||\
     48{{{#!td
     49 {{{
     50 First paragraph
     51 on multiple lines.
     52
     53 Second paragraph.
     54 }}}
     55}}}
     56{{{#!td
     57First paragraph
     58on multiple lines.
     59
     60Second paragraph.
     61}}}
     62|-----------------------------------------------------------
     63||= [#Lists Lists] =||\
     64{{{#!td
     65 {{{
     66 * bullets list
     67   on multiple paragraphs
     68   1. nested list
     69     a. different numbering
     70        styles
     71 }}}
     72}}}
     73{{{#!td
     74* bullets list
     75  on multiple paragraphs
     76  1. nested list
     77    a. different numbering
     78       styles
     79}}}
     80|-----------------------------------------------------------
     81{{{#!th
     82[#DefinitionLists Definition Lists]
     83}}}
     84{{{#!td
     85 {{{
     86  term:: definition on
     87         multiple paragraphs
     88 }}}
     89}}}
     90{{{#!td
     91 term:: definition on
     92        multiple paragraphs
     93}}}
     94|-----------------------------------------------------------
     95||= [#PreformattedText Preformatted Text] =||\
     96{{{#!td
     97 {{{
     98 {{{
     99 multiple lines, ''no wiki''
     100       white space respected
     101 }}}
     102 }}}
     103}}}
     104{{{#!td
     105 {{{
     106 multiple lines, ''no wiki''
     107       white space respected
     108 }}}
     109}}}
     110|-----------------------------------------------------------
     111||= [#Blockquotes Blockquotes] =||\
     112{{{#!td
     113 {{{
     114   if there's some leading
     115   space the text is quoted
     116 }}}
     117}}}
     118{{{#!td
     119 if there's some leading
     120 space the text is quoted
     121}}}
     122|-----------------------------------------------------------
     123||= [#DiscussionCitations Discussion Citations] =||\
     124{{{#!td
     125 {{{
     126 >> ... (I said)
     127 > (he replied)
     128 }}}
     129}}}
     130{{{#!td
     131>>... (I said)
     132> (he replied)
     133}}}
     134|-----------------------------------------------------------
     135||= [#Tables Tables] =||\
     136{{{#!td
     137 {{{
     138 ||= Table Header =|| Cell ||
     139 ||||  (details below)  ||
     140 }}}
     141}}}
     142{{{#!td
     143||= Table Header =|| Cell ||
     144||||  (details below)  ||
     145}}}
     146|-----------------------------------------------------------
     147{{{#!th rowspan=2
     148[#Links Links]
     149}}}
     150|| `http://trac.edgewall.org` ||\
     151|| http://trac.edgewall.org ||
     152|| `WikiFormatting (CamelCase)` ||\
     153|| WikiFormatting (CamelCase) ||
     154|-----------------------------------------------------------
     155{{{#!th rowspan=5
     156[#TracLinks TracLinks]
     157}}}
     158|| `wiki:WikiFormatting`, `wiki:"WikiFormatting"` ||\
     159|| wiki:WikiFormatting, wiki:"WikiFormatting" ||
     160|| `#1 (ticket)`, `[1] (changeset)`, `{1} (report)` ||\
     161|| #1 (ticket), [1] (changeset), {1} (report) ||
     162|| `ticket:1, ticket:1#comment:1` ||\
     163|| ticket:1, ticket:1#comment:1 ||
     164|| `Ticket [ticket:1]`, `[ticket:1 ticket one]` ||\
     165|| Ticket [ticket:1], [ticket:1 ticket one] ||
     166|| `Ticket [[ticket:1]]`, `[[ticket:1|ticket one]]` ||\
     167|| Ticket [[ticket:1]], [[ticket:1|ticket one]] ||
     168|-----------------------------------------------------------
     169{{{#!th rowspan=2
     170[#SettingAnchors Setting Anchors]
     171}}}
     172|| `[=#point1 (1)] First...` ||\
     173|| [=#point1 (1)] First... ||
     174|| `see [#point1 (1)]` ||\
     175|| see [#point1 (1)] ||
     176|-----------------------------------------------------------
     177{{{#!th rowspan=2
     178[#EscapingLinksandWikiPageNames Escaping Markup]
     179}}}
     180|| `!'' doubled quotes` ||\
     181|| !'' doubled quotes ||
     182|| `!wiki:WikiFormatting`, `!WikiFormatting` ||\
     183|| !wiki:WikiFormatting, !WikiFormatting ||
     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 {{{
     197 #!div style="font-size: 80%"
     198 Code highlighting:
     199   {{{#!python
     200   hello = lambda: "world"
     201   }}}
     202 }}}
     203 }}}
     204}}}
     205{{{#!td style="padding-left: 2em"
     206 {{{
     207 #!div style="font-size: 80%"
     208 Code highlighting:
     209   {{{#!python
     210   hello = lambda: "world"
     211   }}}
     212 }}}
     213}}}
     214|-----------------------------------------------------------
     215||= [#Comments Comments] =||\
     216{{{#!td
     217 {{{
     218 {{{#!comment
     219 Note to Editors: ...
     220 }}}
     221 }}}
     222}}}
     223{{{#!td style="padding-left: 2em"
     224 {{{#!comment
     225 Note to Editors: ...
     226 }}}
     227}}}
     228|-----------------------------------------------------------
     229||= [#Miscellaneous Miscellaneous] =||\
     230{{{#!td
     231 {{{
     232 Line [[br]] break
     233 Line \\ break
     234 ----
     235 }}}
     236}}}
     237{{{#!td style="padding-left: 2em"
     238Line [[br]] break
     239Line \\ break
     240----
     241}}}
    14242
    15243
     
    32260   * ^superscript^
    33261   * ,,subscript,,
     262   * **also bold**, //italic as well//,
     263     and **'' bold italic **'' //(since 0.12)//
    34264  }}}
    35265}}}
     
    47277 * ^superscript^
    48278 * ,,subscript,,
     279 * **also bold**, //italic as well//,
     280   and **'' bold italic **'' //(since 0.12)//
    49281}}}
    50282
     
    53285 * {{{ ! }}} 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.
    54286 * all the font styles marks have to be used in opening/closing pairs,
    55    and they must nest properly
     287   and they must nest properly (in particular, an `''` italic can't be paired
     288   with a `//` one, and `'''` can't be paired with `**`)
     289
    56290
    57291== Headings ==
    58292
    59293You can create heading by starting a line with one up to six ''equal'' characters ("=")
    60 followed by a single space and the headline text. The headline text can be
    61 followed by the same number of ''='' characters, but this is no longer mandatory.
    62 The heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
     294followed by a single space and the headline text.
     295
     296[=#hn] The headline text can be followed by the same number of "=" characters, but this is no longer mandatory.
     297
     298Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
    63299
    64300||= Wiki Markup =||= Display =||
     
    361597}}}
    362598
    363 Links can be given a more descriptive title by writing the link followed by a space and a title and all this inside square brackets.  If the descriptive title is omitted, then the explicit prefix is discarded, unless the link is an external link. This can be useful for wiki pages not adhering to the WikiPageNames convention.
    364 
    365 ||= Wiki Markup =||= Display =||
    366 {{{#!td
    367   {{{
    368    * [http://www.edgewall.com/ Edgewall Software]
    369    * [wiki:TitleIndex Title Index]
     599Links can be given a more descriptive title by writing the link followed by a space and a title and all this inside square brackets.
     600If 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.
     601
     602||= Wiki Markup =||= Display =||
     603{{{#!td
     604  {{{
     605   * [http://www.edgewall.com Edgewall Software]
     606   * [wiki:TitleIndex Title Index]
     607   * [wiki:TitleIndex]
    370608   * [wiki:ISO9000]
    371609  }}}
    372610}}}
    373611{{{#!td
    374  * [http://www.edgewall.com/ Edgewall Software]
    375  * [wiki:TitleIndex Title Index]
    376  * [wiki:ISO9000]
    377 }}}
     612   * [http://www.edgewall.com Edgewall Software]
     613   * [wiki:TitleIndex Title Index]
     614   * [wiki:TitleIndex]
     615   * [wiki:ISO9000]
     616}}}
     617
     618Following 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.
     619
     620{{{#!td
     621  {{{
     622   * [[http://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{{{#!td
     631   * [[http://www.edgewall.com|Edgewall Software]]
     632   * [[wiki:TitleIndex|Title Index]]
     633     or even [[TitleIndex|Title Index]]
     634   * [[wiki:TitleIndex]]
     635     ''' but not ![[TitleIndex]]! '''
     636   * [[ISO9000]]
     637}}}
     638
     639'''Note''': the [trac:WikiCreole] style for links is quick to type and
     640certainly looks familiar as it's the one used on Wikipedia and in many
     641other wikis. Unfortunately it conflicts with the syntax for [#Macros macros].
     642So in the rare case when you need to refer to a page which is named after
     643a macro (typical examples being TitleIndex, InterTrac and InterWiki),
     644by writing `[[TitleIndex]]` you will actually call the macro instead of linking
     645to the page.
    378646
    379647== Trac Links ==
     
    388656   * Changesets: r1, [1] or changeset:1
    389657   * ...
     658   * targeting other Trac instances,
     659     so called InterTrac links:
     660     - Tickets: #Trac1 or Trac:ticket:1
     661     - Changesets: [Trac1] or Trac:changeset:1
    390662  }}}
    391663}}}
     
    395667 * Changesets: r1, [1] or changeset:1
    396668 * ...
    397 }}}
    398 
    399 There are many more flavors of Trac links, see TracLinks for more in-depth information.
     669 * targeting other Trac instances,
     670   so called InterTrac links:
     671   - Tickets: #Trac1 or Trac:ticket:1
     672   - Changesets: [Trac1] or Trac:changeset:1
     673}}}
     674
     675There are many more flavors of Trac links, see TracLinks for more in-depth information and a reference for all the default link resolvers.
     676
     677
     678== Setting Anchors ==
     679
     680An 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:
     681
     682{{{
     683[=#point1]
     684}}}
     685
     686This syntax was chosen to match the format for explicitly naming the header id [#Headings documented above]. For example:
     687{{{
     688== Long title == #title
     689}}}
     690
     691It's also very close to the syntax for the corresponding link to that anchor:
     692{{{
     693[#point1]
     694}}}
     695
     696Optionally, a label can be given to the anchor:
     697{{{
     698[[=#point1 '''Point 1''']]
     699}}}
     700
     701||= Wiki Markup =||= Display =||
     702|----------------------------------
     703{{{#!td
     704  {{{
     705  [#point2 jump to the second point]
     706
     707  ...
     708
     709  Point2:  [=#point2] Jump here
     710  }}}
     711}}}
     712{{{#!td
     713  [#point2 jump to the second point]
     714
     715  ...
     716
     717  Point2:  [=#point2] Jump here
     718}}}
     719
     720For 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)^)]]`.
    400721
    401722
     
    640961  {{{
    641962  Four or more dashes will be replaced
    642   by a horizontal line (<HR>)
     963  by an horizontal line (<HR>)
    643964  ----
    644965  See?
     
    647968{{{#!td
    648969Four or more dashes will be replaced
    649 by a horizontal line (<HR>)
     970by an horizontal line (<HR>)
    650971----
    651972See?
    652973}}}
    653 
    654 
    655 ----
    656 See also: TracLinks, TracGuide, WikiHtml, WikiMacros, WikiProcessors, TracSyntaxColoring.
     974|----------------------------------
     975{{{#!td
     976  {{{
     977  "macro" style [[br]] line break
     978  }}}
     979}}}
     980{{{#!td
     981"macro" style [[br]] line break
     982}}}
     983|----------------------------------
     984{{{#!td
     985  {{{
     986  !WikiCreole style \\ line\\break
     987  }}}
     988}}}
     989{{{#!td
     990!WikiCreole style \\ line\\break
     991}}}