Changes

From Super-wiki
Jump to: navigation, search

Template:Reflist/doc

3,626 bytes removed, 21:58, 7 March 2011
no edit summary
==RefUse this template to create a footnote-family templates==The ref family of templates is used to place labeled references and notes and references into style reference list in an article, with the labels normally being clickable links for navigating from a ref . The advantage to a corresponding note and back from doing this using the note to the ref. The links and backlinks are identified internally by combining Ref tag is that the specified parameters. The templates wiki will take a variable number care of unnamed parameters identified by their position numbering andmanaging the references list, optionally, a named parameter named ''noid'' which, if used, should be set by specifying it as "noid=noid"editors will not need to renumber an entire references list just to add one footnote mid-article.
=== Very simple example ===
{| class=wikitable !Article!Wikitext|-|<pre>Text that requires a footnote.{{ref|a|1}}= Four options for usage ==
==Notes= Option 1 (only specific/unique references) ===:1<pre>== Content == Lorem ipsum.<ref>season, episode, etc.</ref> Lorem ipsum dolor sit amet.<ref>season, episode, etc.</ref> == References == {{note|areflist}}Body of the footnote.
</pre>
|{{quotation|Text that requires This will create an uniquely numbered footnote at the end of each sentence, which will be a footnoteworking link to the references list at the end of the article. The references themselves can also be links to other pages on the wiki, or even external pages.{{ref|a|1}}
Notes
:1.{{note|a}}Body of the footnote.
|}
The first parameter of === Option 2 (repeat references) ===<pre>== Content == Lorum ipsum.<ref>season, episode, etc.</ref is the label that has to be used for the parameter of the corresponding note> Lorum ipsum dolor sit amet. The second parameter is the marker of the resulting link as it will be shown on the page<ref name="five01">season, as a superscript. The easiest choice is to make these two the sameepisode, but this is not a requirementetc.</ref>
=== Labels must be unique ===Lorum ipsum.<ref name"five01" />
A common error when using ref is to use it multiple times with the same label. For example:== References ==
{{reflist}}
</pre>
This will make numbered footnotes at the end of each sentence, but the number for the second and third footnotes would be the same since they refer to the same source material. The advantage of doing this is less typing and therefore smaller page file size, especially when the reference is itself a link. Note that reference ''name'' '''cannot''' be just an integer, ie. 501, it must start with an alphabetical character.
 
 
=== Option 3 (only general references) ===
<pre>
Text that requires a footnote== Content == Lorem ipsum.{{ref|1|1}}Some other text that requires the same footnoteLorem ipsum dolor sit amet.{{ref|1|1}} == References ==
==Notes=={{refbegin}}:* general reference 1.* general reference 2{{note|1refend}}Body of the footnote.
</pre>
This makes a list of references at the end of the article, without any footnotes citing the references to specific text in the article.
This generates two citations with the same label, which is invalid HTML. To fix the problem, use multiple unique IDs.
=== Simple examples Option 4 (both specific and general references) ===<pre>== Content ==
Lorem ipsum.<ref and note>season, episode, etc.</ref>
Example:Lorem ipsum dolor sit amet.<pre style="border:1; background:white; margin: 0; padding:0; line-height: 130%; word-wrap: break-word;white-space: -moz-pre-wrap;white-space: -o-pre-wrap;white-space: -pre-wrap;white-space: pre-wrap"ref>Article text{{ref|reference_name_A|a}} more text{{ref|reference_name_B|b}} more text {{ref|reference_name_C|c|noid=noid}}.*Bulleted text{{ref|reference_name_B|b|noid=noid}}*Bulleted text{{ref|reference_name_C|c}}.**intervening text**{{note|reference_name_A|a}}Text for note a.*{{note|reference_name_B|b}}Text for note bseason, episode, etc.*{{note|reference_name_C|c|Text for note c (with extended highlighting).}}</preref>
This would produce:<div style="margin: 1em; padding: 1em; border:1px solid #999">Article text{{ref|reference_name_A|a}} more text{{ref|reference_name_B|b}} more text {{ref|reference_name_C|c|noid=noid}}Lorem ipsum.*Bulleted text{{ref|reference_name_B|b|noid=noid}}*Bulleted text{{ref|reference_name_C|c}}.**intervening text**{{note|reference_name_A|a}}Text for note a.*{{note|reference_name_B|b}}Text for note b.*{{note|reference_name_C|c|Text for note c (with extended highlighting).}}</div>
Notice that the navigation back from the note to the ref does not work by clicking the backlink for refs which specify "noid=noid". In practice, if "noid=noid" is specified, it is usually specified for all refs having identical unnamed parameters, and navigation back to the associated ref is done by using the browser's "Back" buttonLorem ipsum dolor sit amet.
Also notice that browsers which support highlighting of link-accessed material highlight the active backlink by default, and that the highlighting has been extended to encompass the text for note c by specifying that text as a final template parameter instead of placing it outside of the template.== References ==
=== More complex examples ===ref label pairs with note label.The note label template will normally have identical parameters with the ref label with which it is paired, and is normally created by copying the ref, pasting it into the note location, and changing its name to "note label"; this avoids having parameters mismatched because of a typo. Navigation forward uses parameters 1 and 3, navigation backward uses parameters 1 and 2. Parameter 3 is optional, and note label has an optional fourth parameter.{{reflist}}
Example:<pre style="border:1; background:white; margin: 0; padding:0; line-height: 130%; word-wrap: break-word;white-space: -moz-pre-wrap;white-space: -o-pre-wrap;white-space: -pre-wrap;white-space: pre-wrap">Article text{{ref label|reference_name_A|a|1}} more text{{ref label|reference_name_G|g|}} more text {{ref label|reference_name_B|b|2refbegin}} more text {{ref label|reference_name_C|c|3}} more text {{ref label|reference name_D|d|4}} more text {{ref label|reference name_E|e|none}} more text {{ref label|reference name_F|f|}} more text {{ref label|reference_name_H|h|8}}.**intervening text**{{note label|reference_name_A|a|general reference 1}}Text of note for ref a.*{{note label|reference_name_B|b|general reference 2}}Text of note for ref b.*{{note label|reference_name_C|c|3|ABCDE}}Text of note for ref c.*{{note label|reference_name_D|d|4|FGHIJ}}Text of note for ref d.*{{note label|reference_name_E|e|none}}Text of note for ref e.*{{note label|reference_name_F|f}}Text of note for ref f.*{{note label|reference_name_G|g||{{note label|reference_name_H|h|8|Text of note for refs g and h (with extended highlighting).}}refend}}
</pre>
This combines both general references with in-article footnoted references.
 
This would produce:== Multiple columns ==Using <tt><div style="margin: 1em; padding: 1em; border:1px solid #999"nowiki>Article text{{ref label|reference_name_A|a|1}} more text{{ref label|reference_name_G|g|}} more text {{ref label|reference_name_B|breflist|2}} more text {{ref label|reference_name_C|c|3}} more text {{ref label|</nowiki></tt> will create a two-column reference name_D|d|4}} more text {{ref label|reference name_E|e|none}} more text {{ref label|reference name_F|f|}} more text {{ref label|reference_name_H|h|8}}.**intervening text**{{note label|reference_name_A|a|1}}Text of note for ref a.*{{note label|reference_name_B|b|2}}Text of note for ref b.*list, and <tt><nowiki>{{note label|reference_name_C|creflist|3|ABCDE}}Text of note for ref c.*{{note label|reference_name_D|d|4|FGHIJ}}Text of note for ref d.*{{note label|reference_name_E|e|none}}Text of note for ref e.*{{note label|reference_name_F|f}}Text of note for ref f.*{{note label|reference_name_G|g||{{note label|reference_name_H|h|8|Text of note for refs g and h (with extended highlighting).}}}}</divnowiki></tt>#Note that ref label produces will create a superscripted link with square brackets. #The note for ref e has a "^" character as its backlink, because parameter 3 was specified as "none".#The notes for refs f and g do not have a clickable backlink, because parameter 3 was not specifiedthree-column list.
Notice that, because Using <tt><nowiki>{{reflist|colwidth=30em}}</nowiki></tt> will allow the browser to automatically choose the notes for refs g and h above use number of columns based on the same text, note h was made a part width of the text passed as web browser. Choose a final parameter to note g in order column width that's appropriate for the extended highlighting to cover both notesaverage width of the references on the page.
==Third party tool==A third-party tool '''Note''': Multiple columns may not render properly in all browsers, as there are compatibility issues. Due to translate articles this please refrain from using columns, its listed here in the templates described on this page into doc for the Cite.php system is availablesake of comprehensiveness and possible future broad use.<includeonly>[[Category:Templates]]</includeonly>
451
edits

Navigation menu