Template:Refn/doc

This template is for inserting references that may require more complex content than just plain text with links - the most common use-case is nesting references.

Normal  tags cannot directly contain any parser/preprocessor functions. This includes standard parser functions, particularly  and similar, as well as other   tags. For parser functions, a way to counter this is to use a template to abstract the function. An alternative method is to use the  parser function - which is what this template does, more cleanly.
 * About

In addition, preprocessor extensions (like  tags) must be nested in this way.

Usage
Refn also supports the two most commonly used extra parameters,  and  :

As mentioned, the most common use-case is nesting references. When nesting references, the outer  tags must be replaced by this template - the innermost tag can remain a   tag, but Refn cannot be inside a   tag at all. The standardised CiteX templates (e.g. Template:CiteGeneral) all utilise this method already, so are nestable.
 * Nesting

Note that the references will be in ordered in parsing order, which is the innermost to the outermost - this is generally not the most logical order for reading, so making footnotes of footnotes or citations of citations is not advised - mix groups.

Examples
* text
 * Markup
 * text 2
 * text 3


 * Reflist
 * Result
 * text
 * text 2
 * text 3


 * Reflist

Here you can clearly see the inner tags sorted before the outer tags.