Changes between Version 1 and Version 2 of WikiFormatting
- Timestamp:
- Jun 21, 2008, 6:11:58 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiFormatting
v1 v2 1 = Wiki 文法=1 = WikiFormatting = 2 2 [[TracGuideToc]] 3 3 4 Wiki マークアップは Trac のコアとなる機能です。他のパーツと緊密に統合することによって、 Trac をフレキシブルかつ強力にしています。5 6 Trac は小さく強力な Wiki レンダリングエンジンを内蔵しています。この Wiki エンジンは、他のポピュラーな Wiki からのコマンドの強化サブセットを実装しています。7 (特に [http://moinmoin.wikiwikiweb.de/ MoinMoin]) 8 9 10 このページは、 WikiFormatting でフォーマットできる文法の文例集です。 11 12 13 == フォント書式==14 15 T rac の Wiki は以下のフォント書式に対応しています:16 {{{ 17 * ''' ボールド''', '''!''' ボールドにできます''' そして'''! '''18 * '' イタリック''19 * ''''' ボールドイタリック'''''20 * __ アンダーライン__21 * {{{ モノスペース}}} or `モノスペース`22 * ~~ 取り消し線~~23 * ^ 上付き文字^24 * ,, 下付き文字,,25 }}} 26 27 表示内容:28 * ''' ボールド''', '''!''' ボールドにできます''' そして'''! '''29 * '' イタリック''30 * ''''' ボールドイタリック'''''31 * __ アンダーライン__32 * {{{ モノスペース}}} or `モノスペース`33 * ~~ 取り消し線~~34 * ^ 上付き文字^35 * ,, 下付き文字,,4 Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole. 5 6 Trac has a built in small and powerful wiki rendering engine. This wiki engine implements an ever growing subset of the commands from other popular Wikis, 7 especially [http://moinmoin.wikiwikiweb.de/ MoinMoin]. 8 9 10 This page demonstrates the formatting syntax available anywhere WikiFormatting is allowed. 11 12 13 == Font Styles == 14 15 The Trac wiki supports the following font styles: 16 {{{ 17 * '''bold''', '''!''' can be bold too''', and '''! ''' 18 * ''italic'' 19 * '''''bold italic''''' 20 * __underline__ 21 * {{{monospace}}} or `monospace` 22 * ~~strike-through~~ 23 * ^superscript^ 24 * ,,subscript,, 25 }}} 26 27 Display: 28 * '''bold''', '''!''' can be bold too''', and '''! ''' 29 * ''italic'' 30 * '''''bold italic''''' 31 * __underline__ 32 * {{{monospace}}} or `monospace` 33 * ~~strike-through~~ 34 * ^superscript^ 35 * ,,subscript,, 36 36 37 37 Notes: 38 * `{{{...}}}`と {{{`...`}}} コマンドは表示を等角フォントにするだけではなく、内容を整形済みテキストとして扱います。つまりテキストに対して、どのような Wiki 処理も行いません。 39 * {{{ ! }}} は wiki パーサに wiki フォーマットとして解釈しないように伝えます。なので、 ! の後ろにスペースを置くことに注意して下さい。例えば、太字で行が終わるようなときです。 40 41 == 見出し == 42 43 1 文字から 5 文字の「イコール '='」を行頭に置き、 1 文字のスペースに続けてタイトルを置くと、 44 見出しになります。見出しの行末は1文字のスペースに続けて、行頭と同じ数の ''イコール (=)'' を 45 置きます。 46 見出しに続いて id 属性を明示的に付与することが出来ます。付与しない場合、暗黙の読み取り可能な id 属性が生成されます。 47 '''(訳注: 明示的に付与する id 属性では日本語は使用できないようです。)''' 48 49 例: 50 {{{ 51 = 見出し (第1レベル) = 52 == 見出し (第2レベル) == 53 === 見出し (第3レベル) === 54 === 明示的な id === #using-explicit-id-in-heading 55 }}} 56 57 表示内容: 58 = 見出し (第1レベル) = 59 == 見出し (第2レベル) == 60 === 見出し (第3レベル) === 61 === 明示的な id === #using-explicit-id-in-heading 62 63 == 改行 == 64 65 2 つのテキストブロックの間に 1 行以上の空行がある場合、新しい段落として改行を行います。 66 67 強制的に改行だけを行いたい場合、このように書いてください: 68 {{{ 69 1行目[[BR]]2行目 70 }}} 71 以下のように表示されます: 72 73 1行目[[BR]]2行目 74 75 76 == リスト == 77 78 番号付きリストと番号無しリストの両方があります。 79 80 例: 38 * `{{{...}}}` and {{{`...`}}} commands not only select a monospace font, but also treat their content as verbatim text, meaning that no further wiki processing is done on this text. 39 * {{{ ! }}} tells wiki parser to not take the following characters as wiki format, so pay attention to put a space after !, e.g. when ending bold. 40 41 == Headings == 42 43 You can create heading by starting a line with one up to five ''equal'' characters ("=") 44 followed by a single space and the headline text. The line should end with a space 45 followed by the same number of ''='' characters. 46 The heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated. 47 48 Example: 49 {{{ 50 = Heading = 51 == Subheading == 52 === About ''this'' === 53 === Explicit id === #using-explicit-id-in-heading 54 }}} 55 56 Display: 57 = Heading = 58 == Subheading == 59 === About ''this'' === 60 === Explicit id === #using-explicit-id-in-heading 61 62 == Paragraphs == 63 64 A new text paragraph is created whenever two blocks of text are separated by one or more empty lines. 65 66 A forced line break can also be inserted, using: 67 {{{ 68 Line 1[[BR]]Line 2 69 }}} 70 Display: 71 72 Line 1[[BR]]Line 2 73 74 75 == Lists == 76 77 The wiki supports both ordered/numbered and unordered lists. 78 79 Example: 81 80 {{{ 82 81 * Item 1 … … 90 89 i. Item 1.b.ii 91 90 1. Item 2 92 番号付きリストでは、番号を指定することもできます:91 And numbered lists can also be given an explicit number: 93 92 3. Item 3 94 93 }}} 95 94 96 表示内容:95 Display: 97 96 * Item 1 98 97 * Item 1.1 … … 105 104 i. Item 1.b.ii 106 105 1. Item 2 107 番号付きリストでは、番号を指定することもできます:106 And numbered lists can also be given an explicit number: 108 107 3. Item 3 109 108 110 リストマーカーの前にスペースを一つ以上置かなければなりません。スペースがない場合、通常のパラグラフとして扱われます。 111 112 113 == 用語定義リスト==114 115 116 Wikiは用語定義リストも作成できます。 117 118 例:109 Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph. 110 111 112 == Definition Lists == 113 114 115 The wiki also supports definition lists. 116 117 Example: 119 118 {{{ 120 119 llama:: 121 毛の生えた哺乳類の一種。120 some kind of mammal, with hair 122 121 ppython:: 123 毛がない爬虫類の一種。124 ( typoを見つけたかい?)125 }}} 126 127 表示内容:122 some kind of reptile, without hair 123 (can you spot the typo?) 124 }}} 125 126 Display: 128 127 llama:: 129 毛の生えた哺乳類の一種。128 some kind of mammal, with hair 130 129 ppython:: 131 毛がない爬虫類の一種。132 ( typoを見つけたかい?)133 134 定義する用語の前にスペースが一つ必要なことを忘れないで下さい。 135 136 137 == 整形済みテキスト==138 139 整形済みテキストを含むブロックは、ソースコードの一部や、ノート、例示に適しています。引用ブロックとしたいテキストの前後を、 3 つの ''ブレース (curly braces)'' で括ってください。ブレースは独立した行に置かなければいけません。 130 some kind of reptile, without hair 131 (can you spot the typo?) 132 133 Note that you need a space in front of the defined term. 134 135 136 == Preformatted Text == 137 138 Block containing preformatted text are suitable for source code snippets, notes and examples. Use three ''curly braces'' wrapped around the text to define a block quote. The curly braces need to be on a separate line. 140 139 141 例:140 Example: 142 141 {{{ 143 142 {{{ … … 147 146 }}} 148 147 149 表示内容:148 Display: 150 149 {{{ 151 150 def HelloWorld(): … … 154 153 155 154 156 == 引用ブロック==157 158 段落を引用ブロックとしてマークするには、段落を 2 個のスペースでインデントします。 159 160 例:155 == Blockquotes == 156 157 In order to mark a paragraph as blockquote, indent that paragraph with two spaces. 158 159 Example: 161 160 {{{ 162 161 This text is a quote from someone else. 163 162 }}} 164 163 165 表示内容:164 Display: 166 165 This text is a quote from someone else. 167 166 168 == 引用==169 170 進行中の議題のスレッド、チケットのコメントエリアなどで引用を表すために、メールライクな引用マーク (">", ">>" など) が使用できます。 171 172 例:167 == Discussion Citations == 168 169 To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 170 171 Example: 173 172 {{{ 174 173 >> Someone's original text … … 177 176 }}} 178 177 179 表示内容:178 Display: 180 179 >> Someone's original text 181 180 > Someone else's reply text 182 181 My reply text 183 182 184 ''Note: いくつかの WikiFormatting の要素、 表やあらかじめ整形されたテキストは引用エリアでは整形が崩れてしまいます。きれいな引用を作るには再整形が必要になるでしょう。''185 186 == 表==187 188 簡単なテーブルはこのように記述します:183 ''Note: Some WikiFormatting elements, such as lists and preformatted text, are lost in the citation area. Some reformatting may be necessary to create a clear citation.'' 184 185 == Tables == 186 187 Simple tables can be created like this: 189 188 {{{ 190 189 ||Cell 1||Cell 2||Cell 3|| … … 192 191 }}} 193 192 194 表示内容:193 Display: 195 194 ||Cell 1||Cell 2||Cell 3|| 196 195 ||Cell 4||Cell 5||Cell 6|| 197 196 198 より複雑なテーブルは [wiki:WikiRestructuredText#より大きいReSTの例 reStructuredText] 199 を使用して書くことができます。 200 201 202 == リンク==203 204 WikiPageNames や URL は自動的にハイパーリンクされます。 !WikiPageLinks を無効化したい場合、 {{{!WikiPageLink}}} のように、エクスクラメーションマーク (!) を語頭に置きます。 205 206 例:197 Note that more complex tables can be created using 198 [wiki:WikiRestructuredText#BiggerReSTExample reStructuredText]. 199 200 201 == Links == 202 203 Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}. 204 205 Example: 207 206 {{{ 208 207 TitleIndex, http://www.edgewall.com/, !NotAlink 209 208 }}} 210 209 211 表示内容:210 Display: 212 211 TitleIndex, http://www.edgewall.com/, !NotAlink 213 212 214 リンク先そのものでなくリンク先の内容説明やタイトルを表示させたい場合、角括弧 (square bracket) で括り、リンクに続いて 1 文字の空白を開けて記述します。もし説明のタイトルが省略された場合、そして明確なプレフィックスが記述されなかったとき、外部へのリンクにはなりません。これは WikiPageNames の仕様に準拠できない Wiki ページを使いたい場合に役に立ちます。 215 216 例:213 Links can be given a more descriptive title by writing the link followed by a space and a title and all this inside square brackets. If the descriptive title is omitted, then the explicit prefix is discarded, unless the link is an external link. This can be useful for wiki pages not adhering to the WikiPageNames convention. 214 215 Example: 217 216 {{{ 218 217 * [http://www.edgewall.com/ Edgewall Software] … … 221 220 }}} 222 221 223 表示内容:222 Display: 224 223 * [http://www.edgewall.com/ Edgewall Software] 225 224 * [wiki:TitleIndex Title Index] … … 227 226 228 227 229 === Trac リンク===230 231 Wiki ページでは Trac の他のコンポーネントに直接リンクできます。チケット、レポート、チェンジセット、マイルストーン、ソースファイル、他の Wiki ページへは以下のようにリンクを記述します:232 {{{ 233 * チケット: #1 もしくはticket:1234 * レポート: {1} もしくはreport:1235 * チェンジセット: [1] もしくはchangeset:1228 === Trac Links === 229 230 Wiki pages can link directly to other parts of the Trac system. Pages can refer to tickets, reports, changesets, milestones, source files and other Wiki pages using the following notations: 231 {{{ 232 * Tickets: #1 or ticket:1 233 * Reports: {1} or report:1 234 * Changesets: r1, [1] or changeset:1 236 235 * ... 237 236 }}} 238 237 239 表示内容:240 * チケット: #1 もしくはticket:1241 * レポート: {1} もしくはreport:1242 * チェンジセット: [1] もしくはchangeset:1238 Display: 239 * Tickets: #1 or ticket:1 240 * Reports: {1} or report:1 241 * Changesets: r1, [1] or changeset:1 243 242 * ... 244 243 245 より深い情報は TracLinks に記述されています。 246 247 248 == リンクの無効化==249 250 エクスクラメーションマーク (!) を語頭に付与することで、 TracLinks が出力するハイパーリンクを無効化できます。 251 252 例:244 See TracLinks for more in-depth information. 245 246 247 == Escaping Links and WikiPageNames == 248 249 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark). 250 251 Example: 253 252 {{{ 254 253 !NoHyperLink 255 !#42 はリンクではありません。256 }}} 257 258 表示内容:254 !#42 is not a link 255 }}} 256 257 Display: 259 258 !NoHyperLink 260 !#42 はリンクではありません。261 262 263 == 画像==264 265 U RL が `.png`, `.gif` or `.jpg` で終わっている場合、自動的にイメージへのリンクとはならずに `<img>` タグに変換されます。266 267 ![[Image]] マクロを使用しなければなりません (以下参照) 。 268 269 270 == マクロ==271 272 マクロは、動的コンテンツを Wiki ページに挿入するための ''カスタム関数'' です。 273 274 例:259 !#42 is not a link 260 261 262 == Images == 263 264 Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags. 265 266 You now have to use the ![[Image]] macro (see below). 267 268 269 == Macros == 270 271 Macros are ''custom functions'' to insert dynamic content in a page. 272 273 Example: 275 274 {{{ 276 275 [[Timestamp]] 277 276 }}} 278 277 279 表示内容:278 Display: 280 279 [[Timestamp]] 281 280 282 使用方法とインストールされているマクロの一覧は WikiMacros に記述されています。 283 284 285 == プロセッサ==286 287 Trac は WikiProcessors の機能によって、 Wiki 以外のマークアップにも対応しています。例えば、プロセッサとしてページの描画に288 [wiki:WikiRestructuredText reStructuredText] や [wiki:WikiHtml HTML] を使用することができます。289 290 例1:281 See WikiMacros for more information, and a list of installed macros. 282 283 284 == Processors == 285 286 Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in 287 [wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML]. 288 289 Example 1: 291 290 {{{ 292 291 #!html 293 292 <pre class="wiki">{{{ 294 293 #!html 295 <h1 style="text-align: right; color: blue">HTML テスト</h1>294 <h1 style="text-align: right; color: blue">HTML Test</h1> 296 295 }}}</pre> 297 296 }}} 298 297 299 表示内容:298 Display: 300 299 {{{ 301 300 #!html 302 <h1 style="text-align: right; color: blue">HTML テスト</h1>303 }}} 304 305 例:301 <h1 style="text-align: right; color: blue">HTML Test</h1> 302 }}} 303 304 Example: 306 305 {{{ 307 306 #!html … … 317 316 }}} 318 317 319 表示内容:318 Display: 320 319 {{{ 321 320 #!python … … 336 335 }}} 337 336 338 より詳細な情報は WikiProcessors に記載されています。 339 340 341 == その他==342 343 4 文字以上のハイフン (-) は水平ライン (<hr>) に置き換えられます。 344 345 例:337 See WikiProcessors for more information. 338 339 340 == Miscellaneous == 341 342 Four or more dashes will be replaced by a horizontal line (<HR>) 343 344 Example: 346 345 {{{ 347 346 ---- 348 347 }}} 349 348 350 表示内容:349 Display: 351 350 ---- 352 351