1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354
|
= WikiFormatting =
[[TracGuideToc]]
Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole.
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://moinmoin.wikiwikiweb.de/ MoinMoin].
This page demonstrates the formatting syntax available anywhere WikiFormatting is allowed.
== Font Styles ==
The Trac wiki supports the following font styles:
{{{
* '''bold''', '''!''' can be bold too''', and '''! '''
* ''italic''
* '''''bold italic'''''
* __underline__
* {{{monospace}}} or `monospace`
* ~~strike-through~~
* ^superscript^
* ,,subscript,,
}}}
Display:
* '''bold''', '''!''' can be bold too''', and '''! '''
* ''italic''
* '''''bold italic'''''
* __underline__
* {{{monospace}}} or `monospace`
* ~~strike-through~~
* ^superscript^
* ,,subscript,,
Notes:
* `{{{...}}}` 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.
* {{{ ! }}} 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.
== Headings ==
You can create heading by starting a line with one up to five ''equal'' characters ("=")
followed by a single space and the headline text. The line should end with a space
followed by the same number of ''='' characters.
The heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
Example:
{{{
= Heading =
== Subheading ==
=== About ''this'' ===
=== Explicit id === #using-explicit-id-in-heading
}}}
Display:
= Heading =
== Subheading ==
=== About ''this'' ===
=== Explicit id === #using-explicit-id-in-heading
== Paragraphs ==
A new text paragraph is created whenever two blocks of text are separated by one or more empty lines.
A forced line break can also be inserted, using:
{{{
Line 1[[BR]]Line 2
}}}
Display:
Line 1[[BR]]Line 2
== Lists ==
The wiki supports both ordered/numbered and unordered lists.
Example:
{{{
* Item 1
* Item 1.1
* Item 2
1. Item 1
a. Item 1.a
a. Item 1.b
i. Item 1.b.i
i. Item 1.b.ii
1. Item 2
And numbered lists can also be given an explicit number:
3. Item 3
}}}
Display:
* Item 1
* Item 1.1
* Item 2
1. Item 1
a. Item 1.a
a. Item 1.b
i. Item 1.b.i
i. Item 1.b.ii
1. Item 2
And numbered lists can also be given an explicit number:
3. Item 3
Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph.
== Definition Lists ==
The wiki also supports definition lists.
Example:
{{{
llama::
some kind of mammal, with hair
ppython::
some kind of reptile, without hair
(can you spot the typo?)
}}}
Display:
llama::
some kind of mammal, with hair
ppython::
some kind of reptile, without hair
(can you spot the typo?)
Note that you need a space in front of the defined term.
== Preformatted Text ==
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.
Example:
{{{
{{{
def HelloWorld():
print "Hello World"
}}}
}}}
Display:
{{{
def HelloWorld():
print "Hello World"
}}}
== Blockquotes ==
In order to mark a paragraph as blockquote, indent that paragraph with two spaces.
Example:
{{{
This text is a quote from someone else.
}}}
Display:
This text is a quote from someone else.
== Discussion Citations ==
To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used.
Example:
{{{
>> Someone's original text
> Someone else's reply text
My reply text
}}}
Display:
>> Someone's original text
> Someone else's reply text
My reply text
''Note: Some WikiFormatting elements, such as lists and preformatted text, are lost in the citation area. Some reformatting may be necessary to create a clear citation.''
== Tables ==
Simple tables can be created like this:
{{{
||Cell 1||Cell 2||Cell 3||
||Cell 4||Cell 5||Cell 6||
}}}
Display:
||Cell 1||Cell 2||Cell 3||
||Cell 4||Cell 5||Cell 6||
Note that more complex tables can be created using
[wiki:WikiRestructuredText#BiggerReSTExample reStructuredText].
== Links ==
Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.
Example:
{{{
TitleIndex, http://www.edgewall.com/, !NotAlink
}}}
Display:
TitleIndex, http://www.edgewall.com/, !NotAlink
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 discarded, unless the link is an external link. This can be useful for wiki pages not adhering to the WikiPageNames convention.
Example:
{{{
* [http://www.edgewall.com/ Edgewall Software]
* [wiki:TitleIndex Title Index]
* [wiki:ISO9000]
}}}
Display:
* [http://www.edgewall.com/ Edgewall Software]
* [wiki:TitleIndex Title Index]
* [wiki:ISO9000]
=== Trac Links ===
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:
{{{
* Tickets: #1 or ticket:1
* Reports: {1} or report:1
* Changesets: r1, [1] or changeset:1
* ...
}}}
Display:
* Tickets: #1 or ticket:1
* Reports: {1} or report:1
* Changesets: r1, [1] or changeset:1
* ...
See TracLinks for more in-depth information.
== Escaping Links and WikiPageNames ==
You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
Example:
{{{
!NoHyperLink
!#42 is not a link
}}}
Display:
!NoHyperLink
!#42 is not a link
== Images ==
Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags.
You now have to use the ![[Image]] macro (see below).
== Macros ==
Macros are ''custom functions'' to insert dynamic content in a page.
Example:
{{{
[[Timestamp]]
}}}
Display:
[[Timestamp]]
See WikiMacros for more information, and a list of installed macros.
== Processors ==
Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in
[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].
Example 1:
{{{
#!html
<pre class="wiki">{{{
#!html
<h1 style="text-align: right; color: blue">HTML Test</h1>
}}}</pre>
}}}
Display:
{{{
#!html
<h1 style="text-align: right; color: blue">HTML Test</h1>
}}}
Example:
{{{
#!html
<pre class="wiki">{{{
#!python
class Test:
def __init__(self):
print "Hello World"
if __name__ == '__main__':
Test()
}}}</pre>
}}}
Display:
{{{
#!python
class Test:
def __init__(self):
print "Hello World"
if __name__ == '__main__':
Test()
}}}
Perl:
{{{
#!perl
my ($test) = 0;
if ($test > 0) {
print "hello";
}
}}}
See WikiProcessors for more information.
== Miscellaneous ==
Four or more dashes will be replaced by a horizontal line (<HR>)
Example:
{{{
----
}}}
Display:
----
----
See also: TracLinks, TracGuide, WikiHtml, WikiMacros, WikiProcessors, TracSyntaxColoring.
|