# வார்ப்புரு:Harvard citation documentation

The **Harv** family of templates are used for creating *short-cites* (or "short citations"), typically used as *in-line citations*, that link to the *full citation* (with the full bibliographic details) for a source. This enables a source to be cited multiple times, with each short-cite having an *in-source specification* (such as a page number) and any other details or comments pertinent to that specific instance. This functionality eliminates the need for replicating notes with "named-refs" (the "&lt;ref name= ...>" construct).  

The **sfn**—"shortened footnote"—templates create notes (footnotes) containing harv templates.  

Note that the use (or even non-use) of these templates is an element of citation "style", and adding or removing them in articles with an established style should be consistent with that style. See WP:CITEVAR.  

## Usage
### Default mode
In its default mode } generates an "author-date" style short-cite from the following parameters:  

: <code>&#123;&#123; } | &lt;*> | &lt;> | &lt;> | &lt;> | &lt;*> | p= &lt;> | loc= &lt;> &#125;&#125;</code>  

with  
:- &lt;>–&lt;> – positional parameters; names of one to four authors; &lt;> required  
:- &lt;> – required; four-digit year; may have a lowercase disambiguation letter  
:- – specific page referenced in the source  
:- – comma separated list of individual pages and / or range(s) of pages referenced in the source  
:- – in-source location when and are inappropriate; may be used to supplement and ; information such as a section or figure number.  

} follows the standard convention that a list of four author names is reduced to the name of the first author followed by "et al." (Latin for "and others"). Where two or more short-cites have the same author(s) and year, but refer to different citations, a lowercase letter can be appended to &lt;> to disambiguate them. (E.g.: <code>&#123;&#123; } | Smith | 2000a&#125;&#125;</code>; <code>&#123;&#123; } | Smith | 2000b&#125;&#125;</code>).  

To link to a full citation, the author(s) and year must match those used in the cite or citation template. The template automatically generates the proper "author-date" anchor. The family of templates do not do this unless is added.  

This template can be placed in the text if so desired, but most commonly is placed inside a note (that is, between tags). Additional information, comments, and even other short-cites can be placed in the same note.  

### Alternate mode
While } requires an initial string of text, there is no requirement that it be a "proper" name. This permits some useful alternatives in the following form:  

: <code>&#123;&#123; } | &lt;*> | &lt;*> | p= &lt;> | loc= &lt;> &#125;&#125;</code>  

#### Example: newspapers
When citing newspaper articles the name of the newspaper is often considered more important than the actual authors (which often are not identified), and it is also conventional bibliographic practice that newspaper articles are listed chronologically under the name of the newspaper. Also, for daily or weekly publications a more precise date is usually required. In such cases a valid short-cite might be:  

:.  

This is generated with the following template:  

:.  

The anchor for the link is given to the or the template using a template in a parameter. In this case that would look like:  

:  

The harvid template should be given exactly the same identifying text and year as used in the } template.  

#### Example: multi-volume works
The *Assessment Reviews* of the Intergovernmental Panel on Climate Change (IPCC) consist of multiple reports with many independently authored (and therefore separately cited) chapters. In such cases, where "Smith et al. 2014" could refer to either chapter 11 ("Human Health") in the report of Working Group II in the fifth review, or to chapter 11 {"Agriculture") in the report of Working Group III in the fifth review, the "author-date" form is inadequate; an indexed form of short-cite, such as  

:.  

is more meaningful, and handier to use and keep track of. This is generated with:  

:.  

For both {citation} and {cite} templates the anchor is specified with:  

:  

#### Other examples
Other examples of alternative ways to use Harv templates can be seen at Global Warming.  

## Placing the template in the body of the article
: <code>**}** | last name(s) of author(s) | year | p=page number</code> *or* <code>pp=page range</code> *or* <code>loc=other location</code>  
Last names of editors can be used, if no authors are given, as author names are given precedence.  

**If more than four authors, truncate the list to the first four.**  

In the references section (or in an earlier footnote):  
: <code>cite book</code> *or* <code>cite journal</code>*, etc* | <code>**ref=harv**</code> | *... other appropriate parameters ...* <code></code>  
or  
: <code>citation |</code> *... other appropriate parameters ...* <code></code> ( is not required when using ).  

### Parameters

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

(All these examples have links which operate. Click on highlighted text.)  

The optional parameters , and 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. For single pages, use ; and for multiple pages (such as ranges), use . Use of for multiple pages or for single pages can cause .  

The optional parameter is used to specify the reference value that links the short citation to the full citation. This parameter is usually not necessary and it is more common to use or in the reference section. If you specify no hyperlink is created. Note that, if one does not want the link, it is always possible to simply not use the template. (Not available in and similar templates.)  

### Aliases
The parameters and exist as aliases for and respectively.  

### Author–date citation templates
There are several templates used to create in-text citations; they differ in the use and placement of parenthesis, in the separator before the page or location and in whether a terminal full stop (period) is present:  

**Article text.**

| Article text. | } |
| --- | --- |

Full citations can be created manually or by templates:  

- templates
- 

All of these templates have the same parameters and basic functionality. This page describes all of them except the parameters of and ; please see their documentation pages. Editors editing one of these templates are requested to make parallel changes to the other versions.  

### Applications in the body of the article
#### Harvard citation:

Template creates a with a link to the full citation in the references section at the bottom of the article.  

#### Shortened footnote: or

Template inside a span can be used to create a that is linked to the full citation at the bottom of the article. Template (without the use of ) has the same effect, automatically adds a period (full stop) after the page number, and combines identical footnotes automatically.  

#### In text attribution:

Template can be used to link an to the full citation at the bottom of the page.  

#### Bundled citation: or

Template can be used to bundle citations. also produces bundled citations.  

: two or more templates with same authors, same year, same page, but different will result in a message. This message happens because the reference names that creates will be the same but the content between the tag and the tag will be different. A work-around is to convert one or some of the templates to wrapped in tags.  

#### No closing period:

Using in removes the final period. Compare the two examples. Suppressing the default period (full stop) ensures consistency with , as produced by , which does not use a trailing period (full stop) in notes. The postscript is only effective the first time is used for a particular author, year and location. will also suppress terminal punctuation. Follow-on editors who encounter 'empty' parameters can't know if a previous editor intended to leave that parameter blank. Using the keyword is a positive indication of the previous editor's intent.  

#### Adding a URL for the page or location
If a specific link to the page or section is available, a URL can be added to the location or page number.  

## Corresponding edits to the Reference section required

The Harvard citation templates used in the body of the article contain links. These links can find anchors in the references section, provided the anchors are included within , or similar templates. To make the anchor, parameter must be set. This is not necessary for , but is normally necessary for the others.  

## Possible issues
### Wikilink to citation does not work
If an article is using this template, and nothing happens when you click on the highlighted wikilink from a Harvard style citation to a full citation at the bottom of the page, there are several possible solutions. If:  
1. The correct citation does *not* appear at the bottom of the article. **Solution**: Find the source (it may be copied from an article on a similar subject), and check that it verifies the text. If the source can't be found, tag the citation with .
1. The correct citation appears at the bottom of the article, and
  1. The Harvard citation uses a template (such as or ):
    1. The citation uses a template from the list at :
      1. The name is spelled or capitalized differently here than the citation. **Solution**: check the source for the correct spelling.
      1. The year is different here than the citation. **Solution**: check the source for the correct year.
      1. The citation template requires (not needed for , but is needed for most other templates). **Solution**: Add .
      1. The template has a field and no field, but the format of the field is unusual. **Solution**: Try to fix the date. If the link still does not work, add to the citation template. (It's okay if it has both.)
      1. The citation does not have an author's, or an editor's, last name (authors take precedence over editors). **Solution**: check that is set correctly (see below).
    1. The citation uses a template. **Solution**: check that is set correctly (see below).
    1. The citation uses a template that does not support (See ). **Solution**: An anchor can be created using <code>*args**citation*</code>.
    1. The citation does not use a template:
      1. It has no wikicode to create an anchor. **Solution**: If citation templates are used liberally throughout the article, then reformat the citation with the appropriate template and set the appropriately. Otherwise consult with local editors on the talk page about how to proceed. Either add templates and templates, or remove all templates, depending on what local editors prefer. A few articles use to create an anchor as an alternative to standard templates.
      1. Uses a span to create an anchor. **Solution**: remove the cite span (these are deprecated) and proceed as with the previous.
      1. Uses . **Solution**: Check that matches.
  1. If the Harvard citation uses a handwritten wikilink, such as <code></code>
    1. The citation uses a citation template which supports (See ). **Solution**: Check that is set to a matching id.
    1. Otherwise, check that the reference has <code>*id**citation*</code> with a matching id.

Templates that have broken wikilinks using these templates are added to the category .  

### More than one work in a year
Where there is a need to cite more than one work *by the same author published in the same year*, the standard way to disambiguate such works is to add a letter suffix after the year element of the template (e.g. and ).  

#### Templates that use Module:Citation/CS1
When is used with or templates, a year-suffix letter may be added to for all accepted date formats except year initial numeric . It is not necessary to include both and . If both are included, is used for the <code>CITEREF</code> anchor to be compliant with legacy citations.  
:: simple year only dates  
: or : month or season and year dates  
: or : full dates  
: or : month or season ranges and year dates  
:: circa year dates  
: or : year ranges  
:: no date (n.d.)  
:

: not supported, the template must use  

#### More than one author with the same last name
The above solution to add a letter suffix after the year element also works for multiple authors with the same last name. For example, both Richard Bushman and Claudia Lauper Bushman published books in 2006. To differentiate between the two books, the first one is given the year "2006a" and the second one "2006b".  

### Large numbers of authors
Only the first four authors are required by the template. Listing more is not supported. It is also possible to use the in the citation template, which allows a more concise citation in the article text.  

### No author name in citation template
Some sources do not have a single author with a last name, such as a magazine article or a report from a government institution. There is no consensus (in Wikipedia or among citation styles) about how to format author–date citations to works that do not have a specific author. Several choices are:  
1. For a newspaper or periodical you may use the name of the paper and the date.
1. For a publication by an institution, use either:
  1. The initials of the institution
  1. The name of the institution
1. Alternatively, some style guides recommend using the title of the article.
1. Other style guides recommend using "Anonymous" or "Anon."
An article should adopt one of these styles consistently. Using in the citation template can handle these cases.  

### Citation has and no
Either the or of a citation template can be matched—the template logic can extract the year from a full date. If the date parameter is not a full date, then the extraction will fail. If the link does not seem to work, it also possible to set both and parameters. The template will display the date and use the year for the anchor. If only the year is known the field must be used in the citation for the link to work correctly (i.e. may not work correctly). These two examples show a year being successfully extracted from full date.  

### Citation template does not support
The family of templates use parameter to create an anchor for the Harvard citation templates. This must be set to a concatenation of the parameters passed to the Harvard citation template.  

### Citation format does not support anchors:
In a few very rare cases, it may be impossible for the citation templates to create an anchor. Either (1) the citation is formatted with a template that does not support the parameter or (2) the source can't be described using our citation templates at all. In these cases, it is possible to use to make the anchor. (As of November 2010, there are only approximately 100 articles that require this technique.) It is also possible that (3) local editors would prefer not to use citation templates. In this case, it is important to discuss what the local editors would like to do about the bad links. It is always possible to simply remove or .  

It is also possible to use to achieve the same effect, but this may not be compatible with HTML 5.  

### Citation has multiple authors and no date
The templates assume that the last field is the year. Where there are multiple authors and no year the template will form a correct link but will display the last author as if it were a year. To force the displayed text to show all authors as name, the following work around may be used:  

## Recommended style
The recommended Harvard referencing style potentially uses all four templates. Each automatically generates a hypertext link based on the name(s) and date. Here is an example  

In short:  
1. For a single work with no author in the text (the most common case), use .
1. For a single work with the author named in the text, use .
1. For multiple works at the same point, use explicit parentheses and separated by semicolons.
1. For anything more complicated use .

## Implementation notes
These templates use two elements: a wikilink in the body of the article, and an anchor in the reference section of the article. Clicking on the wikilink repositions the page at the anchor.  

### Citation template anchor

The most common citation templates are or . If is set, then Module:Citation/CS1 and create an anchor followed by the concatenation of the following parameters:  
- **last** or **last1** or **surname** or **surname1** or **author** or **author1** or **authors**,
- **last2** or **surname2** or **author2**,
- **last3** or **surname3** or **author3**,
- **last4** or **surname4** or **author4**,
- **editor-last** or **editor-surname** or **editor1-last** or **editor1-surname** or **editor** or **editors**,
- **editor2-last** or **editor2-surname**,
- **editor3-last** or **editor3-surname**,
- **editor4-last** or **editor4-surname**,
- **year**.
Template sets as the default.  

This covers the most common templates. Information about all the templates is available at .  

Use of the **date** parameter in place of the **year** parameter in citation templates is preferred when full dates are known.  

### Harvard citation wikilink
The Harvard citation templates create a wikilink to the anchor. For example produces the link and produces the anchor .  

### Using CITEREF directly
A few articles create a custom ID using , either in place of the Harvard citation template (e.g. <code></code>) or as a value for in the citation template.  

Examples:  
- 
- 
- 
Where is a name such as the publisher.  

### 's ref name
Template creates a named footnote, so that identical footnotes are combined automatically. The footnote name begins with followed by a concatenation of the arguments to . E.g.: this template call should have exactly the same functionality as which, in turn, has the same functionality as .  

The ref name becomes more complicated when the page (p) parameter includes a URL, e.g. , which, once defined, can be called by . The "p=" and the characters |,:,.,/,?,=; are therefore stripped out of the URL.  

The call to has been subst'ed for quicker load times.  

<noinclude>  

</noinclude>