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

削除された内容 追加された内容
Sat.d.h. (トーク | 投稿記録)
Sat.d.h. (トーク | 投稿記録)
123行目:
より複雑なトランスクルージョンを使用することで、複数版の比較研究を表示することもできます。[[:en:Elegy I Comparative text]]では1633年印刷版の詩を1896年印刷版と比較しています。[[:en:Bible/Obadiah/1/1]]はLabeled Section Tranclustion (LST)を使用して、オバデヤ書1章1節の原語版を表示し、次にアングル語の翻訳を古いものから順に並べています。これらのより複雑な種類のトランスクルージョンは実際のところ一般的ではありません。ここで使用した例は、トランスクルージョンと以前の校正ページ拡張機能で何ができるかを確かめるための実験です。こんにち行うなら、すべてスキャンした版をもとにし、トランスクルージョンは ''Page:'' 名前空間から呼び出されます。
 
===Using the <nowiki><pages/></nowiki>機能を使う function===
Most of the time, the ほとんどの場合、<nowiki><pages/></nowiki> tag will be the best method of transcluding. There is only one required parameter, which is タグがトランスクルージョンの最善の方法です。要求される引数は'''index='''. This field must always be supplied or nothing happens. The exact pattern to use is as follows: 1つだけです。この欄には必ず入力しなければならず、そうしなければ何も起こりません。使用パターンは以下のとおりです:<code><nowiki><pages index="file name.djvu"/></nowiki></code> where the name 。このうち''file name.djvu'' is just a placeholder for whatever file you have used when proofreading.はただのプレースホルダーで、校正中に使っているファイル名が入力されます。
 
実際のファイル名で試してみましょう:
Try it out with a real file name: Copy
<blockquote><code><nowiki><pages index="Wind in the Willows (1913).djvu"/></nowiki></code></blockquote>
into [https://enja.wikisource.org/w/index.php?title=HelpWikisource:Transclusion/Sandbox%E3%82%B5%E3%83%B3%E3%83%89%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9&action=edit hereサンドボックス] and save. There is one other way to type this and have the same result. Try out にコピーして保存してください。これをタイプして入力しても同じ結果になります。<code><nowiki><pages index=Wind_in_the_Willows_(1913).djvu/></nowiki></code>. This works just the same. The important thing to know is that も試してみてください。これも全く同じ働きをします。知っておくべき重要なこととして<code><nowiki><pages index=Wind in the Willows (1913).djvu/></nowiki></code> will not work. If you use any spaces in the field, then you must also surround the field with quotation marksは機能しないでしょう。欄に空白文字を使う場合は欄を引用符 ("), or it will not work.で囲む必要もあり、そうしないと機能しないおそれがあります。
 
'''index='''欄は必ず入力しなければならない一方、他の引数を一切追加しない場合、この構文はファイルの目次しかトランスクルージョンしません。任意の引数の一部も入力すると必ず、目次が他のコマンドによって置換されます。これらの任意の引数の一部には、ペアとして一緒に使わないと機能しないものがあります。これらの欄の番号は''Page:''名前空間内の / の後ろの名目上の番号です。任意の引数は以下のとおりです。
While you always must supply the '''index=''' field, if you do not add any other parameters this syntax will only transclude the index of the file. Whenever you also supply some of the optional parameters, the index will be superseded by your other commands. Some of these optional parameters must be paired together in order to work. The numbers used in these fields are the titular number after the / in the ''Page:'' namespace. The optional parameters are as follows:
 
* '''include=''' にはトランスクルージョンするページ番号を入力します。
* '''include=''' to supply the numbers of the page(s) to be transcluded
*'''from=''' (''paired with '''to='''とペア'') to supply the number of the first page to be transcludedにはトランスクルージョンする最初のページを入力します。
*'''to=''' (''paired with '''from='''とペア'') to supply the number of the last page to be transcludedにはトランスクルージョンする最後のページを入力します。
*'''fromsection=''' (''paired with '''from='''/'''to=''' orまたは '''include=''' orまたは '''exclude=''' とペア'') to supply the initial anchor on the first page of the section当該節の始めのページの最初のアンカーを入力します。
*'''tosection=''' (''paired with '''from='''/'''to=''' orまたは '''include=''' orまたは '''exclude='''とペア'') to supply the final anchor on the last page of the section当該節の終わりのページの最後のアンカーを入力します。
*'''onlysection=''' (''paired with '''from='''/'''to=''' orまたは '''include=''' orまたは '''exclude='''とペア'') to supply the anchor used to mark off a section for transclusionトランスクルージョンするセクションをマークするために使ったアンカーを入力します。
* '''step=''' (''paired with '''from='''/'''to=''' orまたは '''include=''' orまたは '''exclude='''とペア'') to supply a incremental number where every x page will be transcluded.ページずつトランスクルージョンするときの増分を入力します。
: 増分nずつ飛ばしながらページをトランスクルージョンします。例:<nowiki><pages from=1 to=10 step="2" /></nowiki>では1ページ、3ページ、5ページ、7ページ、および9ページが表示されます。
:Transclude every other page by increments of n. By example : <nowiki><pages from=1 to=10 step="2" /></nowiki> show the 1st, 3rd, 5th, 7th and 9th pages.
* '''include'''
: 以下のページを含めます。これにおいては、より自由な列挙が認められています。例:<nowiki><pages include="2-5,9" /></nowiki>は2ページ、3ページ、4ページ、5ページ、および9ページを表示します。
:Include following pages. This allows a more flexible list. For example : <nowiki><pages include="2-5,9" /></nowiki> show the 2nd, 3rd, 4th, 5th and 9th pages.
* '''exclude'''
:Don't include following pages. By example : 以下のページを含めません。例:<nowiki><pages from=1 to=10 exclude="2-5,9" /></nowiki> show the 1st, 6th, 7th, 8th and 10th pages.は1ページ、6ページ、7ページ、8ページ、および10ページを表示します。
 
We can, of course, use all the attributes on the same tag. By example もちろん、同一タグ内で全属性を使うことができます。たとえば<nowiki><pages from=1 to=10 include="31" exclude="2-4" step="2" /></nowiki> will show 1st, 5th, 7th, 9th and 31st pages.は1ページ、5ページ、7ページ、9ページ、および31ページを表示します。
 
'''註''':グッド・プラクティスとして、&lt;pages>タグ内の属性は引用符で囲むべきです。タグ内に引用符のないカラ属性が'''ない'''のが重要で、そのためカラ属性を引用符で囲むか、必要ない任意の属性を削除するかしてください。
'''Note''': Good practice says that attributes within the &lt;pages> tag should be quoted. It is important to {{sc|not}} have unquoted empty attributes within tags, so please either quote empty attributes, or remove the unneeded optional attributes.
 
==See also==