= WikiFormatting[[TracGuideToc]]

Wiki markup is a core feature in Trac, tightly integrating all the other parts Display:

  • Item 1
    • Item 1.1
  • Item 2
  1. Item 1
  1. Item 1.a

  2. 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:

  1. 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: {{{

System Message: ERROR/3 (<string>, line 60)

Unexpected indentation.
{{{
def HelloWorld():
print "Hello World"

System Message: WARNING/2 (<string>, line 63)

Definition list ends without a blank line; unexpected unindent.

}}}

System Message: WARNING/2 (<string>, line 64)

Block quote ends without a blank line; unexpected unindent.

}}}

Display: {{{

System Message: ERROR/3 (<string>, line 68)

Unexpected indentation.
def HelloWorld():
print "Hello World"

System Message: WARNING/2 (<string>, line 70)

Block quote ends without a blank line; unexpected unindent.

}}}

== Blockquotes ==

In order to mark a paragraph as blockquote, indent that paragraph with two spaces.

Example: {{{

System Message: ERROR/3 (<string>, line 79)

Unexpected indentation.
This text is a quote from someone else.

System Message: WARNING/2 (<string>, line 80)

Block quote ends without a blank line; unexpected unindent.

}}}

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||

[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: {{{

System Message: ERROR/3 (<string>, line 125)

Unexpected indentation.
TitleIndex, http://www.edgewall.com/, NotAlink

System Message: WARNING/2 (<string>, line 126)

Block quote ends without a blank line; unexpected unindent.

}}}

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: {{{

System Message: ERROR/3 (<string>, line 135)

Unexpected indentation.

System Message: WARNING/2 (<string>, line 138)

Block quote ends without a blank line; unexpected unindent.

}}}

Display:

=== 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: {{{

System Message: ERROR/3 (<string>, line 150)

Unexpected indentation.
  • Tickets: #1 or ticket:1
  • Reports: {1} or report:1
  • Changesets: r1, [1] or changeset:1
  • ...

System Message: WARNING/2 (<string>, line 154)

Block quote ends without a blank line; unexpected unindent.

}}}

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: {{{

System Message: ERROR/3 (<string>, line 171)

Unexpected indentation.
NoHyperLink !#42 is not a link

System Message: WARNING/2 (<string>, line 173)

Block quote ends without a blank line; unexpected unindent.

}}}

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: {{{

System Message: ERROR/3 (<string>, line 193)

Unexpected indentation.
[[Timestamp]]

System Message: WARNING/2 (<string>, line 194)

Block quote ends without a blank line; unexpected unindent.

}}}

Display:
[[Timestamp]]

See WikiMacros for more information, and a list of installed macros.

== Processors ==

Trac supports alternative markup formats using WikiProcessors[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].

Display:

System Message: ERROR/3 (<string>, line 210)

Unknown directive type "html".

.. html::
  <h1 style="text-align: right; color: blue">HTML Test</h1>

Display:

class Test:
  def __init__(self):
      print "Hello World"
if __name__ == '__main__':
   Test()

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.

Return to the FrontPage | Edit WikiFormatting | Title List