# வார்ப்புரு:Citeref/doc



## Description
This template can be used to create wiki-links to existing citations defined in the same article through CS1/CS2 (and many other) citation templates. It uses a (partial) reimplementation of the anchor-creation done by , to make it easier to create footnote links in a consistent format. By default, links will be styled as small superscript labels (like <sup>[n]</sup>) similar to those created by Mediawiki's <code></code> tags, but plain text links are possible as well.  

A typical use is inside of , if the quotation refers to other works defined as citations in the same article, but the template can also be used in many other locations inside and outside of citation templates, including in other parameters.  

While it is possible to create direct piped links like <code></code>, usage of the template is preferred as it hides the internal CITEREF-anchor-composing details away from the user. Since the template can be centrally updated it is easier to maintain in the future than adjusting hardcoded links all over the place. Also, in the case of superscript labels, the template ensures a consistent appearance and safe coding usable inside of citations without the user having to remember HTML syntax etc. to achieve the effect.  

## Usage
By default, the template supports 1 to 4 author name parameters (as per ) followed by 1 date parameter (also as per ) to compose the appendage to <code>CITEREF</code> in order to match the internal anchor created by the citation template this link should point to. The last unnamed parameter is the label text that should be displayed as link text, e.g. "a", "b", "c", etc.  
While this does not affect the functionality please make sure that these labels do not clash with other labels used for citations or notes in the same article in order to avoid confusion for users (that is, if small letters or Arabic numbers are already used, you could e.g. use capital letters or Roman numbers instead). Also, since the sequence of labels in an article may change when additional links are added or the arrangement of citations changes, it might be beneficial to use a citation-relative numbering scheme (e.g. (re-)start with "A" in each new citation) instead of having to frequently renumber an article-wide absolute name scheme (e.g. starting with "A" in the first citeref link in an article).  

If only one parameter is given, the label text will be the same.  

The optional named parameter can be used to switch the display style from the default superscript labels to plain text.  

Using the optional or parameters the template can be used for other anchor name styles in order to support special cases.  

In order to avoid dangling links, please check the links by clicking on them after creation and when changing the author/editor names or dates in the corresponding citations. (A future version of the template might automatically detect dangling links and throw error messages, see Module talk:Footnotes/Archive 1#broken harv link reporting and Help talk:Citation Style 1/Archive 66#make ref=harv the default for CS1.)  

## Examples
Example reference definitions:</nowiki> markup level rather than on citation template anchor level)  
- (a different method to create nested links working on markup level rather than on citation template anchor level)
- Wikipedia:Citation templates
-