Changes between Version 2 and Version 3 of WikiFormatting
- Timestamp:
- 01/10/10 10:55:08 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiFormatting
v2 v3 1 1 = WikiFormatting = 2 2 [[TracGuideToc]] 3 [[PageOutline(2-5,,inline)]]4 3 5 4 Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole. … … 16 15 The Trac wiki supports the following font styles: 17 16 {{{ 18 * '''bold''' 17 * '''bold''', '''!''' can be bold too''', and '''! ''' 19 18 * ''italic'' 20 19 * '''''bold italic''''' … … 27 26 28 27 Display: 29 * '''bold''' 28 * '''bold''', '''!''' can be bold too''', and '''! ''' 30 29 * ''italic'' 31 30 * '''''bold italic''''' … … 36 35 * ,,subscript,, 37 36 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. 37 Notes: 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. 39 40 40 41 == Headings == … … 43 44 followed by a single space and the headline text. The line should end with a space 44 45 followed by the same number of ''='' characters. 46 The heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated. 45 47 46 48 Example: … … 49 51 == Subheading == 50 52 === About ''this'' === 53 === Explicit id === #using-explicit-id-in-heading 51 54 }}} 52 55 … … 55 58 == Subheading == 56 59 === About ''this'' === 57 60 === Explicit id === #using-explicit-id-in-heading 58 61 59 62 == Paragraphs == … … 78 81 * Item 1 79 82 * Item 1.1 83 * Item 1.1.1 84 * Item 1.1.2 85 * Item 1.1.3 86 * Item 1.2 80 87 * Item 2 81 88 82 89 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 84 94 1. Item 2 95 And numbered lists can also be given an explicit number: 96 3. Item 3 85 97 }}} 86 98 … … 88 100 * Item 1 89 101 * Item 1.1 102 * Item 1.1.1 103 * Item 1.1.2 104 * Item 1.1.3 105 * Item 1.2 90 106 * Item 2 91 107 92 108 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 94 113 1. Item 2 114 And numbered lists can also be given an explicit number: 115 3. Item 3 95 116 96 117 Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph. … … 98 119 99 120 == Definition Lists == 121 100 122 101 123 The wiki also supports definition lists. … … 151 173 This text is a quote from someone else. 152 174 175 == Discussion Citations == 176 177 To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 178 179 Example: 180 {{{ 181 >> Someone's original text 182 > Someone else's reply text 183 My reply text 184 }}} 185 186 Display: 187 >> Someone's original text 188 > Someone else's reply text 189 My 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 153 193 == Tables == 154 194 … … 179 219 TitleIndex, http://www.edgewall.com/, !NotAlink 180 220 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 dis guarded, unless the link is an external link. This can be useful for wiki pages not adhering to the WikiPageNames convention.221 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 discarded, unless the link is an external link. This can be useful for wiki pages not adhering to the WikiPageNames convention. 182 222 183 223 Example: … … 193 233 * [wiki:ISO9000] 194 234 195 196 === Trac Links === 235 == Trac Links == 197 236 198 237 Wiki 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: … … 201 240 * Reports: {1} or report:1 202 241 * 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 * ... 210 243 }}} 211 244 … … 214 247 * Reports: {1} or report:1 215 248 * 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 251 There are many more flavors of Trac links, see TracLinks for more in-depth information. 225 252 226 253 … … 242 269 == Images == 243 270 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). 271 Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags. 272 273 You 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 275 In 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 281 Example display: [[Image(htdocs:../common/trac_logo_mini.png)]] 282 283 See WikiMacros for further documentation on the `[[Image()]]` macro. 256 284 257 285 … … 262 290 Example: 263 291 {{{ 264 [[ Timestamp]]265 }}} 266 267 Display: 268 [[ Timestamp]]292 [[RecentChanges(Trac,3)]] 293 }}} 294 295 Display: 296 [[RecentChanges(Trac,3)]] 269 297 270 298 See WikiMacros for more information, and a list of installed macros. … … 295 323 #!html 296 324 <pre class="wiki">{{{ 325 #!python 326 class Test: 327 328 def __init__(self): 329 print "Hello World" 330 if __name__ == '__main__': 331 Test() 332 }}}</pre> 333 }}} 334 335 Display: 336 {{{ 297 337 #!python 298 338 class Test: … … 301 341 if __name__ == '__main__': 302 342 Test() 303 }}}</pre>304 }}}305 306 Display:307 {{{308 #!python309 class Test:310 def __init__(self):311 print "Hello World"312 if __name__ == '__main__':313 Test()314 343 }}} 315 344 … … 319 348 my ($test) = 0; 320 349 if ($test > 0) { 321 echo"hello";350 print "hello"; 322 351 } 323 352 }}} … … 326 355 327 356 357 == Comments == 358 359 Comments 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 363 Your comment here 364 }}} 365 }}} 366 367 328 368 == Miscellaneous == 329 369 … … 337 377 Display: 338 378 ---- 379 339 380 340 381
