developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Changes between Version 8 and Version 9 of WikiFormatting


Ignore:
Timestamp:
May 12, 2017, 2:16:00 PM (4 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v8 v9  
    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 a 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,
    18  - WikiProcessors and WikiHtml details how parts of the wiki text can be processed in special ways
    19 
    20 
    21 == Cheat sheet ==
     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, whether in CamelCase or not.
     16 - WikiMacros lists the macros available for generating dynamic content.
     17 - WikiProcessors and WikiHtml details how parts of the wiki text can be processed in special ways.
     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''' =||
     
    3635{{{#!td
    3736 {{{
    38  == Level 2 ==
     37 == Level 2
    3938 === Level 3 ^([#hn note])^
    4039 }}}
    4140}}}
    4241{{{#!td style="padding-left: 2em"
    43 == Level 2 ==
     42== Level 2
    4443=== Level 3 ^([#hn note])^
    4544}}}
     
    6463{{{#!td
    6564 {{{
    66  * bullets list
     65 * bullet list
    6766   on multiple lines
    6867   1. nested list
     
    7271}}}
    7372{{{#!td
    74 * bullets list
     73* bullet list
    7574  on multiple lines
    7675  1. nested list
     
    182181|| `!wiki:WikiFormatting`, `!WikiFormatting` ||\
    183182|| !wiki:WikiFormatting, !WikiFormatting ||
    184 || {{{`}}}`{{{-}}}`{{{`}}}` triple curly brackets` ||\
     183|| [[html(<code>`{{{-}}}` triple curly brackets</code>)]] ||\
    185184|| `{{{-}}}` triple curly brackets ||
    186185|-----------------------------------------------------------
     
    243242}}}
    244243
    245 
    246 == Font Styles ==
     244== Font Styles
    247245
    248246The Trac wiki supports the following font styles:
     
    264262   * **also bold**, //italic as well//,
    265263     and **'' bold italic **'' //(since 0.12)//
     264   * [[span(style=color: #FF0000, a red text )]]
    266265  }}}
    267266}}}
     
    281280 * **also bold**, //italic as well//,
    282281   and **'' bold italic **'' //(since 0.12)//
     282 * [[span(style=color: #FF0000, a red text )]]
    283283}}}
    284284
     
    287287 * {{{ ! }}} 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.
    288288 * all the font styles marks have to be used in opening/closing pairs,
    289    and they must nest properly (in particular, an `''` italic can't be paired
    290    with a `//` one, and `'''` can't be paired with `**`)
    291 
    292 
    293 == Headings ==
    294 
    295 You can create heading by starting a line with one up to six ''equal'' characters ("=")
    296 followed by a single space and the headline text.
     289   and they must nest properly; in particular, an `''` italic can't be paired
     290   with a `//` one, and `'''` can't be paired with `**`.
     291
     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.
    297295
    298296[=#hn]
    299 The headline text can be followed by the same number of "=" characters, but this is no longer mandatory.
     297The headline text can be followed by the same number of "=" characters, but this is not mandatory. That is, `=== Section3 ===` is identical to `=== Section3`.
    300298
    301299Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
     
    322320}}}
    323321
    324 == Paragraphs ==
     322== Paragraphs
    325323
    326324A new text paragraph is created whenever two blocks of text are separated by one or more empty lines.
     
    350348}}}
    351349
    352 == Lists ==
     350== Lists
    353351
    354352The wiki supports both ordered/numbered and unordered lists.
     
    406404}}}
    407405
    408 
    409 == Definition Lists ==
     406== Definition Lists
    410407
    411408The wiki also supports definition lists.
     
    414411{{{#!td
    415412  {{{
    416    ll ''am'' a::
    417      some kind of '''mammal''', with hair
     413   llama::
     414     some kind of mammal, with hair
    418415   ppython::
    419416     some kind of reptile, without hair
     
    422419}}}
    423420{{{#!td
    424  ll ''am'' a::
    425    some kind of '''mammal''', with hair
     421 llama::
     422   some kind of mammal, with hair
    426423 ppython::
    427424   some kind of reptile, without hair
     
    431428Note that you need a space in front of the defined term.
    432429
    433 
    434 == Preformatted Text ==
     430== Preformatted Text
    435431
    436432Block 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.
     
    454450Note that this kind of block is also used for selecting lines that should be processed through WikiProcessors.
    455451
    456 == Blockquotes ==
     452== Blockquotes
    457453
    458454In order to mark a paragraph as blockquote, indent that paragraph with two spaces.
     
    462458{{{
    463459Paragraph
    464   This text is a quote
    465      from someone else.
     460  This text is a quote from someone else.
    466461}}}
    467462}}}
    468463{{{#!td
    469464Paragraph
    470   This text is a quote
    471      from someone else.
    472 }}}
    473 
    474 == Discussion Citations ==
    475 
    476 To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 
     465  This text is a quote from someone else.
     466}}}
     467
     468== Discussion Citations
     469
     470To delineate a citation in an ongoing discussion thread, such as the ticket comment area, email-like citation marks (">", ">>", etc.) may be used. 
    477471
    478472||= Wiki Markup =||= Display =||
     
    492486}}}
    493487
    494 
    495 == Tables ==
    496 === Simple Tables ===
     488== Tables
     489=== Simple Tables
     490
    497491Simple tables can be created like this:
    498492||= Wiki Markup =||= Display =||
     
    584578}}}
    585579
    586 === Complex Tables ===
    587 
    588 If 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].
    589 
    590 
    591 == Links ==
    592 
    593 Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.
     580=== Complex Tables
     581
     582If 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].
     583
     584== Links
     585
     586Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark ('!'), such as {{{!WikiPageLink}}}.
    594587
    595588||= Wiki Markup =||= Display =||
     
    643636}}}
    644637
    645 '''Note''': the [trac:WikiCreole] style for links is quick to type and
    646 certainly looks familiar as it's the one used on Wikipedia and in many
    647 other wikis. Unfortunately it conflicts with the syntax for [#Macros macros].
    648 So in the rare case when you need to refer to a page which is named after
    649 a macro (typical examples being TitleIndex, InterTrac and InterWiki),
    650 by writing `[[TitleIndex]]` you will actually call the macro instead of linking
    651 to the page.
    652 
    653 == 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
    654642
    655643Wiki 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:
     
    681669There are many more flavors of Trac links, see TracLinks for more in-depth information and a reference for all the default link resolvers.
    682670
    683 
    684 == Setting Anchors ==
     671== Setting Anchors
    685672
    686673An 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:
     
    695682}}}
    696683
    697 It's also very close to the syntax for the corresponding link to that anchor:
     684It is also very close to the syntax for the corresponding link to that anchor:
    698685{{{
    699686[#point1]
     
    714701
    715702  Point2:  [=#point2] Jump here
     703  }}}
     704}}}
     705{{{#!td
     706  [#point2 jump to the second point]
    716707
    717708  ...
    718709
    719   Point3: [=#point3 '''Point 3''']
    720 
    721   Point4: [[=#point4|Point 4]]
    722 
    723 
    724   }}}
    725 }}}
    726 {{{#!td
    727   [#point2 jump to the second point]
    728 
    729   ...
    730 
    731710  Point2:  [=#point2] Jump here
    732 
    733   ...
    734 
    735   Point3: [=#point3 '''Point 3''']
    736 
    737   Point4: [[=#point4|Point 4]]
    738 
    739 }}}
    740 
    741 For 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)^)]]`.
    742 
     711}}}
     712
     713For 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)^)]]`.
    743714
    744715== Escaping Links, WikiPageNames and other Markup == #Escaping
    745716
    746 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
     717You may avoid making hyperlinks out of TracLinks by preceding an expression with a single exclamation mark ('!').
    747718
    748719||= Wiki Markup =||= Display =||
     
    754725  {{{
    755726Various forms of escaping for list markup:
    756  `-` escaped minus sign \\
    757  ``1. escaped number  \\
    758  {{{*}}} escaped asterisk sign
     727 ^^- escaped minus sign \\
     728 ^^1. escaped number  \\
     729 ^^* escaped asterisk sign
    759730  }}}
    760731}}}
     
    764735
    765736Various forms of escaping for list markup:
    766  `-` escaped minus sign \\
    767  ``1. escaped number  \\
    768  {{{*}}} escaped asterisk sign
    769 }}}
    770 
    771 == Images ==
     737 ^^- escaped minus sign \\
     738 ^^1. escaped number  \\
     739 ^^* escaped asterisk sign
     740}}}
     741
     742== Images
    772743
    773744Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags.
     
    793764See WikiMacros for further documentation on the `[[Image()]]` macro, which has several useful options (`title=`, `link=`, etc.)
    794765
    795 
    796 == Macros ==
     766== Macros
    797767
    798768Macros are ''custom functions'' to insert dynamic content in a page.
     
    822792}}}
    823793
    824 
    825 == Processors ==
     794== Processors
    826795
    827796Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in
     
    960929See WikiProcessors for more information.
    961930
    962 
    963 == Comments ==
     931== Comments
    964932
    965933Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text.
     
    973941  Your comment for editors here
    974942  }}}
    975   see ;-)
     943  see.
    976944  }}}
    977945}}}
     
    982950  Your comment for editors here
    983951  }}}
    984   see ;-)
    985 }}}
    986 
    987 == Miscellaneous ==
    988 
    989 An horizontal line can be used to separated different parts of your page:
    990 
    991 ||= Wiki Markup =||= Display =||
    992 {{{#!td
     952  see.
     953}}}
     954
     955== Miscellaneous
     956
     957||= Wiki Markup =||= Display =||
     958{{{#!td
     959  Horizontal line:
    993960  {{{
    994961  Four or more dashes will be replaced
    995   by an horizontal line (<HR>)
     962  by a horizontal line (<HR>)
    996963  ----
    997964  See?
     
    1000967{{{#!td
    1001968Four or more dashes will be replaced
    1002 by an horizontal line (<HR>)
     969by a horizontal line (<HR>)
    1003970----
    1004971See?
     
    1006973|----------------------------------
    1007974{{{#!td
    1008   {{{
    1009   "macro" style [[br]] line break
    1010   }}}
    1011 }}}
    1012 {{{#!td
    1013 "macro" style [[br]] line break
     975  Two examples of line breaks:
     976  {{{
     977  "macro" style [[BR]] line break
     978  }}}
     979  or:
     980  {{{
     981  !WikiCreole style \\ line\\break
     982  }}}
     983}}}
     984{{{#!td
     985"macro" style [[BR]] line break
     986
     987!WikiCreole style \\ line\\break
    1014988}}}
    1015989|----------------------------------
    1016 {{{#!td
    1017   {{{
    1018   !WikiCreole style \\ line\\break
    1019   }}}
    1020 }}}
    1021 {{{#!td
    1022 !WikiCreole style \\ line\\break
    1023 }}}
    1024