Template:Harvard citation/doc

Harvard citation templates
The templates for using Harvard citations are:
 * 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.
 * Citation, Cite book, Cite journal or Cite web (or any of several others) for formatting the reference.

This page describes the first 3; for the others see their documentation pages.

Usage

 *  

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


 * p = page
 * pp = pages


 * Notes
 * The abbreviation Harv may be used.
 * 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 year and author name(s) must not have extra space before and after, else the generated links will not work. (BUG)
 * 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 "".
 * If Ref=none, then no hyperlink is created.
 * To avoid the brackets surrounding the citation, use Harvard citation no brackets or Harvnb.
 * To use the author name(s) in the text, use Harvard citation text or Harvtxt.
 * For more complicated Harvard citations with multiple links use Harvard citations or its abbreviation harvs.
 * 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).

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

Examples

 * {| class="wikitable"

! Markup !! Result
 *  
 *  
 *  
 *  </tt>
 *  </tt>
 *  </tt>
 *  </tt>
 *  </tt>
 *  </tt>
 * }
 *  </tt>
 *  </tt>
 *  </tt>
 *  </tt>
 *  </tt>
 *  </tt>
 * }
 *  </tt>
 *  </tt>
 *  </tt>
 * }
 *  </tt>
 * <tt> </tt>
 * }
 * <tt> </tt>
 * }
 * }
 * }

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
 * Markup
 * <tt> Some works on gravitation are so massive they warp spacetime themselves ; yet presented essential equations with notable brevity. The essential ingredients are the curvature tensor and the stress-energy tensor . </tt>
 * Result
 * Some works on gravitation are so massive they warp spacetime themselves ; yet presented essential equations with notable brevity. The two ingredients are the curvature tensor and the stress-energy tensor.

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

#CITEREF
More exotic Harvard citations can be constructed using the harvs template. If even this is not enough, then as a last resort one can use #CITEREF as in the following example:
 * Property (T) was introduced by David Kazhdan (1967).

which produces
 * Property (T) was introduced by David Kazhdan (1967)

with a link to the author, and a link to a citation on a different page. and if the link is to a different page it should be preceded by the name of the page (with spaces allowed). The citation template marks the reference using #CITEREF ; see the source of template:citation/core for details.
 * 1) CITEREF should be followed by the last names of up to 4 authors and the year (with no spaces),

Use with citation templates
The Citation, Cite book, Cite journal, Cite web family of templates can be used to format the citations in the References section. Links from the Harvard citation to the full citation are provided using a  link. The Harvard citation template creates a link  followed by the concatenation of the author names and the year. Citation creates 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.

Please note that the above list does not include the coauthor parameter, which is ignored in generating the citation's CITEREF anchor. It is recommended that, when used with the harv family templates, citation templates always use the numbered last parameters instead of coauthor so that a more accurate CITEREF anchor may be generated. If coauthor is used, it will not be possible to generate a Harvard citation that displays the authors' names correctly and that generates a link to the correct CITEREF anchor.

Cite book, Cite journal and Cite web can also create a similar anchor by setting the "ref" property to "harv". For example: <tt> </tt>

For example <tt> </tt> produces a link   and produces an anchor.

Use of the date parameter in place of the year parameter in citation templates is preferred when full dates are known. The date parameter should not be used to simply encode a year, as this can fail to generate a viable  link.