User:Diannaa/Citation templates

__NOINDEX__

Advantages of sfn templates
The use of the sfn (Shortened FootNote) template provides numerous advantages over traditional and hard-coded citation and reference syntax:
 * sfn templates automatically collate identical citations, thus avoiding naming inconsistencies and errors (see the first example below for an explanation of this).
 * sfn templates create clickable links from the citation to the relevant source information in the bibliography.
 * Citations and sources that use templates are accessible to bots. For example Citation Bot can automatically add detail such as DOIs, PMIDs, JSTOR info, additional authors, and any other material missing from citations (particularly in journal sources).
 * The templates have over fifty parameters, of which a dozen are commonly used. Without the use of templates it is necessary to add a great deal of wiki and HTML mark-up to format sources consistently – something that is a practical impossibility to achieve across differing articles and editors. By wrapping reference and citation information in templates, consistency is established which allows readers to find similar information as they move between articles (e.g. author, date, title, publisher, and ISBN information is always in the same place in the rendered source).
 * The use of templates mean that consensus decisions about changes in reference formatting (e.g. the order of elements, what should be bracketed, formatting such as italics, hyperlinks, etc.) instantly get applied to all articles that use the templates.
 * The sfn template greatly reduces the amount of citation syntax placed within the article text – something that makes it easier for editors to navigate underlying article text as they edit. Consider the following two examples of citation syntax (within the main body of article text), the first using sfn syntax and the second not:
 * In the first example, the vast bulk of the source information will be tucked away at the end of the article (under a References section), where it can be used by multiple citations, and where it does not inject any unnecessary reference syntax into the article text.
 * In the first example, the vast bulk of the source information will be tucked away at the end of the article (under a References section), where it can be used by multiple citations, and where it does not inject any unnecessary reference syntax into the article text.
 * In the first example, the vast bulk of the source information will be tucked away at the end of the article (under a References section), where it can be used by multiple citations, and where it does not inject any unnecessary reference syntax into the article text.


 * There is a script available at User:Ucucha/HarvErrors that will help the editor locate and correct citation errors, for example citing a book that is not actually present in the bibliography.
 * The use of templates do not adversely affect article load times. Here is an article that uses over 250  templates, and the load times are more than acceptable – especially when considered in relation to the benefits the templates provide in such a lengthy article.

Simple usage
For its simplest (and most common) usage, a citation uses three parameters, for example.
 * The first two parameters (author surname and year) uniquely identify the source out of all of the sources used in the article. In the above example, the author's surname is Smith and the year the source was written is 1985.
 * The last parameter identifies the location in the source, e.g. "p=484" means page 484. To indicate a page range, use something like "pp=50–57", and to indicate some other location in the source use something like "loc=Rear cover", "loc=foreword", or "loc=xxiv".
 * If the source has more than one author, simply extend the second parameter with addition surnames, e.g.

Examples

 * A simple example of the use of the sfn template can be found in article. Note:
 * the splitting of Citations and Sources in the References section. No matter how many times a source is cited in the article, the full definition of the source appears only once. For example, even though the "Best, Terence (November 1985)" journal source is cited twice, the lengthy description of the journal information appears only once.
 * the use of the  parameter in the  template. It is this parameter that enables sfn to operate correctly with the source cite template.
 * the referencing and citation hyperlinks that are automatically rendered to assist the interested reader. Within the article text, a hyperlink appears in the citation number and pop-up (e.g. when the mouse is hovered over something like [99]) which directs the reader to the appropriate entry in the Citations section. If that appropriate citation is clicked, the reader is automatically directed to the appropriate entry in the Sources section. To the left of each Citation entry is a hyperlink (marked by ^ ) which directs the reader back up to the point in the text where the citation has been placed. The editor need do nothing to establish these linkages because they are provided by the sfn and cite templates automatically.
 * that no additional  syntax is needed as the sfn template automatically formats everything needed for correct operation.
 * A more involved example of the use of the sfn template can be found in this article. Note:
 * the article does not contain a single use of the  syntax.
 * the use of more than one author in a single source:.
 * that a reasonably lengthy article is pleasant to edit because the large amount of referencing and citation syntax is moved to be after the bulk of the article text.
 * An example of using a sfn template where the source cannot be identified with a simple surname/year pair can be found in this article. Note:
 * the  citation syntax. This has been achieved by adding the   parameter to the relevant cite template in the Sources section near the end of the article text. The sfnRef parameter can be used to link sfn citations to sources in a number of cases: where there are unusual characters (e.g. the italics in the above example), where there is not a unique combination of surname and year (e.g. the same author wrote two sources in the same year), or where there isn't available author/year information.