Changes between Version 1 and Version 2 of WikiFormatting


Ignore:
Timestamp:
Jun 21, 2008, 6:11:58 PM (16 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v1 v2  
    1 = Wiki 文法 =
     1= WikiFormatting =
    22[[TracGuideToc]]
    33
    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 Trac の Wiki は以下のフォント書式に対応しています:
    16 {{{
    17  * '''ボールド''', '''!''' ボールドにできます''' そして '''! '''
    18  * ''イタリック''
    19  * '''''ボールドイタリック'''''
    20  * __アンダーライン__
    21  * {{{モノスペース}}} or `モノスペース`
    22  * ~~取り消し線~~
    23  * ^上付き文字^
    24  * ,,下付き文字,,
    25 }}}
    26 
    27 表示内容:
    28  * '''ボールド''', '''!''' ボールドにできます''' そして '''! '''
    29  * ''イタリック''
    30  * '''''ボールドイタリック'''''
    31  * __アンダーライン__
    32  * {{{モノスペース}}} or `モノスペース`
    33  * ~~取り消し線~~
    34  * ^上付き文字^
    35  * ,,下付き文字,,
     4Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole.
     5
     6Trac 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,
     7especially [http://moinmoin.wikiwikiweb.de/ MoinMoin].
     8
     9
     10This page demonstrates the formatting syntax available anywhere WikiFormatting is allowed.
     11
     12
     13== Font Styles ==
     14
     15The 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
     27Display:
     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,,
    3636
    3737Notes:
    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
     43You can create heading by starting a line with one up to five ''equal'' characters ("=")
     44followed by a single space and the headline text. The line should end with a space
     45followed by the same number of ''='' characters.
     46The heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated.
     47
     48Example:
     49{{{
     50= Heading =
     51== Subheading ==
     52=== About ''this'' ===
     53=== Explicit id === #using-explicit-id-in-heading
     54}}}
     55
     56Display:
     57= Heading =
     58== Subheading ==
     59=== About ''this'' ===
     60=== Explicit id === #using-explicit-id-in-heading
     61
     62== Paragraphs ==
     63
     64A new text paragraph is created whenever two blocks of text are separated by one or more empty lines.
     65
     66A forced line break can also be inserted, using:
     67{{{
     68Line 1[[BR]]Line 2
     69}}}
     70Display:
     71
     72Line 1[[BR]]Line 2
     73
     74
     75== Lists ==
     76
     77The wiki supports both ordered/numbered and unordered lists.
     78
     79Example:
    8180{{{
    8281 * Item 1
     
    9089      i. Item 1.b.ii
    9190 1. Item 2
    92 番号付きリストでは、番号を指定することもできます:
     91And numbered lists can also be given an explicit number:
    9392 3. Item 3
    9493}}}
    9594
    96 表示内容:
     95Display:
    9796 * Item 1
    9897   * Item 1.1
     
    105104      i. Item 1.b.ii
    106105 1. Item 2
    107 番号付きリストでは、番号を指定することもできます:
     106And numbered lists can also be given an explicit number:
    108107 3. Item 3
    109108
    110 リストマーカーの前にスペースを一つ以上置かなければなりません。スペースがない場合、通常のパラグラフとして扱われます。
    111 
    112 
    113 == 用語定義リスト ==
    114 
    115 
    116 Wikiは用語定義リストも作成できます。
    117 
    118 :
     109Note 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
     115The wiki also supports definition lists.
     116
     117Example:
    119118{{{
    120119 llama::
    121    毛の生えた哺乳類の一種。
     120   some kind of mammal, with hair
    122121 ppython::
    123    毛がない爬虫類の一種。
    124    (typoを見つけたかい?)
    125 }}}
    126 
    127 表示内容:
     122   some kind of reptile, without hair
     123   (can you spot the typo?)
     124}}}
     125
     126Display:
    128127 llama::
    129    毛の生えた哺乳類の一種。
     128   some kind of mammal, with hair
    130129 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
     133Note that you need a space in front of the defined term.
     134
     135
     136== Preformatted Text ==
     137
     138Block 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.
    140139 
    141 :
     140Example:
    142141{{{
    143142 {{{
     
    147146}}}
    148147
    149 表示内容:
     148Display:
    150149{{{
    151150 def HelloWorld():
     
    154153
    155154
    156 == 引用ブロック ==
    157 
    158 段落を引用ブロックとしてマークするには、段落を 2 個のスペースでインデントします。
    159 
    160 :
     155== Blockquotes ==
     156
     157In order to mark a paragraph as blockquote, indent that paragraph with two spaces.
     158
     159Example:
    161160{{{
    162161  This text is a quote from someone else.
    163162}}}
    164163
    165 表示内容:
     164Display:
    166165  This text is a quote from someone else.
    167166
    168 == 引用 ==
    169 
    170 進行中の議題のスレッド、チケットのコメントエリアなどで引用を表すために、メールライクな引用マーク (">", ">>" など) が使用できます。
    171 
    172 :
     167== Discussion Citations ==
     168
     169To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 
     170
     171Example:
    173172{{{
    174173>> Someone's original text
     
    177176}}}
    178177
    179 表示内容:
     178Display:
    180179>> Someone's original text
    181180> Someone else's reply text
    182181My reply text
    183182
    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
     187Simple tables can be created like this:
    189188{{{
    190189||Cell 1||Cell 2||Cell 3||
     
    192191}}}
    193192
    194 表示内容:
     193Display:
    195194||Cell 1||Cell 2||Cell 3||
    196195||Cell 4||Cell 5||Cell 6||
    197196
    198 より複雑なテーブルは [wiki:WikiRestructuredText#より大きいReSTの例 reStructuredText]
    199 を使用して書くことができます。
    200 
    201 
    202 == リンク ==
    203 
    204 WikiPageNames や URL は自動的にハイパーリンクされます。 !WikiPageLinks を無効化したい場合、 {{{!WikiPageLink}}} のように、エクスクラメーションマーク (!) を語頭に置きます。
    205 
    206 :
     197Note that more complex tables can be created using
     198[wiki:WikiRestructuredText#BiggerReSTExample reStructuredText].
     199
     200
     201== Links ==
     202
     203Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.
     204
     205Example:
    207206{{{
    208207 TitleIndex, http://www.edgewall.com/, !NotAlink
    209208}}}
    210209
    211 表示内容:
     210Display:
    212211 TitleIndex, http://www.edgewall.com/, !NotAlink
    213212
    214 リンク先そのものでなくリンク先の内容説明やタイトルを表示させたい場合、角括弧 (square bracket) で括り、リンクに続いて 1 文字の空白を開けて記述します。もし説明のタイトルが省略された場合、そして明確なプレフィックスが記述されなかったとき、外部へのリンクにはなりません。これは WikiPageNames の仕様に準拠できない Wiki ページを使いたい場合に役に立ちます。
    215 
    216 :
     213Links 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
     215Example:
    217216{{{
    218217 * [http://www.edgewall.com/ Edgewall Software]
     
    221220}}}
    222221
    223 表示内容:
     222Display:
    224223 * [http://www.edgewall.com/ Edgewall Software]
    225224 * [wiki:TitleIndex Title Index]
     
    227226
    228227
    229 === Trac リンク ===
    230 
    231 Wiki ページでは Trac の他のコンポーネントに直接リンクできます。チケット、レポート、チェンジセット、マイルストーン、ソースファイル、他の Wiki ページへは以下のようにリンクを記述します:
    232 {{{
    233  * チケット: #1 もしくは ticket:1
    234  * レポート: {1} もしくは report:1
    235  * チェンジセット: [1] もしくは changeset:1
     228=== Trac Links ===
     229
     230Wiki 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
    236235 * ...
    237236}}}
    238237
    239 表示内容:
    240  * チケット: #1 もしくは ticket:1
    241  * レポート: {1} もしくは report:1
    242  * チェンジセット: [1] もしくは changeset:1
     238Display:
     239 * Tickets: #1 or ticket:1
     240 * Reports: {1} or report:1
     241 * Changesets: r1, [1] or changeset:1
    243242 * ...
    244243
    245 より深い情報は TracLinks に記述されています。
    246 
    247 
    248 == リンクの無効化 ==
    249 
    250 エクスクラメーションマーク (!) を語頭に付与することで、 TracLinks が出力するハイパーリンクを無効化できます。
    251 
    252 :
     244See TracLinks for more in-depth information.
     245
     246
     247== Escaping Links and WikiPageNames ==
     248
     249You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
     250
     251Example:
    253252{{{
    254253 !NoHyperLink
    255  !#42 はリンクではありません。
    256 }}}
    257 
    258 表示内容:
     254 !#42 is not a link
     255}}}
     256
     257Display:
    259258 !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 :
     259 !#42 is not a link
     260
     261
     262== Images ==
     263
     264Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags.
     265
     266You now have to use the ![[Image]] macro (see below).
     267
     268
     269== Macros ==
     270
     271Macros are ''custom functions'' to insert dynamic content in a page.
     272
     273Example:
    275274{{{
    276275 [[Timestamp]]
    277276}}}
    278277
    279 表示内容:
     278Display:
    280279 [[Timestamp]]
    281280
    282 使用方法とインストールされているマクロの一覧は WikiMacros に記述されています。
    283 
    284 
    285 == プロセッサ ==
    286 
    287 Trac は WikiProcessors の機能によって、 Wiki 以外のマークアップにも対応しています。例えば、プロセッサとしてページの描画に
    288 [wiki:WikiRestructuredText reStructuredText] や [wiki:WikiHtml HTML] を使用することができます。
    289 
    290 1:
     281See WikiMacros for more information, and a list of installed macros.
     282
     283
     284== Processors ==
     285
     286Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in
     287[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].
     288
     289Example 1:
    291290{{{
    292291#!html
    293292<pre class="wiki">{{{
    294293#!html
    295 &lt;h1 style="text-align: right; color: blue"&gt;HTMLテスト&lt;/h1&gt;
     294&lt;h1 style="text-align: right; color: blue"&gt;HTML Test&lt;/h1&gt;
    296295}}}</pre>
    297296}}}
    298297
    299 表示内容:
     298Display:
    300299{{{
    301300#!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
     304Example:
    306305{{{
    307306#!html
     
    317316}}}
    318317
    319 表示内容:
     318Display:
    320319{{{
    321320#!python
     
    336335}}}
    337336
    338 より詳細な情報は WikiProcessors に記載されています。
    339 
    340 
    341 == その他 ==
    342 
    343 4 文字以上のハイフン (-) は水平ライン (<hr>) に置き換えられます。
    344 
    345 :
     337See WikiProcessors for more information.
     338
     339
     340== Miscellaneous ==
     341
     342Four or more dashes will be replaced by a horizontal line (<HR>)
     343
     344Example:
    346345{{{
    347346 ----
    348347}}}
    349348
    350 表示内容:
     349Display:
    351350----
    352351