Difference between revisions of "Template:Reflist"

From Stationery Wiki
Jump to navigation Jump to search
(test update, based on https://en.wikipedia.org/w/index.php?title=Template:Reflist&oldid=794499661 see there for contributors)
(Undo revision 8759 by Memm (talk))
Tag: Undo
Line 1: Line 1:
 
<div class="reflist <!--
 
<div class="reflist <!--
  -->{{#if: {{{1|}}} {{{colwidth|}}}
+
  -->{{#if: {{{1|}}}
    | columns references-column-width
+
    | columns {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
}}" style="<!--
+
      | references-column-width
 +
      | references-column-count references-column-count-{{#if:1|{{{1}}}}} }}
 +
    | {{#if: {{{colwidth|}}}
 +
      | references-column-width }} }}" style="<!--
 
  -->{{#if: {{{1|}}}
 
  -->{{#if: {{{1|}}}
 
     | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
 
     | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
       | {{column-width|1={{{1}}}}}
+
       | {{column-width|{{#if:1|{{{1}}}}}}}
       | {{#switch:{{{1|}}}|1=|2={{column-width|1=30em}}|#default={{column-width|1=25em}}}} }}
+
       | {{column-count|{{#if:1|{{{1}}}}}}} }}
 
     | {{#if: {{{colwidth|}}}
 
     | {{#if: {{{colwidth|}}}
       | {{column-width|1={{{colwidth}}}}} }} }} list-style-type: <!--
+
       | {{column-width|{{{colwidth}}}}} }} }} list-style-type: <!--
 
  -->{{{liststyle|{{#switch: {{{group|}}}
 
  -->{{{liststyle|{{#switch: {{{group|}}}
 
     | upper-alpha
 
     | upper-alpha
Line 16: Line 19:
 
     | lower-roman = {{{group}}}
 
     | lower-roman = {{{group}}}
 
     | #default = decimal}}}}};">
 
     | #default = decimal}}}}};">
{{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive={{#if:{{{1|}}}{{{colwidth|}}}|0|1}}}}</div>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using reflist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Reflist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | group | liststyle | refs }}<noinclude>
+
{{#tag:references|{{{refs|}}}|group={{{group|}}}}}</div><noinclude>
{{Documentation}}
+
{{Template:Reflist/doc}}
 
</noinclude>
 
</noinclude>

Revision as of 09:24, 9 July 2019

This citation template provides formatting and organizational features for footnotes. It adds support for a reduced font size, columns, groups.

Parameters

  • First unnamed parameter (doesn't work with all browsers, e.g. on mobiles)
column-count: a natural number specifying fixed columns into which the reference list is to be rendered. Example: |2|.
column-width: a typographic unit of measurement such as em, specifying the width for the reference list columns. Example: |30em|.
  • refs: used with named references; it specifies a list of some or all named references used in the article.
  • group: identifies by name the subset of references to be rendered.
  • liststyle: specifies the style used when the reference list is enumerated; if none is specified, the default is to render a numbered list.

Example

Lorem.<ref>ipsum</ref><ref>dolor</ref><ref>sit</ref><ref>amet</ref>
Consectetur.<ref>adipisicing</ref><ref>elit, sed</ref><ref>do</ref>

{{Reflist|3}}

gives:

Lorem.[1][2][3][4] Consectetur.[5][6][7]

  1. ipsum
  2. dolor
  3. sit
  4. amet
  5. adipisicing
  6. elit, sed
  7. do