Changes between Version 29 and Version 30 of WikiRestructuredText
- Timestamp:
- Jan 3, 2015, 2:00:56 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiRestructuredText
v29 v30 2 2 [[TranslatedPages]] 3 3 4 Trac supports using ''reStructuredText'' (RST) as an alternative to wiki markup in any contextWikiFormatting is used.4 Trac supports [http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html reStructuredText (RST)] as an alternative to wiki markup where WikiFormatting is used. 5 5 6 6 From the reStucturedText webpage: 7 7 "''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. ''" 8 8 9 If you want a file from your Subversion repository be displayed as reStructuredText in Trac's source browser, set `text/x-rst` asvalue for the Subversion property `svn:mime-type`. See [trac:source:/trunk/INSTALL this example].9 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]. 10 10 11 11 === Requirements === 12 Note that to activate RST support in Trac, the python docutils package must be installed. 13 If not already available on your operating system, you can download it at the [http://docutils.sourceforge.net/rst.html RST Website]. 14 15 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. 12 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]. 13 14 Do not use the package manager of your OS, eg `apt-get install python-docutils`, because Trac will not find docutils then. 16 15 17 16 === More information on RST === … … 71 70 For a complete example of all uses of the `:trac:` role, please see WikiRestructuredTextLinks. 72 71 73 74 72 === Syntax highlighting in reStructuredText === 75 73 76 There is a directive for doing TracSyntaxColoring in RST as well. The directive is called 77 code-block 74 There is a directive for doing TracSyntaxColoring in RST as well. The directive is called code-block: 78 75 79 76 ||= Wiki Markup ||= Display || … … 110 107 === Wiki Macros in reStructuredText === 111 108 112 For doing [WikiMacros Wiki Macros] in RST you use the same directive as for syntax highlighting i.e code-block. 109 To enable [WikiMacros Wiki Macros] in RST, you use the same directive as for syntax highlighting, ie code-block: 113 110 114 111 ||= Wiki Markup ||= Display || … … 136 133 }}} 137 134 138 Or a more concise Wiki Macro 135 Or a more concise Wiki Macro-like syntax is also available, using the `:code-block:` role: 139 136 140 137 ||= Wiki Markup ||= Display || … … 157 154 158 155 === Bigger RST Example === 159 The example below should be mostlyself-explanatory:156 The example below should be self-explanatory: 160 157 161 158 ||= Wiki Markup ||= Display ||