Template:Reflist
This citation template provides formatting and organizational features for footnotes. It encapsulates the <references> tag used by the cite.php
MediaWiki extension to show the list of references as defined by <ref> tags. It adds support for sizing the column width, groups and list-defined references.
Parameters
There are no required parameters; if none are supplied, a single-column list will be generated if there are fewer than 10 references in the list. If you have more than 10 references, it will use columns of 30em wide if your device allows this.
Optional parameters are:
- Unnamed parameter (must be the first one if used): the minimum width for each column of references, typically in ems. Syntax (for example) {{reflist|30em}} with no space (i.e. not {{reflist|30 em}}). Note that this replaces colwidth—see Obsolete parameters section.
- refs: used with list-defined references.
- group: identifies by name the subset of references to be rendered; the value should correspond to that used inline, e.g., {{Reflist|group=groupname}} renders all references with groupname as the group name. There are five pre-defined group names that style the list differently. See § below.
- liststyle: specifies the style used when the reference list is rendered. The default is a numbered list. When set, it will override the style set by the
group
parameter, without affecting group functionality. See § below.
Usage
Markup | Renders as |
---|---|
Lorem ipsum.<ref>Source name, access date, etc.</ref> Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref> ==References== {{Reflist}} |
|
Columns
{{Reflist|30em}} (for example) instructs the browser to create as many columns as possible (of width at least 30 em, in this example) given the width of the display window. (Units supported are em, ex, in, cm, mm, pt, pc, px, but em is almost always used.) There must not be a space between the number and the unit. Percent is not supported.
Example
Markup | Renders as |
---|---|
Lorem ipsum.<ref>Source name, access date, etc.</ref> Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref> Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref> Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref> Lorem ipsum dolor sit amet.<ref>Source name, access date, etc.</ref> ==References== {{Reflist|15em}} |
|
The syntax {{Reflist|2}}
(for example), which specifies two columns of equal width regardless of the available display width, is deprecated. When you use 1 the template gives you a single column while 2 will pretend you specified 30em. When using higher column counts, it will pretend you specified 25em.
Technical details
Font size
The font size should reduce to 90% for most browsers, but may appear to show at 100% for Internet Explorer and possibly other browsers.[general 1] As of December 21, 2010, the standard <references> tag has the same font styling. The smaller font may be disabled through.
Browser support for columns
Multiple columns are generated by using CSS3, which is still in development; thus only browsers that properly support the multi-column property will show multiple columns with {{Reflist}}.
These browsers support CSS3 columns:
- Gecko-based browsers such as Wikipedia:Mozilla Firefox
- Wikipedia:WebKit-based browsers such as Safari and Wikipedia:Google Chrome
- Opera from version 11.10 onward
- Wikipedia:Internet Explorer from version 10 onward
These browsers do not support CSS3 columns:
- Microsoft Wikipedia:MSHTML-based browsers including Internet Explorer up to version 9[general 2]
- Opera through to version 11
Obsolete parameters
These parameters are no longer in use:
- colwidth: Same as specifying a column-width for the first unnamed parameter. Replaced by width as unnamed first parameter.
Limitations
Do not use {{Reflist}} or other templates or modules that use <:references> in numbered or unnumbered lists if the list is inside an HTML div tag.If you're done making changes, please refresh the text. (Why?)
You can experiment in this template's sandbox (create | mirror ) and testcases (create) pages.
Please add categories and interwikis to Template:Reflist/doc. (View all subpages of this page.)
Cite error: <ref>
tags exist for a group named "general", but no corresponding <references group="general"/>
tag was found