Template:Reflist
From 2008.igem.org
Template:Documentation subpage
Contents |
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 Template:Tlx
will create a two-column reference list, and Template:Tlx
will create a three-column list. Three-column lists are inaccessible to users with smaller/laptop monitors and should be avoided.
Using Template:Tlx
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.<ref>Template:Cite web</ref><ref>Template:Cite web</ref>
- 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.<ref>Template:Cite web</ref>
- 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.
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:
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
- 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
- Templates for formatting individual reference citations
- Templates for formatting lists of references and bibliographies
- Template:Tl — Template:Tl; open and close tags to apply 'references-small' font-size style to a listing
- Template:Tl — Template:Tl; open and close tags to apply a hanging indent style to a listing
- Template:Tl