Difference between revisions of "Template:Harvard citation no brackets/doc"

From blackwiki
Jump to navigation Jump to search
test>CharlesGillingham
(→‎Usage: Merging documentation with {{tl|harv}}; various format improvements.)
test>CharlesGillingham
(→‎Usage: Typo)
Line 22: Line 22:
 
*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. For example, "<tt><nowiki>{{harv|Smith|2007a| p=25}}</nowiki></tt>" yields "{{harv|Smith|2007a| p=25}}" and "<tt><nowiki>{{harv|Smith|2007b| p=37}}</nowiki></tt>" yields "{{harv|Smith|2007b| p=37}}"
 
*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. For example, "<tt><nowiki>{{harv|Smith|2007a| p=25}}</nowiki></tt>" yields "{{harv|Smith|2007a| p=25}}" and "<tt><nowiki>{{harv|Smith|2007b| p=37}}</nowiki></tt>" yields "{{harv|Smith|2007b| p=37}}"
 
*A space before or after the author name or before the year ''is'' significant; they produce an underscore in the hyperlink. So, "<tt><nowiki>{{Harvnb|Smith| 2006| p=25}}</nowiki></tt>" yields "{{Harvnb|Smith| 2006| p=25}}" which links to #CITEREFSmith_2006.
 
*A space before or after the author name or before the year ''is'' significant; they produce an underscore in the hyperlink. So, "<tt><nowiki>{{Harvnb|Smith| 2006| p=25}}</nowiki></tt>" yields "{{Harvnb|Smith| 2006| p=25}}" which links to #CITEREFSmith_2006.
When using [[:Category:Citation templates|citation templates]] such as <tt>{{tl|cite book}}</tt> for references, include the parameter <tt>|ref=harv</tt> in the citation template to add the target of the footnote link to each reference. This is not necessary for {{tlx|citation}}, but is normally necessary for the others.
+
*When using [[:Category:Citation templates|citation templates]] such as <tt>{{tl|cite book}}</tt> for references, include the parameter <tt>|ref=harv</tt> in the citation template to add the target of the footnote link to each reference. This is not necessary for {{tlx|citation}}, but is normally necessary for the others.
  
 
Editors editing this template are requested to make parallel changes to the other versions.
 
Editors editing this template are requested to make parallel changes to the other versions.

Revision as of 23:12, 15 November 2010

Usage

{{harv or harvnb, etc. | Last name of author(s) | Year | loc = Location in the text}}

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

  • p = page
  • pp = pages
Usage 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 parameter |loc= is the location of the cited material within the reference. This parameter is optional.

  • The parameter |loc= is an optional page parameter; thus "{{Harv|Smith|2006| p=25}}" yields "(Smith 2006, p. 25)".
  • The parameter |pp= is an optional page range parameter; thus "{{Harv|Smith|2006| pp=25&ndash;26}}" yields "(Smith 2006, pp. 25–26)".
  • 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 |Ref=none no hyperlink is created. (See the examples.)
  • 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. For example, "{{harv|Smith|2007a| p=25}}" yields "(Smith 2007a, p. 25)" and "{{harv|Smith|2007b| p=37}}" yields "(Smith 2007b, p. 37)"
  • A space before or after the author name or before the year is significant; they produce an underscore in the hyperlink. So, "{{Harvnb|Smith| 2006| p=25}}" yields "Smith 2006, p. 25" which links to #CITEREFSmith_2006.
  • 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 {{citation}}, but is normally necessary for the others.

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

Examples

Code Result
{{Harvard citation no brackets|Smith|2006| loc=ch. 10}} Smith 2006, ch. 10
{{Harvnb|Smith|2006| p=25}} Smith 2006, p. 25
{{Harvnb|Smith|2006| pp=25–26}} Smith 2006, pp. 25–26
{{Harvnb|Smith|2006| pp=25–26 | Ref=none}} Smith 2006, pp. 25–26
{{Harvnb|Smith|2007a| p=25}} Smith 2007a, p. 25
{{Harvnb|Smith|2007b| p=37}} Smith 2007b, p. 37
{{Harvnb|Smith|Jones|Brown|2008 | p=25}} Smith, Jones & Brown 2008, p. 25
{{Harvnb|Smith|Jones|Brown|Black|2009 | p=25}} Smith et al. 2009, p. 25
{{Harvnb|Smith|2010| p=25}} Smith 2010, p. 25
{{harvnb|2007a|p=25|Ref={{harvid|Smith|2007a}}}} 2007a, p. 25
Full references for examples

The following references are provided as targets for the {{Harvnb}} templates used in the examples above. If you click on a link in the Result column, the browser will highlight the proper entry below and scroll to the page to make it visible.

  • Smith, John (2006). His First Book.CS1 maint: ref=harv (link)
  • Smith, John (2007a). His Second Book.CS1 maint: ref=harv (link)
  • Smith, John (2007b). His Third Book.CS1 maint: ref=harv (link)
  • Smith, John; Jones, Ann; Brown, Shelby (2008). Multiple Authors Example Book One.CS1 maint: ref=harv (link)
  • Smith, John; Jones, Ann; Brown, Shelby; Black, Joseph (2009). Multiple Authors Example Book Two.CS1 maint: ref=harv (link)
  • Smith, John (11 May 2010). His Latest Book.CS1 maint: ref=harv (link)

Purpose

When using parenthetical referencing there are some situations in which it is undesirable to surround the citation with brackets. Also, Harvnb is sometimes used with inline citations (<ref>…</ref>) to create short footnotes in a Notes section that link to full footnotes in a References section.

Multiple citations

A useful example of the Harvard no brackets template is when creating multiple cites using different pages of the same book. For a worked example, see User:RexxS/Cite_multiple_pages.

See also