Changes between Version 1 and Version 2 of WikiRestructuredText
- Timestamp:
- Jun 21, 2008, 6:11:58 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiRestructuredText
v1 v2 1 = reStructuredText の対応=1 = reStructuredText Support in Trac = 2 2 3 Trac は WikiFormatting が使われているあらゆるコンテキストの中で Wiki マークアップの代わりとなるものとして ''reStructuredText'' が利用可能です。3 Trac supports using ''reStructuredText'' (RST) as an alternative to wiki markup in any context WikiFormatting is used. 4 4 5 reStructuredText の Web ページより:6 "''reStructuredText は読みやすく、見たものを手にする、マークアップされたプレーンテキストとそのパーサシステムです。 reStructuredText はプログラムのインラインのドキュメント (例えば、 Python docstrings) や簡単な Web ページをすばやく作ること、スタンドアロンのドキュメントを書くのにとても役に立ちます。 reStructuredText は特定のアプリケーションの分野のための拡張として設計されています。''"5 From the reStucturedText webpage: 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 === 必須条件===9 Trac で RST を使うためには、 Python の docutils パッケージがインストールされてなければなりません。 10 あなたのオペレーティングシステムでまだ使用できない場合は、 [http://docutils.sourceforge.net/rst.html RST Website] からダウンロードすることができます。 8 === Requirements === 9 Note that to activate RST support in Trac, the python docutils package must be installed. 10 If not already available on your operating system, you can download it at the [http://docutils.sourceforge.net/rst.html RST Website]. 11 11 12 === さらなる RST に関する情報===12 === More information on RST === 13 13 14 * reStructuredText Web サイト-- http://docutils.sourceforge.net/rst.html15 * RST クイックリファレンス-- http://docutils.sourceforge.net/docs/rst/quickref.html14 * reStructuredText Website -- http://docutils.sourceforge.net/rst.html 15 * RST Quick Reference -- http://docutils.sourceforge.net/docs/rst/quickref.html 16 16 17 17 ---- 18 18 19 == RST を Trac で使用する==20 テキストが RST を使用してパースされるようにするには、 ''rst'' プロセッサを使用してください。 19 == Using RST in Trac == 20 To specify that a block of text should be parsed using RST, use the ''rst'' processor. 21 21 22 === reStructuredText における TracLinks===22 === TracLinks in reStructuredText === 23 23 24 * Trac は RST テキストの中で TracLinks を許可するための 'trac' というカスタマイズされたRSTのリファレンスディレクティブを提供しています。24 * Trac provides a custom RST reference-directive 'trac' to allow TracLinks from within RST text. 25 25 26 例:26 Example: 27 27 {{{ 28 28 {{{ … … 34 34 }}} 35 35 36 ''trac'' ディレクティブのすべての使用方法の一覧は、 WikiRestructuredTextLinks を見てください。36 For a complete example of all uses of the ''trac''-directive, please see WikiRestructuredTextLinks. 37 37 38 38 39 * Trac は RST において、カスタマイズされた '':trac::'' というリンクのための命名体系を使用することにより、簡単な方法で TracLinks を作ることを許可しています。39 * Trac allows an even easier way of creating TracLinks in RST, using the custom '':trac:'' link naming scheme. 40 40 41 例:41 Example: 42 42 {{{ 43 43 {{{ … … 49 49 }}} 50 50 51 === reStructuredText におけるシンタックスハイライト===51 === Syntax highlighting in reStructuredText === 52 52 53 同様に、 RST において TracSyntaxColoring を行なうディレクティブがあります。 54 ディレクティブは code-block と呼ばれます。 53 There is a directive for doing TracSyntaxColoring in ReST as well. The directive is called 54 code-block 55 55 56 例 56 Example 57 57 58 58 {{{ … … 70 70 }}} 71 71 72 上記の例は以下のように見えます。 72 Will result in the below. 73 73 74 74 {{{ … … 84 84 }}} 85 85 86 === reStructuredText の中における WikiMacros===86 === WikiMacros in reStructuredText === 87 87 88 WikiMacros を ReST の中で使用するには、例えば code-block のようなシンタックスハイライトと同様の 89 ディレクティブを使用します。動作させるためには [http://trac.edgewall.org/ticket/801 #801] のパッチ適用をした Trac を使用しなければなりません。 88 For doing WikiMacros in ReST you use the same directive as for syntax highlightning i.e 89 code-block. To work you must use a version of trac that has #801 applied. 90 90 91 === WikiMacro s の例===91 === WikiMacro Example === 92 92 93 93 {{{ … … 103 103 }}} 104 104 105 この結果は以下のようになります。 105 Will result in the below. 106 106 107 107 [[HelloWorld(Something I wanted to say)]] 108 108 109 109 110 === より大きい ReST の例===111 この例のように書くと、とても分かりやすくなります:110 === Bigger ReST Example === 111 The example below should be mostly self-explanatory: 112 112 {{{ 113 113 #!html 114 114 <pre class="wiki">{{{ 115 115 #!rst 116 ほげほげヘッダ 117 ============= =118 reStructuredText は **素敵** 。この続きは webpage_ で。116 FooBar Header 117 ============= 118 reStructuredText is **nice**. It has its own webpage_. 119 119 120 表:120 A table: 121 121 122 == 123 入力 出力124 ------ ------125 A BA or B126 == 127 偽 偽 偽 128 真 偽 真 129 偽 真 真 130 真 真 真 131 == 122 ===== ===== ====== 123 Inputs Output 124 ------------ ------ 125 A B A or B 126 ===== ===== ====== 127 False False False 128 True False True 129 False True True 130 True True True 131 ===== ===== ====== 132 132 133 RST でのTracLinks134 ------------- -----133 RST TracLinks 134 ------------- 135 135 136 チケット `[http://trac.edgewall.org/ticket/42 #42]`:trac: のように使用します。 136 See also ticket `#42`:trac:. 137 137 138 138 .. _webpage: http://docutils.sourceforge.net/rst.html … … 141 141 142 142 143 結果:143 Results in: 144 144 {{{ 145 145 #!rst 146 ほげほげヘッダ 147 ============= =148 reStructuredText は **素敵** 。この続きは webpage_ で。146 FooBar Header 147 ============= 148 reStructuredText is **nice**. It has its own webpage_. 149 149 150 表:150 A table: 151 151 152 == 153 入力 出力154 ------ ------155 A BA or B156 == 157 偽 偽 偽 158 真 偽 真 159 偽 真 真 160 真 真 真 161 == 152 ===== ===== ====== 153 Inputs Output 154 ------------ ------ 155 A B A or B 156 ===== ===== ====== 157 False False False 158 True False True 159 False True True 160 True True True 161 ===== ===== ====== 162 162 163 RST でのTracLinks164 ------------- -----163 RST TracLinks 164 ------------- 165 165 166 チケット `[http://trac.edgewall.org/ticket/42 #42]`:trac: のように使用します。 166 See also ticket `#42`:trac:. 167 167 168 168 .. _webpage: http://docutils.sourceforge.net/rst.html 169 169 }}} 170 170 171 '''訳注: 日本語でテーブルを作成する場合、 Python-2.4 以降かつ docutils-0.4 以降でない場合は、 docutils に日本語テーブルパッチを適用する必要があります。'''172 171 173 172 ----