Changes between Version 5 and Version 6 of WikiRestructuredText
- Timestamp:
- Jan 28, 2010, 4:25:37 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiRestructuredText
v5 v6 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 === Wiki Macros in reStructuredText === 87 87 88 WikiMacros を ReST の中で使用するには、例えば code-block のようなシンタックスハイライトと同様の 89 ディレクティブを使用します。動作させるためには [http://trac.edgewall.org/ticket/801 #801] のパッチ適用をした Trac を使用しなければなりません。 88 For doing [WikiMacros Wiki Macros] in ReST you use the same directive as for syntax highlighting i.e 89 code-block. To work you must use a version of trac that has #801 applied. 90 90 91 === Wiki Macros の例===91 === Wiki Macro Example === 92 92 93 93 {{{ … … 95 95 #!rst 96 96 97 .. code-block:: HelloWorld 98 99 Something I wanted to say 97 .. code-block:: RecentChanges 100 98 99 Trac,3 101 100 102 101 }}} 103 102 }}} 104 103 105 この結果は以下のようになります。 104 Will result in the below: 106 105 107 [[HelloWorld(Something I wanted to say)]]106 [[RecentChanges(Trac,3)]] 108 107 108 Or a more concise Wiki Macro like syntax is also available: 109 109 110 === より大きい ReST の例 === 111 この例のように書くと、とても分かりやすくなります: 110 {{{ 111 {{{ 112 #!rst 113 114 :code-block:`RecentChanges:Trac,3` 115 }}} 116 }}} 117 118 === Bigger ReST Example === 119 The example below should be mostly self-explanatory: 112 120 {{{ 113 121 #!html 114 122 <pre class="wiki">{{{ 115 123 #!rst 116 ほげほげヘッダ 117 ============= =118 reStructuredText は **素敵** 。この続きは webpage_ で。124 FooBar Header 125 ============= 126 reStructuredText is **nice**. It has its own webpage_. 119 127 120 表:128 A table: 121 129 122 == 123 入力 出力124 ------ ------125 A BA or B126 == 127 偽 偽 偽 128 真 偽 真 129 偽 真 真 130 真 真 真 131 == 130 ===== ===== ====== 131 Inputs Output 132 ------------ ------ 133 A B A or B 134 ===== ===== ====== 135 False False False 136 True False True 137 False True True 138 True True True 139 ===== ===== ====== 132 140 133 RST でのTracLinks134 ------------- -----141 RST TracLinks 142 ------------- 135 143 136 チケット `[http://trac.edgewall.org/ticket/42 #42]`:trac: のように使用します。 144 See also ticket `#42`:trac:. 137 145 138 146 .. _webpage: http://docutils.sourceforge.net/rst.html … … 141 149 142 150 143 結果:151 Results in: 144 152 {{{ 145 153 #!rst 146 ほげほげヘッダ 147 ============= =148 reStructuredText は **素敵** 。この続きは webpage_ で。154 FooBar Header 155 ============= 156 reStructuredText is **nice**. It has its own webpage_. 149 157 150 表:158 A table: 151 159 152 == 153 入力 出力154 ------ ------155 A BA or B156 == 157 偽 偽 偽 158 真 偽 真 159 偽 真 真 160 真 真 真 161 == 160 ===== ===== ====== 161 Inputs Output 162 ------------ ------ 163 A B A or B 164 ===== ===== ====== 165 False False False 166 True False True 167 False True True 168 True True True 169 ===== ===== ====== 162 170 163 RST でのTracLinks164 ------------- -----171 RST TracLinks 172 ------------- 165 173 166 チケット `[http://trac.edgewall.org/ticket/42 #42]`:trac: のように使用します。 174 See also ticket `#42`:trac:. 167 175 168 176 .. _webpage: http://docutils.sourceforge.net/rst.html 169 177 }}} 170 178 171 '''訳注: 日本語でテーブルを作成する場合、 Python-2.4 以降かつ docutils-0.4 以降でない場合は、 docutils に日本語テーブルパッチを適用する必要があります。'''172 179 173 180 ----