Template:Reflist/doc

From Captain of Industry Wiki
Jump to: navigation, search

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

Using only footnote-style references
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}}

Lorem ipsum.[1] Lorem ipsum dolor sit amet.[2]

References
  1. Source name, access date, etc.
  2. Source name, access date, etc.

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

15em wide columns (vary width of display window to see change in number of columns)
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}}

Lorem ipsum.[1] Lorem ipsum dolor sit amet.[2] Lorem ipsum dolor sit amet.[3] Lorem ipsum dolor sit amet.[4] Lorem ipsum dolor sit amet.[5]

References
  1. Source name, access date, etc.
  2. Source name, access date, etc.
  3. Source name, access date, etc.
  4. Source name, access date, etc.
  5. Source name, access date, etc.

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:

These browsers do not support CSS3 columns:

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.



Cite error: <ref> tags exist for a group named "general", but no corresponding <references group="general"/> tag was found