Template:Reflist: Difference between revisions

From Linguifex
Jump to navigation Jump to search
m 1 revision imported: Reflist template, saves a bit of time.
 
No edit summary
 
Line 1: Line 1:
<div class="reflist <!--
<templatestyles src="Reflist/styles.css" /><div class="reflist <!--
-->{{#if: {{{1|}}}
-->{{#if:{{{1|}}}{{{colwidth|}}}|reflist-columns references-column-width}} <!--
    | columns {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
-->{{#switch:{{{liststyle|{{{group|}}}}}}|upper-alpha|upper-roman|lower-alpha|lower-greek|lower-roman=reflist-{{{liststyle|{{{group}}}}}}}} <!--
      | references-column-width  
-->{{#if:{{{1|}}}|{{#iferror:{{#ifexpr: {{{1|1}}} > 1 }}||{{#switch:{{{1|}}}|1=|2=reflist-columns-2|#default=reflist-columns-3}} }}}}" <!-- end class
      | references-column-count references-column-count-{{#if:1|{{{1}}}}} }}
-->{{#if: {{{1|}}}<!-- start style -->
    | {{#if: {{{colwidth|}}}
    | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }} |style="column-width: {{{1}}};"}}
      | references-column-width }} }}" style="<!--
     | {{#if: {{{colwidth|}}}|style="column-width: {{{colwidth}}};"}}
-->{{#if: {{{1|}}}
    }}>
    | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
{{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive={{#if:{{{1|}}}{{{colwidth|}}}|0|1}}}}</div><noinclude>
      | {{column-width|{{#if:1|{{{1}}}}}}}
{{documentation}}
      | {{column-count|{{#if:1|{{{1}}}}}}} }}
     | {{#if: {{{colwidth|}}}
      | {{column-width|{{{colwidth}}}}} }} }} list-style-type: <!--
-->{{{liststyle|{{#switch: {{{group|}}}
    | upper-alpha
    | upper-roman
    | lower-alpha
    | lower-greek
    | lower-roman = {{{group}}}
    | #default = decimal}}}}};">
{{#tag:references|{{{refs|}}}|group={{{group|}}}}}</div><noinclude>
{{Documentation}}
</noinclude>
</noinclude>

Latest revision as of 21:32, 29 January 2025


Description

Use this template to create a reference list in small font for an article. Note that there is no consensus that small font size should always be used for all references; when normal-sized font is more appropriate on an article, use <references /> instead.[1]

Syntax

Type {{reflist|<...>}} where you would normally type <references/>. If used with no parameters, it will produce a reference list with a single column.

Multiple columns

Using {{reflist|2}} will create a two-column reference list, and {{reflist|3}} will create a three-column list. Three-column lists are inaccessible to users with smaller/laptop monitors and should be avoided.

Using {{reflist|colwidth=30em}} will allow the browser to automatically choose the number of columns based on the width of the web browser. Choose a column width that's appropriate for the average width of the references on the page.

Note: multiple columns currently render properly only in Mozilla Firefox and other Gecko-based browsers and Safari 3, though the feature is included in CSS3 so it should work for a larger number of browsers in the future.

Sample output

{{reflist}} gives...

  1. ^ I am a reference

CSS used

.references-small { font-size: 90%; }

See also