Template:Reflist/doc

From TVPaintWiki
Revision as of 02:27, 28 October 2016 by Nate Spidgewood (Talk | contribs) (Created page with "{{Documentation subpage}} {{Ombox | type=notice | text = Columns are not supported by some older browsers, most notably Internet Explorer 9 and below and Opera 11.0 and below....")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

{{#ifeq:reflist/doc |doc

    | 

{{#ifeq:show |show

         | {{#invoke:Message box|mbox}}
        }}{{#if: |
         |   {{#ifexist:Template:Reflist/doc
                  | [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
                  |
                 }}
        }}
    | 
   }}

{{#invoke:Message box|ombox}}

This citation template provides formatting and organizational features for footnotes. It encapsulates the {{#switch:s

|c|close  = 
|s|single
|o|open
|p|pair   = <references{{#if:| {{{params}}}}}

}}{{#switch:s

|c|close  = 
|s|single =  />
|o|open   = >
|p|pair   = >...

}}{{#switch:s

|s|single
|o|open   = 
|c|close
|p|pair   = </references>

}} tag used by the cite.php MediaWiki extension to show the list of references as defined by {{#switch:o

|c|close  = 
|s|single
|o|open
|p|pair   = <ref{{#if:| {{{params}}}}}

}}{{#switch:o

|c|close  = 
|s|single =  />
|o|open   = >
|p|pair   = >...

}}{{#switch:o

|s|single
|o|open   = 
|c|close
|p|pair   = </ref>

}} 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 {{#switch:s

|c|close  = 
|s|single
|o|open
|p|pair   = <references{{#if:| {{{params}}}}}

}}{{#switch:s

|c|close  = 
|s|single =  />
|o|open   = >
|p|pair   = >...

}}{{#switch:s

|s|single
|o|open   = 
|c|close
|p|pair   = </references>

}} tag.

Parameters

  • First unnamed parameter:
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 (e.g., {{#switch:s
|c|close  = 
|s|single
|o|open
|p|pair   = <ref{{#if:name=name| name=name}}

}}{{#switch:s

|c|close  = 
|s|single =  />
|o|open   = >
|p|pair   = >...

}}{{#switch:s

|s|single
|o|open   = 
|c|close
|p|pair   = </ref>

}}); 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; the value should correspond to that used inline, e.g., Template:Tlx renders all references with groupname as the group name ({{#switch:o
|c|close  = 
|s|single
|o|open
|p|pair   = <ref{{#if:| {{{params}}}}}

}}{{#switch:o

|c|close  = 
|s|single =  />
|o|open   = >
|p|pair   = >...

}}{{#switch:o

|s|single
|o|open   = 
|c|close
|p|pair   = </ref>

}}).

  • 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.<ref>ipsum</ref><ref>dolor</ref><ref>sit</ref><ref>amet</ref> Consectetur.<ref>adipisicing</ref><ref>elit, sed</ref><ref>do</ref>

1 }}
     | references-column-width 
     | references-column-count references-column-count-{{#if:1|3}} }}
   | {{#if: 
     | references-column-width }} }}" style="{{#if: 3
   | {{#iferror: {{#ifexpr: 3 > 1 }}
     | -moz-column-width: {{#if:1|3}}; -webkit-column-width: {{#if:1|3}}; column-width: {{#if:1|3}};
     | -moz-column-count: {{#if:1|3}}; -webkit-column-count: {{#if:1|3}}; column-count: {{#if:1|3}}; }}
   | {{#if: 
     | -moz-column-width: {{{colwidth}}}; -webkit-column-width: {{{colwidth}}}; column-width: {{{colwidth}}}; }} }} list-style-type: {{#switch: 
   | upper-alpha
   | upper-roman
   | lower-alpha
   | lower-greek
   | lower-roman = {{{group}}}
   | #default = decimal}};">
<references group=""></references>

See also