1 | | www.g00ns.net |
2 | | |
3 | | ruby on rails 4 life and django |
| 1 | = WikiFormatting = |
| 2 | |
| 3 | Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into flexible and powerful whole. |
| 4 | |
| 5 | 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://moin.sf.net/ MoinWiki]. |
| 6 | |
| 7 | This page demonstrates the formatting syntax available anywhere WikiFormatting is allowed. |
| 8 | |
| 9 | == Font styles == |
| 10 | |
| 11 | The Trac wiki support the following font styles: '''bold''', ''italic'', |
| 12 | __underline__ and ~~strike-through~~. |
| 13 | |
| 14 | {{{ |
| 15 | The Trac wiki support the following font styles: '''bold''', ''italic'', |
| 16 | __underline__ and ~~strike-through~~. |
| 17 | }}} |
| 18 | |
| 19 | |
| 20 | == Heading == |
| 21 | |
| 22 | You can create heading by starting a line with one up to five ''equal\\ '=' characters |
| 23 | followed by a single space and the headline text. The line should end with a space |
| 24 | followed by the same number of ''equal'' characters. |
| 25 | |
| 26 | ''Note: As of writing, headings cannot contain TracLinks.'' |
| 27 | |
| 28 | === Example: === |
| 29 | {{{ |
| 30 | = Heading = |
| 31 | == Subheading == |
| 32 | }}} |
| 33 | |
| 34 | |
| 35 | == Paragraphs == |
| 36 | |
| 37 | A new text paragraph is created whenever two blocks of text are separated |
| 38 | by one or more empty lines. |
| 39 | |
| 40 | A forced line break can also be inserted, using: |
| 41 | {{{ |
| 42 | Line 1[[BR]]Line 2 |
| 43 | }}} |
| 44 | Display: |
| 45 | |
| 46 | Line 1[[BR]]Line 2 |
| 47 | |
| 48 | Text paragraphs can be indented by starting the lines with two or more spaces. |
| 49 | |
| 50 | == Lists == |
| 51 | The wiki supports both ordered/numbered and unordered lists. |
| 52 | |
| 53 | Example: |
| 54 | {{{ |
| 55 | * Item 1 |
| 56 | * Item 1.1 |
| 57 | * Item 2 |
| 58 | |
| 59 | 1. Item 1 |
| 60 | 1. Item 1.1 |
| 61 | 1. Item 2 |
| 62 | }}} |
| 63 | Display: |
| 64 | * Item 1 |
| 65 | * Item 1.1 |
| 66 | * Item 2 |
| 67 | |
| 68 | 1. Item 1 |
| 69 | 1. Item 1.1 |
| 70 | 1. Item 2 |
| 71 | |
| 72 | == Preformatted text == |
| 73 | Block quotes, preformatted text, are suitable for source code snippets, notes and examples. Use three ''curly braces'' wrapped around the text to define a block quote: |
| 74 | |
| 75 | Example: |
| 76 | {{{ |
| 77 | {{{ |
| 78 | def HelloWorld() |
| 79 | print "Hello World" |
| 80 | }}} |
| 81 | }}} |
| 82 | |
| 83 | Display: |
| 84 | {{{ |
| 85 | def HelloWorld() |
| 86 | print "Hello World" |
| 87 | }}} |
| 88 | |
| 89 | == Tables == |
| 90 | |
| 91 | Simple tables can be created like this: |
| 92 | {{{ |
| 93 | ||Cell 1||Cell 2||Cell 3|| |
| 94 | ||Cell 4||Cell 5||Cell 6|| |
| 95 | }}} |
| 96 | Display: |
| 97 | ||Cell 1||Cell 2||Cell 3|| |
| 98 | ||Cell 4||Cell 5||Cell 6|| |
| 99 | |
| 100 | == Links == |
| 101 | |
| 102 | !Hyperlinks are automatically created for WikiPageNames and urls. !WikiPageLinks can be disabled by |
| 103 | prepending an exclamation mark (!) character, such as {{{!WikiPageLink}}}. |
| 104 | |
| 105 | Examples: |
| 106 | |
| 107 | TitleIndex, http://www.edgewall.com/. |
| 108 | |
| 109 | Links can be given a more descriptive title by writing the link followed by |
| 110 | a space and a title and all this inside two square brackets. Like this: |
| 111 | {{{ |
| 112 | * [http://www.edgewall.com/ Edgewall Software] |
| 113 | * [wiki:TitleIndex Title Index] |
| 114 | }}} |
| 115 | Display: |
| 116 | |
| 117 | * [http://www.edgewall.com/ Edgewall Software] |
| 118 | * [wiki:TitleIndex Title Index] |
| 119 | |
| 120 | === Trac Links === |
| 121 | |
| 122 | Wiki pages can link directly to other parts of the Trac system. |
| 123 | Pages can refer to tickets, reports, changesets, milestones, source files and |
| 124 | other Wiki pages using the following notation: |
| 125 | * Tickets: '''!#1''' or '''!ticket:1''' |
| 126 | * Reports: '''!{1}''' or '''!report:1''' |
| 127 | * Changesets: '''![1]''' or '''!changeset:1''' |
| 128 | * Wiki pages: '''CamelCase''' or '''!wiki:CamelCase''' |
| 129 | * Milestones: '''!milestone:1.0''' |
| 130 | * Files: '''!source:trunk/COPYING''' |
| 131 | * A specific file revision: '''!source:/trunk/COPYING#200''' |
| 132 | Display: |
| 133 | * Tickets: #1 or ticket:1 |
| 134 | * Reports: {1} or report:1 |
| 135 | * Changesets: [1] or changeset:1 |
| 136 | * Wiki pages: CamelCase or wiki:CamelCase |
| 137 | * Milestones: milestone:1.0 |
| 138 | * Files: source:trunk/COPYING |
| 139 | * A specific file revision: source:/trunk/COPYING#200 |
| 140 | |
| 141 | See TracLinks for more in-depth information. |
| 142 | |
| 143 | == Escaping Links and WikiNames == |
| 144 | You may avoid making hyperlinks out of TracLinks by preceding an expression with a single '!' (exclamation mark). |
| 145 | |
| 146 | {{{ |
| 147 | !NoHyperLink |
| 148 | !#42 is not a link |
| 149 | }}} |
| 150 | |
| 151 | Display: |
| 152 | !NoHyperLink |
| 153 | !#42 is not a link |
| 154 | |
| 155 | == Images == |
| 156 | |
| 157 | Urls ending with .png, .gif or .jpg are automatically interpreted as image links, and converted to IMG tags. |
| 158 | |
| 159 | Example: |
| 160 | {{{ |
| 161 | http://www.edgewall.com/gfx/trac_example_image.png |
| 162 | }}} |
| 163 | Display: |
| 164 | |
| 165 | http://www.edgewall.com/gfx/trac_example_image.png |
| 166 | |
| 167 | == Macros == |
| 168 | Macros are ''custom functions'' to insert dynamic content in a page. See WikiMacros for usage. |
| 169 | |
| 170 | Example: |
| 171 | {{{ |
| 172 | [[Timestamp]] |
| 173 | }}} |
| 174 | Display: |
| 175 | [[Timestamp]] |
| 176 | |
| 177 | == Processors == |
| 178 | Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in [wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML]. |
| 179 | |
| 180 | See WikiProcessors for more information. |
| 181 | |
| 182 | '''Example 1:''' |
| 183 | {{{ |
| 184 | #!html |
| 185 | <pre class="wiki">{{{ |
| 186 | #!html |
| 187 | <h1 style="text-align: right; color: blue">HTML Test</h1> |
| 188 | }}}</pre> |
| 189 | }}} |
| 190 | Display: |
| 191 | {{{ |
| 192 | #!html |
| 193 | <h1 style="text-align: right; color: blue">HTML Test</h1> |
| 194 | }}} |
| 195 | |
| 196 | '''Example 2:''' |
| 197 | {{{ |
| 198 | #!html |
| 199 | <pre class="wiki">{{{ |
| 200 | #!python |
| 201 | class Test: |
| 202 | def __init__(self): |
| 203 | print "Hello World" |
| 204 | if __name__ == '__main__': |
| 205 | Test() |
| 206 | }}}</pre> |
| 207 | }}} |
| 208 | Display: |
| 209 | {{{ |
| 210 | #!python |
| 211 | class Test: |
| 212 | def __init__(self): |
| 213 | print "Hello World" |
| 214 | if __name__ == '__main__': |
| 215 | Test() |
| 216 | }}} |
| 217 | |
| 218 | == Miscellaneous == |
| 219 | |
| 220 | Four or more dashes will be replaced by a horizontal line (<HR>) |
| 221 | |
| 222 | {{{ |
| 223 | ---- |
| 224 | }}} |
| 225 | |
| 226 | Display: |
| 227 | ---- |
| 228 | |
| 229 | |
| 230 | ---- |
| 231 | See also: TracLinks, TracGuide, WikiHtml, WikiMacros, WikiProcessors, TracSyntaxColoring. |
| 232 | |
| 233 | |