Still working to recover. Please don't edit quite yet.

Difference between revisions of "Template:Cite book"

From Anarchopedia
Jump to: navigation, search
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
−
<includeonly><cite class="book" style="font-style:normal" {{
+
<cite class="book" style="font-style:normal">{{qif
−
   #if: {{{ref|}}}
+
   |test={{{author|{{{last|}}}}}}
−
  |{{#ifeq:{{{ref}}}|none||id="{{{ref}}}"}}
+
   |then={{qif
−
  |{{#if:{{{last|}}} | {{#if:{{{year|}}} | id="Reference-{{{last}}}-{{{year}}}" }} }}
+
    |test={{{authorlink|}}}
−
}}>{{
+
     |then=[[{{{authorlink}}}|{{qif
−
   #if: {{{author|}}}{{{last|}}}
+
       |test={{{last|}}}
−
  | {{
+
       |then={{{last}}}{{qif
−
    #if: {{{authorlink|}}}
+
        |test={{{first|}}}
−
     | [[{{{authorlink}}}|{{
+
        |then=, {{{first}}}
−
       #if: {{{last|}}}
+
      }}
−
       | {{{last}}}{{ #if: {{{first|}}} | , {{{first}}} }}
+
       |else={{{author}}}
−
       | {{{author}}}
+
 
     }}]]
 
     }}]]
−
     | {{
+
     |else={{qif
−
       #if: {{{last|}}}
+
       |test={{{last|}}}
−
       | {{{last}}}{{ #if: {{{first|}}} | , {{{first}}} }}
+
       |then={{{last}}}{{qif
−
       | {{{author}}}
+
        |test={{{first|}}}
 +
        |then=, {{{first}}}
 +
      }}
 +
       |else={{{author}}}
 
     }}
 
     }}
 
   }}
 
   }}
−
}}{{
+
}}{{qif
−
   #if: {{{author|}}}{{{last|}}}
+
   |test={{{author|{{{last|}}}}}}
−
   | {{ #if: {{{coauthors|}}} | <nowiki>;</nowiki>&#32;{{{coauthors}}} }}
+
   |then={{qif
−
}}{{
+
    |test={{{coauthors|}}}
−
   #if: {{{origdate|}}}
+
    |then=<nowiki>;</nowiki>&#32;{{{coauthors}}}
−
   | &#32;<nowiki>[</nowiki>{{{origdate}}}]
+
  }}
−
   | {{
+
}}{{qif
−
     #if: {{{origyear|}}}
+
   |test={{{origdate|}}}
−
     | {{
+
   |then=&#32;<nowiki>[</nowiki>{{{origdate}}}]
−
       #if: {{{origmonth|}}}
+
   |else={{qif
−
       | &#32;<nowiki>[</nowiki>{{{origmonth}}} {{{origyear}}}]
+
     |test={{{origyear|}}}
−
       | &#32;<nowiki>[</nowiki>{{{origyear}}}]
+
     |then={{qif
 +
       |test={{{origmonth|}}}
 +
       |then=&#32;<nowiki>[</nowiki>{{{origmonth}}} {{{origyear}}}]
 +
       |else=&#32;<nowiki>[</nowiki>{{{origyear}}}]
 
     }}
 
     }}
 
   }}
 
   }}
−
}}{{
+
}}{{qif
−
   #if: {{{date|}}}
+
   |test={{{date|}}}
−
   | &#32;({{{date}}})
+
   |then=&#32;({{{date}}})
−
   | {{
+
   |else={{qif
−
     #if: {{{year|}}}
+
     |test={{{year|}}}
−
     | {{
+
     |then={{qif
−
       #if: {{{month|}}}
+
       |test={{{month|}}}
−
       | &#32;({{{month}}} {{{year}}})
+
       |then=&#32;({{{month}}} {{{year}}})
−
       | &#32;({{{year}}})
+
       |else=&#32;({{{year}}})
 
     }}
 
     }}
 
   }}
 
   }}
−
}}{{ #if: {{{author|}}}{{{last|}}} | .
+
}}{{qif
−
}}{{
+
  |test={{{author|{{{last|}}}}}}
−
   #if: {{{chapter|}}}
+
  |then=.
−
   | &#32;"{{
+
}}{{qif
−
    #if: {{{chapterurl|}}}
+
   |test={{{chapter|}}}
−
    | [{{{chapterurl}}} {{{chapter}}}]
+
   |then=&#32;"{{qif
−
    | {{{chapter}}}
+
  |test={{{chapterurl|}}}
−
}}",}}{{
+
  |then=[{{{chapterurl}}} {{{chapter}}}]
−
   #if: {{{editor|}}}
+
  |else={{{chapter}}}
−
   | &#32;in {{{editor}}}:
+
}}"}}{{qif
−
}} <i>{{
+
   |test={{{editor|}}}
−
   #if: {{{url|}}} | [{{{url}}} {{{title}}}] | {{{title}}}
+
   |then=&#32;{{{editor}}}
−
}}</i>{{
+
}} ''{{qif
−
   #if: {{{format|}}} | &#32;({{{format}}})
+
   |test={{{url|}}}
−
}}{{
+
  |then=[{{{url}}} {{{title}}}]
−
   #if: {{{others|}}} | , {{{others}}}
+
  |else={{{title}}}
−
}}{{
+
}}''{{qif
−
   #if: {{{edition|}}} | , {{{edition}}}
+
   |test={{{format|}}}
−
}}{{
+
  |then=&#32;({{{format}}})
−
   #if: {{{series|}}} | , {{{series}}}
+
}}{{qif
−
}}{{
+
   |test={{{others|}}}
−
    #if: {{{volume|{{{number|}}}}}} | &#32;'''{{{volume|{{{number}}}}}}'''
+
  |then=, {{{others}}}
−
}}{{
+
}}{{qif
−
   #if: {{{language|}}} | &#32;(in {{{language}}})
+
   |test={{{edition|}}}
−
}}{{
+
  |then=, {{{edition}}}
−
   #if: {{{publisher|}}}
+
}}{{qif
−
   | {{#if: {{{format|}}}{{{others|}}}{{{edition|}}} | ,&#32; | .&#32; }}{{  
+
   |test={{{language|}}}
−
     #if: {{{location|}}}  
+
   |then=&#32;(in {{{language}}})
−
     | {{{location}}}:&#32;
+
}}{{qif
 +
   |test={{{pages|}}}
 +
   |then=, p. {{{pages}}}
 +
}}{{qif
 +
  |test={{{publisher|}}}
 +
  |then=, {{qif
 +
     |test={{{location|}}}
 +
     |then={{{location}}}:&#32;
 
   }}{{{publisher}}}
 
   }}{{{publisher}}}
−
}}{{
+
}}{{qif
−
   #if: {{{pages|{{{page|}}}}}} | ,&#32;{{{pages|{{{page}}}}}}
+
   |test={{{id|}}}
−
}}{{
+
   |then=. {{{id}}}
−
   #if: {{{doi|}}} | . [[Digital object identifier|DOI]]:[http://dx.doi.org/{{{doi|{{{doilabel|}}}}}} {{{doi}}}]
+
}}{{qif
−
}}{{
+
   |test={{{accessdate|}}}
−
  #if: {{{id|}}} | . {{{id}}}
+
   |then=. URL accessed [[{{{accessdate}}}]]
−
}}{{
+
   |else={{qif
−
   #if: {{{isbn|}}} | . ISBN {{{isbn}}}
+
     |test={{{accessyear|}}}
−
}}{{
+
     |then=. URL accessed {{qif
−
  #if: {{{oclc|}}} | . [[OCLC]] [http://worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]
+
       |test={{{accessmonth|}}}
−
}}{{
+
       |then=on [[{{{accessmonth}}} {{{accessyear}}}]]
−
   #if: {{{url|}}}{{{chapterurl|}}} | {{
+
       |else=during [[{{{accessyear}}}]]
−
  #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}}}”
+
}}.{{qif
−
}}</cite><!--
+
  |test={{{quote|}}}
 +
  |then=&nbsp;"{{{quote}}}"
 +
}}</cite><noinclude>
 +
 
 +
 
 +
This template replaces the deprecated {{tl|book reference}}.
 +
{{esoteric}}
 +
[[Category:Citation templates|Book]]
  
−
This is a COinS tag (http://ocoins.info), which allows automated tools to parse the citation information:
+
[[sk:Šablóna:Knižná_referencia]]
−
  --><span class="Z3988" title="ctx_ver=Z39.88-2004<!--
+
</noinclude>
−
  -->&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
+
−
  -->&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)
+
−
  -->&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"
+
−
  -->{{#if: {{{chapter|}}}  | &rft.atitle={{urlencode:{{{chapter}}}}}  }}<!-- Chapter title. Chapter title is included if it is a distinct title, e.g. "The Push Westward."
+
−
  -->{{#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"
+
−
  -->{{#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"
+
−
  -->{{#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".
+
−
  -->{{#if: {{{date|}}}                                                    <!--
+
−
  --> | &rft.date={{urlencode:{{{date}}}}}                                <!-- Date of publication.  ISO 8601 is allowed and preferred by us, although
+
−
  --> | {{#if: {{{year|}}}  | &rft.date={{urlencode:{{{year}}}}} }}    }}<!-- "Book dates are assumed to be a single year."
+
−
  -->{{#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."
+
−
  -->{{#if: {{{publisher|}}} | &rft.pub={{urlencode:{{{publisher}}}}}    }}<!-- Publisher name. "Harper and Row"
+
−
  -->{{#if: {{{location|}}}  | &rft.place={{urlencode:{{{location}}}}}  }}<!-- Place of publication. "New York"
+
−
  -->{{#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".
+
−
  -->{{#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.
+
−
  -->{{#if: {{{isbn|}}}      | &rft.isbn={{{isbn}}}                      }}<!-- International Standard Book Number (ISBN) ... i.e. "057117678X" but it may contain hyphens, e.g. "1-878067-73-7"
+
−
  -->{{#if: {{{oclc|}}}      | &rft_id=info:oclcnum/{{{oclc}}}          }}<!--
+
−
  -->{{#if: {{{doi|}}}      | &rft_id=info:doi/{{urlencode:{{{doi}}}}}  }}<!--
+
−
  -->{{#if: {{{url|}}}      | &rft_id={{urlencode:{{{url}}}}}          }}<!--
+
−
  -->"><span style="display: none;">&nbsp;</span></span></includeonly><noinclude>{{pp-template|small=yes}}{{documentation}}</noinclude>
+

Latest revision as of 02:13, 2 August 2008

{{{title}}}.


This template replaces the deprecated {{book reference}}. Template:esoteric