Difference between revisions of "Template:Citation/core"

From Self-sufficiency
Jump to: navigation, search
(minor fix for third author)
(Significant upgrade based on sub-templates. This has been tested, but let me know if there is a problem.)
Line 4: Line 4:
 
     |id="CITEREF{{{Surname1}}}{{{Surname2|}}}{{{Surname3|}}}{{{Surname4|}}}{{{Year}}}"
 
     |id="CITEREF{{{Surname1}}}{{{Surname2|}}}{{{Surname3|}}}{{{Surname4|}}}{{{Year}}}"
 
   }}
 
   }}
}}>{{
+
}}>{{Harvard reference/authors
   #if: {{{Authorlink1|}}}
+
   | Surname1 = {{{Surname1}}}
   | [[ {{{Authorlink1}}} | {{{Surname1}}}{{ #if: {{{Given1|}}} |, {{{Given1}}} }} ]]
+
   | Given1 = {{{Given1|}}}
   | {{{Surname1}}}{{ #if: {{{Given1|}}} |, {{{Given1}}} }}
+
   | Authorlink1 = {{{Authorlink1|}}}
}}{{
+
   | Surname2 = {{{Surname2|}}}
   #if: {{{Surname2|}}}
+
   | Given2 = {{{Given2|}}}
   | {{
+
  | Authorlink2 = {{{Authorlink2|}}}
      #if: {{{Surname3|}}}
+
  | Surname3 = {{{Surname3|}}}
      |, 
+
   | Given3 = {{{Given3|}}}
      | & 
+
   | Authorlink3 = {{{Authorlink3|}}}
    }}{{
+
  | Surname4 = {{{Surname4|}}}
      #if: {{{Authorlink2|}}}
+
  | Given4 = {{{Given4|}}}
      |[[ {{{Authorlink2}}} | {{{Surname2}}}{{ #if: {{{Given2|}}} |, {{{Given2}}} }} ]]
+
   | Authorlink4 = {{{Authorlink4|}}}
      |{{{Surname2}}}{{ #if: {{{Given2|}}} |, {{{Given2}}} }}
+
    }}
+
}}{{
+
   #if: {{{Surname3|}}}
+
   | {{#if: {{{Authorlink3|}}}
+
      | & [[{{{Authorlink3}}}|{{{Surname3}}}{{#if:{{{Given3|}}}|, {{{Given3}}}}}]]
+
      | & {{{Surname3}}}{{#if:{{{Given3|}}}|, {{{Given3|}}} }}
+
    }}
+
}}{{
+
   #if:{{{Surname4|}}}
+
  |, et al.
+
 
}} ({{{Date}}}){{
 
}} ({{{Date}}}){{
   #if:{{{Periodical|}}}
+
   #if: {{{ChapterTitle|}}}
   | {{
+
   |{{
      #if: {{{Title|}}}
+
    #if: {{{Periodical|}}}
      |, {{Link|1={{{URL|}}}|2="{{{Title}}}"}}
+
    | {{Link
    }}, ''{{{Periodical}}}''{{
+
        | 1={{{ChapterURL|}}}
      #if: {{{Volume|}}}
+
        | 2={{{ChapterTitle|}}}
      |, vol. {{{Volume}}}
+
      }} in {{Harvard reference/authors
    }}{{
+
        | Surname1 = {{{EditorSurname1|}}}
      #if: {{{Issue|}}}
+
        | Given1 = {{{EditorGiven1|}}}
      |, no. {{{Issue}}}
+
        | Authorlink1 = {{{Editorlink1|}}}
    }}{{
+
        | Surname2 = {{{EditorSurname2|}}}
      #if: {{{Pages|}}}
+
        | Given2 = {{{EditorGiven2|}}}
      |, pp. {{{Pages}}}
+
        | Authorlink2 = {{{Editorlink2|}}}
      |{{#if: {{{Page|}}} |, p. {{{Page}}}}}
+
        | Surname3 = {{{EditorSurname3|}}}
    }}{{#if: {{{ID|}}}
+
        | Given3 = {{{EditorGiven3|}}}
      |, {{{ID}}}
+
        | Authorlink3 = {{{Editorlink3|}}}
    }}
+
        | Surname4 = {{{EditorSurname4|}}}
  | {{
+
        | Given4 = {{{EditorGiven4|}}}
      #if: {{{ChapterTitle|}}}
+
        | Authorlink4 = {{{Editorlink4|}}}
      |, {{Link|1={{{ChapterURL|}}}|2="{{{ChapterTitle|}}}"
+
      }}{{Harvard reference/articlepart
        }} in {{
+
        | URL = {{{URL|}}}
          #if: {{{EditorSurname1|}}}
+
        | Periodical = {{{Periodical|}}}
          | {{
+
        | Title = {{{Title|}}}
              #if: {{{Editorlink1|}}}
+
        | Volume = {{{Volume|}}}
              | [[ {{{Editorlink1|}}} | {{{EditorSurname1}}}{{ #if: {{{EditorGiven1|}}} |, {{{EditorGiven1|}}} }} ]]
+
         | Issue = {{{Issue|}}}
              | {{{EditorSurname1}}}{{ #if: {{{EditorGiven1|}}} |, {{{EditorGiven1}}} }}
+
        | PublicationYear = {{{PublicationYear|}}}
            }}{{
+
         | Page = {{{Page|}}}
              #if: {{{EditorSurname2|}}}
+
         | Pages = {{{Pages|}}}
              | {{
+
                  #if:{{{EditorSurname3|}}}
+
                  |, 
+
                  | & 
+
                }}{{
+
                  #if: {{{Editorlink2|}}}
+
                  | [[ {{{Editorlink2}}} | {{{EditorSurname2}}}{{ #if: {{{EditorGiven2|}}} |, {{{EditorGiven2}}} }} ]]
+
                  | {{{EditorSurname2}}}{{ #if: {{{EditorGiven2|}}} |, {{{EditorGiven2}}} }}
+
                }}
+
            }}{{
+
              #if:{{{EditorSurname3|}}}
+
              | {{
+
                  #if: {{{Editorlink3|}}}
+
                  | & [[{{{Editorlink3}}}|{{{EditorSurname3}}}{{#if:{{{EditorGiven3|}}}|, {{{Given1}}}}}]]
+
                  | & {{{EditorSurname3}}}{{#if:{{{EditorGiven3|}}}|, {{{EditorGiven3|}}} }}
+
                }}
+
            }}{{
+
              #if: {{{EditorSurname4|}}}
+
              |, et al.
+
            }}, ed{{#if:{{{EditorSurname2|}}}|s}}., 
+
        }}{{Link|1={{{URL|}}}|2=''{{{Title}}}''
+
        }}{{
+
          #if: {{{Volume|}}}
+
          |, vol. {{{Volume}}}
+
        }}{{
+
          #if: {{{PublicationYear|}}}
+
          |, {{{PublicationYear}}}
+
        }}{{
+
          #if: {{{Pages|}}}
+
          |, pp. {{{Pages}}}
+
          |{{#if:
+
              {{{Page|}}}
+
              |, p. {{{Page}}}
+
            }}
+
          }}
+
      | {{
+
          #if: {{{Title|}}}
+
          |, {{Link|1={{{URL|}}}|2=''{{{Title}}}''}}
+
        }}{{
+
          #if: {{{Volume|}}}
+
          |, vol. {{{Volume}}}
+
         }}
+
    }}{{
+
      #if: {{{Edition|}}}
+
      | ({{{Edition}}} ed.)
+
    }}{{
+
      #if: {{{Place|}}}
+
      |, {{{Place}}}
+
    }}{{
+
      #if: {{{Publisher|}}}
+
      | {{
+
          #if: {{{Place|}}}
+
          |<nowiki>: </nowiki>
+
          |,&#32;
+
         }}{{{Publisher}}}
+
    }}{{
+
      #if: {{{ID|}}}
+
      |, {{{ID}}}
+
      | {{
+
          #if: {{{ISBN|}}}
+
          |, ISBN {{{ISBN}}}
+
          | {{
+
              #if: {{{OCLC|}}}
+
              |, [[OCLC]] [http://worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]
+
              | {{
+
                  #if: {{{DOI|}}}
+
                  |, [[Digital object identifier|DOI]]:[http://dx.doi.org/{{{DOI}}} {{{DOI}}}]
+
                }}
+
            }}
+
         }}
+
    }}
+
}}{{
+
    #if: {{URL|}}
+
    | {{
+
        #if: {{{AccessDate|}}}
+
        |&#32;<nowiki>[</nowiki>link accessed {{{AccessDate}}}<nowiki>]</nowiki>
+
 
       }}
 
       }}
 +
    |&#32;{{Link
 +
        | 1={{{ChapterURL|}}}
 +
        | 2="{{{ChapterTitle|}}}"
 +
      }} in {{Harvard reference/authors
 +
        | Surname1 = {{{EditorSurname1|}}}
 +
        | Given1 = {{{EditorGiven1|}}}
 +
        | Authorlink1 = {{{Editorlink1|}}}
 +
        | Surname2 = {{{EditorSurname2|}}}
 +
        | Given2 = {{{EditorGiven2|}}}
 +
        | Authorlink2 = {{{Editorlink2|}}}
 +
        | Surname3 = {{{EditorSurname3|}}}
 +
        | Given3 = {{{EditorGiven3|}}}
 +
        | Authorlink3 = {{{Editorlink3|}}}
 +
        | Surname4 = {{{EditorSurname4|}}}
 +
        | Given4 = {{{EditorGiven4|}}}
 +
        | Authorlink4 = {{{Editorlink4|}}}
 +
      }}{{Harvard reference/bookpart
 +
        | URL = {{{URL|}}}
 +
        | Title = {{{Title|}}}
 +
        | Volume = {{{Volume|}}}
 +
        | PublicationYear = {{{PublicationYear|}}}
 +
        | Page = {{{Page|}}}
 +
        | Pages = {{{Pages|}}}
 +
        | Edition = {{{Edition|}}}
 +
        | Place = {{{Place|}}}
 +
        | Publisher = {{{Publisher|}}}
 +
      }}
 +
  }}
 +
  |{{
 +
    #if: {{{Periodical|}}}
 +
    |{{Harvard reference/article
 +
        | URL = {{{URL|}}}
 +
        | Periodical = {{{Periodical|}}}
 +
        | Title = {{{Title|}}}
 +
        | Volume = {{{Volume|}}}
 +
        | Issue = {{{Issue|}}}
 +
        | Page = {{{Page|}}}
 +
        | Pages = {{{Pages|}}}
 +
      }}
 +
    |{{Harvard reference/book
 +
        | URL = {{{URL|}}}
 +
        | Title = {{{Title|}}}
 +
        | Volume = {{{Volume|}}}
 +
        | Edition = {{{Edition|}}}
 +
        | Place = {{{Place|}}}
 +
        | Publisher = {{{Publisher|}}}
 +
      }}
 +
  }}
 +
}}{{
 +
  #if: {{{ID|}}}
 +
  |, {{{ID}}}
 +
  |{{
 +
    #if: {{{ISBN|}}}
 +
    |, ISBN {{{ISBN}}}
 +
  }}{{
 +
    #if: {{{OCLC|}}}
 +
    |, [[OCLC]] [http://worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]
 +
  }}{{
 +
    #if: {{{DOI|}}}
 +
    |, [[Digital object identifier|DOI]]:[http://dx.doi.org/{{{DOI}}} {{{DOI}}}]
 +
  }}
 +
}}{{
 +
  #if: {{{URL|}}}
 +
  |{{
 +
    #if: {{{AccessDate|}}}
 +
    |<nowiki> [</nowiki>link accessed {{{AccessDate}}}<nowiki>]</nowiki>
 +
  }}
 
}}</cite>
 
}}</cite>

Revision as of 02:22, 31 January 2007

Template:Harvard reference/authors ({{{Date}}})Template:Harvard reference/book