Changes between Version 1 and Version 2 of WikiFormatting


Ignore:
Timestamp:
12/04/2008 10:19:06 PM (16 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v1 v2  
    1515The Trac wiki supports the following font styles:
    1616{{{
    17  * '''bold'''
     17 * '''bold''', '''!''' can be bold too''', and '''! '''
    1818 * ''italic''
    1919 * '''''bold italic'''''
     
    2626
    2727Display:
    28  * '''bold'''
     28 * '''bold''', '''!''' can be bold too''', and '''! '''
    2929 * ''italic''
    3030 * '''''bold italic'''''
     
    3535 * ,,subscript,,
    3636
    37 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.
    3840
    3941== Headings ==
     
    4244followed by a single space and the headline text. The line should end with a space
    4345followed 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.
    4447
    4548Example:
     
    4851== Subheading ==
    4952=== About ''this'' ===
     53=== Explicit id === #using-explicit-id-in-heading
    5054}}}
    5155
     
    5458== Subheading ==
    5559=== About ''this'' ===
    56 
     60=== Explicit id === #using-explicit-id-in-heading
    5761
    5862== Paragraphs ==
     
    7781 * Item 1
    7882   * Item 1.1
     83      * Item 1.1.1   
     84      * Item 1.1.2
     85      * Item 1.1.3
     86   * Item 1.2
    7987 * Item 2
    8088
    8189 1. Item 1
    82    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
    8394 1. Item 2
     95And numbered lists can also be given an explicit number:
     96 3. Item 3
    8497}}}
    8598
     
    87100 * Item 1
    88101   * Item 1.1
     102      * Item 1.1.1
     103      * Item 1.1.2
     104      * Item 1.1.3
     105   * Item 1.2
    89106 * Item 2
    90107
    91108 1. Item 1
    92    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
    93113 1. Item 2
     114And numbered lists can also be given an explicit number:
     115 3. Item 3
    94116
    95117Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph.
     
    97119
    98120== Definition Lists ==
     121
    99122
    100123The wiki also supports definition lists.
     
    150173  This text is a quote from someone else.
    151174
     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
    152193== Tables ==
    153194
     
    178219 TitleIndex, http://www.edgewall.com/, !NotAlink
    179220
    180 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.
    181222
    182223Example:
     
    192233 * [wiki:ISO9000]
    193234
    194 
    195 === Trac Links ===
     235== Trac Links ==
    196236
    197237Wiki 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:
     
    200240 * Reports: {1} or report:1
    201241 * Changesets: r1, [1] or changeset:1
    202  * Revision Logs: r1:3, [1:3] or log:branches/0.8-stable#1:3
    203  * Wiki pages: CamelCase or wiki:CamelCase
    204  * Milestones: milestone:1.0 or milestone:"End-of-days Release"
    205  * Files: source:trunk/COPYING
    206  * Attachments: attachment:"file name.doc"
    207  * A specific file revision: source:/trunk/COPYING#200
    208  * A filename with embedded space: source:"/trunk/README FIRST"
     242 * ...
    209243}}}
    210244
     
    213247 * Reports: {1} or report:1
    214248 * Changesets: r1, [1] or changeset:1
    215  * Revision Logs: r1:3, [1:3] or log:branches/0.8-stable#1:3
    216  * Wiki pages: CamelCase or wiki:CamelCase
    217  * Milestones: milestone:1.0 or milestone:"End-of-days Release"
    218  * Files: source:trunk/COPYING
    219  * Attachments: attachment:"file name.doc"
    220  * A specific file revision: source:/trunk/COPYING#200
    221  * A filename with embedded space: source:"/trunk/README FIRST"
    222 
    223 See TracLinks for more in-depth information.
     249 * ...
     250
     251There are many more flavors of Trac links, see TracLinks for more in-depth information.
    224252
    225253
     
    241269== Images ==
    242270
    243 Urls ending with `.png`, `.gif` or `.jpg` are automatically interpreted as image links, and converted to `<img>` tags.
    244 
    245 Example:
    246 {{{
    247 http://www.edgewall.com/gfx/trac_example_image.png
    248 }}}
    249 
    250 Display:
    251 
    252 http://www.edgewall.com/gfx/trac_example_image.png
    253 
    254 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
     283
     284See WikiMacros for further documentation on the `[[Image()]]` macro.
    255285
    256286
     
    261291Example:
    262292{{{
    263  [[Timestamp]]
    264 }}}
    265 
    266 Display:
    267  [[Timestamp]]
     293 [[RecentChanges(Trac,3)]]
     294}}}
     295
     296Display:
     297 [[RecentChanges(Trac,3)]]
    268298
    269299See WikiMacros for more information, and a list of installed macros.
     
    294324#!html
    295325<pre class="wiki">{{{
     326#!python
     327class Test:
     328
     329    def __init__(self):
     330        print "Hello World"
     331if __name__ == '__main__':
     332   Test()
     333}}}</pre>
     334}}}
     335
     336Display:
     337{{{
    296338#!python
    297339class Test:
     
    300342if __name__ == '__main__':
    301343   Test()
    302 }}}</pre>
    303 }}}
    304 
    305 Display:
    306 {{{
    307 #!python
    308 class Test:
    309     def __init__(self):
    310         print "Hello World"
    311 if __name__ == '__main__':
    312    Test()
    313344}}}
    314345
     
    318349my ($test) = 0;
    319350if ($test > 0) {
    320 echo "hello";
     351    print "hello";
    321352}
    322353}}}
     
    325356
    326357
     358== Comments ==
     359
     360Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text.
     361{{{
     362{{{
     363#!comment
     364Your comment here
     365}}}
     366}}}
     367
     368
    327369== Miscellaneous ==
    328370
     
    336378Display:
    337379----
     380
    338381
    339382