Changes between Version 1 and Version 2 of WikiFormatting
- Timestamp:
- 12/04/2008 10:18:45 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiFormatting
v1 v2 15 15 The Trac wiki supports the following font styles: 16 16 {{{ 17 * '''bold''' 17 * '''bold''', '''!''' can be bold too''', and '''! ''' 18 18 * ''italic'' 19 19 * '''''bold italic''''' … … 26 26 27 27 Display: 28 * '''bold''' 28 * '''bold''', '''!''' can be bold too''', and '''! ''' 29 29 * ''italic'' 30 30 * '''''bold italic''''' … … 35 35 * ,,subscript,, 36 36 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. 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. 38 40 39 41 == Headings == … … 42 44 followed by a single space and the headline text. The line should end with a space 43 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. 44 47 45 48 Example: … … 48 51 == Subheading == 49 52 === About ''this'' === 53 === Explicit id === #using-explicit-id-in-heading 50 54 }}} 51 55 … … 54 58 == Subheading == 55 59 === About ''this'' === 56 60 === Explicit id === #using-explicit-id-in-heading 57 61 58 62 == Paragraphs == … … 77 81 * Item 1 78 82 * Item 1.1 83 * Item 1.1.1 84 * Item 1.1.2 85 * Item 1.1.3 86 * Item 1.2 79 87 * Item 2 80 88 81 89 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 83 94 1. Item 2 95 And numbered lists can also be given an explicit number: 96 3. Item 3 84 97 }}} 85 98 … … 87 100 * Item 1 88 101 * Item 1.1 102 * Item 1.1.1 103 * Item 1.1.2 104 * Item 1.1.3 105 * Item 1.2 89 106 * Item 2 90 107 91 108 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 93 113 1. Item 2 114 And numbered lists can also be given an explicit number: 115 3. Item 3 94 116 95 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. … … 97 119 98 120 == Definition Lists == 121 99 122 100 123 The wiki also supports definition lists. … … 150 173 This text is a quote from someone else. 151 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 152 193 == Tables == 153 194 … … 178 219 TitleIndex, http://www.edgewall.com/, !NotAlink 179 220 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 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. 181 222 182 223 Example: … … 192 233 * [wiki:ISO9000] 193 234 194 195 === Trac Links === 235 == Trac Links == 196 236 197 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: … … 200 240 * Reports: {1} or report:1 201 241 * 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 * ... 209 243 }}} 210 244 … … 213 247 * Reports: {1} or report:1 214 248 * 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 251 There are many more flavors of Trac links, see TracLinks for more in-depth information. 224 252 225 253 … … 241 269 == Images == 242 270 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). 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 284 See WikiMacros for further documentation on the `[[Image()]]` macro. 255 285 256 286 … … 261 291 Example: 262 292 {{{ 263 [[ Timestamp]]264 }}} 265 266 Display: 267 [[ Timestamp]]293 [[RecentChanges(Trac,3)]] 294 }}} 295 296 Display: 297 [[RecentChanges(Trac,3)]] 268 298 269 299 See WikiMacros for more information, and a list of installed macros. … … 294 324 #!html 295 325 <pre class="wiki">{{{ 326 #!python 327 class Test: 328 329 def __init__(self): 330 print "Hello World" 331 if __name__ == '__main__': 332 Test() 333 }}}</pre> 334 }}} 335 336 Display: 337 {{{ 296 338 #!python 297 339 class Test: … … 300 342 if __name__ == '__main__': 301 343 Test() 302 }}}</pre>303 }}}304 305 Display:306 {{{307 #!python308 class Test:309 def __init__(self):310 print "Hello World"311 if __name__ == '__main__':312 Test()313 344 }}} 314 345 … … 318 349 my ($test) = 0; 319 350 if ($test > 0) { 320 echo"hello";351 print "hello"; 321 352 } 322 353 }}} … … 325 356 326 357 358 == Comments == 359 360 Comments 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 364 Your comment here 365 }}} 366 }}} 367 368 327 369 == Miscellaneous == 328 370 … … 336 378 Display: 337 379 ---- 380 338 381 339 382