Changes

Jump to navigation Jump to search
473 bytes removed ,  09:48, 22 September 2008
m
Protected "Template:Citation" [edit=sysop:move=sysop]
Line 1: Line 1: −
<includeonly><cite class="book" style="font-style:normal" {{
+
<includeonly>{{{initiallast|}}}, {{{initialfirst|}}}.{{if|1={{{2last|}}}|2={{altlast|1={{{2last|}}}}}|3={{{empty|}}}}} {{if|1={{{2first|}}}|2={{altfirst|1={{{2first|}}}}}|3={{{empty|}}}}}{{if|1={{{3last|}}}|2={{altlast|1={{{3last|}}}}}|3={{{empty|}}}}} {{if|1={{{3first|}}}|2={{altfirst|1={{{3first|}}}}}|3={{{empty|}}}}}{{if|1={{{4last|}}}|2={{altlast|1={{{4last|}}}}}|3={{{empty|}}}}} {{if|1={{{4first|}}}|2={{altfirst|1={{{4first|}}}}}|3={{{empty|}}}}}{{if|1={{{5last|}}}|2={{altlast|1={{{5last|}}}}}|3={{{empty|}}}}} {{if|1={{{5first|}}}|2={{altfirst|1={{{5first|}}}}}|3={{{empty|}}}}}{{if|1={{{6last|}}}|2={{altlast|1={{{6last|}}}}}|3={{{empty|}}}}} {{if|1={{{6first|}}}|2={{altfirst|1= {{{6first|}}}}}|3= {{{empty|}}}}}{{if|1={{{finallast|}}}|2=<nowiki> </nowiki>and {{{finallast|}}},|3={{{empty|}}}}} {{if|1={{{finalfirst|}}}|2={{{finalfirst}}}.|3={{{empty|}}}}} {{if|1={{{year}}}|2=({{{year|}}})|3={{{empty|}}}}}{{if|1={{{title|}}}|2=<nowiki> </nowiki><b>{{{title|}}}</b>|3={{{empty|}}}}}{{if|1={{{jtitle|}}}|2=<nowiki> </nowiki>{{{jtitle|}}}|3={{{empty|}}}}}. {{{ed|}}}{{if|1={{{ed|}}}|2=<nowiki> ed.</nowiki>|3={{{empty|}}}}} {{if|1={{{city|}}}|2={{{city|}}}:|3={{{empty|}}}}} {{if|1={{{pub|}}}|2={{{pub|}}}.|3={{{empty|}}}}}{{if|1={{{jor|}}}|2=<b>{{{jor|}}}</b> {{{vol||}}}:|3={{{empty|}}}}} {{if|1= {{{range|}}}|2=pp.{{{range|}}}.|3= {{{empty|}}}}}</includeonly><noinclude>
  #if: {{{ref|}}}
+
==Usage==
  |{{#ifeq:{{{ref}}}|none||id="{{{ref}}}"}}
+
{| align="right"
  |{{#if:{{{last|}}} | {{#if:{{{year|}}} | id="Reference-{{{last}}}-{{{year}}}" }} }}
+
   | __TOC__
}}>{{
+
  |}
  #if: {{{author|}}}{{{last|}}}
+
<p>This template can be used to create references using the Harvard system for both books and journals. To use the template copy the code [[#The template|below]]. You only need to include the variables that you are using.</p>
  | {{
+
===Authors===
    #if: {{{authorlink|}}}
+
<p>The first name being referenced should always by 'initiallast' and 'initialfirst' and the last name being referenced should always be 'finallast' and 'finalfirst'. Therefore:
    | [[{{{authorlink}}}|{{
+
* A single author book/journal would include 'initiallast' and 'initialfirst'
      #if: {{{last|}}}
+
* A book with two authors would include 'initiallast', 'initialfirst', 'finallast' and 'finalfirst
      | {{{last}}}{{ #if: {{{first|}}} | , {{{first}}} }}
+
* A book with several authors would be 'initiallast', 'initialfirst', '2last', '2first' ... 'finallast' and 'finalfirst</p>
      | {{{author}}}
+
===Book and journals===
    }}]]
+
*Books use the parameters 'title' and 'city'
    | {{
+
*Journals use the parameters 'jtitle', 'jor' and 'vol'
      #if: {{{last|}}}
+
===The template===
      | {{{last}}}{{ #if: {{{first|}}} | , {{{first}}} }}
+
{|
      | {{{author}}}
+
!For books
    }}
+
!For journals
  }}
+
|-
}}{{
+
|  
  #if: {{{author|}}}{{{last|}}}
+
<nowiki>{{</nowiki><nowiki>citation</nowiki>
  | {{ #if: {{{coauthors|}}} | <nowiki>;</nowiki>&#32;{{{coauthors}}} }}
+
<nowiki>|initiallast =</nowiki>
}}{{
+
<nowiki>|initialfirst =</nowiki>
  #if: {{{origdate|}}}
+
<nowiki>|2last =</nowiki>
  | &#32;<nowiki>[</nowiki>{{{origdate}}}]
+
<nowiki>|2first =</nowiki>
  | {{
+
<nowiki>|3last =</nowiki>
    #if: {{{origyear|}}}
+
<nowiki>|3first =</nowiki>
    | {{
+
<nowiki>|4last =</nowiki>
      #if: {{{origmonth|}}}
+
<nowiki>|4first =</nowiki>
      | &#32;<nowiki>[</nowiki>{{{origmonth}}} {{{origyear}}}]
+
<nowiki>|5last =</nowiki>
      | &#32;<nowiki>[</nowiki>{{{origyear}}}]
+
<nowiki>|5first =</nowiki>
    }}
+
<nowiki>|6last =</nowiki>
  }}
+
<nowiki>|6first =</nowiki>
}}{{
+
<nowiki>|finallast =</nowiki>
  #if: {{{date|}}}
+
<nowiki>|finalfirst =</nowiki>
  | &#32;({{#ifeq:{{#time:Y-m-d|{{{date}}}}}|{{{date}}}|[[{{{date}}}]]|{{#ifeq:{{#time:Y-m-d|{{{date}}}}}|1970-01-01|[[{{{date}}}]]|{{{date}}}}}}})  | {{
+
<nowiki>|year = </nowiki>
    #if: {{{year|}}}
+
<nowiki>|title = </nowiki>
    | {{
+
<nowiki>|ed = </nowiki>
      #if: {{{month|}}}
+
<nowiki>|city = </nowiki>
      | &#32;({{{month}}} {{{year}}})
+
<nowiki>|pub =</nowiki>
      | &#32;({{{year}}})
+
<nowiki>|range = </nowiki>
    }}
+
<nowiki>}} </nowiki>
  }}
+
|
}}{{ #if: {{{author|}}}{{{last|}}} | .
+
<nowiki>{{</nowiki><nowiki>citation</nowiki>
}}{{
+
<nowiki>|initiallast =</nowiki>
  #if: {{{chapter|}}}
+
<nowiki>|initialfirst =</nowiki>
  | &#32;"{{
+
<nowiki>|2last =</nowiki>
    #if: {{{chapterurl|}}}
+
<nowiki>|2first =</nowiki>
    | [{{{chapterurl}}} {{{chapter}}}]
+
<nowiki>|3last =</nowiki>
    | {{{chapter}}}
+
<nowiki>|3first =</nowiki>
}}",}}{{
+
<nowiki>|4last =</nowiki>
  #if: {{{editor|}}}
+
<nowiki>|4first =</nowiki>
  | &#32;in {{{editor}}}:
+
<nowiki>|5last =</nowiki>
}} <i>{{
+
<nowiki>|5first =</nowiki>
  #if: {{{url|}}} | [{{{url}}} {{{title}}}] | {{{title}}}
+
<nowiki>|6last =</nowiki>
}}</i>{{
+
<nowiki>|6first =</nowiki>
  #if: {{{format|}}} | &#32;({{{format}}})
+
<nowiki>|finallast =</nowiki>
}}{{
+
<nowiki>|finalfirst =</nowiki>
   #if: {{{others|}}} | , {{{others}}}
+
<nowiki>|year = </nowiki>
}}{{
+
<nowiki>|jtitle = </nowiki>
  #if: {{{edition|}}} | , {{{edition}}}
+
<nowiki>|ed = </nowiki>
}}{{
+
<nowiki>|pub =</nowiki>
  #if: {{{series|}}} | , {{{series}}}
+
<nowiki>|jor = </nowiki>
}}{{
+
<nowiki>|vol =  </nowiki>
    #if: {{{volume|{{{number|}}}}}} | &#32;'''{{{volume|{{{number}}}}}}'''
+
<nowiki>|range = </nowiki>
}}{{
+
<nowiki>}} </nowiki>
  #if: {{{language|}}} | &#32;(in {{{language}}})
+
|}
}}{{
+
'''NB: Templates can be used in a single line to save space:
  #if: {{{publisher|}}}
+
*<nowiki>{{citation</nowiki> |initiallast =  |initialfirst =  |2last = |2first = |3last = |3first = |4last = |4first = |5last = |5first = |6last = |6first = |finallast = |finalfirst = |year =  |title =  |jtitle = |ed =  |city =  |pub =  |jor = |vol = |range = <nowiki>}}</nowiki>
  | {{#if: {{{format|}}}{{{others|}}}{{{edition|}}} | ,&#32; | .&#32; }}{{
  −
    #if: {{{location|}}}
  −
    | {{{location}}}:&#32;
  −
  }}{{{publisher}}}
  −
}}{{
  −
  #if: {{{pages|{{{page|}}}}}} | ,&#32;{{{pages|{{{page}}}}}}
  −
}}{{
  −
  #if: {{{doi|}}} | . [[Digital object identifier|DOI]]:[http://dx.doi.org/{{{doi|{{{doilabel|}}}}}} {{{doi}}}]
  −
}}{{
  −
  #if: {{{id|}}} | . {{{id}}}
  −
}}{{
  −
  #if: {{{isbn|}}} | . ISBN {{{isbn}}}
  −
}}{{
  −
  #if: {{{oclc|}}} | . [[OCLC]] [http://worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]
  −
}}{{
  −
  #if: {{{url|}}}{{{chapterurl|}}} | {{
  −
  #if: {{{accessdate|}}} |
  −
  <span class="reference-accessdate">. Retrieved on [[{{{accessdate}}}]]</span>
  −
  | {{
  −
    #if: {{{accessyear|}}}
  −
    | <span class="reference-accessdate">. Retrieved {{
  −
      #if: {{{accessmonth|}}}
  −
      | on [[{{{accessmonth}}} {{{accessyear}}}]]
  −
      | during [[{{{accessyear}}}]]
  −
  }}</span>}}
  −
  }}
  −
}}.{{ #if: {{{quote|}}} | &nbsp;“{{{quote}}}”
  −
}}</cite><!--
     −
This is a COinS tag (http://ocoins.info), which allows automated tools to parse the citation information:
+
==Example==
  --><span class="Z3988" title="ctx_ver=Z39.88-2004<!--
+
===For a single author with no page reference:===
  -->&rft_val_fmt={{urlencode:info:ofi/fmt:kev:mtx:book}}<!--                  Field descriptions: http://www.openurl.info/registry/docs/mtx/info:ofi/fmt:kev:mtx:book
+
<nowiki>
  -->&rft.genre=book<!--                                                        book: a publication that is complete in one part or a designated finite number of parts, often identified with an ISBN. (genre could also be bookitem, conference, proceeding, report, document, or unknown)
+
{{citation</nowiki>
  -->&rft.btitle={{urlencode:{{{title|}}}}}<!--                                The title of the book. This can also be expressed as title, for compatibility with version 0.1. "moby dick or the white whale"
+
|initiallast = Tizard
  -->{{#if: {{{chapter|}}}  | &rft.atitle={{urlencode:{{{chapter}}}}}  }}<!-- Chapter title. Chapter title is included if it is a distinct title, e.g. "The Push Westward."
+
|initialfirst = I
  -->{{#if: {{{last|}}}      | &rft.aulast={{urlencode:{{{last}}}}}      }}<!-- First author's family name. This may be more than one word ... e.g. Smith, Fred James is recorded as "aulast=smith"
+
|year = 2004
  -->{{#if: {{{first|}}}    | &rft.aufirst={{urlencode:{{{first}}}}}    }}<!-- First author's given name or names or initials. This data element may contain multiple words and punctuation, e.g. "Fred F", "Fred James"
+
|title = Veterinary Immunology: An Introduction
  -->{{#if: {{{author|}}}    | &rft.au={{urlencode:{{{author}}}}}        }}<!-- This data element contains the full name of a single author, e.g. "Smith, Fred M", "Harry S. Truman".
+
  |ed = 7th
  -->{{#if: {{{date|}}}                                                    <!--
+
|city = Philadelphia
  --> | &rft.date={{urlencode:{{{date}}}}}                                <!-- Date of publication. ISO 8601 is allowed and preferred by us, although
+
|pub = Saunders
  --> | {{#if: {{{year|}}}  | &rft.date={{urlencode:{{{year}}}}} }}    }}<!-- "Book dates are assumed to be a single year."
+
<nowiki>}}</nowiki>
  -->{{#if: {{{edition|}}}  | &rft.edition={{urlencode:{{{edition}}}}}  }}<!-- Statement of the edition of the book. This will usually be a phrase, with or without numbers, but may be a single number, e.g. "First edition", "4th ed."
+
'''Gives:'''<br>
  -->{{#if: {{{publisher|}}} | &rft.pub={{urlencode:{{{publisher}}}}}    }}<!-- Publisher name. "Harper and Row"
+
<p>{{citation
  -->{{#if: {{{location|}}} | &rft.place={{urlencode:{{{location}}}}}  }}<!-- Place of publication. "New York"
+
|initiallast = Tizard
  -->{{#if: {{{pages|{{{page|}}}}}}    | &rft.pages={{urlencode:{{{pages|{{{page}}}}}}}}      }}<!-- Start and end pages for parts of a book, e.g. "124-147" ... This data element includes the OpenURL 0.1 definition of "pages".
+
|initialfirst = I
  -->{{#if: {{{series|}}}    | &rft.series={{urlencode:{{{series}}}}}    }}<!-- The title of a series in which the book or document was issued. There may also be an ISSN associated with the series.
+
|year = 2004
  -->{{#if: {{{isbn|}}}      | &rft.isbn={{{isbn}}}                      }}<!-- International Standard Book Number (ISBN) ... i.e. "057117678X" but it may contain hyphens, e.g. "1-878067-73-7"
+
|title = Veterinary Immunology: An Introduction
  -->{{#if: {{{oclc|}}}      | &rft_id=info:oclcnum/{{{oclc}}}          }}<!--
+
|ed = 7th
  -->{{#if: {{{doi|}}}      | &rft_id=info:doi/{{urlencode:{{{doi}}}}}  }}<!--
+
|city = Philadelphia
  -->{{#if: {{{url|}}}      | &rft_id={{urlencode:{{{url}}}}}          }}<!--
+
|pub = Saunders
  -->"><span style="display: none;">&nbsp;</span></span></includeonly>
+
}} </p>
 +
 
 +
===For several authors with page reference:===
 +
<nowiki>
 +
{{citation</nowiki>
 +
|initiallast = Janeway
 +
|initialfirst = C
 +
|2last = Travers
 +
|2first = P
 +
|3last = Walport
 +
|3first = M
 +
|finallast = Sholmchik
 +
|finalfirst = M
 +
|year = 2005
 +
|title = Immunobiology: The immune system in health and disease
 +
  |ed = 6th
 +
|city = New York
 +
|pub = Garland Science Publishing
 +
|range = 1-35
 +
<nowiki>}}</nowiki>
 +
'''Gives:'''<br>
 +
<p>{{citation
 +
|initiallast =Janeway
 +
|initialfirst =C
 +
|2last = Travers
 +
|2first = P
 +
|3last = Walport
 +
|3first = M
 +
|finallast = Sholmchik
 +
|finalfirst = M
 +
|year = 2005
 +
|title = Immunobiology: The immune system in health and disease
 +
|ed =
 +
|city = New York
 +
|pub = Garland Science Publishing
 +
|range = 1-35
 +
}}
 +
</p>
 +
===For journals:===
 +
<nowiki>
 +
{{citation</nowiki>
 +
|initiallast = Metcalfe
 +
  |initialfirst = D.D
 +
|2last = Baram
 +
|2first = D
 +
|finallast = Mekori
 +
|finalfirst = Y
 +
|year = 1997
 +
|jtitle = Mast Cells
 +
|jor = Physiological Reviews
 +
|vol = 77(4)
 +
|range = 1033-1064
 +
<nowiki>}}</nowiki>
 +
'''Gives:'''<br>
 +
<p>
 +
{{citation
 +
|initiallast = Metcalfe
 +
|initialfirst = D.D
 +
|2last = Baram
 +
|2first = D
 +
|finallast = Mekori
 +
|finalfirst = Y
 +
|year = 1997
 +
|jtitle = Mast Cells
 +
|jor = Physiological Reviews
 +
|vol = 77(4)
 +
|range = 1033-1064}}
 +
</p>
 +
</noinclude>

Navigation menu