Changes between Version 3 and Version 4 of WikiProcessors
- Timestamp:
- Dec 31, 2005, 5:43:43 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiProcessors
v3 v4 1 = Wiki Processors=2 Processors are WikiMacros designed to provide alternative markup formats for the Trac Wiki engine. Processors can be thought of as ''macro functions to process user-edited text''. 1 = Wiki プロセッサ = 2 プロセッサは Trac の Wiki エンジンが、 Wiki 以外のフォーマットを提供するために設計された WikiMacros です。プロセッサは、 ''ユーザが編集したテキストを処理するマクロ機能'' と考えることができます。 3 3 4 T he wiki engine uses processors to allow using [wiki:WikiRestructuredText Restructured Text] and [wiki:WikiHtml raw HTML] in any wiki text throughout Trac.4 Trac 内の全ての Wiki テキストにおいて、 [wiki:WikiRestructuredText Restructured Text] および [wiki:WikiHtml raw HTML] をプロセッサとして使用することができます。 5 5 6 == Using Processors == 7 To use a processor on a block of text, use a wiki blockquote, selecting a processor by name using ''shebang notation'' (#!), familiar to most UNIX users from scripts. 6 テキストブロックでプロセッサを使うには、 Wiki の引用ブロックを使用し、プロセッサの名前を (Unix 系 OS のスクリプトのように) ''shebang 行'' (#!) に続いて指定します。 8 7 9 ''' Example 1''' (''inserting raw HTML in a wiki text''):8 '''例1''' (''Wiki テキストに 生 HTML を挿入する''): 10 9 11 10 {{{ … … 13 12 <pre class="wiki">{{{ 14 13 #!html 15 <h1 style="color: orange"> This is raw HTML</h1>14 <h1 style="color: orange">これは生 HTML です</h1> 16 15 }}}</pre> 17 16 }}} 18 17 19 ''' Results in:'''18 '''結果、このように表示されます:''' 20 19 {{{ 21 20 #!html 22 <h1 style="color: orange"> This is raw HTML</h1>21 <h1 style="color: orange">これは生 HTML です</h1> 23 22 }}} 24 23 25 24 ---- 26 25 27 ''' Example 2''' (''inserting Restructured Text in wiki text''):26 '''例2''' (''Wiki テキストに !ReStructured テキストを挿入する''): 28 27 29 28 {{{ … … 31 30 <pre class="wiki">{{{ 32 31 #!rst 33 A header 34 ------ --35 This is some **text** with a footnote [*]_. 32 見出し 33 ------ 34 脚注 [*]_ 付きの **text** です。 36 35 37 .. [*] This is the footnote.36 .. [*] ここは脚注。 38 37 }}}</pre> 39 38 }}} 40 39 41 ''' Results in:'''40 '''結果、このように表示されます:''' 42 41 {{{ 43 42 #!rst 44 A header 45 ------ --46 This is some **text** with a footnote [*]_. 43 見出し 44 ------ 45 脚注 [*]_ 付きの **text** です。 47 46 48 .. [*] This is the footnote.47 .. [*] ここは脚注。 49 48 }}} 49 (訳注: !ReStructuredText は国際化が甘いので、使えないかもしれません) 50 50 ---- 51 ''' Example 3''' (''inserting a block of C source code in wiki text''):51 '''例3''' (''Wiki テキストに C 言語ソースコードブロックを挿入する''): 52 52 53 53 {{{ … … 63 63 }}} 64 64 65 ''' Results in:'''65 '''結果、このように表示されます:''' 66 66 {{{ 67 67 #!c … … 75 75 ---- 76 76 77 == Available Processors==78 The following processors are included in the Trac distribution:79 * '''html''' -- Insert custom HTML in a wiki page. See WikiHtml.80 * '''rst''' -- Trac support for Restructured Text. See WikiRestructuredText.81 * '''textile''' -- Supported if [http://dealmeida.net/projects/textile/ Textile] is installed.77 == 利用可能なプロセッサ == 78 以下のプロセッサが Trac の配布に含まれています: 79 * '''html''' -- Wiki ページにカスタム HTML を挿入する。 WikiHtml を参照してください。 80 * '''rst''' -- Restructured テキスト を Trac でサポートする。 WikiRestructuredText を参照してください。 81 * '''textile''' -- [http://dealmeida.net/projects/textile/ Textile] がインストールされていれば、サポートされます。 82 82 83 === Code Highlighting Support===84 Trac includes processors to provide inline [wiki:TracSyntaxColoring syntax highlighting] for the following languages:83 === ソースコードの強調表示サポート === 84 Trac では、以下のプログラミング言語でのインライン [wiki:TracSyntaxColoring syntax ハイライト] を行うプロセッサを内蔵しています。 85 85 * '''c''' -- C 86 86 * '''cpp''' -- C++ … … 92 92 * '''sql''' -- SQL 93 93 * '''xml''' -- XML 94 '''Note:''' ''Trac relies on external software packages for syntax coloring. See TracSyntaxColoring for more info.''94 '''Note:''' ''Trac はシンタックスの色付けを、外部のソフトウェアパッケージに依存しています。詳しくは TracSyntaxColoring をご覧下さい。'' 95 95 96 By using the MIME type as processor, it is possible to syntax-highlight the same languages that are supported when browsing source code. For example, you can write:96 プロセッサとして mime-type が指定されると、ソースコードをブラウズするときと同じく、サポートされている言語であれば、シンタックスハイライトを行うことができます。例えば、以下のように書くと: 97 97 {{{ 98 98 {{{ … … 102 102 }}} 103 103 104 The result will be syntax highlighted HTML code. The same is valid for all other mime types supported. 104 この結果はシンタックスハイライトされた HTML コードになります。サポートされている全ての mime-type でも、これは同じく有効です。 105 105 106 106 107 For more processor macros developed and/or contributed by users, visit: 107 ユーザによるプロセッサマクロの開発やコントリビュート: 108 108 * [http://projects.edgewall.com/trac/wiki/ProcessorBazaar ProcessorBazaar] 109 109 * [http://projects.edgewall.com/trac/wiki/MacroBazaar MacroBazaar] 110 110 111 111 112 == Advanced Topics: Developing Processor Macros==113 Developing processors is no different than WikiMacros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information. 112 == 上級トピック: プロセッサマクロを開発する == 113 プロセッサの開発は WikiMacros と違いはありません。事実、これらは同じような機能を持ち、シンタックスだけが異なります。詳しくは WikiMacros に記述します。 114 114 115 ''' Example:''' (''Restructured Text Processor''):115 '''例:''' (''Restructured テキストプロセッサ''): 116 116 {{{ 117 117 from docutils.core import publish_string