Difference between revisions of "Template:Citation"

From WikiVet English
Jump to navigation Jump to search
(New page: <includeonly>{{ #if: {{{inventor-surname|{{{inventor1-surname|{{{inventor-last|{{{inventor1-last|{{{inventor|}}}}}}}}}}}}}}} <!-- CITATIONS FOR PATENTS --> |{{Citation/patent |Surna...)
 
m (Protected "Template:Citation" [edit=sysop:move=sysop])
 
(106 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{
+
<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: {{{inventor-surname|{{{inventor1-surname|{{{inventor-last|{{{inventor1-last|{{{inventor|}}}}}}}}}}}}}}}
+
==Usage==
<!--
+
{| align="right"
    CITATIONS FOR PATENTS
+
  | __TOC__
-->
+
  |}
|{{Citation/patent
+
<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>
|Surname1 = {{{inventor-surname|{{{inventor1-surname|{{{inventor-last|{{{inventor1-last|{{{inventor}}}}}}}}}}}}}}}
+
===Authors===
|Surname2={{{inventor2-surname|{{{inventor2-last|{{{inventor2|}}}}}}}}}
+
<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:
|Surname3={{{inventor3-surname|{{{inventor3-last|{{{inventor3|}}}}}}}}}
+
* A single author book/journal would include 'initiallast' and 'initialfirst'
|Surname4={{{inventor4-surname|{{{inventor4-last|{{{inventor4|}}}}}}}}}
+
* A book with two authors would include 'initiallast', 'initialfirst', 'finallast' and 'finalfirst
|Given1 = {{{inventor-given|{{{inventor1-given|{{{inventor-first|{{{inventor1-first|}}}}}}}}}}}}
+
* A book with several authors would be 'initiallast', 'initialfirst', '2last', '2first' ... 'finallast' and 'finalfirst</p>
|Given2={{{inventor2-given|{{{inventor2-first|}}}}}}
+
===Book and journals===
|Given3={{{inventor3-given|{{{inventor3-first|}}}}}}
+
*Books use the parameters 'title' and 'city'
|Given4={{{inventor4-given|{{{inventor4-first|}}}}}}
+
*Journals use the parameters 'jtitle', 'jor' and 'vol'
|Inventorlink1={{{inventorlink1|{{{inventorlink|}}}}}}
+
===The template===
|Inventorlink2={{{inventorlink2|}}}
+
{|
|Inventorlink3={{{inventorlink3|}}}
+
!For books
|Inventorlink4={{{inventorlink4|}}}
+
!For journals
|Title={{{title|}}}
+
|-
|CountryCode={{{country-code}}}
+
|
|PublicationNumber={{{publication-number|{{{patent-number}}}}}}
+
<nowiki>{{</nowiki><nowiki>citation</nowiki>
|Description={{{description|}}}
+
<nowiki>|initiallast =</nowiki>
|PublicationDate={{{publication-date|}}}
+
<nowiki>|initialfirst =</nowiki>
  |IssueDate={{{issue-date|}}}
+
<nowiki>|2last =</nowiki>
  |Year={{{year}}}
+
<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>|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==
 +
===For a single author with no page reference:===
 +
<nowiki>
 +
{{citation</nowiki>
 +
|initiallast = Tizard
 +
|initialfirst = I
 +
|year = 2004
 +
|title = Veterinary Immunology: An Introduction
 +
|ed = 7th
 +
|city = Philadelphia
 +
|pub = Saunders
 +
<nowiki>}}</nowiki>
 +
'''Gives:'''<br>
 +
<p>{{citation
 +
|initiallast = Tizard
 +
|initialfirst = I
 +
|year = 2004
 +
|title = Veterinary Immunology: An Introduction
 +
|ed = 7th
 +
|city = Philadelphia
 +
|pub = Saunders
 +
}} </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:===
    CITATIONS FOR THINGS LIKE BOOKS AND PERIODICALS
+
<nowiki>
-->
+
{{citation</nowiki>
|{{Template:Citation/core
+
|initiallast = Metcalfe
  |Surname1 = {{{last|{{{surname|{{{last1|{{{surname1|{{{author1|{{{author|{{{authors|}}}}}}}}}}}}}}}}}}}}}
+
|initialfirst = D.D
  |Surname2 = {{{last2|{{{surname2|{{{author2|}}}}}}}}}
+
|2last = Baram
  |Surname3 = {{{last3|{{{surname3|{{{author3|}}}}}}}}}
+
|2first = D
  |Surname4 = {{{last4|{{{surname4|{{{author4|}}}}}}}}}
+
|finallast = Mekori
  |Surname5 = {{{last5|{{{surname5|{{{author5|}}}}}}}}}
+
|finalfirst = Y
  |Surname6 = {{{last6|{{{surname6|{{{author6|}}}}}}}}}
+
|year = 1997
  |Surname7 = {{{last7|{{{surname7|{{{author7|}}}}}}}}}
+
|jtitle = Mast Cells
  |Surname8 = {{{last8|{{{surname8|{{{author8|}}}}}}}}}
+
|jor = Physiological Reviews
  |Surname9 = {{{last9|{{{surname9|{{{author9|}}}}}}}}}
+
|vol = 77(4)
  |Given1 = {{{first1|{{{given1|{{{first|{{{given|}}}}}}}}}}}}
+
|range = 1033-1064
  |Given2 = {{{first2|{{{given2|}}}}}}
+
<nowiki>}}</nowiki>
  |Given3 = {{{first3|{{{given3|}}}}}}
+
'''Gives:'''<br>
  |Given4 = {{{first4|{{{given4|}}}}}}
+
<p>
  |Given5 = {{{first5|{{{given5|}}}}}}
+
{{citation
  |Given6 = {{{first6|{{{given6|}}}}}}
+
|initiallast = Metcalfe
  |Given7 = {{{first7|{{{given7|}}}}}}
+
|initialfirst = D.D
  |Given8 = {{{first8|{{{given8|}}}}}}
+
|2last = Baram
  |Given9 = {{{first9|{{{given9|}}}}}}
+
|2first = D
  |Authorlink1 = {{{author-link|{{{author1-link|{{{authorlink|{{{authorlink1|}}}}}}}}}}}}
+
|finallast = Mekori
  |Authorlink2 = {{{author2-link|{{{authorlink2|}}}}}}
+
|finalfirst = Y
  |Authorlink3 = {{{author3-link|{{{authorlink3|}}}}}}
+
|year = 1997
  |Authorlink4 = {{{author4-link|{{{authorlink4|}}}}}}
+
|jtitle = Mast Cells
  |Authorlink5 = {{{author5-link|{{{authorlink5|}}}}}}
+
|jor = Physiological Reviews
  |Authorlink6 = {{{author6-link|{{{authorlink6|}}}}}}
+
|vol = 77(4)
  |Authorlink7 = {{{author7-link|{{{authorlink7|}}}}}}
+
|range = 1033-1064}}
  |Authorlink8 = {{{author8-link|{{{authorlink8|}}}}}}
+
</p>
  |Authorlink9 = {{{author9-link|{{{authorlink9|}}}}}}
+
</noinclude>
  |Year={{{year|{{    <!-- attempt to derive year from date, if possible -->
 
            #if: {{{date|}}}
 
            |{{
 
                #iferror:{{#time:Y|{{{date|}}} }}
 
                |{{#iferror:{{#time:Y|{{{publication-date|einval}}} }}||{{#time:Y|{{{publication-date|}}} }}}}
 
                |{{#time:Y|{{{date|}}} }}
 
              }}
 
            |{{{publication-date|}}} <!-- last resort -->
 
          }}
 
        }}}
 
  |Date = {{{date|{{{year|{{{publication-date|}}}}}}}}}
 
  |Title={{{title|}}}
 
  |URL={{{url|}}}
 
  |Series={{{series|}}}
 
  |Periodical = {{{journal|{{{periodical|{{{newspaper|{{{magazine|}}}}}}}}}}}}
 
  |Volume = {{{volume|}}}
 
  |Issue = {{{issue|{{{number|}}}}}}
 
  |At = {{
 
          #if: {{{journal|{{{periodical|{{{newspaper|{{{magazine|}}}}}}}}}}}}
 
          |{{{pages|{{{page|{{{at|}}}}}}}}}
 
          |{{
 
            #if: {{{page|}}}
 
            |p. {{{page}}}
 
            |{{
 
                #if: {{{pages|}}}
 
                |pp. {{{pages}}}
 
                |{{{at|}}}
 
              }}
 
          }}
 
        }}
 
  |IncludedWorkTitle = {{{chapter|{{{contribution|}}}}}}
 
  |IncludedWorkURL = {{{chapter-url|{{{chapterurl|{{{contribution-url|}}}}}}}}}
 
  |Edition = {{{edition|}}}
 
  |Place = {{{place|{{{location|}}}}}}
 
  |PublicationPlace = {{{publication-place|{{{place|{{{location|}}}}}}}}}
 
  |Publisher = {{{publisher|}}}
 
  |PublicationDate = {{{publication-date|}}}
 
  |EditorSurname1 = {{{editor-last|{{{editor-surname|{{{editor1-last|{{{editor1-surname|{{{editor|{{{editors|}}}}}}}}}}}}}}}}}}
 
  |EditorSurname2 = {{{editor2-last|{{{editor2-surname|}}}}}}
 
  |EditorSurname3 = {{{editor3-last|{{{editor3-surname|}}}}}}
 
  |EditorSurname4 = {{{editor4-last|{{{editor4-surname|}}}}}}
 
  |EditorGiven1 = {{{editor-first|{{{editor-given|{{{editor1-first|{{{editor1-given|}}}}}}}}}}}}
 
  |EditorGiven2={{{editor2-first|{{{editor2-given|}}}}}}
 
  |EditorGiven3={{{editor3-first|{{{editor3-given|}}}}}}
 
  |EditorGiven4={{{editor4-first|{{{editor4-given|}}}}}}
 
  |Editorlink1={{{editor-link|{{{editor1-link|}}}}}}
 
  |Editorlink2={{{editor2-link|}}}
 
  |Editorlink3={{{editor3-link|}}}
 
  |Editorlink4={{{editor4-link|}}}
 
  |ID={{{id|{{{ID|}}}}}}
 
  |ISBN={{{isbn|{{{ISBN|}}}}}}
 
  |ISSN={{{issn|{{{ISSN|}}}}}}
 
  |OCLC={{{oclc|{{{OCLC|}}}}}}
 
  |PMID={{{pmid|{{{PMID|}}}}}}
 
  |DOI={{{doi|{{{DOI|}}}}}}
 
  |AccessDate={{{access-date|{{{accessdate|}}}}}}
 
  |Ref={{{ref|}}}
 
}}
 
}}</includeonly>
 

Latest revision as of 09:48, 22 September 2008

Usage

This template can be used to create references using the Harvard system for both books and journals. To use the template copy the code below. You only need to include the variables that you are using.

Authors

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 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

Book and journals

  • Books use the parameters 'title' and 'city'
  • Journals use the parameters 'jtitle', 'jor' and 'vol'

The template

For books For journals
{{citation
|initiallast =
|initialfirst =
|2last =
|2first =
|3last =
|3first =
|4last =
|4first =
|5last =
|5first =
|6last =
|6first =
|finallast =
|finalfirst =
|year = 
|title = 
|ed = 
|city = 
|pub =
|range = 
}} 
{{citation
|initiallast =
|initialfirst =
|2last =
|2first =
|3last =
|3first =
|4last =
|4first =
|5last =
|5first =
|6last =
|6first =
|finallast =
|finalfirst =
|year = 
|jtitle = 
|ed = 
|pub =
|jor = 
|vol =  
|range = 
}} 

NB: Templates can be used in a single line to save space:

  • {{citation |initiallast = |initialfirst = |2last = |2first = |3last = |3first = |4last = |4first = |5last = |5first = |6last = |6first = |finallast = |finalfirst = |year = |title = |jtitle = |ed = |city = |pub = |jor = |vol = |range = }}

Example

For a single author with no page reference:

{{citation
|initiallast = Tizard
|initialfirst = I
|year = 2004
|title = Veterinary Immunology: An Introduction
|ed = 7th
|city = Philadelphia
|pub = Saunders
}}

Gives:

Tizard, I. (2004) Veterinary Immunology: An Introduction. 7th ed. Philadelphia: Saunders.

For several authors with page reference:

{{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 = 6th
|city = New York
|pub = Garland Science Publishing
|range = 1-35
}}

Gives:

Janeway, C., Travers, P., Walport, M. and Sholmchik, M. (2005) Immunobiology: The immune system in health and disease. New York: Garland Science Publishing. pp.1-35.

For journals:

{{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
}}

Gives:

Metcalfe, D.D., Baram, D. and Mekori, Y. (1997) Mast Cells. Physiological Reviews 77(4): pp.1033-1064.