6 | | 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, |
7 | | especially [http://moinmoin.wikiwikiweb.de/ MoinMoin]. |
8 | | |
9 | | |
10 | | This page demonstrates the formatting syntax available anywhere WikiFormatting is allowed. |
11 | | |
12 | | |
13 | | == Font Styles == |
| 7 | 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://moinmo.in/ MoinMoin] and [trac:WikiCreole]. |
| 8 | |
| 9 | This page will give you an in-depth explanation of the wiki markup available anywhere WikiFormatting is allowed. |
| 10 | |
| 11 | The sections below provide an overview for the most common syntax, each link in the ''Category'' column will lead you to the more detailed explanation later in this page. |
| 12 | |
| 13 | A few other wiki pages present the advanced features of the Trac wiki markup in more depth: |
| 14 | - TracLinks covers all the possible ways to refer precisely to any Trac resource or parts thereof |
| 15 | - WikiPageNames covers the various names a wiki page can take, CamelCase or not |
| 16 | - WikiMacros lists the macros available for generating dynamic content |
| 17 | - WikiProcessors and WikiHtml details how parts of the wiki text can be processed in special ways |
| 18 | - [trac:wiki:TracDev/Proposals/AdvancedWikiOperations AdvancedWikiOperations] provides some operations in uncommon or administrative scenarios |
| 19 | |
| 20 | == Common wiki markup |
| 21 | |
| 22 | ||= '''Category''' =||= '''Wiki Markup''' =||= '''Display''' =|| |
| 23 | |----------------------------------------------------------- |
| 24 | {{{#!th rowspan=3 |
| 25 | [#FontStyles Font Styles] |
| 26 | }}} |
| 27 | || `'''bold'''`, `''italic''`, `'''''Wikipedia style'''''` || \ |
| 28 | || '''bold''', ''italic'', '''''Wikipedia style''''' || |
| 29 | || {{{`monospaced (''other markup ignored'')`}}} || \ |
| 30 | || `monospaced (''other markup ignored'')` || |
| 31 | || `**bold**`, `//italic//`, `**//!WikiCreole style//**` || \ |
| 32 | || **bold**, //italic//, **//!WikiCreole style//** || |
| 33 | |----------------------------------------------------------- |
| 34 | ||= [#Headings Headings] =||\ |
| 35 | {{{#!td |
| 36 | {{{ |
| 37 | == Level 2 == |
| 38 | === Level 3 ^([#hn note])^ |
| 39 | }}} |
| 40 | }}} |
| 41 | {{{#!td style="padding-left: 2em" |
| 42 | == Level 2 == |
| 43 | === Level 3 ^([#hn note])^ |
| 44 | }}} |
| 45 | |----------------------------------------------------------- |
| 46 | ||= [#Paragraphs Paragraphs] =||\ |
| 47 | {{{#!td |
| 48 | {{{ |
| 49 | First paragraph |
| 50 | on multiple lines. |
| 51 | |
| 52 | Second paragraph. |
| 53 | }}} |
| 54 | }}} |
| 55 | {{{#!td |
| 56 | First paragraph |
| 57 | on multiple lines. |
| 58 | |
| 59 | Second paragraph. |
| 60 | }}} |
| 61 | |----------------------------------------------------------- |
| 62 | ||= [#Lists Lists] =||\ |
| 63 | {{{#!td |
| 64 | {{{ |
| 65 | * bullets list |
| 66 | on multiple lines |
| 67 | 1. nested list |
| 68 | a. different numbering |
| 69 | styles |
| 70 | }}} |
| 71 | }}} |
| 72 | {{{#!td |
| 73 | * bullets list |
| 74 | on multiple lines |
| 75 | 1. nested list |
| 76 | a. different numbering |
| 77 | styles |
| 78 | }}} |
| 79 | |----------------------------------------------------------- |
| 80 | {{{#!th |
| 81 | [#DefinitionLists Definition Lists] |
| 82 | }}} |
| 83 | {{{#!td |
| 84 | {{{ |
| 85 | term:: definition on |
| 86 | multiple lines |
| 87 | }}} |
| 88 | }}} |
| 89 | {{{#!td |
| 90 | term:: definition on |
| 91 | multiple lines |
| 92 | }}} |
| 93 | |----------------------------------------------------------- |
| 94 | ||= [#PreformattedText Preformatted Text] =||\ |
| 95 | {{{#!td |
| 96 | {{{ |
| 97 | {{{ |
| 98 | multiple lines, ''no wiki'' |
| 99 | white space respected |
| 100 | }}} |
| 101 | }}} |
| 102 | }}} |
| 103 | {{{#!td |
| 104 | {{{ |
| 105 | multiple lines, ''no wiki'' |
| 106 | white space respected |
| 107 | }}} |
| 108 | }}} |
| 109 | |----------------------------------------------------------- |
| 110 | ||= [#Blockquotes Blockquotes] =||\ |
| 111 | {{{#!td |
| 112 | {{{ |
| 113 | if there's some leading |
| 114 | space the text is quoted |
| 115 | }}} |
| 116 | }}} |
| 117 | {{{#!td |
| 118 | if there's some leading |
| 119 | space the text is quoted |
| 120 | }}} |
| 121 | |----------------------------------------------------------- |
| 122 | ||= [#DiscussionCitations Discussion Citations] =||\ |
| 123 | {{{#!td |
| 124 | {{{ |
| 125 | >> ... (I said) |
| 126 | > (he replied) |
| 127 | }}} |
| 128 | }}} |
| 129 | {{{#!td |
| 130 | >>... (I said) |
| 131 | > (he replied) |
| 132 | }}} |
| 133 | |----------------------------------------------------------- |
| 134 | ||= [#Tables Tables] =||\ |
| 135 | {{{#!td |
| 136 | {{{ |
| 137 | ||= Table Header =|| Cell || |
| 138 | |||| (details below) || |
| 139 | }}} |
| 140 | }}} |
| 141 | {{{#!td |
| 142 | ||= Table Header =|| Cell || |
| 143 | |||| (details below) || |
| 144 | }}} |
| 145 | |----------------------------------------------------------- |
| 146 | {{{#!th rowspan=2 |
| 147 | [#Links Links] |
| 148 | }}} |
| 149 | || `http://trac.edgewall.org` ||\ |
| 150 | || http://trac.edgewall.org || |
| 151 | || `WikiFormatting (CamelCase)` ||\ |
| 152 | || WikiFormatting (CamelCase) || |
| 153 | |----------------------------------------------------------- |
| 154 | {{{#!th rowspan=5 |
| 155 | [#TracLinks TracLinks] |
| 156 | }}} |
| 157 | || `wiki:WikiFormatting`, `wiki:"WikiFormatting"` ||\ |
| 158 | || wiki:WikiFormatting, wiki:"WikiFormatting" || |
| 159 | || `#1 (ticket)`, `[1] (changeset)`, `{1} (report)` ||\ |
| 160 | || #1 (ticket), [1] (changeset), {1} (report) || |
| 161 | || `ticket:1, ticket:1#comment:1` ||\ |
| 162 | || ticket:1, ticket:1#comment:1 || |
| 163 | || `Ticket [ticket:1]`, `[ticket:1 ticket one]` ||\ |
| 164 | || Ticket [ticket:1], [ticket:1 ticket one] || |
| 165 | || `Ticket [[ticket:1]]`, `[[ticket:1|ticket one]]` ||\ |
| 166 | || Ticket [[ticket:1]], [[ticket:1|ticket one]] || |
| 167 | |----------------------------------------------------------- |
| 168 | {{{#!th rowspan=2 |
| 169 | [#SettingAnchors Setting Anchors] |
| 170 | }}} |
| 171 | || `[=#point1 (1)] First...` ||\ |
| 172 | || [=#point1 (1)] First... || |
| 173 | || `see [#point1 (1)]` ||\ |
| 174 | || see [#point1 (1)] || |
| 175 | |----------------------------------------------------------- |
| 176 | {{{#!th rowspan=3 |
| 177 | [#Escaping Escaping Markup] |
| 178 | }}} |
| 179 | || `!'' doubled quotes` ||\ |
| 180 | || !'' doubled quotes || |
| 181 | || `!wiki:WikiFormatting`, `!WikiFormatting` ||\ |
| 182 | || !wiki:WikiFormatting, !WikiFormatting || |
| 183 | || [[html(<code>`{{{-}}}` triple curly brackets</code>)]] ||\ |
| 184 | || `{{{-}}}` triple curly brackets || |
| 185 | |----------------------------------------------------------- |
| 186 | ||= [#Images Images] =|| `[[Image(`''link''`)]]` || [[Image(htdocs:../common/trac_logo_mini.png)]] || |
| 187 | |----------------------------------------------------------- |
| 188 | {{{#!th rowspan=2 |
| 189 | [#Macros Macros] |
| 190 | }}} |
| 191 | || `[[MacroList(*)]]` || ''(short list of all available macros)'' || |
| 192 | || `[[Image?]]` || ''(help for the Image macro)'' || |
| 193 | |----------------------------------------------------------- |
| 194 | ||= [#Processors Processors] =||\ |
| 195 | {{{#!td |
| 196 | {{{ |
| 197 | {{{ |
| 198 | #!div style="font-size: 80%" |
| 199 | Code highlighting: |
| 200 | {{{#!python |
| 201 | hello = lambda: "world" |
| 202 | }}} |
| 203 | }}} |
| 204 | }}} |
| 205 | }}} |
| 206 | {{{#!td style="padding-left: 2em" |
| 207 | {{{ |
| 208 | #!div style="font-size: 80%" |
| 209 | Code highlighting: |
| 210 | {{{#!python |
| 211 | hello = lambda: "world" |
| 212 | }}} |
| 213 | }}} |
| 214 | }}} |
| 215 | |----------------------------------------------------------- |
| 216 | ||= [#Comments Comments] =||\ |
| 217 | {{{#!td |
| 218 | {{{ |
| 219 | {{{#!comment |
| 220 | Note to Editors: ... |
| 221 | }}} |
| 222 | }}} |
| 223 | }}} |
| 224 | {{{#!td style="padding-left: 2em" |
| 225 | {{{#!comment |
| 226 | Note to Editors: ... |
| 227 | }}} |
| 228 | }}} |
| 229 | |----------------------------------------------------------- |
| 230 | ||= [#Miscellaneous Miscellaneous] =||\ |
| 231 | {{{#!td |
| 232 | {{{ |
| 233 | Line [[br]] break |
| 234 | Line \\ break |
| 235 | ---- |
| 236 | }}} |
| 237 | }}} |
| 238 | {{{#!td style="padding-left: 2em" |
| 239 | Line [[br]] break |
| 240 | Line \\ break |
| 241 | ---- |
| 242 | }}} |
| 243 | |
| 244 | == Font Styles |
25 | | }}} |
26 | | |
27 | | Display: |
28 | | * '''bold''' |
29 | | * ''italic'' |
30 | | * '''''bold italic''''' |
31 | | * __underline__ |
32 | | * {{{monospace}}} or `monospace` |
33 | | * ~~strike-through~~ |
34 | | * ^superscript^ |
35 | | * ,,subscript,, |
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. |
38 | | |
39 | | == Headings == |
40 | | |
41 | | You can create heading by starting a line with one up to five ''equal'' characters ("=") |
42 | | followed by a single space and the headline text. The line should end with a space |
43 | | followed by the same number of ''='' characters. |
| 280 | * **also bold**, //italic as well//, |
| 281 | and **'' bold italic **'' //(since 0.12)// |
| 282 | * [[span(style=color: #FF0000, a red text )]] |
| 283 | }}} |
| 284 | |
| 285 | Notes: |
| 286 | * `{{{...}}}` 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. |
| 287 | * {{{ ! }}} 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. |
| 288 | * all the font styles marks have to be used in opening/closing pairs, |
| 289 | and they must nest properly (in particular, an `''` italic can't be paired |
| 290 | with a `//` one, and `'''` can't be paired with `**`) |
| 291 | |
| 292 | == Headings |
| 293 | |
| 294 | You can create heading by starting a line with one up to six ''equal'' characters ("=") followed by a single space and the headline text. |
| 295 | |
| 296 | [=#hn] |
| 297 | The headline text can be followed by the same number of "=" characters, but this is no longer mandatory. |
| 298 | |
| 299 | Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated. |
| 300 | |
| 301 | ||= Wiki Markup =||= Display =|| |
| 302 | {{{#!td |
| 303 | {{{ |
| 304 | = Heading = |
| 305 | == Subheading |
| 306 | === About ''this'' === |
| 307 | === Explicit id === #using-explicit-id-in-heading |
| 308 | == Subheading #sub2 |
| 309 | }}} |
| 310 | }}} |
| 311 | {{{#!td style="padding: 1em;" |
| 312 | {{{ |
| 313 | #!div |
| 314 | = Heading = |
| 315 | == Subheading |
| 316 | === About ''this'' === |
| 317 | === Explicit id === #using-explicit-id-in-heading |
| 318 | == Subheading #sub2 |
| 319 | }}} |
| 320 | }}} |
| 321 | |
| 322 | == Paragraphs |
| 323 | |
| 324 | A new text paragraph is created whenever two blocks of text are separated by one or more empty lines. |
| 325 | |
| 326 | A forced line break can also be inserted, using: |
| 327 | ||= Wiki Markup =||= Display =|| |
| 328 | {{{#!td |
| 329 | {{{ |
| 330 | Line 1[[BR]]Line 2 |
| 331 | }}} |
| 332 | {{{ |
| 333 | Paragraph |
| 334 | one |
| 335 | |
| 336 | Paragraph |
| 337 | two |
| 338 | }}} |
| 339 | }}} |
| 340 | {{{#!td |
| 341 | Line 1[[BR]]Line 2 |
| 342 | |
| 343 | Paragraph |
| 344 | one |
| 345 | |
| 346 | Paragraph |
| 347 | two |
| 348 | }}} |
| 349 | |
| 350 | == Lists |
| 351 | |
| 352 | The wiki supports both ordered/numbered and unordered lists. |
160 | | Display: |
161 | | ||Cell 1||Cell 2||Cell 3|| |
162 | | ||Cell 4||Cell 5||Cell 6|| |
163 | | |
164 | | Note that more complex tables can be created using |
165 | | [wiki:WikiRestructuredText#BiggerReSTExample reStructuredText]. |
166 | | |
167 | | |
168 | | == Links == |
| 504 | Cell headings can be specified by wrapping the content in a pair of '=' characters. |
| 505 | Note that the '=' characters have to stick to the cell separators, like this: |
| 506 | ||= Wiki Markup =||= Display =|| |
| 507 | {{{#!td |
| 508 | {{{ |
| 509 | || ||= stable =||= latest =|| |
| 510 | ||= 0.10 =|| 0.10.5 || 0.10.6dev|| |
| 511 | ||= 0.11 =|| 0.11.6 || 0.11.7dev|| |
| 512 | }}} |
| 513 | }}} |
| 514 | {{{#!td style="padding: 2em;" |
| 515 | || ||= stable =||= latest =|| |
| 516 | ||= 0.10 =|| 0.10.5 || 0.10.6dev|| |
| 517 | ||= 0.11 =|| 0.11.6 || 0.11.7dev|| |
| 518 | }}} |
| 519 | |
| 520 | Finally, specifying an empty cell means that the next non empty cell will span the empty cells. For example: |
| 521 | ||= Wiki Markup =||= Display =|| |
| 522 | {{{#!td |
| 523 | {{{ |
| 524 | || 1 || 2 || 3 || |
| 525 | |||| 1-2 || 3 || |
| 526 | || 1 |||| 2-3 || |
| 527 | |||||| 1-2-3 || |
| 528 | }}} |
| 529 | }}} |
| 530 | {{{#!td style="padding: 2em;" |
| 531 | || 1 || 2 || 3 || |
| 532 | |||| 1-2 || 3 || |
| 533 | || 1 |||| 2-3 || |
| 534 | |||||| 1-2-3 || |
| 535 | }}} |
| 536 | |
| 537 | Note that if the content of a cell "sticks" to one side of the cell and only one, then the text will be aligned on that side. Example: |
| 538 | ||= Wiki Markup =||= Display =|| |
| 539 | {{{#!td |
| 540 | {{{ |
| 541 | ||=Text =||= Numbers =|| |
| 542 | ||left align || 1.0|| |
| 543 | || center || 4.5|| |
| 544 | || right align|| 4.5|| |
| 545 | || default alignment || 2.5|| |
| 546 | ||default|| 2.5|| |
| 547 | || default || 2.5|| |
| 548 | || default || 2.5|| |
| 549 | }}} |
| 550 | }}} |
| 551 | {{{#!td style="padding: 2em;" |
| 552 | ||=Text =||= Numbers =|| |
| 553 | ||left align || 1.0|| |
| 554 | || center || 4.5|| |
| 555 | || right align|| 4.5|| |
| 556 | || default alignment || 2.5|| |
| 557 | ||default|| 2.5|| |
| 558 | || default || 2.5|| |
| 559 | || default || 2.5|| |
| 560 | }}} |
| 561 | |
| 562 | If contrary to the example above, the cells in your table contain more text, it might be convenient to spread a table row over multiple lines of markup. The `\` character placed at the end of a line after a cell separator tells Trac to not start a new row for the cells on the next line. |
| 563 | |
| 564 | ||= Wiki Markup =|| |
| 565 | {{{#!td |
| 566 | {{{ |
| 567 | || this is column 1 [http://trac.edgewall.org/newticket new ticket] || \ |
| 568 | || this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \ |
| 569 | || that's column 3 and last one || |
| 570 | }}} |
| 571 | }}} |
| 572 | |------------- |
| 573 | ||= Display =|| |
| 574 | {{{#!td style="padding: 2em;" |
| 575 | || this is column 1 [http://trac.edgewall.org/newticket new ticket] || \ |
| 576 | || this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \ |
| 577 | || that's column 3 and last one || |
| 578 | }}} |
| 579 | |
| 580 | === Complex Tables |
| 581 | |
| 582 | If the possibilities offered by the simple "pipe"-based markup for tables described above are not enough for your needs, you can create more elaborated tables by using [#Processors-example-tables WikiProcessor based tables]. |
| 583 | |
| 584 | == Links |
172 | | Example: |
173 | | {{{ |
174 | | TitleIndex, http://www.edgewall.com/, !NotAlink |
175 | | }}} |
176 | | |
177 | | Display: |
178 | | TitleIndex, http://www.edgewall.com/, !NotAlink |
179 | | |
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. |
181 | | |
182 | | Example: |
183 | | {{{ |
184 | | * [http://www.edgewall.com/ Edgewall Software] |
185 | | * [wiki:TitleIndex Title Index] |
186 | | * [wiki:ISO9000] |
187 | | }}} |
188 | | |
189 | | Display: |
190 | | * [http://www.edgewall.com/ Edgewall Software] |
191 | | * [wiki:TitleIndex Title Index] |
192 | | * [wiki:ISO9000] |
193 | | |
194 | | |
195 | | === Trac Links === |
| 588 | ||= Wiki Markup =||= Display =|| |
| 589 | {{{#!td |
| 590 | {{{ |
| 591 | TitleIndex, http://www.edgewall.com/, !NotAlink |
| 592 | }}} |
| 593 | }}} |
| 594 | {{{#!td |
| 595 | TitleIndex, http://www.edgewall.com/, !NotAlink |
| 596 | }}} |
| 597 | |
| 598 | 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. |
| 599 | 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. |
| 600 | |
| 601 | ||= Wiki Markup =||= Display =|| |
| 602 | {{{#!td |
| 603 | {{{ |
| 604 | * [http://www.edgewall.com Edgewall Software] |
| 605 | * [wiki:TitleIndex Title Index] |
| 606 | * [wiki:TitleIndex] |
| 607 | * [wiki:ISO9000] |
| 608 | }}} |
| 609 | }}} |
| 610 | {{{#!td |
| 611 | * [http://www.edgewall.com Edgewall Software] |
| 612 | * [wiki:TitleIndex Title Index] |
| 613 | * [wiki:TitleIndex] |
| 614 | * [wiki:ISO9000] |
| 615 | }}} |
| 616 | |
| 617 | Following the [trac:WikiCreole] trend, the descriptive title can also be specified by writing the link followed by a pipe ('|') and a title and all this inside //double// square brackets. |
| 618 | |
| 619 | {{{#!td |
| 620 | {{{ |
| 621 | * [[http://www.edgewall.com|Edgewall Software]] |
| 622 | * [[wiki:TitleIndex|Title Index]] |
| 623 | or even [[TitleIndex|Title Index]] |
| 624 | * [[wiki:TitleIndex]] |
| 625 | ''' but not ![[TitleIndex]]! ''' |
| 626 | * [[ISO9000]] |
| 627 | }}} |
| 628 | }}} |
| 629 | {{{#!td |
| 630 | * [[http://www.edgewall.com|Edgewall Software]] |
| 631 | * [[wiki:TitleIndex|Title Index]] |
| 632 | or even [[TitleIndex|Title Index]] |
| 633 | * [[wiki:TitleIndex]] |
| 634 | ''' but not ![[TitleIndex]]! ''' |
| 635 | * [[ISO9000]] |
| 636 | }}} |
| 637 | |
| 638 | '''Note''': the [trac:WikiCreole] style for links is quick to type and certainly looks familiar as it is the one used on Wikipedia and in many other wikis. Unfortunately it conflicts with the syntax for [#Macros macros]. |
| 639 | So in the rare case when you need to refer to a page which is named after a macro (typical examples being TitleIndex, InterTrac and InterWiki), by writing `[[TitleIndex]]` you will actually call the macro instead of linking to the page. |
| 640 | |
| 641 | == Trac Links |
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" |
209 | | }}} |
210 | | |
211 | | Display: |
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" |
222 | | |
223 | | See TracLinks for more in-depth information. |
224 | | |
225 | | |
226 | | == Escaping Links and WikiPageNames == |
| 662 | * ... |
| 663 | * targeting other Trac instances, |
| 664 | so called InterTrac links: |
| 665 | - Tickets: #Trac1 or Trac:ticket:1 |
| 666 | - Changesets: [Trac1] or Trac:changeset:1 |
| 667 | }}} |
| 668 | |
| 669 | There are many more flavors of Trac links, see TracLinks for more in-depth information and a reference for all the default link resolvers. |
| 670 | |
| 671 | == Setting Anchors |
| 672 | |
| 673 | An anchor, or more correctly speaking, an [http://www.w3.org/TR/REC-html40/struct/links.html#h-12.2.1 anchor name] can be added explicitly at any place in the Wiki page, in order to uniquely identify a position in the document: |
| 674 | |
| 675 | {{{ |
| 676 | [=#point1] |
| 677 | }}} |
| 678 | |
| 679 | This syntax was chosen to match the format for explicitly naming the header id [#Headings documented above]. For example: |
| 680 | {{{ |
| 681 | == Long title == #title |
| 682 | }}} |
| 683 | |
| 684 | It's also very close to the syntax for the corresponding link to that anchor: |
| 685 | {{{ |
| 686 | [#point1] |
| 687 | }}} |
| 688 | |
| 689 | Optionally, a label can be given to the anchor: |
| 690 | {{{ |
| 691 | [[=#point1 '''Point 1''']] |
| 692 | }}} |
| 693 | |
| 694 | ||= Wiki Markup =||= Display =|| |
| 695 | |---------------------------------- |
| 696 | {{{#!td |
| 697 | {{{ |
| 698 | [#point2 jump to the second point] |
| 699 | |
| 700 | ... |
| 701 | |
| 702 | Point2: [=#point2] Jump here |
| 703 | }}} |
| 704 | }}} |
| 705 | {{{#!td |
| 706 | [#point2 jump to the second point] |
| 707 | |
| 708 | ... |
| 709 | |
| 710 | Point2: [=#point2] Jump here |
| 711 | }}} |
| 712 | |
| 713 | For more complex anchors (e.g. when a custom title is wanted), one can use the Span macro, e.g. `[[span(id=point2, class=wikianchor, title=Point 2, ^(2)^)]]`. |
| 714 | |
| 715 | == Escaping Links, WikiPageNames and other Markup == #Escaping |
234 | | }}} |
235 | | |
236 | | Display: |
237 | | !NoHyperLink |
238 | | !#42 is not a link |
239 | | |
240 | | |
241 | | == Images == |
242 | | |
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). |
255 | | |
256 | | |
257 | | == Macros == |
| 735 | |
| 736 | Various forms of escaping for list markup: |
| 737 | ^^- escaped minus sign \\ |
| 738 | ^^1. escaped number \\ |
| 739 | ^^* escaped asterisk sign |
| 740 | }}} |
| 741 | |
| 742 | == Images |
| 743 | |
| 744 | Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags. |
| 745 | |
| 746 | 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)]]`. |
| 747 | |
| 748 | In addition to the current page, it is possible to refer to other resources: |
| 749 | * `[[Image(wiki:WikiFormatting:picture.gif)]]` (referring to attachment on another page) |
| 750 | * `[[Image(ticket:1:picture.gif)]]` (file attached to a ticket) |
| 751 | * `[[Image(htdocs:picture.gif)]]` (referring to a file inside the [TracEnvironment environment] `htdocs` directory) |
| 752 | * `[[Image(source:/trunk/trac/htdocs/trac_logo_mini.png)]]` (a file in repository) |
| 753 | |
| 754 | ||= Wiki Markup =||= Display =|| |
| 755 | {{{#!td |
| 756 | {{{ |
| 757 | [[Image(htdocs:../common/trac_logo_mini.png)]] |
| 758 | }}} |
| 759 | }}} |
| 760 | {{{#!td |
| 761 | [[Image(htdocs:../common/trac_logo_mini.png)]] |
| 762 | }}} |
| 763 | |
| 764 | See WikiMacros for further documentation on the `[[Image()]]` macro, which has several useful options (`title=`, `link=`, etc.) |
| 765 | |
| 766 | == Macros |