Template:Testcases side by side

テンプレートの解説[表示] [編集] [履歴] [キャッシュを破棄]

テンプレートのテストケースページでテンプレートとサンドボックスを並べて比較するためのテンプレートです。

使用法[編集]

{{ Testcases side by side
| {{Template 1 |パラメータ1 |パラメータ2 |etc}}
| {{Template 1/sandbox |パラメータ1 |パラメータ2 |etc}}
}}

パラメータ[編集]

3種類の名無しパラメータが使用可能で、1番めにテンプレートの全構文を指定し、2番めにテンプレートサンドボックスの全構文を指定します。3番めは比較表を真ん中で表示させたい時に|centerと入力するのに使用します。

名前のあるパラメータは以下のとおり:

  • t1: 左に表示するテンプレート名。{{tl}}を使用して表示。既定値は{{BASEPAGENAME}}です。
  • t2: 右に表示するテンプレート名。{{tl}}を使用して表示。既定値は{{BASEPAGENAME}}/sandboxです。
  • t3: 左に表示するテンプレートのタイトルでt1を上書きする時、|t3=と書いて指定します。空表記の場合はテンプレートのタイトルは表示されません。
  • t4: 右に表示するテンプレートのタイトルでt2を上書きする時、|t4=と書いて指定します。空表記の場合はテンプレートのタイトルは表示されません。
  • box=y: 幅を90%狭め、テンプレート表示部の周囲を点線で囲うボックスを生成します。
  • title:既定値である「並べて表示」以外のタイトルを|title=と書いて指定します。空表記の場合タイトルは表示されません。

使用例:

使用例を表示

基本的なテンプレートのオリジナルとサンドボックスの比較表示

{{ testcases side by side|t1=cite book|t2=cite book/sandbox
|{{Cite book |last = Lunde |first = Ken |year = 1999 |title = CJKV Information Processing |publisher = O'Reilly & Associates |location = Sebastopol, California |isbn = 1-56592-224-7 |ref = harv}}
|{{cite book/sandbox |last = Lunde |first = Ken |year = 1999 |title = CJKV Information Processing |publisher = O'Reilly & Associates |location = Sebastopol, California |isbn = 1-56592-224-7 |ref = harv}}
}}
並べて比較
{{cite book}} {{cite book/sandbox}}
Lunde, Ken (1999). CJKV Information Processing. Sebastopol, California: O'Reilly & Associates. ISBN 1-56592-224-7  Lunde, Ken (1999). CJKV Information Processing. Sebastopol, California: O'Reilly & Associates. ISBN 1-56592-224-7 

ボックスで囲み

{{testcases side by side|t1=cite book|t2=cite book/sandbox|box=y|title=
|{{Cite book |last = Lunde |first = Ken |year = 1999 |title = CJKV Information Processing |publisher = O'Reilly & Associates |location = Sebastopol, California |isbn = 1-56592-224-7 |ref = harv}}
|{{cite book/sandbox |last = Lunde |first = Ken |year = 1999 |title = CJKV Information Processing |publisher = O'Reilly & Associates |location = Sebastopol, California |isbn = 1-56592-224-7 |ref = harv}}
{{cite book}} {{cite book/sandbox}}
Lunde, Ken (1999). CJKV Information Processing. Sebastopol, California: O'Reilly & Associates. ISBN 1-56592-224-7  Lunde, Ken (1999). CJKV Information Processing. Sebastopol, California: O'Reilly & Associates. ISBN 1-56592-224-7 

テンプレートのタイトルを指定し、<wiki>を使って入力結果を表示

入力 表示
{{Cite book |last = Lunde |first = Ken |year = 1999 |title = CJKV Information Processing |publisher = O'Reilly & Associates |location = Sebastopol, California |isbn = 1-56592-224-7 |ref = harv}} Lunde, Ken (1999). CJKV Information Processing. Sebastopol, California: O'Reilly & Associates. ISBN 1-56592-224-7 

TemplateData[編集]

これはビジュアルエディターテンプレートウィザードにより使用されるテンプレートのためのTemplateData文書です。

Testcases side by side

テンプレートのテストケースページでテンプレートとサンドボックスを並べて比較します。

テンプレートパラメーター[テンプレートデータを編集]

パラメーター説明状態
11

テンプレートの全構文

必須
22

テンプレートサンドボックスの全構文を指定します。

必須
33 align

表示位置(中央に表示させたい時は center を入力します)

省略可能
t1t1

左に表示するテンプレート名。{{tl}}を使用して表示します。

既定
{{BASEPAGE}}
省略可能
t2t2

右に表示するテンプレート名。{{tl}}を使用して表示します。

既定
{{BASEPAGENAME}}/sandbox
省略可能
t3t3

左に表示するテンプレート名。

省略可能
t4t4

右に表示するテンプレート名。

省略可能
boxbox

表示スタイル。空文字列以外にすると、幅を90%狭め、テンプレート表示部の周囲を点線で囲うボックスを生成します。

y
省略可能
キャプションtitle

テーブルのキャプション

既定
並べて表示
省略可能

関連項目[編集]