Changes between Version 5 and Version 6 of WikiFormatting
- Timestamp:
- Jan 28, 2010, 4:25:37 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiFormatting
v5 v6 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 83 82 * Item 1.1 83 * Item 1.1.1 84 * Item 1.1.2 85 * Item 1.1.3 86 * Item 1.2 84 87 * Item 2 85 88 … … 90 93 i. Item 1.b.ii 91 94 1. Item 2 92 番号付きリストでは、番号を指定することもできます:95 And numbered lists can also be given an explicit number: 93 96 3. Item 3 94 97 }}} 95 98 96 表示内容:99 Display: 97 100 * Item 1 98 101 * Item 1.1 102 * Item 1.1.1 103 * Item 1.1.2 104 * Item 1.1.3 105 * Item 1.2 99 106 * Item 2 100 107 … … 105 112 i. Item 1.b.ii 106 113 1. Item 2 107 番号付きリストでは、番号を指定することもできます:114 And numbered lists can also be given an explicit number: 108 115 3. Item 3 109 116 110 リストマーカーの前にスペースを一つ以上置かなければなりません。スペースがない場合、通常のパラグラフとして扱われます。 111 112 113 == 用語定義リスト==114 115 116 Wikiは用語定義リストも作成できます。 117 118 例:117 Note that there must be one or more spaces preceding the list item markers, otherwise the list will be treated as a normal paragraph. 118 119 120 == Definition Lists == 121 122 123 The wiki also supports definition lists. 124 125 Example: 119 126 {{{ 120 127 llama:: 121 毛の生えた哺乳類の一種。128 some kind of mammal, with hair 122 129 ppython:: 123 毛がない爬虫類の一種。124 ( typoを見つけたかい?)125 }}} 126 127 表示内容:130 some kind of reptile, without hair 131 (can you spot the typo?) 132 }}} 133 134 Display: 128 135 llama:: 129 毛の生えた哺乳類の一種。136 some kind of mammal, with hair 130 137 ppython:: 131 毛がない爬虫類の一種。132 ( typoを見つけたかい?)133 134 定義する用語の前にスペースが一つ必要なことを忘れないで下さい。 135 136 137 == 整形済みテキスト==138 139 整形済みテキストを含むブロックは、ソースコードの一部や、ノート、例示に適しています。引用ブロックとしたいテキストの前後を、 3 つの ''ブレース (curly braces)'' で括ってください。ブレースは独立した行に置かなければいけません。 138 some kind of reptile, without hair 139 (can you spot the typo?) 140 141 Note that you need a space in front of the defined term. 142 143 144 == Preformatted Text == 145 146 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 147 141 例:148 Example: 142 149 {{{ 143 150 {{{ … … 147 154 }}} 148 155 149 表示内容:156 Display: 150 157 {{{ 151 158 def HelloWorld(): … … 154 161 155 162 156 == 引用ブロック==157 158 段落を引用ブロックとしてマークするには、段落を 2 個のスペースでインデントします。 159 160 例:163 == Blockquotes == 164 165 In order to mark a paragraph as blockquote, indent that paragraph with two spaces. 166 167 Example: 161 168 {{{ 162 169 This text is a quote from someone else. 163 170 }}} 164 171 165 表示内容:172 Display: 166 173 This text is a quote from someone else. 167 174 168 == 引用==169 170 進行中の議題のスレッド、チケットのコメントエリアなどで引用を表すために、メールライクな引用マーク (">", ">>" など) が使用できます。 171 172 例:175 == Discussion Citations == 176 177 To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 178 179 Example: 173 180 {{{ 174 181 >> Someone's original text … … 177 184 }}} 178 185 179 表示内容:186 Display: 180 187 >> Someone's original text 181 188 > Someone else's reply text 182 189 My reply text 183 190 184 ''Note: いくつかの WikiFormatting の要素、 表やあらかじめ整形されたテキストは引用エリアでは整形が崩れてしまいます。きれいな引用を作るには再整形が必要になるでしょう。''185 186 == 表==187 188 簡単なテーブルはこのように記述します:191 ''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.'' 192 193 == Tables == 194 195 Simple tables can be created like this: 189 196 {{{ 190 197 ||Cell 1||Cell 2||Cell 3|| … … 192 199 }}} 193 200 194 表示内容:201 Display: 195 202 ||Cell 1||Cell 2||Cell 3|| 196 203 ||Cell 4||Cell 5||Cell 6|| 197 204 198 より複雑なテーブルは [wiki:WikiRestructuredText#より大きいReSTの例 reStructuredText] 199 を使用して書くことができます。 200 201 202 == リンク==203 204 WikiPageNames や URL は自動的にハイパーリンクされます。 !WikiPageLinks を無効化したい場合、 {{{!WikiPageLink}}} のように、エクスクラメーションマーク (!) を語頭に置きます。 205 206 例:205 Note that more complex tables can be created using 206 [wiki:WikiRestructuredText#BiggerReSTExample reStructuredText]. 207 208 209 == Links == 210 211 Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}. 212 213 Example: 207 214 {{{ 208 215 TitleIndex, http://www.edgewall.com/, !NotAlink 209 216 }}} 210 217 211 表示内容:218 Display: 212 219 TitleIndex, http://www.edgewall.com/, !NotAlink 213 220 214 リンク先そのものでなくリンク先の内容説明やタイトルを表示させたい場合、角括弧 (square bracket) で括り、リンクに続いて 1 文字の空白を開けて記述します。もし説明のタイトルが省略された場合、そして明確なプレフィックスが記述されなかったとき、外部へのリンクにはなりません。これは WikiPageNames の仕様に準拠できない Wiki ページを使いたい場合に役に立ちます。 215 216 例:221 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. 222 223 Example: 217 224 {{{ 218 225 * [http://www.edgewall.com/ Edgewall Software] … … 221 228 }}} 222 229 223 表示内容:230 Display: 224 231 * [http://www.edgewall.com/ Edgewall Software] 225 232 * [wiki:TitleIndex Title Index] 226 233 * [wiki:ISO9000] 227 234 228 229 === Trac リンク === 230 231 Wiki ページでは Trac の他のコンポーネントに直接リンクできます。チケット、レポート、チェンジセット、マイルストーン、ソースファイル、他の Wiki ページへは以下のようにリンクを記述します: 232 {{{ 233 * チケット: #1 もしくは ticket:1 234 * レポート: {1} もしくは report:1 235 * チェンジセット: [1] もしくは changeset:1 235 == Trac Links == 236 237 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: 238 {{{ 239 * Tickets: #1 or ticket:1 240 * Reports: {1} or report:1 241 * Changesets: r1, [1] or changeset:1 236 242 * ... 237 243 }}} 238 244 239 表示内容:240 * チケット: #1 もしくはticket:1241 * レポート: {1} もしくはreport:1242 * チェンジセット: [1] もしくはchangeset:1245 Display: 246 * Tickets: #1 or ticket:1 247 * Reports: {1} or report:1 248 * Changesets: r1, [1] or changeset:1 243 249 * ... 244 250 245 より深い情報は TracLinks に記述されています。 246 247 248 == リンクの無効化==249 250 エクスクラメーションマーク (!) を語頭に付与することで、 TracLinks が出力するハイパーリンクを無効化できます。 251 252 例:251 There are many more flavors of Trac links, see TracLinks for more in-depth information. 252 253 254 == Escaping Links and WikiPageNames == 255 256 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark). 257 258 Example: 253 259 {{{ 254 260 !NoHyperLink 255 !#42 はリンクではありません。256 }}} 257 258 表示内容:261 !#42 is not a link 262 }}} 263 264 Display: 259 265 !NoHyperLink 260 !#42 はリンクではありません。 261 262 263 == 画像 == 264 265 URL が `.png`, `.gif` or `.jpg` で終わっている場合、自動的にイメージへのリンクとはならずに `<img>` タグに変換されます。 266 267 ![[Image]] マクロを使用しなければなりません (以下参照) 。 268 269 270 == マクロ == 271 272 マクロは、動的コンテンツを Wiki ページに挿入するための ''カスタム関数'' です。 273 274 例: 275 {{{ 276 [[Timestamp]] 277 }}} 278 279 表示内容: 280 [[Timestamp]] 281 282 使用方法とインストールされているマクロの一覧は WikiMacros に記述されています。 283 284 285 == プロセッサ == 286 287 Trac は WikiProcessors の機能によって、 Wiki 以外のマークアップにも対応しています。例えば、プロセッサとしてページの描画に 288 [wiki:WikiRestructuredText reStructuredText] や [wiki:WikiHtml HTML] を使用することができます。 289 290 例1: 266 !#42 is not a link 267 268 269 == Images == 270 271 Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags. 272 273 You now have to use the ![[Image]] macro. The simplest way to include an image is to upload it as attachment to the current page, and put the filename in a macro call like `[[Image(picture.gif)]]`. 274 275 In addition to the current page, it is possible to refer to other resources: 276 * `[[Image(wiki:WikiFormatting:picture.gif)]]` (referring to attachment on another page) 277 * `[[Image(ticket:1:picture.gif)]]` (file attached to a ticket) 278 * `[[Image(htdocs:picture.gif)]]` (referring to a file inside project htdocs) 279 * `[[Image(source:/trunk/trac/htdocs/trac_logo_mini.png)]]` (a file in repository) 280 281 Example display: [[Image(htdocs:../common/trac_logo_mini.png)]] 282 283 284 See WikiMacros for further documentation on the `[[Image()]]` macro. 285 286 287 == Macros == 288 289 Macros are ''custom functions'' to insert dynamic content in a page. 290 291 Example: 292 {{{ 293 [[RecentChanges(Trac,3)]] 294 }}} 295 296 Display: 297 [[RecentChanges(Trac,3)]] 298 299 See WikiMacros for more information, and a list of installed macros. 300 301 302 == Processors == 303 304 Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in 305 [wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML]. 306 307 Example 1: 291 308 {{{ 292 309 #!html 293 310 <pre class="wiki">{{{ 294 311 #!html 295 <h1 style="text-align: right; color: blue">HTML テスト</h1>312 <h1 style="text-align: right; color: blue">HTML Test</h1> 296 313 }}}</pre> 297 314 }}} 298 315 299 表示内容:316 Display: 300 317 {{{ 301 318 #!html 302 <h1 style="text-align: right; color: blue">HTML テスト</h1>303 }}} 304 305 例:319 <h1 style="text-align: right; color: blue">HTML Test</h1> 320 }}} 321 322 Example: 306 323 {{{ 307 324 #!html … … 317 334 }}} 318 335 319 表示内容:336 Display: 320 337 {{{ 321 338 #!python … … 336 353 }}} 337 354 338 より詳細な情報は WikiProcessors に記載されています。 339 340 341 == その他 == 342 343 4 文字以上のハイフン (-) は水平ライン (<hr>) に置き換えられます。 344 345 例: 355 See WikiProcessors for more information. 356 357 358 == Comments == 359 360 Comments can be added to the plain text. These will not be rendered and will not display in any other format than plain text. 361 {{{ 362 {{{ 363 #!comment 364 Your comment here 365 }}} 366 }}} 367 368 369 == Miscellaneous == 370 371 Four or more dashes will be replaced by a horizontal line (<HR>) 372 373 Example: 346 374 {{{ 347 375 ---- 348 376 }}} 349 377 350 表示内容:378 Display: 351 379 ---- 380 352 381 353 382