Changes between Version 3 and Version 4 of WikiRestructuredText
- Timestamp:
- 19/05/2016 16:30:59 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiRestructuredText
v3 v4 1 = reStructuredText Support in Trac = 1 = reStructuredText Support in Trac 2 3 == Introduction 4 2 5 3 6 Trac supports [http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html reStructuredText (RST)] as an alternative to wiki markup where WikiFormatting is used. 4 7 5 8 From the reStucturedText webpage: 6 " ''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. ''"9 "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." 7 10 8 11 If you want a file from your Subversion repository to be displayed as reStructuredText in the Trac source browser, set `text/x-rst` as the value for the Subversion property `svn:mime-type`. See [trac:source:/trunk/INSTALL this example]. 9 12 10 === Requirements === 13 === Requirements 14 11 15 To activate RST support in Trac, install the python docutils package: `easy_install docutils`. If not already available on your operating system, you can download it at the [http://docutils.sourceforge.net/rst.html RST Website]. 12 16 13 17 Do not use the package manager of your OS, eg `apt-get install python-docutils`, because Trac will not find docutils then. 14 18 15 === More information on RST ===19 === More information on RST 16 20 17 21 * reStructuredText Website -- http://docutils.sourceforge.net/rst.html 18 22 * RST Quick Reference -- http://docutils.sourceforge.net/docs/rst/quickref.html 19 23 20 ---- 21 22 == Using RST in Trac == 24 == Using RST in Trac 25 23 26 To specify that a block of text should be parsed using RST, use the ''rst'' processor. 24 27 25 === TracLinks in reStructuredText ===28 === TracLinks in reStructuredText 26 29 27 30 * Trac provides a custom RST directive `trac::` to allow TracLinks from within RST text. … … 69 72 For a complete example of all uses of the `:trac:` role, please see WikiRestructuredTextLinks. 70 73 71 === Syntax highlighting in reStructuredText ===74 === Syntax highlighting in reStructuredText 72 75 73 76 There is a directive for doing TracSyntaxColoring in RST as well. The directive is called code-block: … … 104 107 Note the need to indent the code at least one character after the `.. code-block` directive. 105 108 106 === Wiki Macros in reStructuredText ===109 === Wiki Macros in reStructuredText 107 110 108 111 To enable [WikiMacros Wiki Macros] in RST, you use the same directive as for syntax highlighting, ie code-block: … … 152 155 }}} 153 156 154 === Bigger RST Example === 157 === Bigger RST Example 158 155 159 The example below should be self-explanatory: 156 160