Template:Reflist/doc

This citation template provides formatting and organizational features for footnotes. It encapsulates the tag used by the Cite MediaWiki extension to show the list of references as defined by  tags. It adds support for a reduced font size, columns, groups.

If you don't use any of the additional features, then it produces the same output as the simpler and slightly faster tag.

Parameters
{	"description": "This template displays the list of footnotes at the end of an article and provides additional formatting and organizing options.", "params": { "1": {			"label": "Columns / Column width", "type": "string", "required": false, "description": "Two modes supported. First mode: integer number of fixed columns into which the reference list is to be rendered.  Second mode: typographic unit of measurement such as 'em', specifying the width for the reference list columns, e.g. '33em'; note that '33\u00a0em' will not be recognized", "default": "1", "aliases": [ "colwidth" ]		},		"liststyle": { "label": "Liststyle", "type": "string", "required": false, "description": "Specifies the style used when the reference list is enumerated; accepts any valid CSS value defined for list-style-type", "default": "decimal" },		"close": { "label": "Close", "type": "number", "required": false, "description": "When set to '1', forces the reference list to close and render all references defined to that point; useful if including more than one Reflist call" },		"group": { "label": "Group", "type": "string", "required": false, "description": "Group is an identifier which restricts the references that are shown. Without this parameter, this template only shows references with no group identifier. With a group identifier specified, only references with a matching group identifier are handled. The rest are left alone." },		"refs": { "label": "List of references", "type": "string", "required": false, "description": "Provides a space to define named references for use in the article. References defined in this space are not shown unless used somewhere in the article." }	} }

Usage
{{markup|title=Using only footnote-style references Lorem ipsum dolor sit amet.
 * Lorem ipsum.

Columns

 * Browser support: Internet Explorer 10+, Firefox 2+, Chrome 4+, Safari 3.1+, Opera 11.1+

Using will create a two-column reference list, and  will create a three-column list, and so on. Choose the number of columns that is appropriate for the average width of the references on the page.

Using will create columns with a minimum width of 30em, allowing 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. A width measurement must conform to the format given in CSS 2.1 Syntax and basic data types: Lengths; in particular, there must not be a space between the number and the unit.

Widows and orphans
The use of columns can result in widows and orphans, where a citation at the bottom of a column may be split to the top of the next column. MediaWiki:Common.css includes CSS rules to avoid list items from breaking between columns. Widows may still show in extreme circumstances, such as a reference list formatted in columns where only a single reference is defined.

{{markup Lorem ipsum dolor sit amet.
 * Lorem ipsum.

Practices
The number of columns to use is up to the editor, but some major practices include:
 * 1 column (default): Where there are only a few footnotes.
 * 2 columns specified: Where there are a number of footnotes.
 * 30em: Where there are many footnotes plus a page-width Bibliography subsection.

Examples
{{markup|title=Two columns Lorem ipsum dolor sit amet.
 * Lorem ipsum.

List styles
Reference lists are by default numbered lists. By using the liststyle parameter, you can control how the list is rendered. For example, using liststyle=upper-roman will result in items being prefixed with roman numerals instead of decimal numbers. The parameter accepts any valid CSS value defined for.

The citations in the reference list will show the default decimal styling if:
 * The value for liststyle does not exactly match one of the predefined values
 * The value for liststyle is enclosed by quotes
 * Reflist is indented with the : markup

Multiple uses
If Reflist is used multiple times without a parameter, each subsequent use will confusingly repeat the output of the first instance due to template caching. This may also result in an error message:


 * Cite error: tags exist, but no tag was found

Where a page included multiple uses of Reflist, or a variant such as Notelist, each subsequent use should include at least one named parameter, such as refs or group. If these parameters are not appropriate, then the practice is to use. Do not use close without the =1, as it will be parsed into the column-width.

List-defined references
A list of references may be defined within Reflist using the refs parameter, just like including named  elements inside the  container. This has been available since September 2009. There are new error messages associated with this feature, documented at wikipedia:Help:Cite errors, including one for references defined in Reflist but not used within the body.

Example
{{markup This is reference 2.
 * This is reference 1.

Grouped references
As of June 2008, the footnotes system supports the separation of references into groups. This allows groups for explanatory notes, table references and the like.

The general format for the reference tag is:



And using group for the reflist:


 * Where groupname is a group identifier such as "notes", "nb" or "label".

There are three pre-defined group names that will automatically cause the link labels and this template to display other characters instead of numbers (see List styles above). These are: "lower-alpha" (a, b, c...), "lower-greek" (α, β, γ...) and "lower-roman" (i, ii, iii...) and must be written without quotes.

Image flow issues
When an image is inserted to the left of the reference list, the list may flow under the image, clipping the reference numbers or hiding them behind the image frame.

{{markup
 * Lorem ipsum dolor sit amet.