-
Notifications
You must be signed in to change notification settings - Fork 41
WikiRestructuredText
Trac supports using reStructuredText (RST) as an alternative to wiki markup in any context WikiFormatting is used.
From the reStucturedText webpage:
" reStructuredText is an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax and parser system. It is useful for in-line program documentation (such as Python docstrings), for quickly creating simple web pages, and for standalone documents. reStructuredText is designed for extensibility for specific application domains. "
If you want a file from your Subversion repository be displayed as reStructuredText in Trac's source browser, set text/x-rst
as value for the Subversion property svn:mime-type
. See this example .
Note that to activate RST support in Trac, the python docutils package must be installed. If not already available on your operating system, you can download it at the RST Website .
Install docutils using easy_install docutils
. Do not use the package manager of your OS (e.g. apt-get install python-docutils
), because Trac will not find docutils then.
- reStructuredText Website — http://docutils.sourceforge.net/rst.html
- RST Quick Reference — http://docutils.sourceforge.net/docs/rst/quickref.html
To specify that a block of text should be parsed using RST, use the rst processor.
TracLinks in reStructuredText
- Trac provides a custom RST directive
trac::
to allow TracLinks from within RST text.
Wiki Markup | Display |
---|---|
|
This is a reference to SasView/sasview#270 |
- Trac allows an even easier way of creating TracLinks in RST, using the custom
:trac:
role.
Wiki Markup | Display |
---|---|
|
This is a reference to ticket SasView/sasview#241 To learn how to use Trac, see TracGuide |
For a complete example of all uses of the
:trac:
role, please see WikiRestructuredTextLinks .
There is a directive for doing TracSyntaxColoring in RST as well. The directive is called code-block
Wiki Markup | Display |
---|---|
|
|
Note the need to indent the code at least one character after the .. code-block
directive.
For doing Wiki Macros in RST you use the same directive as for syntax highlighting i.e code-block.
Wiki Markup | Display |
---|---|
|
|
Or a more concise Wiki Macro like syntax is also available, using the :code-block:
role:
Wiki Markup | Display |
---|---|
|
|
The example below should be mostly self-explanatory:
Wiki Markup | Display | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
reStructuredText is nice . It has its own webpage . A table:
See also ticket SasView/sasview#270 . |
See also: WikiRestructuredTextLinks , WikiProcessors , WikiFormatting
- 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