「ヘルプ:トランスクルージョン」の版間の差分

削除された内容 追加された内容
Sat.d.h. (トーク | 投稿記録)
Sat.d.h. (トーク | 投稿記録)
85行目:
連続する節がページの途中で終わるときは、追加的引数が両方一度に必要になるかもしれません。
 
== 単一の節をトランスクルージョンする方法 ==
==How to transclude single-section==
論理的な単一の節が単一のPage:のコンテンツ内で開始・終了しているときは、ページのコンテンツから関連する節のみをトランスクルージョンするのが望ましいです。
If a single logical section begins and ends within the content of a single <tt>Page:</tt>, it is desirable to transclude only the relevant section from the page content.
 
こちらも[[:mw:Extension:Labeled Section Transclusion|Labeled Section Transclusion]]によって実現できます。繰り返しますが、ページのコンテンツの関連部の開始箇所と終了箇所をsectionタグで印づけ、それからトランスクルージョン時に、ページ全体でなく、マークした部分のみ呼び出されます。
This is also accomplished by using [[:mw:Extension:Labeled Section Transclusion|Labeled Section Transclusion]] (LST).
Again, the relevant part of the page's content is marked with a begining & ending section tag and then, upon transclusion, only the marked part of the page, rather than the entire page, is called.
 
"<tt>Page:</tt>"名前空間内の節に印づけをするには、以下の構文を校正中の文章に挿入して、節A(節Aのコンテンツが単一の<tt>Page:</tt>内にある場合)の開始箇所と終了箇所にラベル付けをします:
To mark sections in the "<tt>Page:</tt>" namespace, insert the following syntax into the typed proofreading text to label the start & end of Section A (where Section A's content is found witin the content of a single <tt>Page:</tt>):
*<code><nowiki><section begin="sectionA" />This is Section これが節A text.の文章です。<section end="sectionA" /></nowiki></code>
 
基本的方法が3つ、またそのそれぞれにいくつかの追加的ヴァリエーションがあります。それによって一の節のコンテンツ(単一ページ内)をトランスクルージョンすることができます。&#60;pages&#62;タグ機能、{{tl|Page}}テンプレート、および#sectionタグ・パーサーです。
There are three basic methods, with a few additional variations per each method, which can accomplish single-section content (found within a single page) transclusions. These are the &#60;pages&#62; tag function, the {{tl|Page}} template, and the #section tag parser.
 
ほとんどの場合は、the &#60;pages&#62;タグが単一の節をトランスクルージョンする最善の方法です。構文は以下のとおりです。
In most instances, the &#60;pages&#62; tag is the best method of transcluding a single section. The syntax is as follows:
*<code>&#60;pages index="file_name.djvu" from="20" to="20" onlysection="sectionA" /&#62;</code>
::::(この例において、''ページ範囲''が単一ページから成り立っています;''20ページ'')
::::(In this case, the ''page range'' consists of a single page; ''page 20'')
:*'''onlysection'''がトランスクルージョンしたいコンテンツを含むsectionタグに割り当てられたラベル名です。
:*'''onlysection''' is the label name assigned to the section tags containing the desired content.
 
''上記がコミュニティ内で広く認められている推奨される設定です''。
''From May 2012 forward the above is the recognized community recommended preference''.
 
=== 有効だが非推奨 ===
===Working, though deprecated===
You may also use the {{tl|Page}} template as follows, replacing "'''djvu'''" with the djvu file name and "'''#'''" with the page number where the text appears:
*<code><nowiki>{{Page|djvu/#|section=sectionA}}</nowiki></code>