| This template is used on approximately 6,300 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
| This template uses Lua: |
The harv ("Harvard citation") template creates a short citation in the form of "(Smith 2007, p. 22)", for use inside explanatory notes. It is occasionally used in project namespace for essays. It can be used within footnotes, but should not be used in the body text of any article. Since 2020, inline parenthetical references have been deprecated on Wikipedia. Any usage of parenthetical references in the body of an article can be converted to footnotes.
It is used to create shortened footnotes, a citation style which pairs a short, author-date citation in a footnote with a complete citation in the references section at the end of the article (see example below). This citation style is used to simplify multiple citations to the same source and to reduce clutter in the edit window.
harv is a stylistic alternative to {{sfn}}. When placed in <ref>...</ref> tags, it behaves the same way as {{sfn}} but formats the short citation slightly differently.
| Markup | Renders as |
|---|---|
Article text.{{sfn|Smith|2020|p=25}}
{{reflist}}
|
Article text.[1]
|
Article text.<ref>{{harv|Smith|2020|p=25}}</ref>
{{reflist}}
|
Article text.[1]
|
Unlike {{sfn}}, identical short footnotes with harv are not automatically combined.
{{Sfn}}'s documentation includes an extensive collection of workarounds and solutions to common problems, and these will work equally well with harv.
harv should not appear within the body text of an article outside of <ref>...</ref> tags. Inline parenthetical references have been deprecated on Wikipedia since September 2020. Any usage of parenthetical references in the body of an article can be converted to footnotes by placing harv into <ref>...</ref> tags.
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
harv generates an "author-date" style short-cite from the following parameters:
<ref>{{harv | <last1*> | <last2> | <last3> | <last4> | <year*> | p= <page> | loc= <location> }}</ref>with
- <last1> – required; surname of first author or corporate author
- <last2>–<last4> – positional parameters; surnames of next three authors; required if available in the full citation
- <year> – required; four-digit year; may have a lowercase disambiguation letter, like
2012a |p=– specific page referenced in the source (alias:|page=)|pp=– comma-separated list of individual pages and / or range(s) of pages referenced in the source (alias:|pages=)|loc=– in-source location when|p=and|pp=are inappropriate; may be used to supplement|p=and|pp=; information such as a section or figure number. (alias:|at=)
Example
Typical usage is shown in the example below. The text and the footnote are connected by a bi-directional link – clicking on the superscript takes the reader to the footnote, clicking on the footnote number takes them back to the superscript. The clicking on the short citation takes them to the full citation in the references section.
Template harv is placed inside <ref>...</ref> tags to create shortened footnotes. (As discussed above, using harv outside of <ref>...</ref> tags is deprecated in almost all cases.)
| Markup | Renders as |
|---|---|
Article text.<ref>{{harv|Smith|2020|p=25}}</ref>
More article text.<ref>{{harv|Smith|2020|p=25}}</ref>
Still more article text.<ref>{{harv|Smith|2020|p=26}}</ref>
==Notes==
{{reflist}}
==References==
* {{cite book
| last = Smith | first = John
| date = 2020
| title = Smith's Book
}}
|
Article text.[1] More article text.[2] Still more article text.[3]
Notes
References
|
Parameters
Author(s) and year
The first four author surnames (or all authors if fewer than four; use the values from |lastN= or |authorN= ) are required, followed by the year of publication (from |year= or |date=). Authors past the fourth must be omitted or an error will result.
The possible issues section in {{sfn}} describes workarounds for various common problems, such as large number of authors, no author name, multiple works in the same year, two sources with same last names and years and others.
| Markup | Renders as |
|---|---|
Article text.<ref>{{harv|Smith|1994|p=25}}</ref> |
Article text.[1]
|
Article text.<ref>{{harv|Smith|Jones|1994|p=25}}</ref> |
Article text.[1]
|
Article text.<ref>{{harv|Smith|Jones|Brown|1994|p=25}}</ref> |
Article text.[1]
|
Article text.<ref>{{harv|Smith|Jones|Brown|Black|1994|p=25}}</ref> |
Article text.[1]
|
Location in the source text
|p= and |pp= can be used to indicate the location in the source, such as page numbers. For single pages, use |p=; for multiple pages (such as ranges), use |pp=. Use of |p= for multiple pages or |pp= for single pages can cause cite errors.
|loc= can be used to specify a location in the source in another way, such as section numbers or chapters. It can also be combined with |p= or |pp=.
| Markup | Renders as |
|---|---|
Article text.<ref>{{harv|Smith|2020|p=25}}</ref> |
Article text.[1]
|
Article text.<ref>{{harv|Smith|2020|pp=25–26}}</ref> |
Article text.[1]
|
Article text.<ref>{{harv|Smith|2020|loc=ch. 3}}</ref> |
Article text.[1]
|
Article text.<ref>{{harv|Smith|2020|p=25|loc=n. 14}}</ref> |
Article text.[1]
|
Other variations
These alternative templates change the appearance of the author-date citation
| Purpose | Markup | Renders as |
|---|---|---|
| The most common format, used 200,000+ articles Has a final period |
{{sfn|Smith|2020|p=25}} |
Article text.[1]
|
| No final period | <ref>{{harvnb|Smith|2020|p=25}}</ref> |
Article text.[1]
|
| No final period | {{sfn|Smith|2020|p=25|ps=none}} |
Article text.[1]
|
| Parenthesis around year and page | <ref>{{harvtxt|Smith|2020|p=25}}</ref> |
Article text.[1]
|
| Parenthesis around citation | <ref>{{harv|Smith|2020|p=25}}</ref> |
Article text.[1]
|
| Parenthesis around year | <ref>{{harvp|Smith|2020|p=25}}</ref> |
Article text.[1]
|
| Parenthesis around year | {{sfnp|Smith|2020|p=25|ps=none}} |
Article text.[1]
|
| Parenthesis around year With final period |
{{sfnp|Smith|2020|p=25}} |
Article text.[1]
|
| Colon for page number | <ref>{{harvcolnb|Smith|2020|p=25}}</ref> |
Article text.[1]
|
| Colon for page number, parenthesis around year and page |
<ref>{{harvcoltxt|Smith|2020|p=25}}</ref> |
Article text.[1]
|
| Colon for page number, parenthesis around citation |
<ref>{{harvcol|Smith|2020|p=25}}</ref> |
Article text.[1]
|
- Smith (1994). Book by Smith.
- Smith; Jones (1994). Book by Smith and Jones.
- Smith; Jones; Brown (1994). Book by Smith, Jones and Brown.
- Smith; Jones; Brown; Black (1994). Book by Smith, Jones and Brown.
This template creates a short author–date citation with a one-directional link to the first matching citation template on the same page.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| 1 | 1 | 1st author's last name
| String | required |
| 2 | 2 | 2nd author's last name or year of publication
| String | required |
| 3 | 3 | 3rd author's last name or year of publication
| String | optional |
| 4 | 4 | 4th author's last name or year of publication
| String | optional |
| 5 | 5 | Year of publication
| Number | optional |
| Reference value | ref Ref | Usual not used. Reference value that links the short citation to the full citation. If you specify |ref=none, no hyperlink is created.
| Unknown | optional |
| Ref | Ref | no description | Unknown | optional |
| Location | loc at | Some other description of the location. Can be a URL in [ ].
| URL | optional |
| Page | p page | Single page number
| String | suggested |
| page | page | no description | Unknown | optional |
| Pages | pp pages | range of page numbers or multiple separate page numbers
| String | deprecated |
| pages | pages | no description | Unknown | optional |
| Quotes or additional comments | ps | Used to add quotes or additional comments.
| String | optional |