close
Warning:
Can't synchronize with repository "(default)" (/var/lib/svn/mod_papi does not appear to be a Subversion repository.). Look in the Trac log for more information.
- Timestamp:
-
Jan 20, 2016, 12:17:02 PM (10 years ago)
- Author:
-
trac
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v3
|
v4
|
|
| 1 | 1 | = reStructuredText Support in Trac = |
| 2 | 2 | |
| 3 | | Trac supports using ''reStructuredText'' (RST) as an alternative to wiki markup in any context WikiFormatting is used. |
| | 3 | Trac supports [http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html reStructuredText (RST)] as an alternative to wiki markup where WikiFormatting is used. |
| 4 | 4 | |
| 5 | 5 | From the reStucturedText webpage: |
| 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]. |
| | 8 | 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 | 9 | |
| 10 | 10 | === Requirements === |
| 11 | | Note that to activate RST support in Trac, the python docutils package must be installed. |
| 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 | 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 | |
| | 13 | Do not use the package manager of your OS, eg `apt-get install python-docutils`, because Trac will not find docutils then. |
| 15 | 14 | |
| 16 | 15 | === More information on RST === |
| … |
… |
|
| 70 | 69 | For a complete example of all uses of the `:trac:` role, please see WikiRestructuredTextLinks. |
| 71 | 70 | |
| 72 | | |
| 73 | 71 | === Syntax highlighting in reStructuredText === |
| 74 | 72 | |
| 75 | | There is a directive for doing TracSyntaxColoring in RST as well. The directive is called |
| 76 | | code-block |
| | 73 | There is a directive for doing TracSyntaxColoring in RST as well. The directive is called code-block: |
| 77 | 74 | |
| 78 | 75 | ||= Wiki Markup ||= Display || |
| … |
… |
|
| 109 | 106 | === Wiki Macros in reStructuredText === |
| 110 | 107 | |
| 111 | | For doing [WikiMacros Wiki Macros] in RST you use the same directive as for syntax highlighting i.e code-block. |
| | 108 | To enable [WikiMacros Wiki Macros] in RST, you use the same directive as for syntax highlighting, ie code-block: |
| 112 | 109 | |
| 113 | 110 | ||= Wiki Markup ||= Display || |
| … |
… |
|
| 135 | 132 | }}} |
| 136 | 133 | |
| 137 | | Or a more concise Wiki Macro like syntax is also available, using the `:code-block:` role: |
| | 134 | Or a more concise Wiki Macro-like syntax is also available, using the `:code-block:` role: |
| 138 | 135 | |
| 139 | 136 | ||= Wiki Markup ||= Display || |
| … |
… |
|
| 156 | 153 | |
| 157 | 154 | === Bigger RST Example === |
| 158 | | The example below should be mostly self-explanatory: |
| | 155 | The example below should be self-explanatory: |
| 159 | 156 | |
| 160 | 157 | ||= Wiki Markup ||= Display || |