Changes between Version 1 and Version 2 of WikiFormatting


Ignore:
Timestamp:
Nov 29, 2015, 3:00:01 AM (7 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v1 v2  
    1 = WikiFormatting =
     1= WikiFormatting
     2
    23[[TracGuideToc]]
    34
    45Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole.
    56
    6 Trac has a built in small and powerful wiki rendering engine. This wiki engine implements an ever growing subset of the commands from other popular Wikis,
    7 especially [http://moinmo.in/ MoinMoin] and [trac:WikiCreole].
    8 
     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, especially [http://moinmo.in/ MoinMoin] and [trac:WikiCreole].
    98
    109This page will give you an in-depth explanation of the wiki markup available anywhere WikiFormatting is allowed.
    1110
    12 The ''Cheat sheet'' below gives you a quick overview for the most common syntax, each link in the ''Category'' column will lead you to the more detailed explanation later in this page.
     11The sections below provide an overview for the most common syntax, each link in the ''Category'' column will lead you to the more detailed explanation later in this page.
    1312
    1413A 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,
     14 - TracLinks covers all the possible ways to refer precisely to any Trac resource or parts thereof
     15 - WikiPageNames covers the various names a wiki page can take, CamelCase or not
     16 - WikiMacros lists the macros available for generating dynamic content
    1817 - WikiProcessors and WikiHtml details how parts of the wiki text can be processed in special ways
    19 
    20 
    21 == Cheat sheet ==
     18 - [trac:wiki:TracDev/Proposals/AdvancedWikiOperations AdvancedWikiOperations] provides some operations in uncommon or administrative scenarios
     19
     20== Common wiki markup
    2221
    2322||= '''Category''' =||= '''Wiki Markup''' =||= '''Display''' =||
     
    2827|| `'''bold'''`, `''italic''`, `'''''Wikipedia style'''''` || \
    2928|| '''bold''', ''italic'', '''''Wikipedia style''''' ||
    30 || {{{`monospaced and ''nowiki''`}}} || \
    31 || `monospaced and ''nowiki''` ||
     29|| {{{`monospaced (''other markup ignored'')`}}} || \
     30|| `monospaced (''other markup ignored'')` ||
    3231|| `**bold**`, `//italic//`, `**//!WikiCreole style//**` || \
    3332|| **bold**, //italic//, **//!WikiCreole style//** ||
     
    4140}}}
    4241{{{#!td style="padding-left: 2em"
    43 == Level 2
     42== Level 2 ==
    4443=== Level 3 ^([#hn note])^
    4544}}}
     
    6564 {{{
    6665 * bullets list
    67    on multiple paragraphs
     66   on multiple lines
    6867   1. nested list
    6968     a. different numbering
     
    7372{{{#!td
    7473* bullets list
    75   on multiple paragraphs
     74  on multiple lines
    7675  1. nested list
    7776    a. different numbering
     
    8584 {{{
    8685  term:: definition on
    87          multiple paragraphs
     86         multiple lines
    8887 }}}
    8988}}}
    9089{{{#!td
    9190 term:: definition on
    92         multiple paragraphs
     91        multiple lines
    9392}}}
    9493|-----------------------------------------------------------
     
    175174|| see [#point1 (1)] ||
    176175|-----------------------------------------------------------
    177 {{{#!th rowspan=2
    178 [#EscapingLinksandWikiPageNames Escaping Markup]
     176{{{#!th rowspan=3
     177[#Escaping Escaping Markup]
    179178}}}
    180179|| `!'' doubled quotes` ||\
     
    182181|| `!wiki:WikiFormatting`, `!WikiFormatting` ||\
    183182|| !wiki:WikiFormatting, !WikiFormatting ||
     183|| [[html(<code>`{{{-}}}` triple curly brackets</code>)]] ||\
     184|| `{{{-}}}` triple curly brackets ||
    184185|-----------------------------------------------------------
    185186||= [#Images Images] =|| `[[Image(`''link''`)]]` || [[Image(htdocs:../common/trac_logo_mini.png)]] ||
     
    241242}}}
    242243
    243 
    244 == Font Styles ==
     244== Font Styles
    245245
    246246The Trac wiki supports the following font styles:
     
    262262   * **also bold**, //italic as well//,
    263263     and **'' bold italic **'' //(since 0.12)//
     264   * [[span(style=color: #FF0000, a red text )]]
    264265  }}}
    265266}}}
     
    279280 * **also bold**, //italic as well//,
    280281   and **'' bold italic **'' //(since 0.12)//
     282 * [[span(style=color: #FF0000, a red text )]]
    281283}}}
    282284
     
    288290   with a `//` one, and `'''` can't be paired with `**`)
    289291
    290 
    291 == Headings ==
    292 
    293 You can create heading by starting a line with one up to six ''equal'' characters ("=")
    294 followed by a single space and the headline text.
     292== Headings
     293
     294You can create heading by starting a line with one up to six ''equal'' characters ("=") followed by a single space and the headline text.
    295295
    296296[=#hn]
     
    312312  {{{
    313313  #!div
     314  = Heading =
    314315  == Subheading
    315316  === About ''this'' ===
     
    319320}}}
    320321
    321 == Paragraphs ==
     322== Paragraphs
    322323
    323324A new text paragraph is created whenever two blocks of text are separated by one or more empty lines.
     
    347348}}}
    348349
    349 == Lists ==
     350== Lists
    350351
    351352The wiki supports both ordered/numbered and unordered lists.
     
    403404}}}
    404405
    405 
    406 == Definition Lists ==
     406== Definition Lists
    407407
    408408The wiki also supports definition lists.
     
    428428Note that you need a space in front of the defined term.
    429429
    430 
    431 == Preformatted Text ==
     430== Preformatted Text
    432431
    433432Block 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.
     
    451450Note that this kind of block is also used for selecting lines that should be processed through WikiProcessors.
    452451
    453 == Blockquotes ==
     452== Blockquotes
    454453
    455454In order to mark a paragraph as blockquote, indent that paragraph with two spaces.
     
    467466}}}
    468467
    469 == Discussion Citations ==
     468== Discussion Citations
    470469
    471470To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 
     
    487486}}}
    488487
    489 
    490 == Tables ==
    491 === Simple Tables ===
     488== Tables
     489=== Simple Tables
     490
    492491Simple tables can be created like this:
    493492||= Wiki Markup =||= Display =||
     
    579578}}}
    580579
    581 === Complex Tables ===
     580=== Complex Tables
    582581
    583582If 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].
    584583
    585 
    586 == Links ==
     584== Links
    587585
    588586Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.
     
    638636}}}
    639637
    640 '''Note''': the [trac:WikiCreole] style for links is quick to type and
    641 certainly looks familiar as it's the one used on Wikipedia and in many
    642 other wikis. Unfortunately it conflicts with the syntax for [#Macros macros].
    643 So in the rare case when you need to refer to a page which is named after
    644 a macro (typical examples being TitleIndex, InterTrac and InterWiki),
    645 by writing `[[TitleIndex]]` you will actually call the macro instead of linking
    646 to the page.
    647 
    648 == Trac Links ==
     638'''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].
     639So 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.
     640
     641== Trac Links
    649642
    650643Wiki 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:
     
    676669There are many more flavors of Trac links, see TracLinks for more in-depth information and a reference for all the default link resolvers.
    677670
    678 
    679 == Setting Anchors ==
     671== Setting Anchors
    680672
    681673An 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:
     
    721713For 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)^)]]`.
    722714
    723 
    724 == Escaping Links and WikiPageNames ==
     715== Escaping Links, WikiPageNames and other Markup == #Escaping
    725716
    726717You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
     
    732723   !#42 is not a link
    733724  }}}
     725  {{{
     726Various forms of escaping for list markup:
     727 ^^- escaped minus sign \\
     728 ^^1. escaped number  \\
     729 ^^* escaped asterisk sign
     730  }}}
    734731}}}
    735732{{{#!td
    736733 !NoHyperLink
    737734 !#42 is not a link
    738 }}}
    739 
    740 == Images ==
     735
     736Various forms of escaping for list markup:
     737 ^^- escaped minus sign \\
     738 ^^1. escaped number  \\
     739 ^^* escaped asterisk sign
     740}}}
     741
     742== Images
    741743
    742744Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags.
     
    762764See WikiMacros for further documentation on the `[[Image()]]` macro, which has several useful options (`title=`, `link=`, etc.)
    763765
    764 
    765 == Macros ==
     766== Macros
    766767
    767768Macros are ''custom functions'' to insert dynamic content in a page.
     
    791792}}}
    792793
    793 
    794 == Processors ==
     794== Processors
    795795
    796796Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in
     
    929929See WikiProcessors for more information.
    930930
    931 
    932 == Comments ==
     931== Comments
    933932
    934933Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text.
     
    954953}}}
    955954
    956 == Miscellaneous ==
     955== Miscellaneous
    957956
    958957An horizontal line can be used to separated different parts of your page:
     
    991990!WikiCreole style \\ line\\break
    992991}}}
    993