-
Notifications
You must be signed in to change notification settings - Fork 41
WikiFormatting
Table of Contents
- Index
- Installation
- Customization
- Plugins
- Upgrading
- Configuration
- Administration
- Backup
- Logging
- Permissions
- The Wiki
- Wiki Formatting
- Timeline
- Repository Browser
- Revision Log
- Changesets
- Tickets
- Workflow
- Roadmap
- Ticket Queries
- Batch Modify
- Reports
- RSS Support
- Notification
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 MoinMoin and WikiCreole .
This page will give you an in-depth explanation of the wiki markup available anywhere WikiFormatting is allowed.
The Cheat sheet below gives you a quick overview for the most common syntax, each link in the Category column will lead you to the more detailed explanation later in this page.
A few other wiki pages present the advanced features of the Trac wiki markup in more depth:
- TracLinks covers all the possible ways to refer precisely to any Trac resource or parts thereof,
- WikiPageNames talks about the various names a wiki page can take, CamelCase or not
- WikiMacros lists the macros available for generating dynamic content,
- WikiProcessors and WikiHtml details how parts of the wiki text can be processed in special ways
Category | Wiki Markup | Display | ||||
---|---|---|---|---|---|---|
Font Styles |
'''bold''' , ''italic'' , '''''Wikipedia style'''''
|
bold , italic , Wikipedia style | ||||
`monospaced (''other markup ignored'')` |
monospaced (''other markup ignored'') |
|||||
**bold** , //italic// , **//!WikiCreole style//**
|
bold , italic , WikiCreole style | |||||
Headings |
|
|||||
Paragraphs |
|
First paragraph on multiple lines. Second paragraph. |
||||
Lists |
|
|
||||
Definition Lists |
|
|
||||
Preformatted Text |
|
|
||||
Blockquotes |
|
|
||||
Discussion Citations |
|
|
||||
Tables |
|
|
||||
Links |
http://trac.edgewall.org |
http://trac.edgewall.org | ||||
WikiFormatting (CamelCase) |
WikiFormatting ( CamelCase ) | |||||
TracLinks |
wiki:WikiFormatting , wiki:"WikiFormatting"
|
wiki:WikiFormatting , wiki:"WikiFormatting" | ||||
#1 (ticket) , [1] (changeset) , {1} (report)
|
{1} (report) | |||||
ticket:1, ticket:1#comment:1 |
ticket:1#comment:1 | |||||
Ticket [ticket:1] , [ticket:1 ticket one]
|
Ticket ticket one | |||||
Ticket [[ticket:1]] , [[ticket:1|ticket one]]
|
Ticket ticket one | |||||
Setting Anchors |
[=#point1 (1)] First... |
(1) First… | ||||
see [#point1 (1)] |
see (1) | |||||
Escaping Markup |
!'' doubled quotes |
'' doubled quotes | ||||
!wiki:WikiFormatting , !WikiFormatting
|
wiki:WikiFormatting, WikiFormatting | |||||
` {{{-}}} ` triple curly brackets
|
{{{-}}} triple curly brackets |
|||||
Images |
[[Image( link )]]
|
|||||
Macros |
[[MacroList(*)]] |
(short list of all available macros) | ||||
[[Image?]] |
(help for the Image macro) | |||||
Processors |
|
Code highlighting:
|
||||
Comments |
|
|||||
Miscellaneous |
|
Line |
The Trac wiki supports the following font styles:
Wiki Markup | Display |
---|---|
|
|
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. - all the font styles marks have to be used in opening/closing pairs, and they must nest properly (in particular, an
''
italic can't be paired with a//
one, and'''
can't be paired with**
)
You can create heading by starting a line with one up to six equal characters ("=") followed by a single space and the headline text.
The headline text can be followed by the same number of "=" characters, but this is no longer mandatory.
Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
Wiki Markup | Display |
---|---|
|
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:
Wiki Markup | Display |
---|---|
|
|
The wiki supports both ordered/numbered and unordered lists.
Example:
Wiki Markup | Display |
---|---|
|
that will start a new paragraph…
And numbered lists can also be restarted with an explicit number:
|
The wiki also supports definition lists.
Wiki Markup | Display |
---|---|
|
|
Note that you need a space in front of the defined term.
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.
Wiki Markup | Display |
---|---|
|
|
Note that this kind of block is also used for selecting lines that should be processed through WikiProcessors .
In order to mark a paragraph as blockquote, indent that paragraph with two spaces.
Wiki Markup | Display |
---|---|
|
Paragraph
|
To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used.
Wiki Markup | Display |
---|---|
|
My reply text |
Simple tables can be created like this:
Wiki Markup | Display | ||||||
---|---|---|---|---|---|---|---|
|
|
Cell headings can be specified by wrapping the content in a pair of '=' characters. Note that the '=' characters have to stick to the cell separators, like this:
Wiki Markup | Display | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|
Finally, specifying an empty cell means that the next non empty cell will span the empty cells. For example:
Wiki Markup | Display | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
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:
Wiki Markup | Display | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
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.
Wiki Markup | |||
---|---|---|---|
|
|||
Display | |||
|
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 WikiProcessor based tables .
Hyperlinks are automatically created for WikiPageNames and URLs. WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as !WikiPageLink
.
Wiki Markup | 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.
Wiki Markup | Display |
---|---|
|
Following the 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.
|
|
Note : the WikiCreole style for links is quick to type and certainly looks familiar as it's the one used on Wikipedia and in many other wikis. Unfortunately it conflicts with the syntax for [macros]{} . 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.
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:
Wiki Markup | Display |
---|---|
|
There are many more flavors of Trac links, see TracLinks for more in-depth information and a reference for all the default link resolvers.
An anchor, or more correctly speaking, an anchor name can be added explicitly at any place in the Wiki page, in order to uniquely identify a position in the document:
[=#point1]
This syntax was chosen to match the format for explicitly naming the header id [documented above]{} . For example:
== Long title == #title
It's also very close to the syntax for the corresponding link to that anchor:
[#point1]
Optionally, a label can be given to the anchor:
[[=#point1 '''Point 1''']]
Wiki Markup | Display |
---|---|
|
|
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)^)]]
.
Escaping Links, WikiPageNames and other Markup
You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
Wiki Markup | Display |
---|---|
|
Various forms of escaping for list markup:
|
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. The simplest way to include an image is to upload it as attachment to the current page, and put the filename in a macro call like [[Image(picture.gif)]]
.
In addition to the current page, it is possible to refer to other resources:
-
[[Image(wiki:WikiFormatting:picture.gif)]]
(referring to attachment on another page) -
[[Image(ticket:1:picture.gif)]]
(file attached to a ticket) -
[[Image(htdocs:picture.gif)]]
(referring to a file inside the environmenthtdocs
directory) -
[[Image(source:/trunk/trac/htdocs/trac_logo_mini.png)]]
(a file in repository)
Wiki Markup | Display |
---|---|
|
See WikiMacros for further documentation on the [[Image()]]
macro, which has several useful options ( title=
, link=
, etc.)
Macros are custom functions to insert dynamic content in a page.
Wiki Markup | Display |
---|---|
|
|
See WikiMacros for more information, and a list of installed macros.
The detailed help for a specific macro can also be obtained more directly by appending a "?" to the macro name.
Wiki Markup | Display |
---|---|
|
Display a list of all installed Wiki macros, including documentation if available. Optionally, the name of a specific macro can be provided as an argument. In that case, only the documentation for that macro will be rendered. Note that this macro will not be able to display the documentation of macros if the |
Trac supports alternative markup formats using WikiProcessors . For example, processors are used to write pages in reStructuredText or HTML .
Wiki Markup | Display | |||||||
---|---|---|---|---|---|---|---|---|
|
||||||||
|
||||||||
|
||||||||
|
|
|||||||
|
||||||||
|
|
See WikiProcessors for more information.
Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text.
Wiki Markup | Display |
---|---|
|
|
An horizontal line can be used to separated different parts of your page:
Wiki Markup | Display |
---|---|
|
Four or more dashes will be replaced by an horizontal line (<HR>) See? |
|
"macro" style |
|
WikiCreole style |
- View/Subscribe to the SasView Calendar
- Fortnightly developer's agenda/minutes
- Developer Guides
- Admin Processes and Procedure Notes
- Active Project Pages
- Historical Archive of Obsolete Pages
- Contributor e-Learning Course (free)
- Non Coding contribution needs/projects
- New functionality projects
- DRAFT for acknowledging contributions