Changes between Version 1 and Version 2 of WikiRestructuredText
- Timestamp:
- Jan 28, 2011, 2:52:13 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiRestructuredText
v1 v2 6 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. ''" 7 7 8 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 [trac:source:/trunk/INSTALL this example]. 9 8 10 === Requirements === 9 11 Note that to activate RST support in Trac, the python docutils package must be installed. 10 12 If not already available on your operating system, you can download it at the [http://docutils.sourceforge.net/rst.html RST Website]. 13 14 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. 11 15 12 16 === More information on RST === … … 22 26 === TracLinks in reStructuredText === 23 27 24 * Trac provides a custom RST reference-directive 'trac'to allow TracLinks from within RST text.28 * Trac provides a custom RST directive `trac::` to allow TracLinks from within RST text. 25 29 26 30 Example: … … 34 38 }}} 35 39 36 For a complete example of all uses of the ''trac''-directive, please see WikiRestructuredTextLinks. 37 38 39 * Trac allows an even easier way of creating TracLinks in RST, using the custom '':trac:'' link naming scheme. 40 * Trac allows an even easier way of creating TracLinks in RST, using the custom `:trac:` role. 40 41 41 42 Example: … … 49 50 }}} 50 51 52 For a complete example of all uses of the `:trac:` role, please see WikiRestructuredTextLinks. 53 54 51 55 === Syntax highlighting in reStructuredText === 52 56 53 There is a directive for doing TracSyntaxColoring in R eST as well. The directive is called57 There is a directive for doing TracSyntaxColoring in RST as well. The directive is called 54 58 code-block 55 59 … … 84 88 }}} 85 89 90 === Wiki Macros in reStructuredText === 86 91 87 === Example === 92 For doing [WikiMacros Wiki Macros] in RST you use the same directive as for syntax highlighting i.e code-block. 93 94 === Wiki Macro Example === 95 96 {{{ 97 {{{ 98 #!rst 99 100 .. code-block:: RecentChanges 101 102 Trac,3 103 104 }}} 105 }}} 106 107 Will result in the below: 108 109 [[RecentChanges(Trac,3)]] 110 111 Or a more concise Wiki Macro like syntax is also available: 112 113 {{{ 114 {{{ 115 #!rst 116 117 :code-block:`RecentChanges:Trac,3` 118 }}} 119 }}} 120 121 === Bigger RST Example === 88 122 The example below should be mostly self-explanatory: 89 123 {{{ … … 111 145 ------------- 112 146 113 See also ticket |#42|. 114 115 .. |#42| trac:: #42 147 See also ticket `#42`:trac:. 116 148 117 149 .. _webpage: http://docutils.sourceforge.net/rst.html … … 143 175 ------------- 144 176 145 See also ticket |#42|. 146 147 .. |#42| trac:: #42 177 See also ticket `#42`:trac:. 148 178 149 179 .. _webpage: http://docutils.sourceforge.net/rst.html