Jump to content

Template:Citation: Difference between revisions

From IdeaWazaWiki
wikademia>Ligulem
if -> qif - qif is the server friendlier variant of if
wikademia>Wikademia
m 71 revisions
 
(65 intermediate revisions by 23 users not shown)
Line 1: Line 1:
'''FOR TESTING ONLY'''
{{
<cite style="font-style:normal" {{qif
   #if: {{{inventor-surname|{{{inventor1-surname|{{{inventor-last|{{{inventor1-last|{{{inventor|}}}}}}}}}}}}}}}
   |test={{{Ref|}}}
<!--
  |then={{qif
    CITATIONS FOR PATENTS
      |test={{booleq
-->
            |{{{Ref}}}
|{{Citation/patent
            |none
|Surname1 = {{{inventor-surname|{{{inventor1-surname|{{{inventor-last|{{{inventor1-last|{{{inventor}}}}}}}}}}}}}}}
          }}
|Surname2={{{inventor2-surname|{{{inventor2-last|{{{inventor2|}}}}}}}}}
      |then=
|Surname3={{{inventor3-surname|{{{inventor3-last|{{{inventor3|}}}}}}}}}
      |else=id="{{{Ref}}}"
|Surname4={{{inventor4-surname|{{{inventor4-last|{{{inventor4|}}}}}}}}}
    }}
|Given1 = {{{inventor-given|{{{inventor1-given|{{{inventor-first|{{{inventor1-first|}}}}}}}}}}}}
  |else={{qif
|Given2={{{inventor2-given|{{{inventor2-first|}}}}}}
      |test={{{Surname|{{{Last|{{{Surname1|{{{Last1}}}}}}}}}}}}
|Given3={{{inventor3-given|{{{inventor3-first|}}}}}}
      |then=id="CITEREF{{{Surname1|{{{Last1|{{{Surname|{{{Last}}}}}}}}}}}}{{{Surname2|{{{Last2|}}}}}}{{{Surname3|{{{Last3|}}}}}}{{{Surname4|{{{Last4|}}}}}}{{{Year}}}"
|Given4={{{inventor4-given|{{{inventor4-first|}}}}}}
    }}
|Inventorlink1={{{inventorlink1|{{{inventorlink|}}}}}}
}}>{{qif
|Inventorlink2={{{inventorlink2|}}}
  |test={{{Surname|{{{Last|{{{Surname1|{{{Last1|{{{Author|{{{Author1}}}}}}}}}}}}}}}}}}
|Inventorlink3={{{inventorlink3|}}}
  |then={{qif
|Inventorlink4={{{inventorlink4|}}}
    |test={{{Authorlink|{{{Authorlink1|}}}}}}
|Title={{{title|}}}
    |then={{wikilink
|CountryCode={{{country-code}}}
        |1={{{Authorlink1|{{{Authorlink}}}}}}
|PublicationNumber={{{publication-number|{{{patent-number}}}}}}
        |2={{{Author1|{{{Author
|Description={{{description|}}}
            |{{{Surname1|{{{Last1|{{{Surname|{{{Last}}}}}}}}}}}}{{qif
|PublicationDate={{{publication-date|}}}
              |test={{{Given|{{{First|{{{Given1|{{{First1|{{{Initials|{{{Initials1|}}}}}}}}}}}}}}}}}}
|IssueDate={{{issue-date|}}}
              |then=, {{{Initials1|{{{Given1|{{{First1|{{{Initials|{{{Given|{{{First}}}}}}}}}}}}}}}}}}
|Year={{{year}}}
            }}
}}
        }}}}}}
 
      }}
<!--
    |else={{{Author1|{{{Author
    CITATIONS FOR THINGS LIKE BOOKS AND PERIODICALS
        |{{{Surname1|{{{Last1|{{{Surname|{{{Last}}}}}}}}}}}}{{qif
-->
            |test={{{Given|{{{First|{{{Given1|{{{First1|{{{Initials|{{{Initials1}}}}}}}}}}}}}}}}}}
|{{Citation/core
            |then=, {{{Initials1|{{{Given1|{{{First1|{{{Initials|{{{Given|{{{First}}}}}}}}}}}}}}}}}}
  |Surname1 = {{{last|{{{surname|{{{last1|{{{surname1|{{{author1|{{{author|{{{authors|}}}}}}}}}}}}}}}}}}}}}
          }}
  |Surname2 = {{{last2|{{{surname2|{{{author2|}}}}}}}}}
      }}}}}}
  |Surname3 = {{{last3|{{{surname3|{{{author3|}}}}}}}}}
  }}{{qif
  |Surname4 = {{{last4|{{{surname4|{{{author4|}}}}}}}}}
    |test={{{Surname2|{{{Last2|{{{Author2|}}}}}}}}}
  |Given1 = {{{first1|{{{given1|{{{first|{{{given|}}}}}}}}}}}}
    |then={{qif
  |Given2 = {{{first2|{{{given2|}}}}}}
        |test={{{Author3|{{{Surname3|{{{Last3|}}}}}}}}}
  |Given3 = {{{first3|{{{given3|}}}}}}
        |then=,&#32;
  |Given4 = {{{first4|{{{given4|}}}}}}
        |else=&#32;&amp;&#32;
  |Authorlink1 = {{{author-link|{{{author1-link|}}}}}}
      }}{{qif
  |Authorlink2 = {{{author2-link|}}}
        |test={{{Authorlink2|}}}
  |Authorlink3 = {{{author3-link|}}}
        |then={{wikilink
  |Authorlink4 = {{{author4-link|}}}
          |1={{{Authorlink2}}}
  |Year={{{year|{{   <!-- attempt to derive year from date, if possible -->
          |2={{{Author2|{{{Surname2|{{{Last2|}}}}}}{{qif|test={{{Given2|{{{First2|{{{Initials2|}}}}}}}}}|then=, {{{Initials2|{{{Given2|{{{First2}}}}}}}}}}}}}}
            #if: {{{date|}}}
        }}
            |{{
        |else={{{Author2|{{{Surname2|{{{Last2|}}}}}}{{qif|test={{{Given2|{{{First2|{{{Initials2|}}}}}}}}}|then=, {{{Initials2|{{{Given2|{{{First2}}}}}}}}}}}}}}
                #switch: {{#time:Y|{{{date|}}}}}
      }}{{qif
                |Error: invalid time = {{{publication-date|}}}
        |test={{{Surname3|{{{Last3|{{{Author3|}}}}}}}}}
                |{{#time:Y|{{{date|}}}}}
        |then=&#32;&amp; {{qif
              }}
          |test={{{Authorlink3|}}}
            |{{{publication-date|}}} <!-- last resort -->
          |then={{wikilink
          }}
            |1={{{Authorlink3}}}
        }}}
            |2={{{Author3|{{{Surname3|{{{Last3|}}}}}}{{qif|test={{{Given3|{{{First3|{{{Initials3|}}}}}}}}}|then=, {{{Initials3|{{{Given3|{{{First3}}}}}}}}}}}}}}
  |Date = {{{date|{{{year|{{{publication-date|}}}}}}}}}
            }}
  |Title={{{title|}}}
          |else={{{Author3|{{{Surname3|{{{Last3|}}}}}}{{qif|test={{{Given3|{{{First3|{{{Initials3|}}}}}}}}}|then=, {{{Initials3|{{{Given3|{{{First3}}}}}}}}}}}}}}
  |URL={{{url|}}}
        }}{{qif
  |Periodical = {{{journal|{{{periodical|{{{newspaper|{{{magazine|}}}}}}}}}}}}
          |test={{{Surname4|{{{Last4|{{{Author4|}}}}}}}}}
  |Volume = {{{volume|}}}
          |then=, et al.
  |Issue = {{{issue|{{{number|}}}}}}
        }}
  |Pages = {{{pages|}}}
      }}
  |IncludedWorkTitle = {{{chapter|{{{contribution|}}}}}}
  }}
  |IncludedWorkURL = {{{chapter-url|{{{contribution-url|}}}}}}
   |…
  |Edition = {{{edition|}}}
}} ({{{Year}}}){{qif
  |Place = {{{place|}}}
  |test={{{Journal|{{{Periodical|}}}}}}
  |Publisher = {{{publisher|}}}
   |then={{qif
  |PublicationDate = {{{publication-date|}}}
      |test={{{Title|}}}
  |EditorSurname1 = {{{editor-last|{{{editor-surname|{{{editor1-last|{{{editor1-surname|{{{editor|{{{editors|}}}}}}}}}}}}}}}}}}
      |then=, {{Link|1={{{URL|}}}|2="{{{Title}}}"}}
  |EditorSurname2 = {{{editor2-last|{{{editor2-surname|}}}}}}
    }}, ''{{{Journal|{{{Periodical}}}}}}''{{qif
  |EditorSurname3 = {{{editor3-last|{{{editor3-surname|}}}}}}
      |test={{{Volume|}}}
  |EditorSurname4 = {{{editor4-last|{{{editor4-surname|}}}}}}
      |then=, vol. {{{Volume}}}
   |EditorGiven1 = {{{editor-first|{{{editor-given|{{{editor1-first|{{{editor1-given|}}}}}}}}}}}}
    }}{{qif
   |EditorGiven2={{{editor2-first|{{{editor2-given|}}}}}}
      |test={{{Issue|{{{Number|}}}}}}
  |EditorGiven3={{{editor3-first|{{{editor3-given|}}}}}}
      |then=, no. {{{Number|{{{Issue}}}}}}
  |EditorGiven4={{{editor4-first|{{{editor4-given|}}}}}}
    }}{{qif
  |Editorlink1={{{editor-link|{{{editor1-link|}}}}}}
      |test={{{Pages|}}}
  |Editorlink2={{{editor2-link|}}}
      |then=, pp. {{{Pages}}}
  |Editorlink3={{{editor3-link|}}}
      |else={{qif
  |Editorlink4={{{editor4-link|}}}
          |test={{{Page|}}}
  |ID={{{id|{{{ID|}}}}}}
          |then=, p. {{{Page}}}
  |ISBN={{{isbn|{{{ISBN|}}}}}}
        }}
  |DOI={{{doi|{{{DOI|}}}}}}
    }}
  |AccessDate={{{access-date|}}}
  |else={{qif
  |Ref={{{ref|}}}
      |test={{{Chapter|{{{Contribution|}}}}}}
}}
      |then=, {{Link|1={{{URL|}}}|2="{{{Chapter|{{{Contribution}}}}}}"}} in {{qif
}}<noinclude>{{Citation/doc}}
            |test={{{Editor|}}}
            |then={{{Editor}}}, ed.,&#32;
          }}''{{{Title}}}''{{qif
              |test={{{Edition|}}}
              |then=&#32;({{{Edition}}} ed.)
          }}{{qif
              |test={{{Publisher|}}}
              |then=, {{{Publisher}}}
          }}{{qif
              |test={{{Place|}}}
              |then=, {{{Place}}}
          }}{{qif
              |test={{{ISBN|{{{ID|}}}}}}
              |then=, {{{ID|ISBN {{{ISBN}}}}}}
          }}{{qif
            |test={{{Pages|}}}
            |then=, pp. {{{Pages}}}
            |else={{qif
              |test={{{Page|}}}
              |then=, p. {{{Page}}}
            }}
          }}
      |else={{qif
            |test={{{Title|}}}
            |then=, {{Link|1={{{URL|}}}|2=''{{{Title}}}''}}
          }}{{qif
              |test={{{Edition|}}}
              |then=&#32;({{{Edition}}} ed.)
          }}{{qif
              |test={{{Publisher|}}}
              |then=, {{{Publisher}}}
          }}{{qif
              |test={{{Place|}}}
              |then=, {{{Place}}}
          }}{{qif
              |test={{{ISBN|{{{ID|}}}}}}
              |then=, {{{ID|ISBN {{{ISBN}}}}}}
          }}
    }}
}}{{qif
    |test={{{Access-date|}}}
    |then=&#32;<nowiki>[</nowiki>{{{Access-date}}}<nowiki>]</nowiki>
}}</cite><noinclude>
{{esoteric}}
[[Category:Citation templates|{{PAGENAME}}]]
'''This template is subject to periodic changes and breaking, and for now should be used only by testers and developers who can correct problems when they appear.'''
</noinclude>
</noinclude>

Latest revision as of 06:40, 11 April 2009