Difference between revisions of "Template:Smallrefs"

From Nynorn
Jump to navigation Jump to search
(a starting point for documentation)
(add use of reference group)
Line 1: Line 1:
<includeonly><div style="font-size:{{{1|0.8em}}}; {{#if: {{{columns|}}}|-moz-column-count:{{{columns}}}; column-count:{{{columns}}};}}"><references /></div></includeonly><noinclude>
+
<includeonly><div style="font-size:{{{1|0.8em}}}; {{#if: {{{columns|}}}|-moz-column-count:{{{columns}}}; column-count:{{{columns}}};}}"><references {{#if:{{{group|}}}|group="{{{group}}}"}} /></div></includeonly><noinclude>
 
==Usage==
 
==Usage==
 
  <nowiki>{{smallrefs}}</nowiki>
 
  <nowiki>{{smallrefs}}</nowiki>
 
  <nowiki>{{smallrefs|10pt}}</nowiki>
 
  <nowiki>{{smallrefs|10pt}}</nowiki>
 
  <nowiki>{{smallrefs|columns=2}}</nowiki>
 
  <nowiki>{{smallrefs|columns=2}}</nowiki>
 +
<nowiki>{{smallrefs|group=a}}</nowiki>
  
 
Use in place of <code><nowiki><references/></nowiki></code> when a smaller type size is desired, with optional control over the specific type size and the number of columns rendered (in browsers that implement CSS columns).
 
Use in place of <code><nowiki><references/></nowiki></code> when a smaller type size is desired, with optional control over the specific type size and the number of columns rendered (in browsers that implement CSS columns).
Line 13: Line 14:
 
; <code>columns</code> (or second parameter)
 
; <code>columns</code> (or second parameter)
 
: number of columns for references; this sets the CSS <code>column-count</code> and <code>-moz-column-count</code> attributes
 
: number of columns for references; this sets the CSS <code>column-count</code> and <code>-moz-column-count</code> attributes
 +
; <code>group</code> (needs to be called by name)
 +
:for named groups as per [[w:Wikipedia:Footnotes#Separating reference lists and explanatory notes|reference group]]
 
   
 
   
 
[[Category:Formatting templates|Smallrefs]]</noinclude>
 
[[Category:Formatting templates|Smallrefs]]</noinclude>

Revision as of 12:04, 23 January 2010

Usage

{{smallrefs}}
{{smallrefs|10pt}}
{{smallrefs|columns=2}}
{{smallrefs|group=a}}

Use in place of <references/> when a smaller type size is desired, with optional control over the specific type size and the number of columns rendered (in browsers that implement CSS columns).

Parameters

All parameters are optional.

first paramater (unnamed)
Font size; this sets the CSS font-size attribute ("12px", "10pt", etc.; default is "0.8em")
columns (or second parameter)
number of columns for references; this sets the CSS column-count and -moz-column-count attributes
group (needs to be called by name)
for named groups as per reference group