User:CharlesGillingham/TEMP 9

The harvard citation templates create an author-date citation with a one-directional link to the first matching citation template on the same page.

Templates that create Harvard citations in text:
 * Harvard citation or harv for a basic Harvard citation
 * Harvard citation no brackets or harvnb for a Harvard citation with no brackets
 * Harvard citation text or harvtxt for a Harvard citation with the name outside the brackets
 * Harvcol for a harvard citation with a colon before page numbers
 * Harvcolnb ditto, without brackets
 * Harvcoltxt ditto, with the name outside the brackets
 * Harvard citations or harvs for multiple Harvard citations and other more complicated features.

Template that creates a Harvard citation in a footnote:
 * Sfn (shortened footnote template)

All of these templates have the same parameters and basic functionality. This page describes the first six in detail; for the others see their documentation pages.

Usage
In the body of the article:
 *  

In the references section (or in an earlier footnote):
 *  

Up to four authors can be given as parameters. (If there are more than 4 authors only the first 4 should be listed. See, below.) The last parameter is the year of publication.
 * Parameters

The optional parameters p, pp and loc can be used to indicate the location in the source. All of the harvard citation templates use the same parameters to indicate page numbers or other locations in the text.

The parameter Ref is used to specify the reference value that links the short citation to the full citation. This parameter is optional and is usually not necessary. If you specify none no hyperlink is created. (See the examples. Not available in sfn.)

The links in the harvard citation templates can find anchors in most of Wikipedia's citation templates, such as Citation, Cite book, Cite journal or Cite web (or any of several others). To make the anchor, parameter harv must be set. This is not necessary for, but is normally necessary for the others.
 * Reference section

Harvard citation: harv

 * See also: 

Template harv creates a parenthetical reference with a link to the full citation in the references section at the bottom of the article. (All the links in these examples have links which operate. Click on highlighted text "").

{| class="wikitable" ! width=700 | Markup !! width = 300 | Result
 * Article text.
 * Article text.

Shortened footnote: harvnb or sfn

 * See also: 

Template harvnb inside a span can be used to create an author-date citation in footnote that is linked to the full citation at the bottom of the article. Template sfn has the same effect and it also combines identical footnotes automatically.

{| class="wikitable" ! width=700 | Markup !! width = 300 | Result More article text. Still more article text.
 * Article text.
 * Article text.

In text attribution: harvtxt

 * See also 

Template harvtxt can be used to link an in-text attribution to the full citation at the bottom of the page. {| class="wikitable" ! width=700 | Markup !! width = 300 | Result


 * According to ...
 * According to ...

Bundled citation: harvnb

 * See also: 

Template harvnb can be used to bundle citations.

{| class="wikitable" ! width=700 | Markup !! width = 300 | Result
 *  Article text.
 * Article text.
 * Article text.
 * Article text.
 * Article text.

Names or years are misspelled, wrong, or there are spaces
A space before or after the author name or before the year is significant; they produce an underscore in the hyperlink. So, " " yields "" which links to #CITEREFSmith_2006.

Citation template needs harv
When using citation templates such as cite book for references, include the parameter |ref=harv in the citation template to add the target of the footnote link to each reference. This is not necessary for, but is normally necessary for the others.

Citation template does not support ref at all
There are a few citation templates which don't support ref, such as cite report.

Source can't be described with a citation template
These technigues can be used in cases where editors are opposed to the use of citation templates on principle. (Although, in this case note that it may actually be wiser to remove the harvard citation templates as well, giving the article a more consistent citation format.)

Citation template uses date field
Either the year or date of a citation can be matched – the template logic can extract the year of from a full date. However if only the year is known the year field must be used in the citation for the link to work correctly (i.e. 2005 may not work correctly).

Using an external link for the page number
Some times editors add an external link to part of the source.

ref
The parameter Ref is used to specify the reference value that links the short citation to the full citation. This parameter is optional and is usually not necessary. If you specify none no hyperlink is created. (See the examples. Not available in sfn.)

 

Old material

 * Parameters
 * 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.

Editors editing this template are requested to make parallel changes to the other versions.