Jump to content

Template:Reflist: Difference between revisions

From Stationery Wiki
First version based on https://www.mediawiki.org/wiki/Template:Reflist
 
update
Line 1: Line 1:
This citation template provides formatting and organizational features for footnotes. It adds support for a reduced font size, columns, groups.
<div class="reflist <!--
 
  -->{{#if: {{{1|}}}
==Parameters==
    | columns {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
* First unnamed parameter (doesn't work with all browsers, e.g. on mobiles)
      | references-column-width
: column-count: a natural number specifying fixed columns into which the reference list is to be rendered. Example: <code>|2|</code>.
      | references-column-count references-column-count-{{#if:1|{{{1}}}}} }}
: column-width: a typographic unit of measurement such as ''em'', specifying the width for the reference list columns. Example: <code>|30em|</code>.
    | {{#if: {{{colwidth|}}}
* '''refs''': used with named references; it specifies a list of some or all named references used in the article.
      | references-column-width }} }}" style="<!--
* '''group''': identifies by name the subset of references to be rendered.
-->{{#if: {{{1|}}}
* '''liststyle''': specifies the style used when the reference list is enumerated; if none is specified, the default is to render a numbered list.
    | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
 
      | {{column-width|{{#if:1|{{{1}}}}}}}
==Example==
      | {{column-count|{{#if:1|{{{1}}}}}}} }}
<pre>
    | {{#if: {{{colwidth|}}}
Lorem.<ref>ipsum</ref><ref>dolor</ref><ref>sit</ref><ref>amet</ref>
      | {{column-width|{{{colwidth}}}}} }} }} list-style-type: <!--
Consectetur.<ref>adipisicing</ref><ref>elit, sed</ref><ref>do</ref>
-->{{{liststyle|{{#switch: {{{group|}}}
 
    | upper-alpha
{{Reflist|3}}
    | upper-roman
</pre>
    | lower-alpha
 
    | lower-greek
gives:
    | lower-roman = {{{group}}}
 
    | #default = decimal}}}}};">
Lorem.<ref>ipsum</ref><ref>dolor</ref><ref>sit</ref><ref>amet</ref>
{{#tag:references|{{{refs|}}}|group={{{group|}}}}}</div><noinclude>
Consectetur.<ref>adipisicing</ref><ref>elit, sed</ref><ref>do</ref>
{{Documentation}}
 
</noinclude>
{{Reflist|3}}

Revision as of 16:33, 10 April 2017