Changes between Version 121 and Version 129 of WikiFormatting
- Timestamp:
- (multiple changes)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiFormatting
v121 v129 4 4 [[TranslatedPages]] 5 5 6 Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole. 7 8 Trac has a built-in small and powerful wiki rendering engine. This wiki engine implements a growing subset of the commands from other popular Wikis, especially [http://moinmo.in/ MoinMoin] and [trac:WikiCreole]. 9 10 This page will give you an in-depth explanation of the wiki markup available anywhere WikiFormatting is allowed. 11 12 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. 13 14 A few other wiki pages present the advanced features of the Trac wiki markup in more depth: 15 - TracLinks covers all the possible ways to refer precisely to any Trac resource or parts thereof. 6 Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and unified whole. 7 8 Trac has a powerful wiki rendering engine that implements a subset of the commands from other popular Wikis, such as [https://moinmo.in/ MoinMoin] and [trac:WikiCreole]. 9 10 The sections below provide an overview for the most common syntax, each link in the ''Category'' column leads you to the more detailed explanation later in this page. 11 12 The following wiki pages present the advanced features of the Trac wiki markup in more depth: 13 - TracLinks covers all the possible ways to refer to any Trac resource or parts thereof. 16 14 - WikiPageNames covers the various names a wiki page can take, whether in CamelCase or not. 17 15 - WikiMacros lists the macros available for generating dynamic content. … … 28 26 || `'''bold'''`, `''italic''`, `'''''Wikipedia style'''''` || \ 29 27 || '''bold''', ''italic'', '''''Wikipedia style''''' || 28 || `**bold**`, `//italic//`, `**//!WikiCreole style//**` || \ 29 || **bold**, //italic//, **//!WikiCreole style//** || 30 30 || {{{`monospaced (''other markup ignored'')`}}} || \ 31 31 || `monospaced (''other markup ignored'')` || 32 || `**bold**`, `//italic//`, `**//!WikiCreole style//**` || \33 || **bold**, //italic//, **//!WikiCreole style//** ||34 32 |----------------------------------------------------------- 35 33 ||= [#Headings Headings] =||\ 36 {{{#!td 34 {{{#!td 37 35 {{{ 38 36 == Level 2 … … 67 65 on multiple lines 68 66 1. nested list 69 a. different numbering 67 a. different numbering 70 68 styles 71 69 }}} … … 97 95 {{{ 98 96 {{{ 99 multiple lines, ''no wiki'' 97 multiple lines, ''no wiki'', 100 98 white space respected 101 99 }}} … … 104 102 {{{#!td 105 103 {{{ 106 multiple lines, ''no wiki'' 104 multiple lines, ''no wiki'', 107 105 white space respected 108 106 }}} … … 148 146 [#Links Links] 149 147 }}} 150 || `http ://trac.edgewall.org` ||\151 || http ://trac.edgewall.org ||148 || `https://trac.edgewall.org` ||\ 149 || https://trac.edgewall.org || 152 150 || `WikiFormatting (CamelCase)` ||\ 153 151 || WikiFormatting (CamelCase) || … … 160 158 || `#1 (ticket)`, `[1] (changeset)`, `{1} (report)` ||\ 161 159 || #1 (ticket), [1] (changeset), {1} (report) || 162 || `ticket:1, ticket:1#comment:1 ` ||\163 || ticket:1, ticket:1#comment:1 ||160 || `ticket:1, ticket:1#comment:1, comment:1:ticket:1` ||\ 161 || ticket:1, ticket:1#comment:1, comment:1:ticket:1 || 164 162 || `Ticket [ticket:1]`, `[ticket:1 ticket one]` ||\ 165 163 || Ticket [ticket:1], [ticket:1 ticket one] || … … 167 165 || Ticket [[ticket:1]], [[ticket:1|ticket one]] || 168 166 |----------------------------------------------------------- 169 {{{#!th rowspan=2 167 {{{#!th rowspan=2 170 168 [#SettingAnchors Setting Anchors] 171 169 }}} … … 196 194 {{{#!td 197 195 {{{ 198 {{{ 199 #!div style="font-size: 80%" 196 {{{#!div style="font-size: 80%" 200 197 Code highlighting: 201 198 {{{#!python … … 206 203 }}} 207 204 {{{#!td style="padding-left: 2em" 208 {{{ 209 #!div style="font-size: 80%" 205 {{{#!div style="font-size: 80%" 210 206 Code highlighting: 211 {{{#!python 207 {{{#!python 212 208 hello = lambda: "world" 213 209 }}} … … 223 219 }}} 224 220 }}} 225 {{{#!td style="padding-left: 2em" 226 {{{#!comment 227 Note to Editors: ... 228 }}} 229 }}} 221 || ''(comment is shown in edit mode only)'' || 230 222 |----------------------------------------------------------- 231 223 ||= [#Miscellaneous Miscellaneous] =||\ 232 224 {{{#!td 233 225 {{{ 234 Line [[br]] break 226 Line [[br]] break 235 227 Line \\ break 236 228 ---- … … 249 241 {{{#!td 250 242 {{{ 251 * '''bold''', 252 ''' triple quotes !''' 253 can be bold too if prefixed by ! ''', 243 * '''bold''', 244 ''' triple quotes !''' 245 can be bold too if prefixed by ! ''', 254 246 * ''italic'' 255 247 * '''''bold italic''''' or ''italic and … … 259 251 (hence `{{{` or {{{`}}} quoting) 260 252 * ~~strike-through~~ 261 * ^superscript^ 253 * ^superscript^ 262 254 * ,,subscript,, 263 * **also bold**, //italic as well//, 255 * **also bold**, //italic as well//, 264 256 and **'' bold italic **'' //(since 0.12)// 265 257 * [[span(style=color: #FF0000, a red text )]] … … 267 259 }}} 268 260 {{{#!td 269 * '''bold''', 270 ''' triple quotes !''' 271 can be bold too if prefixed by ! ''', 261 * '''bold''', 262 ''' triple quotes !''' 263 can be bold too if prefixed by ! ''', 272 264 * ''italic'' 273 265 * '''''bold italic''''' or ''italic and … … 277 269 (hence `{{{` or {{{`}}} quoting) 278 270 * ~~strike-through~~ 279 * ^superscript^ 271 * ^superscript^ 280 272 * ,,subscript,, 281 * **also bold**, //italic as well//, 273 * **also bold**, //italic as well//, 282 274 and **'' bold italic **'' //(since 0.12)// 283 275 * [[span(style=color: #FF0000, a red text )]] … … 286 278 Notes: 287 279 * `{{{...}}}` 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. 288 * {{{ ! }}} 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.289 * all the font styles marks have to be used in opening/closing pairs, 290 and they must nest properly; in particular, an `''` italic can't be paired 280 * {{{ ! }}} 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. 281 * all the font styles marks have to be used in opening/closing pairs, 282 and they must nest properly; in particular, an `''` italic can't be paired 291 283 with a `//` one, and `'''` can't be paired with `**`. 292 284 293 285 == Headings 294 286 295 You can create heading by starting a line with one up to six ''equal'' characters ("=") followed by a single space and the headline text.287 You can create a heading by starting a line with one up to six ''equal'' characters (`=`) followed by a single space and the headline text. 296 288 297 289 [=#hn] 298 The headline text can be followed by the same number of "="characters, but this is not mandatory. That is, `=== Section3 ===` is identical to `=== Section3`.290 The headline text can be followed by the same number of `=` characters, but this is not mandatory. That is, `=== Section3 ===` is identical to `=== Section3`. 299 291 300 292 Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated. … … 335 327 one 336 328 337 Paragraph 329 Paragraph 338 330 two 339 331 }}} … … 342 334 Line 1[[BR]]Line 2 343 335 344 Paragraph 336 Paragraph 345 337 one 346 338 347 Paragraph 339 Paragraph 348 340 two 349 341 }}} … … 353 345 The wiki supports both ordered/numbered and unordered lists. 354 346 355 Example:356 347 ||= Wiki Markup =||= Display =|| 357 348 {{{#!td … … 359 350 * Item 1 360 351 * Item 1.1 361 * Item 1.1.1 352 * Item 1.1.1 362 353 * Item 1.1.2 363 354 * Item 1.1.3 … … 366 357 - items can start at the beginning of a line 367 358 and they can span multiple lines 368 - be careful though to continue the line 359 - be careful though to continue the line 369 360 with the appropriate indentation, otherwise 370 361 that will start a new paragraph... 371 362 372 363 1. Item 1 373 364 a. Item 1.a … … 384 375 * Item 1 385 376 * Item 1.1 386 * Item 1.1.1 377 * Item 1.1.1 387 378 * Item 1.1.2 388 379 * Item 1.1.3 … … 391 382 - items can start at the beginning of a line 392 383 and they can span multiple lines 393 - be careful though to continue the line 384 - be careful though to continue the line 394 385 with the appropriate indentation, otherwise 395 386 that will start a new paragraph... … … 432 423 433 424 Block 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. 434 425 435 426 ||= Wiki Markup =||= Display =|| 436 427 {{{#!td … … 469 460 == Discussion Citations 470 461 471 To delineate a citation in an ongoing discussion thread, such as the ticket comment area, email-like citation marks ( ">", ">>", etc.) may be used.462 To delineate a citation in an ongoing discussion thread, such as the ticket comment area, email-like citation marks (`>`, `>>`, etc.) may be used. 472 463 473 464 ||= Wiki Markup =||= Display =|| … … 490 481 === Simple Tables 491 482 492 Simple tables can be created like this:483 Simple tables can be created: 493 484 ||= Wiki Markup =||= Display =|| 494 485 {{{#!td … … 503 494 }}} 504 495 505 Cell headings can be specified by wrapping the content in a pair of '='characters.506 Note that the '=' characters have to stick to the cell separators, like this:496 Cell headings can be specified by wrapping the content in a pair of `=` characters. 497 Note that the `=` characters have to stick to the cell separators: 507 498 ||= Wiki Markup =||= Display =|| 508 499 {{{#!td … … 519 510 }}} 520 511 521 Finally, specifying an empty cell means that the next non empty cell will span the empty cells . For example:512 Finally, specifying an empty cell means that the next non empty cell will span the empty cells: 522 513 ||= Wiki Markup =||= Display =|| 523 514 {{{#!td … … 536 527 }}} 537 528 538 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:529 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: 539 530 ||= Wiki Markup =||= Display =|| 540 531 {{{#!td … … 561 552 }}} 562 553 563 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 .554 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: 564 555 565 556 ||= Wiki Markup =|| 566 557 {{{#!td 567 558 {{{ 568 || this is column 1 [http ://trac.edgewall.org/newticket new ticket] || \569 || this is column 2 [http ://trac.edgewall.org/roadmap the road ahead] || \559 || this is column 1 [https://trac.edgewall.org/newticket new ticket] || \ 560 || this is column 2 [https://trac.edgewall.org/roadmap the road ahead] || \ 570 561 || that's column 3 and last one || 571 562 }}} … … 574 565 ||= Display =|| 575 566 {{{#!td style="padding: 2em;" 576 || this is column 1 [http ://trac.edgewall.org/newticket new ticket] || \577 || this is column 2 [http ://trac.edgewall.org/roadmap the road ahead] || \567 || this is column 1 [https://trac.edgewall.org/newticket new ticket] || \ 568 || this is column 2 [https://trac.edgewall.org/roadmap the road ahead] || \ 578 569 || that's column 3 and last one || 579 570 }}} … … 581 572 === Complex Tables 582 573 583 If the possibilities offered by the simple pipe-based markup ( '||') for tables described above are not enough for your needs, you can create more elaborate tables by using [#Processors-example-tables WikiProcessor based tables].574 If the possibilities offered by the simple pipe-based markup (`||`) for tables described above are not enough for your needs, you can create more elaborate tables by using [#Processors-example-tables WikiProcessor based tables]. 584 575 585 576 == Links 586 577 587 Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark ( '!'), such as {{{!WikiPageLink}}}.588 589 ||= Wiki Markup =||= Display =|| 590 {{{#!td 591 {{{ 592 TitleIndex, http ://www.edgewall.com/, !NotAlink593 }}} 594 }}} 595 {{{#!td 596 TitleIndex, http ://www.edgewall.com/, !NotAlink597 }}} 598 599 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. 578 Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark (`!`), such as `!WikiPageLink`. 579 580 ||= Wiki Markup =||= Display =|| 581 {{{#!td 582 {{{ 583 TitleIndex, https://www.edgewall.com/, !NotAlink 584 }}} 585 }}} 586 {{{#!td 587 TitleIndex, https://www.edgewall.com/, !NotAlink 588 }}} 589 590 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. 600 591 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. 601 592 … … 603 594 {{{#!td 604 595 {{{ 605 * [http ://www.edgewall.com Edgewall Software]606 * [wiki:TitleIndex Title Index] 607 * [wiki:TitleIndex] 596 * [https://www.edgewall.com Edgewall Software] 597 * [wiki:TitleIndex Title Index] 598 * [wiki:TitleIndex] 608 599 * [wiki:ISO9000] 609 600 }}} 610 601 }}} 611 602 {{{#!td 612 * [http ://www.edgewall.com Edgewall Software]613 * [wiki:TitleIndex Title Index] 614 * [wiki:TitleIndex] 603 * [https://www.edgewall.com Edgewall Software] 604 * [wiki:TitleIndex Title Index] 605 * [wiki:TitleIndex] 615 606 * [wiki:ISO9000] 616 607 }}} 617 608 618 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.619 620 {{{#!td 621 {{{ 622 * [[http ://www.edgewall.com|Edgewall Software]]609 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. 610 611 {{{#!td 612 {{{ 613 * [[https://www.edgewall.com|Edgewall Software]] 623 614 * [[wiki:TitleIndex|Title Index]] 624 615 or even [[TitleIndex|Title Index]] … … 629 620 }}} 630 621 {{{#!td 631 * [[http ://www.edgewall.com|Edgewall Software]]622 * [[https://www.edgewall.com|Edgewall Software]] 632 623 * [[wiki:TitleIndex|Title Index]] 633 624 or even [[TitleIndex|Title Index]] … … 651 642 * Changesets: r1, [1] or changeset:1 652 643 * ... 653 * targeting other Trac instances, 644 * targeting other Trac instances, 654 645 so called InterTrac links: 655 646 - Tickets: #Trac1 or Trac:ticket:1 … … 661 652 * Reports: {1} or report:1 662 653 * Changesets: r1, [1] or changeset:1 663 * ... 664 * targeting other Trac instances, 654 * ... 655 * targeting other Trac instances, 665 656 so called InterTrac links: 666 657 - Tickets: #Trac1 or Trac:ticket:1 … … 672 663 == Setting Anchors 673 664 674 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 orderto uniquely identify a position in the document:665 An anchor, or more correctly speaking, an [https://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, to uniquely identify a position in the document: 675 666 676 667 {{{ … … 678 669 }}} 679 670 680 This syntax was chosen to match the format for explicitly naming the header id [#Headings documented above] . For example:671 This syntax was chosen to match the format for explicitly naming the header id [#Headings documented above]: 681 672 {{{ 682 673 == Long title == #title … … 690 681 Optionally, a label can be given to the anchor: 691 682 {{{ 692 [ [=#point1 '''Point 1''']]683 [=#point1 '''Point 1'''] 693 684 }}} 694 685 … … 716 707 == Escaping Links, WikiPageNames and other Markup == #Escaping 717 708 718 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single exclamation mark ( '!').709 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single exclamation mark (`!`). 719 710 720 711 ||= Wiki Markup =||= Display =|| … … 767 758 == Macros 768 759 769 Macros are ''custom functions'' t oinsert dynamic content in a page.760 Macros are ''custom functions'' that insert dynamic content in a page. 770 761 771 762 ||= Wiki Markup =||= Display =|| … … 781 772 See WikiMacros for more information, and a list of installed macros. 782 773 783 The detailed help for a specific macro can also be obtained more directly by appending a "?"to the macro name.774 The detailed help for a specific macro can also be obtained more directly by appending a `?` to the macro name. 784 775 785 776 ||= Wiki Markup =||= Display =|| … … 795 786 == Processors 796 787 797 Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in 798 [wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML]. 788 Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in 789 [wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML]. 799 790 800 791 ||= Wiki Markup =||= Display =|| … … 808 799 {{{#!td style="border: 0px" 809 800 {{{ 810 {{{ 811 #!html 801 {{{#!html 812 802 <h1 style="text-align: right; color: blue"> 813 803 HTML Test … … 818 808 {{{#!td valign="top" style="border: 0px" 819 809 820 {{{ 821 #!html 810 {{{#!html 822 811 <h1 style="text-align: right; color: blue">HTML Test</h1> 823 812 }}} … … 833 822 {{{#!td style="border: 0px" 834 823 {{{ 835 {{{ 836 #!python 824 {{{#!python 837 825 class Test: 838 826 839 827 def __init__(self): 840 828 print "Hello World" … … 844 832 }}} 845 833 }}} 846 {{{ 847 #!td valign="top" style="border: 0px" 848 849 {{{ 850 #!python 834 {{{#!td valign="top" style="border: 0px" 835 836 {{{#!python 851 837 class Test: 852 838 def __init__(self): … … 878 864 |---------------- 879 865 {{{#!td 880 As processors can be easily nested, 866 As processors can be easily nested, 881 867 so can be tables: 882 868 {{{#!th … … 895 881 }}} 896 882 }}} 897 {{{ 898 #!td valign="top" style="border: 0px" 883 {{{#!td valign="top" style="border: 0px" 899 884 900 885 {{{#!th rowspan=4 align=justify … … 910 895 |---------------- 911 896 {{{#!td 912 As processors can be easily nested, 897 As processors can be easily nested, 913 898 so can be tables: 914 899 {{{#!th … … 938 923 {{{ 939 924 Nothing to 940 {{{ 941 #!comment 925 {{{#!comment 942 926 Your comment for editors here 943 927 }}} … … 947 931 {{{#!td 948 932 Nothing to 949 {{{ 950 #!comment 933 {{{#!comment 951 934 Your comment for editors here 952 935 }}} … … 960 943 Horizontal line: 961 944 {{{ 962 Four or more dashes will be replaced 945 Four or more dashes will be replaced 963 946 by a horizontal line (<HR>) 964 947 ----