Difference between revisions of "Template:Reflist/doc"

From Chevy Wiki
Jump to navigation Jump to search
(Importing image file)
 
m (1 revision)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<noinclude>
{{documentation subpage}}
{{template doc page viewed directly}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
</noinclude>
This template creates a single third-column succession box column to be used with [[Template:S-start/doc|succession boxes]].


==Usage==
==Usage==
Use this template to create a reference list in small font for an article.  Note that there is no consensus that small font size should always be used for all references; when normal-sized font is more appropriate on an article, use <code><nowiki><references&nbsp;/></nowiki></code> instead.


The format is <code><nowiki>{{</nowiki>s-aft|after=|''parameter''}}</code>, where ''parameter'' is replaced by one of the parameter names shown in the following table. The use of a parameter is optional.
If used with no parameters, it will produce a reference list with a single column.


:''as'' &mdash; Adds a title line beneath a successor's name to designate a change in title.
===Font size===
The font size should reduce to 90% for most browsers, but may show at 100% for Internet Explorer and possibly other browsers. Reflist uses one CSS entry in [[MediaWiki:Common.css]] to set the font size:


This template allows for multiple row-spans using the parameter |rows=| between the template name and the first parameter.
* <code>.references-small { font-size: 90%;}</code>


==Example==
There is another CSS entry:
From the [[Louis XIV of France]] article:
 
<pre style="font-size:95%; width:95%; overflow:auto;">
* <code>ol.references { font-size: 100%;}</code>
{{s-start}}
 
{{s-reg}}
Although Reflist does not use this CSS, some browsers may honor it over the references-small CSS, especially Internet Explorer, thus showing the font size at 100%.
{{s-bef | before = [[Louis XIII of France|Louis XIII]]}}
 
{{s-ttl | title = [[List of French monarchs|King of France]] and [[List of Navarrese monarchs|Navarre]]
Editors may over-ride these settings by placing entries in their personal CSS.
| years = 14 May 1643 – 1 September 1715}}
 
{{s-aft | after = [[Louis XV of France|Louis XV]]}}
===Multiple columns===
{{end}}
Using <code>{{tlx|reflist|2}}</code> will create a two-column reference list, and <code>{{tlx|reflist|3}}</code> will create a three-column list.  Three-column lists are inaccessible to users with smaller/laptop monitors and should be avoided.
 
Using <code>{{tlx|reflist|colwidth{{=}}30em}}</code> will allow the browser to automatically choose the number of columns based on the width of the web browser.  Choose a column width that is appropriate for the average width of the references on the page.
 
====Browser support====
Multiple columns are generated by using [[Cascading Style Sheets|CSS3]], which is still in development; thus only browsers that properly support the multi-column selector will show multiple columns.<ref>{{cite web|accessdate=2006-11-24|date=[[2005-12-30]]|title=CSS3 Multi-Column Thriller|url=http://www.stuffandnonsense.co.uk/archives/css3_multi-column_thriller.html}}</ref><ref>{{cite web|url=http://www.w3.org/TR/css3-multicol/|title=CSS3 module: Multi-column layout|publisher=[[World Wide Web Consortium|W3C]]|date=[[2005-12-15]]|accessdate=2006-11-24}}</ref>
 
* [[Mozilla Firefox]] and other [[Gecko (layout engine)|Gecko]]-based browsers support multiple columns with two caveats:
**may create [[Widows and orphans|widows]]
**may mangle long URLs in the printable version; see [[:Image:Wikipediareflistoverlap.gif]] for an example
* [[Internet Explorer]] does not currently support the column selector; version 8 is not scheduled to support it.<ref>{{cite web |url=http://msdn.microsoft.com/en-us/library/cc351024(VS.85).aspx#multicolumn |title=CSS Compatibility and Internet Explorer: Multi-column Layout |work=Microsoft Developer Network |publisher=Microsoft |accessdate=2008-09-15}}</ref>
* [[Safari (web browser)|Safari]] 3.1.2, [[Google Chrome]] and possibly other [[WebKit]] based browsers have a bug that breaks links in multiple columns; the column feature has been removed for these browsers until the bug is resolved; see [[Template:Reflist/Safari testcase]] for details.
* [[Opera (web browser)|Opera]] does not support multiple columns.
 
==== Disabling multiple columns for your account ====
If you cannot abide multiple columns, you may add the following to your personal CSS file (after [[Special:UserLogin/signup|creating an account]] if you have not already done so) to force single-column display while logged in to your account:
<source lang="css">
.references-column-count, .references-column-width {
    column-count:1 !important;
    column-width:auto !important;
    -moz-column-count:1 !important;
    -moz-column-width:auto !important;
    -webkit-column-count:1 !important;
    -webkit-column-width:auto !important;
}
</source>
This will normally have to be added to your [[Special:MyPage/monobook.css|monobook.css]]; if you are using a different skin, look in the "Personal CSS" column of the table [[Help:Skin#Customisation (advanced users)|here]] to find the right file.
 
===Three options for usage===
====Option 1 (only specific references)&nbsp;— Example:====
<pre>
==Content==
Lorem ipsum.<ref>Source name, access date, etc.</ref>
 
Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref>
 
==References==
{{reflist}}
</pre>
 
====Option 2 (only general references)&nbsp;— Example:====
<pre>
==Content==
Lorem ipsum.
 
Lorem ipsum dolor sit amet.
 
==References==
{{refbegin}}
* general reference 1
* general reference 2
{{refend}}
</pre>
</pre>
{{s-start}}
 
{{s-reg}}
====Option 3 (both specific and general references)&nbsp;— Example:====
{{s-bef | before = [[Louis XIII of France|Louis XIII]]}}
<pre>
{{s-ttl | title = [[List of French monarchs|King of France]] and [[List of Navarrese monarchs|Navarre]]
==Content==
| years = 14 May 1643 – 1 September 1715}}
Lorem ipsum.<ref>Source name, access date, etc.</ref>
{{s-aft | after = [[Louis XV of France|Louis XV]]}}
 
{{end}}
Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref>
 
Lorem ipsum.
 
Lorem ipsum dolor sit amet.
 
==References==
{{reflist}}
 
{{refbegin}}
* general reference 1
* general reference 2
{{refend}}
</pre>
 
====Continuing the references====
In order to add references manually, use the "#" sign and enclose the additional references in the <code>"references-small"</code> div style, as in this example:
 
{{Pre2|scroll|<nowiki>
<div class="references-small">
#<li value="2"> [http://saturn.jpl.nasa.gov/news/features/feature20070719.cfm ''Cassini-Huygens: NEWS - Features - Saturn Turns 60'']
# [http://www.scitech.ac.uk/PMC/PRel/STFC/frank.aspx ''A new moon for Saturn a family affair'']
# [http://ciclops.org/view.php?id=3353 ''From Dark Obscurity... A Tiny New Saturnian Moon Comes To Light'']
</div>
</nowiki>}}
 
The <code><nowiki><li value="2"></nowiki></code> tag is used to ensure the new references start at the correct number. In the example, there was just one reference. Had there been 10, we would have started the additional references at "11".
 
==Groups extension==
The <nowiki><ref></nowiki> tag now supports named groups so that separate lists may be created— see [[Wikipedia:Footnotes#Separating reference lists and explanatory notes]].
 
The general format for the reference tag would be:
 
<pre><ref group=name></pre>
 
And for the reflist:
<pre>{{reflist|group=name}})</pre>
 
:Where ''name'' would be a group identifier such as "note", "nb" or "label".
 
For example, to create a separate format notes list, the references would be formatted as:
 
<pre><ref group=note></pre>
 
To create the formatted list:
 
<pre>
==Name==
{{reflist|group=note}})</pre>
 
While any number of groups can be created and listed, they should be kept to a minimum.
 
==Caveats==
 
This template (or <code><nowiki><references/></nowiki></code> by any means, for that matter) should probably not be used multiple times in the same page with the same value for the <code><nowiki>group</nowiki></code> parameter. But if this is for some reason required, at least one parameter must be passed to every invocation of the template for correct output. For example, use <code><nowiki>{{reflist|dummy=1}}</nowiki></code> instead of simply <code><nowiki>{{reflist}}</nowiki></code>.


==See also==
==See also==
Documentation for creating succession boxes can be found at [[Template:s-start/doc]].
* [[Wikipedia:Citing sources]]; style guide for the citation of sources, and layout options
* [[Wikipedia:Footnotes]]; style guide for footnotes and inline citations
* Template for adding an HTML comment that explains references
** {{tl|Footnotes}}
; Templates for formatting individual reference citations
* [[Wikipedia:Citation templates]]
; Templates for formatting lists of references and bibliographies
* {{tl|Refbegin}}&nbsp;— {{tl|Refend}}; open and close tags to apply 'references-small' font-size style to a listing
** {{tl|Ref indent}}&nbsp;— {{tl|Ref indent-end}}; open and close tags to apply a [[indentation|hanging indent]] style to a listing
** {{tl|Colbegin}} Template creates 2 columns.
*{{tl|Reflist-talk}}; reflist for Talk pages.
 
==References==
{{reflist}}
 
<includeonly>
<includeonly>
[[Category:Succession templates|{{PAGENAME}}]]
<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:Citation templates|{{PAGENAME}}]]


[[id:Templat:S-aft]]
<!-- ADD INTERWIKIS BELOW THIS LINE -->
[[ja:Template:S-aft]]
[[ar:قالب:ثبت المراجع]]
[[be-x-old:Шаблён:Зноскі]]
[[ca:Plantilla:Referències]]
[[eo:Ŝablono:Referencoj]]
[[es:Plantilla:Listaref]]
[[fr:Modèle:Références]]
[[hi:Template:टिप्पणीसूची]]
[[hsb:Předłoha:Referency]]
[[hu:Reflist]]
[[ia:Patrono:Reflist]]
[[ja:Template:Reflist]]
[[ka:თარგი:სქოლიოს სია]]
[[ko:틀:주석]]
[[lv:Veidne:Reflist]]
[[ml:ഫലകം:Reflist]]
[[ms:Templat:Reflist]]
[[no:Mal:Reflist]]
[[pl:Szablon:Przypisy]]
[[pt:Predefinição:Reflist]]
[[ro:Format:Listănote]]
[[ru:Шаблон:Примечания]]
[[sr:Шаблон:Напомене]]
[[fi:Malline:Viitteet]]
[[zh:Template:Reflist]]
</includeonly>
</includeonly>

Latest revision as of 15:12, 3 February 2009

Usage

Use this template to create a reference list in small font for an article. Note that there is no consensus that small font size should always be used for all references; when normal-sized font is more appropriate on an article, use <references /> instead.

If used with no parameters, it will produce a reference list with a single column.

Font size

The font size should reduce to 90% for most browsers, but may show at 100% for Internet Explorer and possibly other browsers. Reflist uses one CSS entry in MediaWiki:Common.css to set the font size:

  • .references-small { font-size: 90%;}

There is another CSS entry:

  • ol.references { font-size: 100%;}

Although Reflist does not use this CSS, some browsers may honor it over the references-small CSS, especially Internet Explorer, thus showing the font size at 100%.

Editors may over-ride these settings by placing entries in their personal CSS.

Multiple columns

Using {{reflist|2}} will create a two-column reference list, and {{reflist|3}} will create a three-column list. Three-column lists are inaccessible to users with smaller/laptop monitors and should be avoided.

Using {{reflist|colwidth=30em}} will allow the browser to automatically choose the number of columns based on the width of the web browser. Choose a column width that is appropriate for the average width of the references on the page.

Browser support

Multiple columns are generated by using CSS3, which is still in development; thus only browsers that properly support the multi-column selector will show multiple columns.[1][2]

  • Mozilla Firefox and other Gecko-based browsers support multiple columns with two caveats:
    • may create widows
    • may mangle long URLs in the printable version; see Image:Wikipediareflistoverlap.gif for an example
  • Internet Explorer does not currently support the column selector; version 8 is not scheduled to support it.[3]
  • Safari 3.1.2, Google Chrome and possibly other WebKit based browsers have a bug that breaks links in multiple columns; the column feature has been removed for these browsers until the bug is resolved; see Template:Reflist/Safari testcase for details.
  • Opera does not support multiple columns.

Disabling multiple columns for your account

If you cannot abide multiple columns, you may add the following to your personal CSS file (after creating an account if you have not already done so) to force single-column display while logged in to your account:

.references-column-count, .references-column-width {
    column-count:1 !important;
    column-width:auto !important;
    -moz-column-count:1 !important;
    -moz-column-width:auto !important;
    -webkit-column-count:1 !important;
    -webkit-column-width:auto !important;
}

This will normally have to be added to your monobook.css; if you are using a different skin, look in the "Personal CSS" column of the table here to find the right file.

Three options for usage

Option 1 (only specific references) — Example:

==Content==
Lorem ipsum.<ref>Source name, access date, etc.</ref>

Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref>

==References==
{{reflist}}

Option 2 (only general references) — Example:

==Content==
Lorem ipsum.

Lorem ipsum dolor sit amet.

==References==
{{refbegin}}
* general reference 1
* general reference 2
{{refend}}

Option 3 (both specific and general references) — Example:

==Content==
Lorem ipsum.<ref>Source name, access date, etc.</ref>

Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref>

Lorem ipsum.

Lorem ipsum dolor sit amet.

==References==
{{reflist}}

{{refbegin}}
* general reference 1
* general reference 2
{{refend}}

Continuing the references

In order to add references manually, use the "#" sign and enclose the additional references in the "references-small" div style, as in this example:

<div class="references-small">
#<li value="2"> [http://saturn.jpl.nasa.gov/news/features/feature20070719.cfm ''Cassini-Huygens: NEWS - Features - Saturn Turns 60'']
# [http://www.scitech.ac.uk/PMC/PRel/STFC/frank.aspx ''A new moon for Saturn a family affair'']
# [http://ciclops.org/view.php?id=3353 ''From Dark Obscurity... A Tiny New Saturnian Moon Comes To Light'']
</div>

The <li value="2"> tag is used to ensure the new references start at the correct number. In the example, there was just one reference. Had there been 10, we would have started the additional references at "11".

Groups extension

The <ref> tag now supports named groups so that separate lists may be created— see Wikipedia:Footnotes#Separating reference lists and explanatory notes.

The general format for the reference tag would be:

<ref group=name>

And for the reflist:

{{reflist|group=name}})
Where name would be a group identifier such as "note", "nb" or "label".

For example, to create a separate format notes list, the references would be formatted as:

<ref group=note>

To create the formatted list:

==Name==
{{reflist|group=note}})

While any number of groups can be created and listed, they should be kept to a minimum.

Caveats

This template (or <references/> by any means, for that matter) should probably not be used multiple times in the same page with the same value for the group parameter. But if this is for some reason required, at least one parameter must be passed to every invocation of the template for correct output. For example, use {{reflist|dummy=1}} instead of simply {{reflist}}.

See also

Templates for formatting individual reference citations
Templates for formatting lists of references and bibliographies
  • {{Refbegin}} — {{Refend}}; open and close tags to apply 'references-small' font-size style to a listing
  • {{Reflist-talk}}; reflist for Talk pages.

References