close
Warning:
Can't synchronize with repository "(default)" (/common/SVN/wimax does not appear to be a Subversion repository.). Look in the Trac log for more information.
- Timestamp:
-
Jan 30, 2019, 11:46:28 PM (4 years ago)
- Author:
-
trac
- Comment:
-
—
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v3
|
v4
|
|
3 | 3 | [[TracGuideToc]] |
4 | 4 | |
5 | | Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and unified whole. |
6 | | |
7 | | Trac has a powerful wiki rendering engine that implements a subset of the commands from other popular Wikis, such as [http://moinmo.in/ MoinMoin] and [trac:WikiCreole]. |
8 | | |
9 | | 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. |
10 | | |
11 | | The following wiki pages present the advanced features of the Trac wiki markup in more depth: |
12 | | - TracLinks covers all the possible ways to refer to any Trac resource or parts thereof. |
| 5 | Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole. |
| 6 | |
| 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]. |
| 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. |
13 | 15 | - WikiPageNames covers the various names a wiki page can take, whether in CamelCase or not. |
14 | 16 | - WikiMacros lists the macros available for generating dynamic content. |
… |
… |
|
25 | 27 | || `'''bold'''`, `''italic''`, `'''''Wikipedia style'''''` || \ |
26 | 28 | || '''bold''', ''italic'', '''''Wikipedia style''''' || |
| 29 | || {{{`monospaced (''other markup ignored'')`}}} || \ |
| 30 | || `monospaced (''other markup ignored'')` || |
27 | 31 | || `**bold**`, `//italic//`, `**//!WikiCreole style//**` || \ |
28 | 32 | || **bold**, //italic//, **//!WikiCreole style//** || |
29 | | || {{{`monospaced (''other markup ignored'')`}}} || \ |
30 | | || `monospaced (''other markup ignored'')` || |
31 | 33 | |----------------------------------------------------------- |
32 | 34 | ||= [#Headings Headings] =||\ |
… |
… |
|
94 | 96 | {{{ |
95 | 97 | {{{ |
96 | | multiple lines, ''no wiki'', |
| 98 | multiple lines, ''no wiki'' |
97 | 99 | white space respected |
98 | 100 | }}} |
… |
… |
|
101 | 103 | {{{#!td |
102 | 104 | {{{ |
103 | | multiple lines, ''no wiki'', |
| 105 | multiple lines, ''no wiki'' |
104 | 106 | white space respected |
105 | 107 | }}} |
… |
… |
|
157 | 159 | || `#1 (ticket)`, `[1] (changeset)`, `{1} (report)` ||\ |
158 | 160 | || #1 (ticket), [1] (changeset), {1} (report) || |
159 | | || `ticket:1, ticket:1#comment:1, comment:1:ticket:1` ||\ |
160 | | || ticket:1, ticket:1#comment:1, comment:1:ticket:1 || |
| 161 | || `ticket:1, ticket:1#comment:1` ||\ |
| 162 | || ticket:1, ticket:1#comment:1 || |
161 | 163 | || `Ticket [ticket:1]`, `[ticket:1 ticket one]` ||\ |
162 | 164 | || Ticket [ticket:1], [ticket:1 ticket one] || |
… |
… |
|
193 | 195 | {{{#!td |
194 | 196 | {{{ |
195 | | {{{#!div style="font-size: 80%" |
| 197 | {{{ |
| 198 | #!div style="font-size: 80%" |
196 | 199 | Code highlighting: |
197 | 200 | {{{#!python |
… |
… |
|
202 | 205 | }}} |
203 | 206 | {{{#!td style="padding-left: 2em" |
204 | | {{{#!div style="font-size: 80%" |
| 207 | {{{ |
| 208 | #!div style="font-size: 80%" |
205 | 209 | Code highlighting: |
206 | 210 | {{{#!python |
… |
… |
|
218 | 222 | }}} |
219 | 223 | }}} |
220 | | || ''(comment is shown in edit mode only)'' || |
| 224 | {{{#!td style="padding-left: 2em" |
| 225 | {{{#!comment |
| 226 | Note to Editors: ... |
| 227 | }}} |
| 228 | }}} |
221 | 229 | |----------------------------------------------------------- |
222 | 230 | ||= [#Miscellaneous Miscellaneous] =||\ |
… |
… |
|
277 | 285 | Notes: |
278 | 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. |
279 | | * {{{ ! }}} 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. |
| 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. |
280 | 288 | * all the font styles marks have to be used in opening/closing pairs, |
281 | 289 | and they must nest properly; in particular, an `''` italic can't be paired |
… |
… |
|
284 | 292 | == Headings |
285 | 293 | |
286 | | 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. |
| 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. |
287 | 295 | |
288 | 296 | [=#hn] |
289 | | The headline text can be followed by the same number of `=` characters, but this is not mandatory. That is, `=== Section3 ===` is identical to `=== Section3`. |
| 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`. |
290 | 298 | |
291 | 299 | Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated. |
… |
… |
|
344 | 352 | The wiki supports both ordered/numbered and unordered lists. |
345 | 353 | |
| 354 | Example: |
346 | 355 | ||= Wiki Markup =||= Display =|| |
347 | 356 | {{{#!td |
… |
… |
|
459 | 468 | == Discussion Citations |
460 | 469 | |
461 | | To delineate a citation in an ongoing discussion thread, such as the ticket comment area, email-like citation marks (`>`, `>>`, etc.) may be used. |
| 470 | To delineate a citation in an ongoing discussion thread, such as the ticket comment area, email-like citation marks (">", ">>", etc.) may be used. |
462 | 471 | |
463 | 472 | ||= Wiki Markup =||= Display =|| |
… |
… |
|
480 | 489 | === Simple Tables |
481 | 490 | |
482 | | Simple tables can be created: |
| 491 | Simple tables can be created like this: |
483 | 492 | ||= Wiki Markup =||= Display =|| |
484 | 493 | {{{#!td |
… |
… |
|
493 | 502 | }}} |
494 | 503 | |
495 | | Cell headings can be specified by wrapping the content in a pair of `=` characters. |
496 | | Note that the `=` characters have to stick to the cell separators: |
| 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: |
497 | 506 | ||= Wiki Markup =||= Display =|| |
498 | 507 | {{{#!td |
… |
… |
|
509 | 518 | }}} |
510 | 519 | |
511 | | Finally, specifying an empty cell means that the next non empty cell will span the empty cells: |
| 520 | Finally, specifying an empty cell means that the next non empty cell will span the empty cells. For example: |
512 | 521 | ||= Wiki Markup =||= Display =|| |
513 | 522 | {{{#!td |
… |
… |
|
526 | 535 | }}} |
527 | 536 | |
528 | | 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: |
| 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: |
529 | 538 | ||= Wiki Markup =||= Display =|| |
530 | 539 | {{{#!td |
… |
… |
|
551 | 560 | }}} |
552 | 561 | |
553 | | 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: |
| 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. |
554 | 563 | |
555 | 564 | ||= Wiki Markup =|| |
… |
… |
|
571 | 580 | === Complex Tables |
572 | 581 | |
573 | | 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]. |
| 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]. |
574 | 583 | |
575 | 584 | == Links |
576 | 585 | |
577 | | Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark (`!`), such as `!WikiPageLink`. |
| 586 | Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark ('!'), such as {{{!WikiPageLink}}}. |
578 | 587 | |
579 | 588 | ||= Wiki Markup =||= Display =|| |
… |
… |
|
606 | 615 | }}} |
607 | 616 | |
608 | | 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. |
| 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. |
609 | 618 | |
610 | 619 | {{{#!td |
… |
… |
|
662 | 671 | == Setting Anchors |
663 | 672 | |
664 | | 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, to uniquely identify a position in the document: |
| 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: |
665 | 674 | |
666 | 675 | {{{ |
… |
… |
|
668 | 677 | }}} |
669 | 678 | |
670 | | This syntax was chosen to match the format for explicitly naming the header id [#Headings documented above]: |
| 679 | This syntax was chosen to match the format for explicitly naming the header id [#Headings documented above]. For example: |
671 | 680 | {{{ |
672 | 681 | == Long title == #title |
… |
… |
|
680 | 689 | Optionally, a label can be given to the anchor: |
681 | 690 | {{{ |
682 | | [=#point1 '''Point 1'''] |
| 691 | [[=#point1 '''Point 1''']] |
683 | 692 | }}} |
684 | 693 | |
… |
… |
|
706 | 715 | == Escaping Links, WikiPageNames and other Markup == #Escaping |
707 | 716 | |
708 | | 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 ('!'). |
709 | 718 | |
710 | 719 | ||= Wiki Markup =||= Display =|| |
… |
… |
|
757 | 766 | == Macros |
758 | 767 | |
759 | | Macros are ''custom functions'' that insert dynamic content in a page. |
| 768 | Macros are ''custom functions'' to insert dynamic content in a page. |
760 | 769 | |
761 | 770 | ||= Wiki Markup =||= Display =|| |
… |
… |
|
771 | 780 | See WikiMacros for more information, and a list of installed macros. |
772 | 781 | |
773 | | The detailed help for a specific macro can also be obtained more directly by appending a `?` to the macro name. |
| 782 | The detailed help for a specific macro can also be obtained more directly by appending a "?" to the macro name. |
774 | 783 | |
775 | 784 | ||= Wiki Markup =||= Display =|| |
… |
… |
|
798 | 807 | {{{#!td style="border: 0px" |
799 | 808 | {{{ |
800 | | {{{#!html |
| 809 | {{{ |
| 810 | #!html |
801 | 811 | <h1 style="text-align: right; color: blue"> |
802 | 812 | HTML Test |
… |
… |
|
807 | 817 | {{{#!td valign="top" style="border: 0px" |
808 | 818 | |
809 | | {{{#!html |
| 819 | {{{ |
| 820 | #!html |
810 | 821 | <h1 style="text-align: right; color: blue">HTML Test</h1> |
811 | 822 | }}} |
… |
… |
|
821 | 832 | {{{#!td style="border: 0px" |
822 | 833 | {{{ |
823 | | {{{#!python |
| 834 | {{{ |
| 835 | #!python |
824 | 836 | class Test: |
825 | 837 | |
… |
… |
|
831 | 843 | }}} |
832 | 844 | }}} |
833 | | {{{#!td valign="top" style="border: 0px" |
834 | | |
835 | | {{{#!python |
| 845 | {{{ |
| 846 | #!td valign="top" style="border: 0px" |
| 847 | |
| 848 | {{{ |
| 849 | #!python |
836 | 850 | class Test: |
837 | 851 | def __init__(self): |
… |
… |
|
880 | 894 | }}} |
881 | 895 | }}} |
882 | | {{{#!td valign="top" style="border: 0px" |
| 896 | {{{ |
| 897 | #!td valign="top" style="border: 0px" |
883 | 898 | |
884 | 899 | {{{#!th rowspan=4 align=justify |
… |
… |
|
922 | 937 | {{{ |
923 | 938 | Nothing to |
924 | | {{{#!comment |
| 939 | {{{ |
| 940 | #!comment |
925 | 941 | Your comment for editors here |
926 | 942 | }}} |
… |
… |
|
930 | 946 | {{{#!td |
931 | 947 | Nothing to |
932 | | {{{#!comment |
| 948 | {{{ |
| 949 | #!comment |
933 | 950 | Your comment for editors here |
934 | 951 | }}} |