Edgewall Software

Changes between Version 21 and Version 22 of 0.12/WikiFormatting


Ignore:
Timestamp:
Jul 16, 2012, 9:16:12 PM (12 years ago)
Author:
trac
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • 0.12/WikiFormatting

    v21 v22  
    1 ** Note: this page was used to prepare the 0.12 version of wiki:/WikiFormatting, see now directly that toplevel page **
     1** Note: this page documents the 0.12 version of Trac, see [[0.11/WikiFormatting]] if you need the previous version **
     2
    23= WikiFormatting =
    34[[TracGuideToc]]
     5[[TranslatedPages]]
    46
    57Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole.
     
    2022
    2123
    22 == Cheatsheet ==
     24== Cheat sheet ==
    2325
    2426||= '''Category''' =||= '''Wiki Markup''' =||= '''Display''' =||
     
    2931|| `'''bold'''`, `''italic''`, `'''''Wikipedia style'''''` || \
    3032|| '''bold''', ''italic'', '''''Wikipedia style''''' ||
    31 || {{{`monospaced and ''nowiki''`}}} || \
    32 || `monospaced and nowiki` ||
     33|| {{{`monospaced (''other markup ignored'')`}}} || \
     34|| `monospaced (''other markup ignored'')` ||
    3335|| `**bold**`, `//italic//`, `**//!WikiCreole style//**` || \
    3436|| **bold**, //italic//, **//!WikiCreole style//** ||
     
    4244}}}
    4345{{{#!td style="padding-left: 2em"
    44 == Level 2
     46== Level 2 ==
    4547=== Level 3 ^([#hn note])^
    4648}}}
     
    6668 {{{
    6769 * bullets list
    68    on multiple paragraphs
     70   on multiple lines
    6971   1. nested list
    7072     a. different numbering
     
    7476{{{#!td
    7577* bullets list
    76   on multiple paragraphs
     78  on multiple lines
    7779  1. nested list
    7880    a. different numbering
     
    8688 {{{
    8789  term:: definition on
    88          multiple paragraphs
     90         multiple lines
    8991 }}}
    9092}}}
    9193{{{#!td
    9294 term:: definition on
    93         multiple paragraphs
     95        multiple lines
    9496}}}
    9597|-----------------------------------------------------------
     
    168170|| Ticket [[ticket:1]], [[ticket:1|ticket one]] ||
    169171|-----------------------------------------------------------
    170 {{{#!th rowspan=2
    171 [#EscapingLinksandWikiPageNames Escaping Markup]
     172{{{#!th rowspan=2
     173[#SettingAnchors Setting Anchors]
     174}}}
     175|| `[=#point1 (1)] First...` ||\
     176|| [=#point1 (1)] First... ||
     177|| `see [#point1 (1)]` ||\
     178|| see [#point1 (1)] ||
     179|-----------------------------------------------------------
     180{{{#!th rowspan=3
     181[#Escaping Escaping Markup]
    172182}}}
    173183|| `!'' doubled quotes` ||\
     
    175185|| `!wiki:WikiFormatting`, `!WikiFormatting` ||\
    176186|| !wiki:WikiFormatting, !WikiFormatting ||
     187|| {{{`}}}`{{{-}}}`{{{`}}}` triple curly brackets` ||\
     188|| `{{{-}}}` triple curly brackets ||
    177189|-----------------------------------------------------------
    178190||= [#Images Images] =|| `[[Image(`''link''`)]]` || [[Image(htdocs:../common/trac_logo_mini.png)]] ||
     
    287299followed by a single space and the headline text.
    288300
    289 [=#hn] The headline text can be followed by the same number of "=" characters, but this is no longer mandatory.
     301[=#hn]
     302The headline text can be followed by the same number of "=" characters, but this is no longer mandatory.
    290303
    291304Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
     
    304317  {{{
    305318  #!div
     319  = Heading =
    306320  == Subheading
    307321  === About ''this'' ===
     
    669683
    670684
    671 == Escaping Links and WikiPageNames ==
     685== Setting Anchors ==
     686
     687An 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:
     688
     689{{{
     690[=#point1]
     691}}}
     692
     693This syntax was chosen to match the format for explicitly naming the header id [#Headings documented above]. For example:
     694{{{
     695== Long title == #title
     696}}}
     697
     698It's also very close to the syntax for the corresponding link to that anchor:
     699{{{
     700[#point1]
     701}}}
     702
     703Optionally, a label can be given to the anchor:
     704{{{
     705[[=#point1 '''Point 1''']]
     706}}}
     707
     708||= Wiki Markup =||= Display =||
     709|----------------------------------
     710{{{#!td
     711  {{{
     712  [#point2 jump to the second point]
     713
     714  ...
     715
     716  Point2:  [=#point2] Jump here
     717  }}}
     718}}}
     719{{{#!td
     720  [#point2 jump to the second point]
     721
     722  ...
     723
     724  Point2:  [=#point2] Jump here
     725}}}
     726
     727For 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)^)]]`.
     728
     729
     730== Escaping Links, WikiPageNames and other Markup == #Escaping
    672731
    673732You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
     
    679738   !#42 is not a link
    680739  }}}
     740  {{{
     741Various forms of escaping for list markup:
     742 `-` escaped minus sign \\
     743 ``1. escaped number  \\
     744 {{{*}}} escaped asterisk sign
     745  }}}
    681746}}}
    682747{{{#!td
    683748 !NoHyperLink
    684749 !#42 is not a link
     750
     751Various forms of escaping for list markup:
     752 `-` escaped minus sign \\
     753 ``1. escaped number  \\
     754 {{{*}}} escaped asterisk sign
    685755}}}
    686756
     
    694764 * `[[Image(wiki:WikiFormatting:picture.gif)]]` (referring to attachment on another page)
    695765 * `[[Image(ticket:1:picture.gif)]]` (file attached to a ticket)
    696  * `[[Image(htdocs:picture.gif)]]` (referring to a file inside project htdocs)
     766 * `[[Image(htdocs:picture.gif)]]` (referring to a file inside the [TracEnvironment environment] `htdocs` directory)
    697767 * `[[Image(source:/trunk/trac/htdocs/trac_logo_mini.png)]]` (a file in repository)
    698768
     
    707777}}}
    708778
    709 See WikiMacros for further documentation on the `[[Image()]]` macro.
     779See WikiMacros for further documentation on the `[[Image()]]` macro, which has several useful options (`title=`, `link=`, etc.)
    710780
    711781
     
    9381008!WikiCreole style \\ line\\break
    9391009}}}
     1010