2,396 bytes added ,  09:48, 22 September 2008
m
Protected "Template:Citation" [edit=sysop:move=sysop]
Line 1: Line 1: −
<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={{finallast|1={{{finallast|}}}}}|3={{{empty|}}}}} {{if|1={{{finalfirst|}}}|2={{finalfirst|1={{{finalfirst|}}}}}|3={{{empty|}}}}} ({{{year|}}}) <b>{{{title|}}}.</b> {{{ed|}}} {{{city|}}}: {{{pub|}}}. <noinclude>{{{range}}}</noinclude>
+
<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|1= {{{range|}}}|2= {{pp|1= {{{range}}}}}|3= {{{empty|}}}}}
  −
</includeonly>
  −
<noinclude>
  −
__NOTOC__
   
==Usage==
 
==Usage==
<p>This template can be used to create references using the Harvard system. To use the template copy the code below. You only need to include the variables that you are using.</p>'''Authors'''<br><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:
+
{| align="right"
 +
  | __TOC__
 +
  |}
 +
<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===
 +
<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:
 
* A single author book/journal would include 'initiallast' and 'initialfirst'
 
* A single author book/journal would include 'initiallast' and 'initialfirst'
 
* A book with two authors would include 'initiallast', 'initialfirst', 'finallast' and 'finalfirst
 
* A book with two authors would include 'initiallast', 'initialfirst', 'finallast' and 'finalfirst
 
* A book with several authors would be 'initiallast', 'initialfirst', '2last', '2first' ... 'finallast' and 'finalfirst</p>
 
* A book with several authors would be 'initiallast', 'initialfirst', '2last', '2first' ... 'finallast' and 'finalfirst</p>
<br>
+
===Book and journals===
  <nowiki>
+
*Books use the parameters 'title' and 'city'
{{citation</nowiki>
+
*Journals use the parameters 'jtitle', 'jor' and 'vol'
  |initiallast =  
+
===The template===
  |initialfirst =  
+
{|
  |2last =
+
!For books
  |2first =
+
!For journals
  |3last =
+
|-
  |3first =
+
|
  |4last =
+
<nowiki>{{</nowiki><nowiki>citation</nowiki>
  |4first =
+
<nowiki>|initiallast =</nowiki>
  |5last =
+
<nowiki>|initialfirst =</nowiki>
  |5first =
+
<nowiki>|2last =</nowiki>
  |6last =
+
<nowiki>|2first =</nowiki>
  |6first =
+
<nowiki>|3last =</nowiki>
  |finallast =
+
<nowiki>|3first =</nowiki>
  |finalfirst =
+
<nowiki>|4last =</nowiki>
  |year =  
+
<nowiki>|4first =</nowiki>
  |title =  
+
<nowiki>|5last =</nowiki>
  |ed =  
+
<nowiki>|5first =</nowiki>
  |city =  
+
<nowiki>|6last =</nowiki>
  |pub =  
+
<nowiki>|6first =</nowiki>
  |range =  
+
<nowiki>|finallast =</nowiki>
  <nowiki>}}</nowiki>
+
<nowiki>|finalfirst =</nowiki>
 +
<nowiki>|year = </nowiki>
 +
<nowiki>|title = </nowiki>
 +
<nowiki>|ed = </nowiki>
 +
<nowiki>|city = </nowiki>
 +
<nowiki>|pub =</nowiki>
 +
<nowiki>|range = </nowiki>
 +
  <nowiki>}} </nowiki>
 +
|
 +
<nowiki>{{</nowiki><nowiki>citation</nowiki>
 +
  <nowiki>|initiallast =</nowiki>
 +
  <nowiki>|initialfirst =</nowiki>
 +
  <nowiki>|2last =</nowiki>
 +
  <nowiki>|2first =</nowiki>
 +
  <nowiki>|3last =</nowiki>
 +
  <nowiki>|3first =</nowiki>
 +
  <nowiki>|4last =</nowiki>
 +
  <nowiki>|4first =</nowiki>
 +
  <nowiki>|5last =</nowiki>
 +
  <nowiki>|5first =</nowiki>
 +
  <nowiki>|6last =</nowiki>
 +
  <nowiki>|6first =</nowiki>
 +
  <nowiki>|finallast =</nowiki>
 +
  <nowiki>|finalfirst =</nowiki>
 +
  <nowiki>|year = </nowiki>
 +
  <nowiki>|jtitle = </nowiki>
 +
  <nowiki>|ed = </nowiki>
 +
  <nowiki>|pub =</nowiki>
 +
<nowiki>|jor = </nowiki>
 +
  <nowiki>|vol = </nowiki>
 +
  <nowiki>|range = </nowiki>
 +
  <nowiki>}} </nowiki>
 +
|}
 +
'''NB: Templates can be used in a single line to save space:
 +
*<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>
 +
 
 
==Example==
 
==Example==
 
===For a single author with no page reference:===
 
===For a single author with no page reference:===
Line 41: Line 77:  
  |year = 2004
 
  |year = 2004
 
  |title = Veterinary Immunology: An Introduction
 
  |title = Veterinary Immunology: An Introduction
  |ed = 7th ed.
+
  |ed = 7th
 
  |city = Philadelphia
 
  |city = Philadelphia
 
  |pub = Saunders
 
  |pub = Saunders
|range = 23-35
   
  <nowiki>}}</nowiki>
 
  <nowiki>}}</nowiki>
 
'''Gives:'''<br>
 
'''Gives:'''<br>
Line 52: Line 87:  
|year = 2004
 
|year = 2004
 
|title = Veterinary Immunology: An Introduction
 
|title = Veterinary Immunology: An Introduction
|ed = 7th ed.
+
|ed = 7th
 
|city = Philadelphia
 
|city = Philadelphia
 
|pub = Saunders
 
|pub = Saunders
 
}} </p>
 
}} </p>
<br>
+
 
 
===For several authors with page reference:===
 
===For several authors with page reference:===
 
  <nowiki>
 
  <nowiki>
Line 70: Line 105:  
  |year = 2005
 
  |year = 2005
 
  |title = Immunobiology: The immune system in health and disease
 
  |title = Immunobiology: The immune system in health and disease
  |ed = 6th ed.
+
  |ed = 6th
 
  |city = New York
 
  |city = New York
 
  |pub = Garland Science Publishing
 
  |pub = Garland Science Publishing
Line 87: Line 122:  
|year = 2005
 
|year = 2005
 
|title = Immunobiology: The immune system in health and disease
 
|title = Immunobiology: The immune system in health and disease
|ed = 6th ed.
+
|ed =
 
|city = New York
 
|city = New York
 
|pub = Garland Science Publishing
 
|pub = Garland Science Publishing
 
|range = 1-35
 
|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>
 
</p>
 
</noinclude>
 
</noinclude>