Changes between Version 1 and Version 2 of WikiFormatting


Ignore:
Timestamp:
04/10/06 14:40:06 (19 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v1 v2  
    11= WikiFormatting = 
    2  
    3 Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into flexible and powerful whole. 
    4  
    5 Trac has a built in small and powerful wiki rendering engine. This wiki engine implements an ever growing subset of the commands from other popular Wikis especially [http://moin.sf.net/ MoinWiki].  
     2[[TracGuideToc]] 
     3 
     4Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole. 
     5 
     6Trac has a built in small and powerful wiki rendering engine. This wiki engine implements an ever growing subset of the commands from other popular Wikis, 
     7especially [http://moinmoin.wikiwikiweb.de/ MoinMoin].  
     8 
    69 
    710This page demonstrates the formatting syntax available anywhere WikiFormatting is allowed. 
    811 
    9 == Font styles == 
    10  
    11 The Trac wiki support the following font styles: '''bold''', ''italic'', 
    12 __underline__ and ~~strike-through~~. 
    13  
    14 {{{ 
    15 The Trac wiki support the following font styles: '''bold''', ''italic'', 
    16 __underline__ and ~~strike-through~~. 
    17 }}} 
    18  
    19  
    20 == Heading == 
    21  
    22 You can create heading by starting a line with one up to five ''equal\\ '=' characters 
     12 
     13== Font Styles == 
     14 
     15The Trac wiki supports the following font styles: 
     16{{{ 
     17 * '''bold''' 
     18 * ''italic'' 
     19 * '''''bold italic''''' 
     20 * __underline__ 
     21 * {{{monospace}}} or `monospace` 
     22 * ~~strike-through~~ 
     23 * ^superscript^  
     24 * ,,subscript,, 
     25}}} 
     26 
     27Display: 
     28 * '''bold''' 
     29 * ''italic'' 
     30 * '''''bold italic''''' 
     31 * __underline__ 
     32 * {{{monospace}}} or `monospace` 
     33 * ~~strike-through~~ 
     34 * ^superscript^  
     35 * ,,subscript,, 
     36 
     37Note 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. 
     38 
     39== Headings == 
     40 
     41You can create heading by starting a line with one up to five ''equal'' characters ("=") 
    2342followed by a single space and the headline text. The line should end with a space  
    24 followed by the same number of ''equal'' characters.  
    25  
    26 ''Note: As of writing, headings cannot contain TracLinks.'' 
    27  
    28 === Example: === 
     43followed by the same number of ''='' characters. 
     44 
     45Example: 
    2946{{{ 
    3047= Heading = 
    3148== Subheading == 
    32 }}} 
     49=== About ''this'' === 
     50}}} 
     51 
     52Display: 
     53= Heading = 
     54== Subheading == 
     55=== About ''this'' === 
    3356 
    3457 
    3558== Paragraphs == 
    3659 
    37 A new text paragraph is created whenever two blocks of text are separated 
    38 by one or more empty lines. 
     60A new text paragraph is created whenever two blocks of text are separated by one or more empty lines. 
    3961 
    4062A forced line break can also be inserted, using: 
     
    4668Line 1[[BR]]Line 2 
    4769 
    48   Text paragraphs can be indented by starting the lines with two or more spaces. 
    4970 
    5071== Lists == 
     72 
    5173The wiki supports both ordered/numbered and unordered lists. 
    5274 
     
    6183 1. Item 2 
    6284}}} 
     85 
    6386Display: 
    6487 * Item 1 
     
    7093 1. Item 2 
    7194 
    72 == Preformatted text == 
    73 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: 
     95Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph. 
     96 
     97 
     98== Definition Lists == 
     99 
     100The wiki also supports definition lists. 
     101 
     102Example: 
     103{{{ 
     104 llama:: 
     105   some kind of mammal, with hair 
     106 ppython:: 
     107   some kind of reptile, without hair 
     108   (can you spot the typo?) 
     109}}} 
     110 
     111Display: 
     112 llama:: 
     113   some kind of mammal, with hair 
     114 ppython:: 
     115   some kind of reptile, without hair 
     116   (can you spot the typo?) 
     117 
     118Note that you need a space in front of the defined term. 
     119 
     120 
     121== Preformatted Text == 
     122 
     123Block 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. 
    74124   
    75125Example: 
    76126{{{ 
    77127 {{{ 
    78   def HelloWorld() 
     128  def HelloWorld(): 
    79129      print "Hello World" 
    80130 }}} 
     
    83133Display: 
    84134{{{ 
    85  def HelloWorld() 
     135 def HelloWorld(): 
    86136     print "Hello World" 
    87137}}} 
     138 
     139 
     140== Blockquotes == 
     141 
     142In order to mark a paragraph as blockquote, indent that paragraph with two spaces. 
     143 
     144Example: 
     145{{{ 
     146  This text is a quote from someone else. 
     147}}} 
     148 
     149Display: 
     150  This text is a quote from someone else. 
    88151 
    89152== Tables == 
     
    94157||Cell 4||Cell 5||Cell 6|| 
    95158}}} 
     159 
    96160Display: 
    97161||Cell 1||Cell 2||Cell 3|| 
    98162||Cell 4||Cell 5||Cell 6|| 
    99163 
     164Note that more complex tables can be created using 
     165[wiki:WikiRestructuredText#BiggerReSTExample reStructuredText]. 
     166 
     167 
    100168== Links == 
    101169 
    102 !Hyperlinks are automatically created for WikiPageNames and urls. !WikiPageLinks can be disabled by 
    103 prepending an exclamation mark (!) character, such as {{{!WikiPageLink}}}. 
    104  
    105 Examples: 
    106  
    107  TitleIndex, http://www.edgewall.com/. 
    108  
    109 Links can be given a more descriptive title by writing the link followed by 
    110 a space and a title and all this inside two square brackets. Like this: 
     170Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}. 
     171 
     172Example: 
     173{{{ 
     174 TitleIndex, http://www.edgewall.com/, !NotAlink 
     175}}} 
     176 
     177Display: 
     178 TitleIndex, http://www.edgewall.com/, !NotAlink 
     179 
     180Links 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. 
     181 
     182Example: 
    111183{{{ 
    112184 * [http://www.edgewall.com/ Edgewall Software] 
    113185 * [wiki:TitleIndex Title Index] 
    114 }}} 
    115 Display: 
    116  
     186 * [wiki:ISO9000] 
     187}}} 
     188 
     189Display: 
    117190 * [http://www.edgewall.com/ Edgewall Software] 
    118191 * [wiki:TitleIndex Title Index] 
     192 * [wiki:ISO9000] 
     193 
    119194 
    120195=== Trac Links === 
    121196 
    122 Wiki pages can link directly to other parts of the Trac system. 
    123 Pages can refer to tickets, reports, changesets, milestones, source files and 
    124 other Wiki pages using the following notation: 
    125  * Tickets: '''!#1''' or '''!ticket:1''' 
    126  * Reports: '''!{1}''' or '''!report:1''' 
    127  * Changesets: '''![1]''' or '''!changeset:1''' 
    128  * Wiki pages: '''CamelCase''' or '''!wiki:CamelCase''' 
    129  * Milestones: '''!milestone:1.0''' 
    130  * Files: '''!source:trunk/COPYING''' 
    131  * A specific file revision: '''!source:/trunk/COPYING#200''' 
    132 Display: 
     197Wiki 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: 
     198{{{ 
    133199 * Tickets: #1 or ticket:1 
    134200 * Reports: {1} or report:1 
    135  * Changesets: [1] or changeset:1 
     201 * Changesets: r1, [1] or changeset:1 
     202 * Revision Logs: r1:3, [1:3] or log:branches/0.8-stable#1:3 
    136203 * Wiki pages: CamelCase or wiki:CamelCase 
    137  * Milestones: milestone:1.0 
     204 * Milestones: milestone:1.0 or milestone:"End-of-days Release" 
    138205 * Files: source:trunk/COPYING 
     206 * Attachments: attachment:"file name.doc" 
    139207 * A specific file revision: source:/trunk/COPYING#200 
     208 * A filename with embedded space: source:"/trunk/README FIRST" 
     209}}} 
     210 
     211Display: 
     212 * Tickets: #1 or ticket:1 
     213 * Reports: {1} or report:1 
     214 * 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" 
    140222 
    141223See TracLinks for more in-depth information. 
    142224 
    143 == Escaping Links and WikiNames == 
    144 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single '!' (exclamation mark). 
    145  
     225 
     226== Escaping Links and WikiPageNames == 
     227 
     228You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark). 
     229 
     230Example: 
    146231{{{ 
    147232 !NoHyperLink 
     
    153238 !#42 is not a link 
    154239 
     240 
    155241== Images == 
    156242 
    157 Urls ending with .png, .gif or .jpg are automatically interpreted as image links, and converted to IMG tags. 
     243Urls ending with `.png`, `.gif` or `.jpg` are automatically interpreted as image links, and converted to `<img>` tags. 
    158244 
    159245Example: 
     
    161247http://www.edgewall.com/gfx/trac_example_image.png 
    162248}}} 
     249 
    163250Display: 
    164251 
    165252http://www.edgewall.com/gfx/trac_example_image.png 
    166253 
     254However, 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). 
     255 
     256 
    167257== Macros == 
    168 Macros are ''custom functions'' to insert dynamic content in a page. See WikiMacros for usage. 
     258 
     259Macros are ''custom functions'' to insert dynamic content in a page. 
    169260 
    170261Example: 
     
    172263 [[Timestamp]] 
    173264}}} 
     265 
    174266Display: 
    175267 [[Timestamp]] 
    176268 
     269See WikiMacros for more information, and a list of installed macros. 
     270 
     271 
    177272== Processors == 
    178 Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in [wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].  
    179  
    180 See WikiProcessors for more information. 
    181  
    182 '''Example 1:''' 
     273 
     274Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in  
     275[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].  
     276 
     277Example 1: 
    183278{{{ 
    184279#!html 
     
    188283}}}</pre> 
    189284}}} 
     285 
    190286Display: 
    191287{{{ 
     
    194290}}} 
    195291 
    196 '''Example 2:''' 
     292Example: 
    197293{{{ 
    198294#!html 
     
    206302}}}</pre> 
    207303}}} 
     304 
    208305Display: 
    209306{{{ 
     
    216313}}} 
    217314 
     315Perl: 
     316{{{ 
     317#!perl 
     318my ($test) = 0; 
     319if ($test > 0) { 
     320echo "hello"; 
     321} 
     322}}} 
     323 
     324See WikiProcessors for more information. 
     325 
     326 
    218327== Miscellaneous == 
    219328 
    220329Four or more dashes will be replaced by a horizontal line (<HR>) 
    221330 
     331Example: 
    222332{{{ 
    223333 ---- 
     
    230340---- 
    231341See also: TracLinks, TracGuide, WikiHtml, WikiMacros, WikiProcessors, TracSyntaxColoring. 
    232