Changes between Version 2 and Version 3 of WikiFormatting
- Timestamp:
- 03/14/20 12:12:44 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiFormatting
v2 v3 1 = WikiFormatting = 1 = WikiFormatting 2 2 3 [[TracGuideToc]] 3 4 4 5 Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole. 5 6 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://moinmo.in/ MoinMoin] and [trac:WikiCreole]. 8 7 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 8 10 9 This page will give you an in-depth explanation of the wiki markup available anywhere WikiFormatting is allowed. 11 10 12 The ''Cheat sheet'' below gives you a quickoverview for the most common syntax, each link in the ''Category'' column will lead you to the more detailed explanation later in this page.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. 13 12 14 13 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 ,16 - WikiPageNames talks about the various names a wiki page can take, CamelCase or not17 - WikiMacros lists the macros available for generating dynamic content ,18 - WikiProcessors and WikiHtml details how parts of the wiki text can be processed in special ways 19 20 21 == C heat sheet ==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, whether in 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 22 21 23 22 ||= '''Category''' =||= '''Wiki Markup''' =||= '''Display''' =|| … … 36 35 {{{#!td 37 36 {{{ 38 == Level 2 ==37 == Level 2 39 38 === Level 3 ^([#hn note])^ 40 39 }}} 41 40 }}} 42 41 {{{#!td style="padding-left: 2em" 43 == Level 2 ==42 == Level 2 44 43 === Level 3 ^([#hn note])^ 45 44 }}} … … 64 63 {{{#!td 65 64 {{{ 66 * bullet slist65 * bullet list 67 66 on multiple lines 68 67 1. nested list … … 72 71 }}} 73 72 {{{#!td 74 * bullet slist73 * bullet list 75 74 on multiple lines 76 75 1. nested list … … 182 181 || `!wiki:WikiFormatting`, `!WikiFormatting` ||\ 183 182 || !wiki:WikiFormatting, !WikiFormatting || 184 || {{{`}}}`{{{-}}}`{{{`}}}` triple curly brackets`||\183 || [[html(<code>`{{{-}}}` triple curly brackets</code>)]] ||\ 185 184 || `{{{-}}}` triple curly brackets || 186 185 |----------------------------------------------------------- … … 243 242 }}} 244 243 245 246 == Font Styles == 244 == Font Styles 247 245 248 246 The Trac wiki supports the following font styles: … … 289 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. 290 288 * all the font styles marks have to be used in opening/closing pairs, 291 and they must nest properly (in particular, an `''` italic can't be paired 292 with a `//` one, and `'''` can't be paired with `**`) 293 294 295 == Headings == 296 297 You can create heading by starting a line with one up to six ''equal'' characters ("=") 298 followed by a single space and the headline text. 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. 299 295 300 296 [=#hn] 301 The headline text can be followed by the same number of "=" characters, but this is no longer mandatory.297 The headline text can be followed by the same number of "=" characters, but this is not mandatory. That is, `=== Section3 ===` is identical to `=== Section3`. 302 298 303 299 Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated. … … 324 320 }}} 325 321 326 == Paragraphs ==322 == Paragraphs 327 323 328 324 A new text paragraph is created whenever two blocks of text are separated by one or more empty lines. … … 352 348 }}} 353 349 354 == Lists ==350 == Lists 355 351 356 352 The wiki supports both ordered/numbered and unordered lists. … … 408 404 }}} 409 405 410 411 == Definition Lists == 406 == Definition Lists 412 407 413 408 The wiki also supports definition lists. … … 433 428 Note that you need a space in front of the defined term. 434 429 435 436 == Preformatted Text == 430 == Preformatted Text 437 431 438 432 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. … … 456 450 Note that this kind of block is also used for selecting lines that should be processed through WikiProcessors. 457 451 458 == Blockquotes ==452 == Blockquotes 459 453 460 454 In order to mark a paragraph as blockquote, indent that paragraph with two spaces. … … 472 466 }}} 473 467 474 == Discussion Citations ==475 476 To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e -mail-like citation marks (">", ">>", etc.) may be used.468 == Discussion Citations 469 470 To delineate a citation in an ongoing discussion thread, such as the ticket comment area, email-like citation marks (">", ">>", etc.) may be used. 477 471 478 472 ||= Wiki Markup =||= Display =|| … … 492 486 }}} 493 487 494 495 == Tables ==496 === Simple Tables === 488 == Tables 489 === Simple Tables 490 497 491 Simple tables can be created like this: 498 492 ||= Wiki Markup =||= Display =|| … … 584 578 }}} 585 579 586 === Complex Tables === 587 588 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]. 589 590 591 == Links == 592 593 Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}. 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 elaborate tables by using [#Processors-example-tables WikiProcessor based tables]. 583 584 == Links 585 586 Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark ('!'), such as {{{!WikiPageLink}}}. 594 587 595 588 ||= Wiki Markup =||= Display =|| … … 643 636 }}} 644 637 645 '''Note''': the [trac:WikiCreole] style for links is quick to type and 646 certainly looks familiar as it's the one used on Wikipedia and in many 647 other wikis. Unfortunately it conflicts with the syntax for [#Macros macros]. 648 So in the rare case when you need to refer to a page which is named after 649 a macro (typical examples being TitleIndex, InterTrac and InterWiki), 650 by writing `[[TitleIndex]]` you will actually call the macro instead of linking 651 to the page. 652 653 == Trac Links == 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 654 642 655 643 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: … … 681 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. 682 670 683 684 == Setting Anchors == 671 == Setting Anchors 685 672 686 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: … … 695 682 }}} 696 683 697 It 's also very close to the syntax for the corresponding link to that anchor:684 It is also very close to the syntax for the corresponding link to that anchor: 698 685 {{{ 699 686 [#point1] … … 724 711 }}} 725 712 726 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)^)]]`. 727 713 For more complex anchors (eg when a custom title is wanted), you can use the Span macro: `[[span(id=point2, class=wikianchor, title=Point 2, ^(2)^)]]`. 728 714 729 715 == Escaping Links, WikiPageNames and other Markup == #Escaping 730 716 731 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).717 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single exclamation mark ('!'). 732 718 733 719 ||= Wiki Markup =||= Display =|| … … 754 740 }}} 755 741 756 == Images ==742 == Images 757 743 758 744 Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags. … … 778 764 See WikiMacros for further documentation on the `[[Image()]]` macro, which has several useful options (`title=`, `link=`, etc.) 779 765 780 781 == Macros == 766 == Macros 782 767 783 768 Macros are ''custom functions'' to insert dynamic content in a page. … … 807 792 }}} 808 793 809 810 == Processors == 794 == Processors 811 795 812 796 Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in … … 945 929 See WikiProcessors for more information. 946 930 947 948 == Comments == 931 == Comments 949 932 950 933 Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text. … … 958 941 Your comment for editors here 959 942 }}} 960 see ;-)943 see. 961 944 }}} 962 945 }}} … … 967 950 Your comment for editors here 968 951 }}} 969 see ;-) 970 }}} 971 972 == Miscellaneous == 973 974 An horizontal line can be used to separated different parts of your page: 975 976 ||= Wiki Markup =||= Display =|| 977 {{{#!td 952 see. 953 }}} 954 955 == Miscellaneous 956 957 ||= Wiki Markup =||= Display =|| 958 {{{#!td 959 Horizontal line: 978 960 {{{ 979 961 Four or more dashes will be replaced 980 by a nhorizontal line (<HR>)962 by a horizontal line (<HR>) 981 963 ---- 982 964 See? … … 985 967 {{{#!td 986 968 Four or more dashes will be replaced 987 by a nhorizontal line (<HR>)969 by a horizontal line (<HR>) 988 970 ---- 989 971 See? … … 991 973 |---------------------------------- 992 974 {{{#!td 993 {{{ 994 "macro" style [[br]] line break 995 }}} 996 }}} 997 {{{#!td 998 "macro" style [[br]] line break 975 Two examples of line breaks: 976 {{{ 977 "macro" style [[BR]] line break 978 }}} 979 or: 980 {{{ 981 !WikiCreole style \\ line\\break 982 }}} 983 }}} 984 {{{#!td 985 "macro" style [[BR]] line break 986 987 !WikiCreole style \\ line\\break 999 988 }}} 1000 989 |---------------------------------- 1001 {{{#!td1002 {{{1003 !WikiCreole style \\ line\\break1004 }}}1005 }}}1006 {{{#!td1007 !WikiCreole style \\ line\\break1008 }}}