Changes between Version 19 and Version 20 of WikiFormatting


Ignore:
Timestamp:
10/24/06 14:27:33 (14 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v19 v20  
    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 ==
    4042
    41 You can create heading by starting a line with one up to five ''equal'' characters ("=")
     43You can create heading by starting a line with one up to five ''equal'' characters ("=")
    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 ==
     
    8084
    8185 1. Item 1
    82    1. Item 1.1
     86   a. Item 1.a
     87   a. Item 1.b
     88      i. Item 1.b.i
     89      i. Item 1.b.ii
    8390 1. Item 2
     91And numbered lists can also be given an explicit number:
     92 3. Item 3
    8493}}}
    8594
     
    9099
    91100 1. Item 1
    92    1. Item 1.1
     101   a. Item 1.a
     102   a. Item 1.b
     103      i. Item 1.b.i
     104      i. Item 1.b.ii
    93105 1. Item 2
     106And numbered lists can also be given an explicit number:
     107 3. Item 3
    94108
    95109Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph.
     
    97111
    98112== Definition Lists ==
     113
    99114
    100115The wiki also supports definition lists.
     
    127142 {{{
    128143  def HelloWorld():
    129       print "Hello World"
     144      print "Hello World"
    130145 }}}
    131146}}}
     
    134149{{{
    135150 def HelloWorld():
    136      print "Hello World"
     151     print "Hello World"
    137152}}}
    138153
     
    149164Display:
    150165  This text is a quote from someone else.
     166
     167== Discussion Citations ==
     168
     169To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 
     170
     171Example:
     172{{{
     173>> Someone's original text
     174> Someone else's reply text
     175My reply text
     176}}}
     177
     178Display:
     179>> Someone's original text
     180> Someone else's reply text
     181My reply text
     182
     183''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.''
    151184
    152185== Tables ==
     
    168201== Links ==
    169202
    170 Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.
     203Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.
    171204
    172205Example:
     
    178211 TitleIndex, http://www.edgewall.com/, !NotAlink
    179212
    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.
     213Links 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.
    181214
    182215Example:
     
    200233 * Reports: {1} or report:1
    201234 * 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"
     235 * ...
    209236}}}
    210237
     
    213240 * Reports: {1} or report:1
    214241 * 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"
     242 * ...
    222243
    223244See TracLinks for more in-depth information.
     
    226247== Escaping Links and WikiPageNames ==
    227248
    228 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
     249You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
    229250
    230251Example:
     
    241262== Images ==
    242263
    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).
     264Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags.
     265
     266You now have to use the ![[Image]] macro (see below).
    255267
    256268
     
    278290{{{
    279291#!html
    280 &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;pre class=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;wiki&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;{{{
     292<pre class="wiki">{{{
    281293#!html
    282 &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;h1 style=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;text-align: right; color: blue&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;HTML Test&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/h1&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;
    283 }}}&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/pre&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;
     294&lt;h1 style="text-align: right; color: blue"&gt;HTML Test&lt;/h1&gt;
     295}}}</pre>
    284296}}}
    285297
     
    287299{{{
    288300#!html
    289 &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;h1 style=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;text-align: right; color: blue&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;HTML Test&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/h1&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;
    290 }}} 
     301<h1 style="text-align: right; color: blue">HTML Test</h1>
     302}}}
    291303
    292304Example:
    293305{{{
    294306#!html
    295 &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;pre class=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;wiki&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;{{{
     307<pre class="wiki">{{{
     308#!python
     309class Test:
     310
     311    def __init__(self):
     312        print "Hello World"
     313if __name__ == '__main__':
     314   Test()
     315}}}</pre>
     316}}}
     317
     318Display:
     319{{{
    296320#!python
    297321class Test:
    298322    def __init__(self):
    299         print &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;Hello World&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;
     323        print "Hello World"
    300324if __name__ == '__main__':
    301325   Test()
    302 }}}&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/pre&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;
    303 }}}
    304 
    305 Display:
    306 {{{
    307 #!python
    308 class Test:
    309     def __init__(self):
    310         print &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;Hello World&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;
    311 if __name__ == '__main__':
    312    Test()
    313326}}}
    314327
     
    317330#!perl
    318331my ($test) = 0;
    319 if ($test &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; 0) {
    320 echo &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;hello&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;#34;;
     332if ($test > 0) {
     333    print "hello";
    321334}
    322335}}}
     
    327340== Miscellaneous ==
    328341
    329 Four or more dashes will be replaced by a horizontal line (&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;HR&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;)
     342Four or more dashes will be replaced by a horizontal line (<HR>)
    330343
    331344Example:
     
    339352
    340353----
    341 See also: TracLinks, TracGuide, WikiHtml, WikiMacros, WikiProcessors, TracSyntaxColoring 
    342 
     354See also: TracLinks, TracGuide, WikiHtml, WikiMacros, WikiProcessors, TracSyntaxColoring.