<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=WikiRestructuredText</id>
	<title>WikiRestructuredText - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=WikiRestructuredText"/>
	<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=WikiRestructuredText&amp;action=history"/>
	<updated>2026-04-20T22:25:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=WikiRestructuredText&amp;diff=362&amp;oldid=prev</id>
		<title>Maintenance script: Created page with &quot; == reStructuredText Support in Trac ==  Trac supports using &#039;&#039;reStructuredText&#039;&#039; (RST) as an alternative to wiki markup in any context WikiFormatting is used.  From the reStu...&quot;</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=WikiRestructuredText&amp;diff=362&amp;oldid=prev"/>
		<updated>2015-08-26T12:29:30Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == reStructuredText Support in Trac ==  Trac supports using &amp;#039;&amp;#039;reStructuredText&amp;#039;&amp;#039; (RST) as an alternative to wiki markup in any context WikiFormatting is used.  From the reStu...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== reStructuredText Support in Trac ==&lt;br /&gt;
&lt;br /&gt;
Trac supports using &amp;#039;&amp;#039;reStructuredText&amp;#039;&amp;#039; (RST) as an alternative to wiki markup in any context WikiFormatting is used.&lt;br /&gt;
&lt;br /&gt;
From the reStucturedText webpage:&lt;br /&gt;
 &amp;quot;&amp;#039;&amp;#039;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. &amp;#039;&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want a file from your Subversion repository be displayed as reStructuredText in Trac&amp;#039;s source browser, set &amp;lt;tt&amp;gt;text/x-rst&amp;lt;/tt&amp;gt; as value for the Subversion property &amp;lt;tt&amp;gt;svn:mime-type&amp;lt;/tt&amp;gt;. See [trac:source:/trunk/INSTALL this example].&lt;br /&gt;
&lt;br /&gt;
==== Requirements ====&lt;br /&gt;
Note that to activate RST support in Trac, the python docutils package must be installed. &lt;br /&gt;
If not already available on your operating system, you can download it at the [http://docutils.sourceforge.net/rst.html RST Website].&lt;br /&gt;
&lt;br /&gt;
Install docutils using &amp;lt;tt&amp;gt;easy_install docutils&amp;lt;/tt&amp;gt;. Do not use the package manager of your OS (e.g. &amp;lt;tt&amp;gt;apt-get install python-docutils&amp;lt;/tt&amp;gt;), because Trac will not find docutils then.&lt;br /&gt;
&lt;br /&gt;
==== More information on RST ====&lt;br /&gt;
&lt;br /&gt;
*reStructuredText Website -- http://docutils.sourceforge.net/rst.html&lt;br /&gt;
*RST Quick Reference -- http://docutils.sourceforge.net/docs/rst/quickref.html&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Using RST in Trac ===&lt;br /&gt;
To specify that a block of text should be parsed using RST, use the &amp;#039;&amp;#039;rst&amp;#039;&amp;#039; processor. &lt;br /&gt;
&lt;br /&gt;
==== TracLinks in reStructuredText ====&lt;br /&gt;
&lt;br /&gt;
*Trac provides a custom RST directive &amp;lt;tt&amp;gt;trac::&amp;lt;/tt&amp;gt; to allow TracLinks from within RST text.&lt;br /&gt;
&lt;br /&gt;
 Example:&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
 #rst&lt;br /&gt;
 This is a reference to |a ticket|&lt;br /&gt;
&lt;br /&gt;
 .. |a ticket| trac:: #42&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Trac allows an even easier way of creating TracLinks in RST, using the custom &amp;lt;tt&amp;gt;:trac:&amp;lt;/tt&amp;gt; role.&lt;br /&gt;
&lt;br /&gt;
 Example:&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
 #rst&lt;br /&gt;
 This is a reference to ticket &amp;lt;tt&amp;gt;#12&amp;lt;/tt&amp;gt;:trac:&lt;br /&gt;
&lt;br /&gt;
 To learn how to use Trac, see &amp;lt;tt&amp;gt;TracGuide&amp;lt;/tt&amp;gt;:trac:&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 For a complete example of all uses of the &amp;lt;tt&amp;gt;:trac:&amp;lt;/tt&amp;gt; role, please see WikiRestructuredTextLinks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Syntax highlighting in reStructuredText ====&lt;br /&gt;
&lt;br /&gt;
There is a directive for doing TracSyntaxColoring in RST as well. The directive is called&lt;br /&gt;
code-block&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#rst&lt;br /&gt;
&lt;br /&gt;
.. code-block:: python&lt;br /&gt;
&lt;br /&gt;
 class Test:&lt;br /&gt;
&lt;br /&gt;
    def TestFunction(self):&lt;br /&gt;
        pass&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will result in the below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#rst&lt;br /&gt;
&lt;br /&gt;
.. code-block:: python&lt;br /&gt;
&lt;br /&gt;
 class Test:&lt;br /&gt;
&lt;br /&gt;
    def TestFunction(self):&lt;br /&gt;
        pass&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Wiki Macros in reStructuredText ====&lt;br /&gt;
&lt;br /&gt;
For doing [WikiMacros Wiki Macros] in RST you use the same directive as for syntax highlighting i.e code-block.&lt;br /&gt;
&lt;br /&gt;
==== Wiki Macro Example ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#rst&lt;br /&gt;
&lt;br /&gt;
.. code-block:: RecentChanges&lt;br /&gt;
&lt;br /&gt;
   Trac,3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will result in the below:&lt;br /&gt;
&lt;br /&gt;
     [[RecentChanges(Trac,3)]]&lt;br /&gt;
&lt;br /&gt;
Or a more concise Wiki Macro like syntax is also available:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#rst&lt;br /&gt;
&lt;br /&gt;
:code-block:&amp;lt;tt&amp;gt;RecentChanges:Trac,3&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bigger RST Example ====&lt;br /&gt;
The example below should be mostly self-explanatory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#html&lt;br /&gt;
&amp;lt;pre class=&amp;quot;wiki&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#rst&lt;br /&gt;
FooBar Header&lt;br /&gt;
=============&lt;br /&gt;
reStructuredText is **nice**. It has its own webpage_.&lt;br /&gt;
&lt;br /&gt;
A table:&lt;br /&gt;
&lt;br /&gt;
=====  =====  ======&lt;br /&gt;
   Inputs     Output&lt;br /&gt;
------------  ------&lt;br /&gt;
  A      B    A or B&lt;br /&gt;
=====  =====  ======&lt;br /&gt;
False  False  False&lt;br /&gt;
True   False  True&lt;br /&gt;
False  True   True&lt;br /&gt;
True   True   True&lt;br /&gt;
=====  =====  ======&lt;br /&gt;
&lt;br /&gt;
RST TracLinks&lt;br /&gt;
-------------&lt;br /&gt;
&lt;br /&gt;
See also ticket &amp;lt;tt&amp;gt;#42&amp;lt;/tt&amp;gt;:trac:.&lt;br /&gt;
&lt;br /&gt;
.. _webpage: http://docutils.sourceforge.net/rst.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Results in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#rst&lt;br /&gt;
FooBar Header&lt;br /&gt;
=============&lt;br /&gt;
reStructuredText is **nice**. It has its own webpage_.&lt;br /&gt;
&lt;br /&gt;
A table:&lt;br /&gt;
&lt;br /&gt;
=====  =====  ======&lt;br /&gt;
   Inputs     Output&lt;br /&gt;
------------  ------&lt;br /&gt;
  A      B    A or B&lt;br /&gt;
=====  =====  ======&lt;br /&gt;
False  False  False&lt;br /&gt;
True   False  True&lt;br /&gt;
False  True   True&lt;br /&gt;
True   True   True&lt;br /&gt;
=====  =====  ======&lt;br /&gt;
&lt;br /&gt;
RST TracLinks&lt;br /&gt;
-------------&lt;br /&gt;
&lt;br /&gt;
See also ticket &amp;lt;tt&amp;gt;#42&amp;lt;/tt&amp;gt;:trac:.&lt;br /&gt;
&lt;br /&gt;
.. _webpage: http://docutils.sourceforge.net/rst.html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
See also: WikiRestructuredTextLinks, WikiProcessors, WikiFormatting&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TracNotice|{{PAGENAME}}}}&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>