Template:Sfn/doc

Shortened footnote template

Purpose
Creates a short author-date citation in a footnote. Features:
 * Automatically combines identical footnotes.
 * Automatically creates a one-way link to a citation template at the bottom of the page. The anchor is created only if you add the parameter harv to the citation template. The link only operates if the parameters last, last2... and year of that citation template match the first arguments to sfn. (It is also possible to use the citation template's ref parameter to create an anchor that this template will link to. See sfnRef)

Usage


Instead of using the optional loc parameter, you may also use one of the following parameters:


 * page
 * pages


 * Notes
 * The first parameter is the author's last name.
 * Up to four authors can be given as parameters (see the examples). If there are more than 4 authors only the first 4 should be listed; listing more will cause odd things to happen.
 * The next parameter is the year of publication.
 * The "loc = " parameter is the location of the cited material within the reference. This parameter is optional.
 * The parameter p is an optional page parameter; thus " " yields "".
 * The parameter pp is an optional page range parameter; thus " " yields "".
 * For authors who have published more than one work in the same year, the standard way to differentiate such works is to put a lowercase letter after the year (e.g. year=2006a and year=2006b).
 * If multiple references are made to the same location of the same work, only one footnote is generated.
 * If additional comments are needed, use Harvnb or Harvtxt in

Editors editing this template are requested to consider making parallel changes to Harv, Harvnb and Harvs.

Examples

 * {| class="wikitable"

! Markup !! Result Combined footnotes and other situations where this template is inappropriate.
 * Article text.
 * Article text. Citing multiple pages.
 * Article text. A location, rather than a page number.
 * Article text. A second citation of the same page.
 * Article text. Two authors.
 * Article text. Three authors.
 * Article text. Large numbers of authors.
 * Article text. More text. Two papers in the same year.
 * Article text. One author, no year, no page.
 * Article text. Corporate author (no author in citation template).
 * Article text. A particularly unusual citation
 * Article text. More article text.
 * Article text. Two authors.
 * Article text. Three authors.
 * Article text. Large numbers of authors.
 * Article text. More text. Two papers in the same year.
 * Article text. One author, no year, no page.
 * Article text. Corporate author (no author in citation template).
 * Article text. A particularly unusual citation
 * Article text. More article text.
 * Article text. Large numbers of authors.
 * Article text. More text. Two papers in the same year.
 * Article text. One author, no year, no page.
 * Article text. Corporate author (no author in citation template).
 * Article text. A particularly unusual citation
 * Article text. More article text.
 * Article text. One author, no year, no page.
 * Article text. Corporate author (no author in citation template).
 * Article text. A particularly unusual citation
 * Article text. More article text.
 * Article text. A particularly unusual citation
 * Article text. More article text.
 * Article text. A particularly unusual citation
 * Article text. More article text.
 * Article text. More article text.
 * Article text. More article text.
 * ==Notes==
 * ==Notes==

Anchor IDs
This template generates an HTML IDd as an anchor to link the short citation to the full citation.. The harv field is necessary in each of the  templates to enable the id. The citation template always generates an id.

If the article cites multiple works by the same author in the same year, then duplicate IDs will be generated. One method to resolve this is to add an alpha suffix to the year. Example: 2009a, 2009b, 2009c.

If works are cited where the author or year is unknown— such as for a web page —then an invalid ID will be generated. To resolve this, create a custom ID:



Where cite_name is a name such as the publisher, and must follow these rules:
 * Must begin with a letter A-Z or a-z
 * Can be followed by: letters (A-Za-z), digits (0-9), hyphens ("-"), underscores ("_"), colons (":"), and periods (".")
 * Spaces in the ref field must be replaced with underscores
 * Case-sensitive

SfnRef
You may use the SfnRef template to generate the proper value for the ref parameter. Pass the same parameters used with sfn to SfnRef:

Articles using should be checked for duplicate IDs with the W3C Markup Validation Service.

Implementation notes
This template call should have exactly the same functionality as