Changes between Version 5 and Version 6 of WikiFormatting


Ignore:
Timestamp:
Jan 28, 2010, 4:25:37 AM (14 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiFormatting

    v5 v6  
    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
    8382   * Item 1.1
     83      * Item 1.1.1   
     84      * Item 1.1.2
     85      * Item 1.1.3
     86   * Item 1.2
    8487 * Item 2
    8588
     
    9093      i. Item 1.b.ii
    9194 1. Item 2
    92 番号付きリストでは、番号を指定することもできます:
     95And numbered lists can also be given an explicit number:
    9396 3. Item 3
    9497}}}
    9598
    96 表示内容:
     99Display:
    97100 * Item 1
    98101   * Item 1.1
     102      * Item 1.1.1
     103      * Item 1.1.2
     104      * Item 1.1.3
     105   * Item 1.2
    99106 * Item 2
    100107
     
    105112      i. Item 1.b.ii
    106113 1. Item 2
    107 番号付きリストでは、番号を指定することもできます:
     114And numbered lists can also be given an explicit number:
    108115 3. Item 3
    109116
    110 リストマーカーの前にスペースを一つ以上置かなければなりません。スペースがない場合、通常のパラグラフとして扱われます。
    111 
    112 
    113 == 用語定義リスト ==
    114 
    115 
    116 Wikiは用語定義リストも作成できます。
    117 
    118 :
     117Note 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
     123The wiki also supports definition lists.
     124
     125Example:
    119126{{{
    120127 llama::
    121    毛の生えた哺乳類の一種。
     128   some kind of mammal, with hair
    122129 ppython::
    123    毛がない爬虫類の一種。
    124    (typoを見つけたかい?)
    125 }}}
    126 
    127 表示内容:
     130   some kind of reptile, without hair
     131   (can you spot the typo?)
     132}}}
     133
     134Display:
    128135 llama::
    129    毛の生えた哺乳類の一種。
     136   some kind of mammal, with hair
    130137 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
     141Note that you need a space in front of the defined term.
     142
     143
     144== Preformatted Text ==
     145
     146Block 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.
    140147 
    141 :
     148Example:
    142149{{{
    143150 {{{
     
    147154}}}
    148155
    149 表示内容:
     156Display:
    150157{{{
    151158 def HelloWorld():
     
    154161
    155162
    156 == 引用ブロック ==
    157 
    158 段落を引用ブロックとしてマークするには、段落を 2 個のスペースでインデントします。
    159 
    160 :
     163== Blockquotes ==
     164
     165In order to mark a paragraph as blockquote, indent that paragraph with two spaces.
     166
     167Example:
    161168{{{
    162169  This text is a quote from someone else.
    163170}}}
    164171
    165 表示内容:
     172Display:
    166173  This text is a quote from someone else.
    167174
    168 == 引用 ==
    169 
    170 進行中の議題のスレッド、チケットのコメントエリアなどで引用を表すために、メールライクな引用マーク (">", ">>" など) が使用できます。
    171 
    172 :
     175== Discussion Citations ==
     176
     177To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e-mail-like citation marks (">", ">>", etc.) may be used. 
     178
     179Example:
    173180{{{
    174181>> Someone's original text
     
    177184}}}
    178185
    179 表示内容:
     186Display:
    180187>> Someone's original text
    181188> Someone else's reply text
    182189My reply text
    183190
    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
     195Simple tables can be created like this:
    189196{{{
    190197||Cell 1||Cell 2||Cell 3||
     
    192199}}}
    193200
    194 表示内容:
     201Display:
    195202||Cell 1||Cell 2||Cell 3||
    196203||Cell 4||Cell 5||Cell 6||
    197204
    198 より複雑なテーブルは [wiki:WikiRestructuredText#より大きいReSTの例 reStructuredText]
    199 を使用して書くことができます。
    200 
    201 
    202 == リンク ==
    203 
    204 WikiPageNames や URL は自動的にハイパーリンクされます。 !WikiPageLinks を無効化したい場合、 {{{!WikiPageLink}}} のように、エクスクラメーションマーク (!) を語頭に置きます。
    205 
    206 :
     205Note that more complex tables can be created using
     206[wiki:WikiRestructuredText#BiggerReSTExample reStructuredText].
     207
     208
     209== Links ==
     210
     211Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.
     212
     213Example:
    207214{{{
    208215 TitleIndex, http://www.edgewall.com/, !NotAlink
    209216}}}
    210217
    211 表示内容:
     218Display:
    212219 TitleIndex, http://www.edgewall.com/, !NotAlink
    213220
    214 リンク先そのものでなくリンク先の内容説明やタイトルを表示させたい場合、角括弧 (square bracket) で括り、リンクに続いて 1 文字の空白を開けて記述します。もし説明のタイトルが省略された場合、そして明確なプレフィックスが記述されなかったとき、外部へのリンクにはなりません。これは WikiPageNames の仕様に準拠できない Wiki ページを使いたい場合に役に立ちます。
    215 
    216 :
     221Links 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
     223Example:
    217224{{{
    218225 * [http://www.edgewall.com/ Edgewall Software]
     
    221228}}}
    222229
    223 表示内容:
     230Display:
    224231 * [http://www.edgewall.com/ Edgewall Software]
    225232 * [wiki:TitleIndex Title Index]
    226233 * [wiki:ISO9000]
    227234
    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
     237Wiki 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
    236242 * ...
    237243}}}
    238244
    239 表示内容:
    240  * チケット: #1 もしくは ticket:1
    241  * レポート: {1} もしくは report:1
    242  * チェンジセット: [1] もしくは changeset:1
     245Display:
     246 * Tickets: #1 or ticket:1
     247 * Reports: {1} or report:1
     248 * Changesets: r1, [1] or changeset:1
    243249 * ...
    244250
    245 より深い情報は TracLinks に記述されています。
    246 
    247 
    248 == リンクの無効化 ==
    249 
    250 エクスクラメーションマーク (!) を語頭に付与することで、 TracLinks が出力するハイパーリンクを無効化できます。
    251 
    252 :
     251There are many more flavors of Trac links, see TracLinks for more in-depth information.
     252
     253
     254== Escaping Links and WikiPageNames ==
     255
     256You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).
     257
     258Example:
    253259{{{
    254260 !NoHyperLink
    255  !#42 はリンクではありません。
    256 }}}
    257 
    258 表示内容:
     261 !#42 is not a link
     262}}}
     263
     264Display:
    259265 !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
     271Urls ending with `.png`, `.gif` or `.jpg` are no longer automatically interpreted as image links, and converted to `<img>` tags.
     272
     273You 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
     275In 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
     281Example display: [[Image(htdocs:../common/trac_logo_mini.png)]]
     282
     283
     284See WikiMacros for further documentation on the `[[Image()]]` macro.
     285
     286
     287== Macros ==
     288
     289Macros are ''custom functions'' to insert dynamic content in a page.
     290
     291Example:
     292{{{
     293 [[RecentChanges(Trac,3)]]
     294}}}
     295
     296Display:
     297 [[RecentChanges(Trac,3)]]
     298
     299See WikiMacros for more information, and a list of installed macros.
     300
     301
     302== Processors ==
     303
     304Trac supports alternative markup formats using WikiProcessors. For example, processors are used to write pages in
     305[wiki:WikiRestructuredText reStructuredText] or [wiki:WikiHtml HTML].
     306
     307Example 1:
    291308{{{
    292309#!html
    293310<pre class="wiki">{{{
    294311#!html
    295 &lt;h1 style="text-align: right; color: blue"&gt;HTMLテスト&lt;/h1&gt;
     312&lt;h1 style="text-align: right; color: blue"&gt;HTML Test&lt;/h1&gt;
    296313}}}</pre>
    297314}}}
    298315
    299 表示内容:
     316Display:
    300317{{{
    301318#!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
     322Example:
    306323{{{
    307324#!html
     
    317334}}}
    318335
    319 表示内容:
     336Display:
    320337{{{
    321338#!python
     
    336353}}}
    337354
    338 より詳細な情報は WikiProcessors に記載されています。
    339 
    340 
    341 == その他 ==
    342 
    343 4 文字以上のハイフン (-) は水平ライン (<hr>) に置き換えられます。
    344 
    345 例:
     355See WikiProcessors for more information.
     356
     357
     358== Comments ==
     359
     360Comments 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
     364Your comment here
     365}}}
     366}}}
     367
     368
     369== Miscellaneous ==
     370
     371Four or more dashes will be replaced by a horizontal line (<HR>)
     372
     373Example:
    346374{{{
    347375 ----
    348376}}}
    349377
    350 表示内容:
     378Display:
    351379----
     380
    352381
    353382