Changes

From Super-wiki
Jump to: navigation, search

Template:Reflist/doc

6,373 bytes removed, 07:20, 14 January 2011
Replaced content with '== Usage == Work in progress, several failed attempts to get this formatting working. '''Please do not use this template at this time.''' To place a footnote-style list of…'
==Ref-family templatesUsage ==The ref family of templates is used to place labeled references and notes and references into an article, with the labels normally being clickable links for navigating from a ref to a corresponding note and back from the note to the ref. The links and backlinks are identified internally by combining the specified parameters. The templates take a variable number of unnamed parameters identified by their position and, optionally, a named parameter named ''noid'' which, if used, should be set by specifying it as "noid=noid".
=== Very simple example ===Work in progress, several failed attempts to get this formatting working. '''Please do not use this template at this time.'''
{| class=wikitable !Article!Wikitext|-|<pre>Text that requires a footnote.{{ref|a|1}} ==Notes==:1.{{note|a}}Body of the footnote.</pre>|{{quotation|Text that requires a footnote.{{ref|a|1}} Notes:1.{{note|a}}Body of the footnote.|} The first parameter of ref is the label that has to be used for the parameter of the corresponding note. The second parameter is the marker of the resulting link as it will be shown on the page, as a superscript. The easiest choice is to make these two the same, but this is not a requirement. === Labels must be unique === A common error when using ref is to use it multiple times with the same label. For example: <pre>Text that requires To place a footnote.{{ref|1|1}}Some other text that requires the same footnote.{{ref|1|1}} ==Notes==:1.{{note|1}}Body of the footnote.</pre> This generates two citations with the same label, which is invalid HTML. To fix the problem, use multiple unique IDs. === Simple examples === ref and note 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|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 b.*{{note|reference_name_C|c|Text for note c (with extended highlighting).}}</pre> 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}}.*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" button. Also notice that browsers which support highlighting list 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. === 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 references in an optional fourth parameter. 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|2}} 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|1}}Text of note for ref a.*{{note label|reference_name_B|b|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).}}}}</pre> This would produce:<div style="margin: 1em; padding: 1em; border:1px solid #999">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|2}} 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|1}}Text of note for ref a.*{{note label|reference_name_B|b|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).}}}}</div>#Note that ref label produces a superscripted link with square brackets. #The note for ref e has a "^" character as its backlinkarticle, 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 specified. Notice that, because the notes for refs g and h above use the same text, note h was made a part of the text passed as a final parameter to note g in order for the extended highlighting to cover both notes. ==Third party tool==A third-party tool to translate articles using the templates described on this page into the Cite.php system is available.following format:
451
edits

Navigation menu