Changes between Version 3 and Version 4 of WikiFormatting


Ignore:
Timestamp:
Jan 25, 2009 10:55:12 AM (11 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v3 v4  
    1111 
    1212 
    13 == Font styles == 
     13== Font Styles == 
    1414 
    1515The Trac wiki supports the following font styles: 
    1616{{{ 
    17  * '''bold''' 
     17 * '''bold''', '''!''' can be bold too''', and '''! ''' 
    1818 * ''italic'' 
    1919 * '''''bold italic''''' 
     
    2222 * ~~strike-through~~ 
    2323 * ^superscript^  
    24  * ,,subscript,,. 
    25 }}} 
    26  
    27 Display: 
    28  * '''bold''' 
     24 * ,,subscript,, 
     25}}} 
     26 
     27Display: 
     28 * '''bold''', '''!''' can be bold too''', and '''! ''' 
    2929 * ''italic'' 
    3030 * '''''bold italic''''' 
     
    3333 * ~~strike-through~~ 
    3434 * ^superscript^  
    35  * ,,subscript,,. 
    36  
    37  
    38  
    39 == Heading == 
    40  
    41 You can create heading by starting a line with one up to five ''equal'' "=" characters 
     35 * ,,subscript,, 
     36 
     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. 
     40 
     41== Headings == 
     42 
     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  
    43 followed by the same number of ''equal'' characters.  
     45followed 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 == 
    5963 
    60 A new text paragraph is created whenever two blocks of text are separated 
    61 by one or more empty lines. 
     64A new text paragraph is created whenever two blocks of text are separated by one or more empty lines. 
    6265 
    6366A forced line break can also be inserted, using: 
     
    6972Line 1[[BR]]Line 2 
    7073 
    71   Text paragraphs can be indented by starting the lines with two or more spaces. 
    72  
    7374 
    7475== Lists == 
    7576 
    7677The wiki supports both ordered/numbered and unordered lists. 
    77 There must be a space preceding the star "*" or number "1.", or nothing will happen. 
    7878 
    7979Example: 
     
    8181 * Item 1 
    8282   * Item 1.1 
     83      * Item 1.1.1    
     84      * Item 1.1.2 
     85      * Item 1.1.3 
     86   * Item 1.2 
    8387 * Item 2 
    8488 
    8589 1. Item 1 
    86    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 
    8794 1. Item 2 
     95And numbered lists can also be given an explicit number: 
     96 3. Item 3 
    8897}}} 
    8998 
     
    91100 * Item 1 
    92101   * Item 1.1 
     102      * Item 1.1.1 
     103      * Item 1.1.2 
     104      * Item 1.1.3 
     105   * Item 1.2 
    93106 * Item 2 
    94107 
    95108 1. Item 1 
    96    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 
    97113 1. Item 2 
    98  
    99  
    100 == Definition lists == 
     114And numbered lists can also be given an explicit number: 
     115 3. Item 3 
     116 
     117Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph. 
     118 
     119 
     120== Definition Lists == 
     121 
    101122 
    102123The wiki also supports definition lists. 
     
    121142 
    122143 
    123 == Preformatted text == 
    124  
    125 Block quotes, preformatted text, are suitable for source code snippets, notes and examples. Use three ''curly braces'' wrapped around the text to define a block quote. 
     144== Preformatted Text == 
     145 
     146Block 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. 
    126147   
    127148Example: 
    128149{{{ 
    129150 {{{ 
    130   def HelloWorld() 
     151  def HelloWorld(): 
    131152      print "Hello World" 
    132153 }}} 
     
    135156Display: 
    136157{{{ 
    137  def HelloWorld() 
     158 def HelloWorld(): 
    138159     print "Hello World" 
    139160}}} 
    140161 
     162 
     163== Blockquotes == 
     164 
     165In order to mark a paragraph as blockquote, indent that paragraph with two spaces. 
     166 
     167Example: 
     168{{{ 
     169  This text is a quote from someone else. 
     170}}} 
     171 
     172Display: 
     173  This text is a quote from someone else. 
     174 
     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.'' 
    141192 
    142193== Tables == 
     
    155206[wiki:WikiRestructuredText#BiggerReSTExample reStructuredText]. 
    156207 
     208 
    157209== Links == 
    158210 
    159 Hyperlinks are automatically created for WikiPageNames and urls.  
    160 !WikiPageLinks can be disabled by 
    161 prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}. 
     211Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}. 
    162212 
    163213Example: 
     
    169219 TitleIndex, http://www.edgewall.com/, !NotAlink 
    170220 
    171 Links can be given a more descriptive title by writing the link followed by 
    172 a space and a title and all this inside square brackets.  
    173 If the descriptive title is omitted, then the explicit prefix is disguarded, 
    174 unless the link is an external link. This can be useful for wiki pages 
    175 not adhering to the WikiPageNames convention. 
    176  
    177 Like this: 
     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. 
     222 
     223Example: 
    178224{{{ 
    179225 * [http://www.edgewall.com/ Edgewall Software] 
     
    187233 * [wiki:ISO9000] 
    188234 
    189  
    190 === Trac Links === 
    191  
    192 Wiki pages can link directly to other parts of the Trac system. 
    193 Pages can refer to tickets, reports, changesets, milestones, source files and 
    194 other Wiki pages using the following notation: 
     235== Trac Links == 
     236 
     237Wiki 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: 
    195238{{{ 
    196239 * Tickets: #1 or ticket:1 
    197240 * Reports: {1} or report:1 
    198241 * Changesets: r1, [1] or changeset:1 
    199  * Revision Logs: r1:3, [1:3] or log:branches/0.9-stable#1:3 
    200  * Wiki pages: CamelCase or wiki:CamelCase 
    201  * Milestones: milestone:1.0 or milestone:"End-of-days Release" 
    202  * Files: source:trunk/COPYING 
    203  * A specific file revision: source:/trunk/COPYING#200 
    204  * A filename with embedded space: source:"/trunk/README FIRST" 
     242 * ... 
    205243}}} 
    206244 
     
    209247 * Reports: {1} or report:1 
    210248 * Changesets: r1, [1] or changeset:1 
    211  * Revision Logs: r1:3, [1:3] or log:branches/0.8-stable#1000:2000 
    212  * Wiki pages: CamelCase or wiki:CamelCase 
    213  * Milestones: milestone:1.0 or milestone:"End-of-days Release" 
    214  * Files: source:trunk/COPYING 
    215  * A specific file revision: source:/trunk/COPYING#200 
    216  * A filename with embedded space: source:"/trunk/README FIRST" 
    217  
    218 See TracLinks for more in-depth information. 
     249 * ...  
     250 
     251There are many more flavors of Trac links, see TracLinks for more in-depth information. 
    219252 
    220253 
     
    223256You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark). 
    224257 
     258Example: 
    225259{{{ 
    226260 !NoHyperLink 
     
    235269== Images == 
    236270 
    237 Urls ending with `.png`, `.gif` or `.jpg` are automatically interpreted as image links, and converted to `<img>` tags. 
    238  
    239 Example: 
    240 {{{ 
    241 http://www.edgewall.com/gfx/trac_example_image.png 
    242 }}} 
    243  
    244 Display: 
    245  
    246 http://www.edgewall.com/gfx/trac_example_image.png 
     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. 
    247285 
    248286 
    249287== Macros == 
    250288 
    251 Macros are ''custom functions'' to insert dynamic content in a page.  
    252 See WikiMacros for usage. 
    253  
    254 Example: 
    255 {{{ 
    256  [[Timestamp]] 
    257 }}} 
    258  
    259 Display: 
    260  [[Timestamp]] 
     289Macros are ''custom functions'' to insert dynamic content in a page. 
     290 
     291Example: 
     292{{{ 
     293 [[RecentChanges(Trac,3)]] 
     294}}} 
     295 
     296Display: 
     297 [[RecentChanges(Trac,3)]] 
     298 
     299See WikiMacros for more information, and a list of installed macros. 
    261300 
    262301 
    263302== Processors == 
    264303 
    265 Trac supports alternative markup formats using WikiProcessors.  
    266 For example, processors are used to write pages in  
     304Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in  
    267305[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].  
    268306 
    269 See WikiProcessors for more information. 
    270  
    271 '''Example 1:''' 
     307Example 1: 
    272308{{{ 
    273309#!html 
     
    284320}}} 
    285321 
    286 '''Example 2:''' 
     322Example: 
    287323{{{ 
    288324#!html 
    289325<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{{{ 
    290338#!python 
    291339class Test: 
     
    294342if __name__ == '__main__': 
    295343   Test() 
    296 }}}</pre> 
    297 }}} 
    298  
    299 Display: 
    300 {{{ 
    301 #!python 
    302 class Test: 
    303     def __init__(self): 
    304         print "Hello World" 
    305 if __name__ == '__main__': 
    306    Test() 
     344}}} 
     345 
     346Perl: 
     347{{{ 
     348#!perl 
     349my ($test) = 0; 
     350if ($test > 0) { 
     351    print "hello"; 
     352} 
     353}}} 
     354 
     355See WikiProcessors for more information. 
     356 
     357 
     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}}} 
    307366}}} 
    308367 
     
    321380 
    322381 
     382 
    323383---- 
    324  
    325384See also: TracLinks, TracGuide, WikiHtml, WikiMacros, WikiProcessors, TracSyntaxColoring. 
    326  
    327 ----