Template:SfnRef/doc

This template creates an identifier that is used as a link anchor for short citations. Many articles are cited with shortened footnotes, which usually link to full citations at the bottom of the page. SfnRef accepts the same parameters as most short citation templates and create matching anchors when used in the ref parameter of the full citation. Most templates will automatically generate the anchor, or landing point, for links. The anchor can be created manually in situations where the automatic anchors would cause issues including:


 * Multiple authors with the same last name
 * No known last name for the author
 * Unusual characters in the author field
 * Multiple works in the same year by the same author
 * Year of publication unknown

Additionally some less commonly used citation templates, and all full citations written by hand can only be linked to with a manually created anchor.

Examples
When citing an article published in the December 2004 edition of Rolling Stone where the author is unknown, you might create a short footnote as follows:

You may code the value for the ref parameter manually, or you can use and specify the same parameters as used with :

The full footnote:

You can copy and paste the template code and change the name of the template from "Sfn" to "SfnRef". If your short footnote includes page numbers such as, you can copy and paste it to create ; the 48 parameter is not necessary but will do no harm.

Usage
The template accepts up to four names and a year of publication. If there are more than four authors, list only the first four. The last parameter is the year of publication, optionally with a letter suffixed if there are multiple citations by the same set of authors in the same year. All named parameters, such as p are ignored.

Purpose
This template creates the proper value for the ref parameter of Citation Style 1 templates (,, , etc.) and the generic Citation Style 2 template. It is intended to be paired with, , , , and related templates, and uses the same arguments. As explained above, is only necessary in a subset of the cases where those are used.

and its variants create a short footnote that is linked to a full footnote. The templates create the link automatically, but the full footnote must be assigned the proper ID value to be a valid target for that link. This usually happens automatically using the full-citation template's author/editor and date/year parameters, but some cases need a custom anchor, and that is what is for.

When using the Citation Style 1 and 2 family of citation templates, a default ID is generated from the last names of the first four authors (or editors if there are no authors specified). However, if none of last, author, editor-last, or their equivalents are present, use inside the CS1/CS2 template's ref parameter to create a link anchor (perhaps using the publisher name or work title or an abbreviation thereof) without having to know the rules for how, etc., interpret the anchor ID string which is normally auto-generated.

The Vcite journal etc. templates (with, not   names)  the use of  to work with , , and related templates.

For use with CS1/CS2 templates, and its  companion produce the most consistent citation formatting. For use with Vancouver citation templates (and any other citation styles that do not put dates in parentheses/round-brackets), the matching short-footnote templates are and.