wikirestructuredtext
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | wikirestructuredtext [2015/06/09 15:23] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== reStructuredText Support in Trac ====== | ||
+ | |||
+ | Trac supports using // | ||
+ | |||
+ | From the reStucturedText webpage: | ||
+ | "// | ||
+ | |||
+ | ==== Requirements ==== | ||
+ | Note that to activate RST support in Trac, the python docutils package must be installed. | ||
+ | If not already available on your operating system, you can download it at the [[http:// | ||
+ | |||
+ | ==== More information on RST ==== | ||
+ | |||
+ | * reStructuredText Website -- http:// | ||
+ | * RST Quick Reference -- http:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Using RST in Trac ===== | ||
+ | To specify that a block of text should be parsed using RST, use the //rst// processor. | ||
+ | |||
+ | ==== TracLinks in reStructuredText ==== | ||
+ | |||
+ | * Trac provides a custom RST reference-directive ' | ||
+ | |||
+ | | ||
+ | < | ||
+ | < | ||
+ | #!rst | ||
+ | This is a reference to |a ticket| | ||
+ | |||
+ | .. |a ticket| trac:: #42 | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | For a complete example of all uses of the // | ||
+ | |||
+ | |||
+ | * Trac allows an even easier way of creating TracLinks in RST, using the custom //:trac:// link naming scheme. | ||
+ | |||
+ | | ||
+ | < | ||
+ | < | ||
+ | #!rst | ||
+ | This is a reference to ticket `#12`:trac: | ||
+ | |||
+ | To learn how to use Trac, see `TracGuide`: | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Syntax highlighting in reStructuredText ==== | ||
+ | |||
+ | There is a directive for doing TracSyntaxColoring in ReST as well. The directive is called | ||
+ | code-block | ||
+ | |||
+ | Example | ||
+ | |||
+ | < | ||
+ | < | ||
+ | #!rst | ||
+ | |||
+ | .. code-block:: | ||
+ | |||
+ | class Test: | ||
+ | |||
+ | def TestFunction(self): | ||
+ | pass | ||
+ | |||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | Will result in the below. | ||
+ | |||
+ | < | ||
+ | #!rst | ||
+ | |||
+ | .. code-block:: | ||
+ | |||
+ | class Test: | ||
+ | |||
+ | def TestFunction(self): | ||
+ | pass | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== WikiMacros in reStructuredText ==== | ||
+ | |||
+ | For doing WikiMacros in ReST you use the same directive as for syntax highlightning i.e | ||
+ | code-block. To work you must use a version of trac that has #801 applied. | ||
+ | |||
+ | ==== WikiMacro Example ==== | ||
+ | |||
+ | < | ||
+ | < | ||
+ | #!rst | ||
+ | |||
+ | .. code-block:: | ||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | Will result in the below. | ||
+ | |||
+ | [[: | ||
+ | |||
+ | |||
+ | ==== Bigger ReST Example ==== | ||
+ | The example below should be mostly self-explanatory: | ||
+ | < | ||
+ | #!html | ||
+ | <pre class=" | ||
+ | #!rst | ||
+ | FooBar Header | ||
+ | ============= | ||
+ | reStructuredText is **nice**. It has its own webpage_. | ||
+ | |||
+ | A table: | ||
+ | |||
+ | = = ====== | ||
+ | | ||
+ | ------------ | ||
+ | A B A or B | ||
+ | = = ====== | ||
+ | False False False | ||
+ | True | ||
+ | False True True | ||
+ | True | ||
+ | = = ====== | ||
+ | |||
+ | RST TracLinks | ||
+ | ------------- | ||
+ | |||
+ | See also ticket `# | ||
+ | |||
+ | .. _webpage: http:// | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | Results in: | ||
+ | < | ||
+ | #!rst | ||
+ | FooBar Header | ||
+ | ============= | ||
+ | reStructuredText is **nice**. It has its own webpage_. | ||
+ | |||
+ | A table: | ||
+ | |||
+ | = = ====== | ||
+ | | ||
+ | ------------ | ||
+ | A B A or B | ||
+ | = = ====== | ||
+ | False False False | ||
+ | True | ||
+ | False True True | ||
+ | True | ||
+ | = = ====== | ||
+ | |||
+ | RST TracLinks | ||
+ | ------------- | ||
+ | |||
+ | See also ticket `# | ||
+ | |||
+ | .. _webpage: http:// | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | See also: WikiRestructuredTextLinks, | ||
+ | |||
wikirestructuredtext.txt · Last modified: 2015/06/09 15:23 by 127.0.0.1