| 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 | | |
| 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 | | |
| 10 | | === Requirements === |
| 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. |
| 14 | | |
| 15 | | === More information on RST === |
| 16 | | |
| 17 | | * reStructuredText Website -- http://docutils.sourceforge.net/rst.html |
| 18 | | * RST Quick Reference -- http://docutils.sourceforge.net/docs/rst/quickref.html |
| 19 | | |
| 20 | | ---- |
| 21 | | |
| 22 | | == Using RST in Trac == |
| 23 | | To specify that a block of text should be parsed using RST, use the ''rst'' processor. |
| 24 | | |
| 25 | | === TracLinks in reStructuredText === |
| | 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." |
| | 10 | |
| | 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`, or add the extension `rst` to the filename. See [trac:source:branches/1.4-stable/INSTALL.rst this example]. |
| | 12 | |
| | 13 | The examples will only be rendered as reStructuredText if docutils is installed. If Pygments is installed but docutils is not installed, the examples will be syntax-highlighted rather than rendered as reStructuredText. |
| | 14 | |
| | 15 | === Requirements |
| | 16 | |
| | 17 | To activate RST support in Trac, install the python docutils package with the command `easy_install docutils`, or through your operating system package manager. If not already available on your operating system, you can download it from [https://pypi.python.org/pypi/docutils PyPI]. |
| | 18 | |
| | 19 | === More information on RST |
| | 20 | |
| | 21 | * [http://docutils.sourceforge.net/rst.html reStructuredText Website] |
| | 22 | * [http://docutils.sourceforge.net/docs/rst/quickref.html RST Quick Reference] |
| | 23 | |
| | 24 | == Using RST in Trac |
| | 25 | |
| | 26 | To specify that a block of text should be parsed using RST, use the ''rst'' processor. |
| | 27 | |
| | 28 | === TracLinks in reStructuredText |
| 106 | | === Wiki Macros in reStructuredText === |
| 107 | | |
| 108 | | To enable [WikiMacros Wiki Macros] in RST, you use the same directive as for syntax highlighting, ie code-block: |
| | 103 | === Wiki Macros in reStructuredText |
| | 104 | |
| | 105 | To enable [WikiMacros Wiki Macros] in RST, you use the same `code-block` directive as for syntax highlighting: |
| | 106 | |
| | 107 | ||= Wiki Markup ||= Display || |
| | 108 | {{{#!td |
| | 109 | {{{ |
| | 110 | {{{#!rst |
| | 111 | |
| | 112 | .. code-block:: RecentChanges |
| | 113 | |
| | 114 | Trac,3 |
| | 115 | |
| | 116 | }}} |
| | 117 | }}} |
| | 118 | }}} |
| | 119 | {{{#!td |
| | 120 | {{{#!rst |
| | 121 | |
| | 122 | .. code-block:: RecentChanges |
| | 123 | |
| | 124 | Trac,3 |
| | 125 | |
| | 126 | }}} |
| | 127 | }}} |
| | 128 | |
| | 129 | Or use the `:code-block:` role for a more concise Wiki Macro-like syntax: |