Template: Refn: Difference between revisions

From A Wiki of Ice and Fire
Jump to: navigation, search
Maester Pounce (talk | contribs)
No edit summary
Mindset (talk | contribs)
correcting errors in the description of this template, adding notes on usage
Line 1: Line 1:
<includeonly>{{#if:{{{name|}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|name={{{name|}}}|group={{{group|}}}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|group={{{group|}}}}}}}</includeonly><noinclude>===Purpose===
<includeonly>{{#if:{{{name|}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|name={{{name|}}}|group={{{group|}}}}}|{{#tag:ref|{{{1|{{{refn|}}}}}}|group={{{group|}}}}}}}</includeonly><noinclude>===Purpose===
This template is used to create footnotes as an alternative and complement to the <nowiki>{{ref}}</nowiki> tag.
This template is used to create footnotes as an alternative and complement to the <nowiki>{{ref}}</nowiki> tag and <nowiki><ref group="N"></nowiki> tag.


===Purpose===
The primary purpose of this template is to permitting nesting of references, necessary when providing a reference within a footnote.
The primary purpose of this template is to permitting nesting of references, necessary when providing a reference within a footnote.


Because of a technical limitation, some of the standard markup elements that are often used in the article prose do not work within a set of <nowiki>{{ref}}</nowiki> tags, including but not limited to the pipe trick, template substitution, and another "nested" set of <nowiki>{{ref}}</nowiki> tags. For example, the following does not work as expected:
Because of a technical limitation, some of the standard markup elements that are often used in the article prose do not work within a set of <nowiki>{{ref}}</nowiki> tags, including but not limited to the pipe trick, template substitution, and another "nested" set of <nowiki>{{ref}}</nowiki> tags.


===Usage===
===Usage===
<pre><nowiki>{{refn|2=group=groupname|3=name=name|4=Contents of the footnote|allowlinebreak=yes}}</nowiki></pre>
<pre><nowiki>{{refn|group="groupname"|name="name"|Contents of the footnote, including <ref> tags if needed|allowlinebreak=yes}}</nowiki></pre>


:* '''groupname''': If not specified, then the main and nested references will be rendered into the same reference list
:* '''groupname''': Usually "N", to place the footnote within the Notes section of the page. If not specified, then the main and nested references will be rendered into the same reference list.
:* '''name''': Reference name
:* '''name''': Reference name


Line 17: Line 16:


Currently, this template may not be used more than once within list-defined references. Doing so will result in Cite errors.
Currently, this template may not be used more than once within list-defined references. Doing so will result in Cite errors.
[[Category: Templates]]
</noinclude>
</noinclude>

Revision as of 18:11, 17 April 2018

Purpose

This template is used to create footnotes as an alternative and complement to the {{ref}} tag and <ref group="N"> tag.

The primary purpose of this template is to permitting nesting of references, necessary when providing a reference within a footnote.

Because of a technical limitation, some of the standard markup elements that are often used in the article prose do not work within a set of {{ref}} tags, including but not limited to the pipe trick, template substitution, and another "nested" set of {{ref}} tags.

Usage

{{refn|group="groupname"|name="name"|Contents of the footnote, including <ref> tags if needed|allowlinebreak=yes}}
  • groupname: Usually "N", to place the footnote within the Notes section of the page. If not specified, then the main and nested references will be rendered into the same reference list.
  • name: Reference name

Errors

If the reference or note content is missing, a Cite error will be generated.

Currently, this template may not be used more than once within list-defined references. Doing so will result in Cite errors.