reStructuredText Support in Trac

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

Requirements

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.

More information on RST


Using RST in Trac

To specify that a block of text should be parsed using RST, use the rst processor.

TracLinks in reStructuredText

  • Trac provides a custom RST reference-directive 'trac' to allow TracLinks from within RST text.

Example:

 {{{
 #!rst
 This is a reference to |a ticket|

 .. |a ticket| trac:: #42
 }}}

For a complete example of all uses of the trac-directive, please see WikiRestructuredTextLinks.

  • Trac allows an even easier way of creating TracLinks in RST, using the custom :trac: link naming scheme.

Example:

 {{{
 #!rst
 This is a reference to ticket `#12`:trac:

 To learn how to use Trac, see `TracGuide`:trac:
 }}}

Syntax highlighting in reStructuredText

There is a directive for doing TracSyntaxColoring in ReST as well. The directive is called code-block

Example

{{{
#!rst

.. code-block:: python

 class Test:

    def TestFunction(self):
        pass

}}}

Will result in the below.

class Test:

   def TestFunction(self):
       pass

WikiMacros in reStructuredText

For doing WikiMacros in ReST you use the same directive as for syntax highlightning i.e code-block. To work you must use a version of trac that has #801 applied.

WikiMacro? Example

{{{
#!rst

.. code-block:: HelloWorld
 
   Something I wanted to say


}}}

Will result in the below.

Hello World, args = Something I wanted to say

Bigger ReST Example

The example below should be mostly self-explanatory:

{{{
#!rst
FooBar Header
=============
reStructuredText is **nice**. It has its own webpage_.

A table:

=====  =====  ======
   Inputs     Output
------------  ------
  A      B    A or B
=====  =====  ======
False  False  False
True   False  True
False  True   True
True   True   True
=====  =====  ======

RST TracLinks
-------------

See also ticket `#42`:trac:.

.. _webpage: http://docutils.sourceforge.net/rst.html
}}}

Results in:

FooBar Header

reStructuredText is nice. It has its own webpage.

A table:

Inputs Output
A B A or B
False False False
True False True
False True True
True True True

RST TracLinks

See also ticket #42.


See also: WikiRestructuredTextLinks, WikiProcessors, WikiFormattingBOFH Excuse #251:

Processes running slowly due to weak power supply http://www.compraviagraitalia.com/it/item/cialis.html

vendita cialis online farmaco cialis

ordinare viagra generico e cialis http://relievepain.org/tramadol-news/index.php?entry=entry090127-135105 http://headachetreatment.net/index.html vendita viagra di marca cialis italia fioricet headache treatment fioricet orders where can i order tramadol tramadol ultram

A stitch in time saves nine.

http://compraviagraitalia.com/it/item/cialis.html

buy Cialis online cod cash

cialis originale acquista viagra generico in italia http://www.folkd.com/user/tramadolonline http://buycialis.cc/ http://www.gomedia.us/forum/member.php?u=1621 http://www.dogomania.com/forum/showthread.php?p=279776 69DPKGX ordina online viagra butalbital buy Cialis medication Wu6Viah tramadol com

If everything seems to be going well, you have obviously overlooked something.

http://lasuperdirectory.altervista.org/single.php?id=352

buy pharmacy

cialis impotenza viagra a venezia http://www.dogomania.com/forum/showthread.php?p=276144 http://us.lexusownersclub.com/forums/index.php?showuser=95591 http://www.folkd.com/user/buyfioricetonline http://forum.desktopreview.com/member.php?u=145579 XylEBsj acquistare viagra originale buy fioricet sweden buy order cialis online EqgPnVj? order tramadol

While there's life, there's hope.

-- Publius Terentius Afer (Terence)

http://www.mrlink.it/Benessere-e-Salute/Medicina/Compra-Viagra-online-l7919.html

buy generic cialis

acquista cialis viagra viagra di marca e cialis ordina propecia http://buycialis.cc/it/item/generic_propecia.html http://www.xomreviews.com/relievepain.org http://buycialis.cc/ http://forums.3ivx.com/index.php?showuser=16168 http://www.jaman.com/people/BuyCialis/ CsQd4KF acquistare viagra siguro fioricet net buy cialas FiQAZ2n how to buy tramadol

"How many teamsters does it take to screw in a light bulb?"

"FIFTEEN!! YOU GOT A PROBLEM WITH THAT?"

generic cialis viagra http://buycialis.gather.com/ http://www.kaneva.com/channel/Buy_Viagra.people cheap levitra tramadol online order zQ2UsDb http://members.ebay.com/ws/eBayISAPI.dll?ViewUserPage&userid=cialis-levitra http://www.folkd.com/user/tramadolonline buy fioricet viagra postepay http://www.sims99.com/forum/member.php?u=9417&fioricet http://lasuperdirectory.altervista.org/single.php?id=352 "Who cares if it doesn't do anything? It was made with our new Triple-Iso-Bifurcated-Krypton-Gate-MOS process ..." Buy Cialis -> Order Cheap Cialis Online! Free Prescription! buy viagra http://www.spreadfirefox.com/user/269138?buy-cialis http://buycialis.cc/en/item/viagra.html levitra without prescription order cheap tramadol online MQWc2xJ http://www.sims99.com/forum/member.php?u=9418&buy-levitra http://www.dogomania.com/forum/showthread.php?p=276144 buy cheap fioricet headache acquista viagra italia http://www.sims99.com/forum/member.php?u=9417&fioricet http://subscene.com/members/Compra-Viagra-e-Cialis-Online_2E00_.aspx This is the sort of English up with which I will not put.

-- Winston Churchill

buy cialis viagra online viagra free shipping http://www.mania.com/buycialis/blog.html http://community.tasteofhome.com/members/BuyViagra/default.aspx buy levitra cheap buy tramadol cheap h3g1jSa http://community.tasteofhome.com/members/BuyLevitra/default.aspx http://www.xomreviews.com/relievepain.org buy fioricet us acquista viagra in italia http://subscene.com/members/Buy-Cheap-Fioricet-Online.aspx http://www.redhotchilipeppers.it/public/forum/index.php?/user/7012-viagra-e-cialis/ There haven't been any ChangeLog? updates in hours! Slackware's dead! -- GP From: Keith Keller http://www.mrlink.it/Benessere-e-Salute/Medicina/Compra-Viagra-online-l7919.html

buy pharmacies cialis

dove comprare cialis generico vendita viagra generico online comprare propecia online http://compracialis.it/it/item/generic_propecia.html http://www.xomreviews.com/relievepain.org http://members.ebay.com/ws/eBayISAPI.dll?ViewUserPage&userid=cialis-levitra http://www.aboutus.org/HeadacheTreatment.net http://microsoftontheissues.com/cs/members/Buy-Generic-Cialis-Online.aspx 7VVHI56 acquistare viagra originale purchase fioricet generic Cialis gpUgNTt hcl tramadol

May's Law:

The quality of correlation is inversly proportional to the density of control. (The fewer the data points, the smoother the curves.)

http://compraviagraitalia.com/it/item/generic_cialis.html

order Cialis

cialis di marca viagra compra propecia http://buycialis.cc/it/item/generic_propecia.html http://buycialisonline.tv/product.php?prod=tramadol http://www.jayde.com/15220257-buycialis.html http://fioricetonline.gather.com/ http://www.folkd.com/user/buycialisonline lMn6jv0 acquisto viagra fioricet orders buy generic cialis ja3C2nX buy tramadol

Guy in chicken costume: The world is gonna end at midnight tonight. Y2K.

Peter Griffin: Y2K? What are you selling, chicken or sex jelly? buy cialis pills buy viagra http://www.mania.com/buycialis/blog.html http://buyviagraonline.gather.com/ buy levitra tramadol free shipping Awzp3zu http://members.ebay.com/ws/eBayISAPI.dll?ViewUserPage&userid=cialis-levitra http://relievepain.org/ buy fioricet butalbital viagra negozio online http://www.jayde.com/15220245-headachetreatment.html http://forum.studenti.it/members/compraviagraonline.html BOFH Excuse #259:

Someone's tie is caught in the printer, and if anything else gets printed, he'll be in it too. http://www.cittaeducativa.roma.it/moodle/user/view.php?id=2744&compra-viagra-cialis

buy order cialis online

ordina cialis compra viagra di marca e cialis ordina propecia http://www.hotfrog.it/Societa/Compra-Cialis-e-Viagra/Propecia-Generico-14606 http://buycialisonline.tv/product.php?prod=tramadol http://community.post-gazette.com/members/BuyCialis/default.aspx http://community.icontact.com/users/buyfioricet http://members.ebay.com/ws/eBayISAPI.dll?ViewUserPage&userid=cialis-levitra OVuEgIn vendita viagra fioricet usa buy Cialis generic Edmv8Cq buy tramadol