Changes between Version 2 and Version 3 of WikiFormatting


Ignore:
Timestamp:
Jan 10, 2010 6:55:08 PM (6 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v2 v3  
    11= WikiFormatting =
    22[[TracGuideToc]]
    3 [[PageOutline(2-5,,inline)]]
    43
    54Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole.
     
    1615The Trac wiki supports the following font styles:
    1716{{{
    18  * '''bold'''
     17 * '''bold''', '''!''' can be bold too''', and '''! '''
    1918 * ''italic''
    2019 * '''''bold italic'''''
     
    2726
    2827Display:
    29  * '''bold'''
     28 * '''bold''', '''!''' can be bold too''', and '''! '''
    3029 * ''italic''
    3130 * '''''bold italic'''''
     
    3635 * ,,subscript,,
    3736
    38 Note that the `{{{...}}}` 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.
     37Notes:
     38 * `{{{...}}}` 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.
     39 * {{{ ! }}} 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.
    3940
    4041== Headings ==
     
    4344followed by a single space and the headline text. The line should end with a space
    4445followed by the same number of ''='' characters.
     46The heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
    4547
    4648Example:
     
    4951== Subheading ==
    5052=== About ''this'' ===
     53=== Explicit id === #using-explicit-id-in-heading
    5154}}}
    5255
     
    5558== Subheading ==
    5659=== About ''this'' ===
    57 
     60=== Explicit id === #using-explicit-id-in-heading
    5861
    5962== Paragraphs ==
     
    7881 * Item 1
    7982   * Item 1.1
     83      * Item 1.1.1   
     84      * Item 1.1.2
     85      * Item 1.1.3
     86   * Item 1.2
    8087 * Item 2
    8188
    8289 1. Item 1
    83    1. Item 1.1
     90   a. Item 1.a
     91   a. Item 1.b
     92      i. Item 1.b.i
     93      i. Item 1.b.ii
    8494 1. Item 2
     95And numbered lists can also be given an explicit number:
     96 3. Item 3
    8597}}}
    8698
     
    88100 * Item 1
    89101   * Item 1.1
     102      * Item 1.1.1
     103      * Item 1.1.2
     104      * Item 1.1.3
     105   * Item 1.2
    90106 * Item 2
    91107
    92108 1. Item 1
    93    1. Item 1.1
     109   a. Item 1.a
     110   a. Item 1.b
     111      i. Item 1.b.i
     112      i. Item 1.b.ii
    94113 1. Item 2
     114And numbered lists can also be given an explicit number:
     115 3. Item 3
    95116
    96117Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph.
     
    98119
    99120== Definition Lists ==
     121
    100122
    101123The wiki also supports definition lists.
     
    151173  This text is a quote from someone else.
    152174
     175== Discussion Citations ==
     176
     177To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 
     178
     179Example:
     180{{{
     181>> Someone's original text
     182> Someone else's reply text
     183My reply text
     184}}}
     185
     186Display:
     187>> Someone's original text
     188> Someone else's reply text
     189My reply text
     190
     191''Note: Some WikiFormatting elements, such as lists and preformatted text, are  lost in the citation area.  Some reformatting may be necessary to create a clear citation.''
     192
    153193== Tables ==
    154194
     
    179219 TitleIndex, http://www.edgewall.com/, !NotAlink
    180220
    181 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 disguarded, unless the link is an external link. This can be useful for wiki pages not adhering to the WikiPageNames convention.
     221Links 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.
    182222
    183223Example:
     
    193233 * [wiki:ISO9000]
    194234
    195 
    196 === Trac Links ===
     235== Trac Links ==
    197236
    198237Wiki 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:
     
    201240 * Reports: {1} or report:1
    202241 * Changesets: r1, [1] or changeset:1
    203  * Revision Logs: r1:3, [1:3] or log:branches/0.8-stable#1:3
    204  * Wiki pages: CamelCase or wiki:CamelCase
    205  * Milestones: milestone:1.0 or milestone:"End-of-days Release"
    206  * Files: source:trunk/COPYING
    207  * Attachments: attachment:"file name.doc"
    208  * A specific file revision: source:/trunk/COPYING#200
    209  * A filename with embedded space: source:"/trunk/README FIRST"
     242 * ...
    210243}}}
    211244
     
    214247 * Reports: {1} or report:1
    215248 * Changesets: r1, [1] or changeset:1
    216  * Revision Logs: r1:3, [1:3] or log:branches/0.8-stable#1:3
    217  * Wiki pages: CamelCase or wiki:CamelCase
    218  * Milestones: milestone:1.0 or milestone:"End-of-days Release"
    219  * Files: source:trunk/COPYING
    220  * Attachments: attachment:"file name.doc"
    221  * A specific file revision: source:/trunk/COPYING#200
    222  * A filename with embedded space: source:"/trunk/README FIRST"
    223 
    224 See TracLinks for more in-depth information.
     249 * ...
     250
     251There are many more flavors of Trac links, see TracLinks for more in-depth information.
    225252
    226253
     
    242269== Images ==
    243270
    244 Urls ending with `.png`, `.gif` or `.jpg` are automatically interpreted as image links, and converted to `<img>` tags.
    245 
    246 Example:
    247 {{{
    248 http://www.edgewall.com/gfx/trac_example_image.png
    249 }}}
    250 
    251 Display:
    252 
    253 http://www.edgewall.com/gfx/trac_example_image.png
    254 
    255 However, this doesn't give much control over the display mode. This way of inserting images is deprecated in favor of the more powerful `Image` macro (see WikiMacros).
     271Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags.
     272
     273You 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)]]`.
     274
     275In addition to the current page, it is possible to refer to other resources:
     276 * `[[Image(wiki:WikiFormatting:picture.gif)]]` (referring to attachment on another page)
     277 * `[[Image(ticket:1:picture.gif)]]` (file attached to a ticket)
     278 * `[[Image(htdocs:picture.gif)]]` (referring to a file inside project htdocs)
     279 * `[[Image(source:/trunk/trac/htdocs/trac_logo_mini.png)]]` (a file in repository)
     280
     281Example display: [[Image(htdocs:../common/trac_logo_mini.png)]]
     282
     283See WikiMacros for further documentation on the `[[Image()]]` macro.
    256284
    257285
     
    262290Example:
    263291{{{
    264  [[Timestamp]]
    265 }}}
    266 
    267 Display:
    268  [[Timestamp]]
     292 [[RecentChanges(Trac,3)]]
     293}}}
     294
     295Display:
     296 [[RecentChanges(Trac,3)]]
    269297
    270298See WikiMacros for more information, and a list of installed macros.
     
    295323#!html
    296324<pre class="wiki">{{{
     325#!python
     326class Test:
     327
     328    def __init__(self):
     329        print "Hello World"
     330if __name__ == '__main__':
     331   Test()
     332}}}</pre>
     333}}}
     334
     335Display:
     336{{{
    297337#!python
    298338class Test:
     
    301341if __name__ == '__main__':
    302342   Test()
    303 }}}</pre>
    304 }}}
    305 
    306 Display:
    307 {{{
    308 #!python
    309 class Test:
    310     def __init__(self):
    311         print "Hello World"
    312 if __name__ == '__main__':
    313    Test()
    314343}}}
    315344
     
    319348my ($test) = 0;
    320349if ($test > 0) {
    321 echo "hello";
     350    print "hello";
    322351}
    323352}}}
     
    326355
    327356
     357== Comments ==
     358
     359Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text.
     360{{{
     361{{{
     362#!comment
     363Your comment here
     364}}}
     365}}}
     366
     367
    328368== Miscellaneous ==
    329369
     
    337377Display:
    338378----
     379
    339380
    340381