Jump to content

Template:Cite book: Difference between revisions

42,182 bytes added ,  4 years ago
adding templatedate to the template page (pls don't break)
m>Trödel
(→‎Usage: add no wikilink instructions to quick instructions list)
(adding templatedate to the template page (pls don't break))
 
(120 intermediate revisions by 54 users not shown)
Line 1: Line 1:
<noinclude>{{esoteric}}</noinclude><includeonly><cite class="book" style="font-style:normal" {{
<includeonly>{{#invoke:citation/CS1|citation
  #if: {{{ref|}}}
|CitationClass=book
  |{{#ifeq:{{{ref}}}|none||id="{{{ref}}}"}}
}}</includeonly><noinclude>
  |{{#if:{{{last|}}} | {{#if:{{{year|}}} | id="Reference-{{{last}}}-{{{year}}}" }} }}
{{documentation}}
}}>{{
{{collapse top|TemplateData}}
  #if: {{{author|{{{last|}}}}}}
{{TemplateData header}}
  | {{
    #if: {{{authorlink|}}}
    | [[{{{authorlink}}}|{{
      #if: {{{last|}}}
      | {{{last}}}{{ #if: {{{first|}}} | , {{{first}}} }}
      | {{{author}}}
    }}]]
    | {{
      #if: {{{last|}}}
      | {{{last}}}{{ #if: {{{first|}}} | , {{{first}}} }}
      | {{{author}}}
    }}
  }}
}}{{
  #if: {{{author|{{{last|}}}}}}
  | {{ #if: {{{coauthors|}}} | <nowiki>;</nowiki>&#32;{{{coauthors}}} }}
}}{{
  #if: {{{origdate|}}}
  | &#32;<nowiki>[</nowiki>{{{origdate}}}]
  | {{
    #if: {{{origyear|}}}
    | {{
      #if: {{{origmonth|}}}
      | &#32;<nowiki>[</nowiki>{{{origmonth}}} {{{origyear}}}]
      | &#32;<nowiki>[</nowiki>{{{origyear}}}]
    }}
  }}
}}{{
  #if: {{{date|}}}
  | &#32;({{{date}}})
  | {{
    #if: {{{year|}}}
    | {{
      #if: {{{month|}}}
      | &#32;({{{month}}} {{{year}}})
      | &#32;({{{year}}})
    }}
  }}
}}{{ #if: {{{author|{{{last|}}}}}} | .
}}{{
  #if: {{{chapter|}}}
  | &#32;“{{
    #if: {{{chapterurl|}}}
    | [{{{chapterurl}}} {{{chapter}}}]
    | {{{chapter}}}
}}”,}}{{
  #if: {{{editor|}}}
  | &#32;{{{editor}}}
}} ''{{
  #if: {{{url|}}} | [{{{url}}} {{{title}}}] | {{{title}}}
}}''{{
  #if: {{{format|}}} | &#32;({{{format}}})
}}{{
  #if: {{{others|}}} | , {{{others}}}
}}{{
  #if: {{{edition|}}} | , {{{edition}}}
}}{{
  #if: {{{language|}}} | &#32;(in {{{language}}})
}}{{
  #if: {{{pages|}}} | ,&#32;{{{pages}}}
}}{{
  #if: {{{publisher|}}}
  | {{#if: {{{format|}}}{{{others|}}}{{{edition|}}}{{{pages|}}} | ,&#32; | .&#32; }}{{
    #if: {{{location|}}}
    | {{{location}}}:&#32;
  }}{{{publisher}}}
}}{{
  #if: {{{doi|}}} | . [[Digital object identifier|DOI]]:[http://dx.doi.org/{{{doi}}} {{{doi}}}]
}}{{
  #if: {{{id|}}} | . {{{id}}}
}}{{
  #if: {{{accessdate|}}}
  | . Retrieved on [[{{{accessdate}}}]]
  | {{
    #if: {{{accessyear|}}}
    | . Retrieved {{
      #if: {{{accessmonth|}}}
      | on [[{{{accessmonth}}} {{{accessyear}}}]]
      | during [[{{{accessyear}}}]]
    }}
  }}
}}.{{ #if: {{{quote|}}} | &nbsp;“{{{quote}}}”
}}</cite></includeonly><noinclude>
__NOTOC__
This template is used to [[WP:CITE|cite sources]] in Wikipedia. It is specifically for books. This template replaces the deprecated {{tl|book reference}}.


==Usage==
<templatedata>
All fields '''must''' be lowercase. Copy a blank version to use:
{
{| cellpadding="0" cellspacing="6"
"description": "This template formats a citation to a book using the provided bibliographic information (such as author and title) as well as various formatting options.",
! Full version !! Brief Instructions !! &nbsp; !! Most common fields
"params": {
|- width="50%"
"url": {
|
"label": "URL",
<pre>
"description": "The URL of the online location where the text of the publication can be found. Requires schemes of the type \"http://...\" or maybe even the  protocol relative scheme \"//...\"",
{{cite book
"type": "string",
| last =
"aliases": [
| first =
"URL"
| authorlink =
],
| coauthors =
"example": "https://www.nytimes.com/..."
| editor =
},
| others =
"title": {
| title =
"label": "Title",
| origdate =
"description": "The title of the book; displays in italics",
| origyear =
"type": "string",
| origmonth =
"required": true
| url =
},
| format =
"last": {
| accessdate =
"label": "Last name",
| accessyear =
"description": "The surname of the author; don't wikilink, use 'authorlink'; can suffix with a numeral to add additional authors",
| accessmonth =
"aliases": [
| edition =
"last1",
| date =
"author",
| year =
"author1",
| month =
"author1-last",
| publisher =
"author-last",
| location =
"surname1",
| language =
"author-last1",
| id =
"subject1",
| doi =
"surname",
| pages =
"author-last",
| chapter =
"subject"
| chapterurl =
],
| quote =
"suggested": true,
}}
"type": "string"
</pre>
},
| style="vertical-align: top;" |
"first": {
 
"label": "First name",
"description": "Given or first name, middle names, or initials of the author; don't wikilink, use 'authorlink'; can suffix with a numeral to add additional authors",
"aliases": [
"given",
"author-first",
"first1",
"given1",
"author-first1",
"author1-first"
],
"suggested": true,
"type": "string"
},
"last2": {
"label": "Last name 2",
"description": "The surname of the second author; don't wikilink, use 'authorlink2'; can suffix with a numeral to add additional authors",
"aliases": [
"author2",
"surname2",
"author-last2",
"author2-last",
"subject2"
],
"type": "string"
},
"first2": {
"label": "First name 2",
"description": "Given or first name, middle names, or initials of the second author; don't wikilink, use 'authorlink'; can suffix with a numeral to add additional authors",
"aliases": [
"given2",
"author-first2",
"author2-first"
],
"type": "string"
},
"last3": {
"label": "Last name 3",
"description": "The surname of the third author; don't wikilink, use 'authorlink3'.",
"aliases": [
"author3",
"surname3",
"author-last3",
"author3-last",
"subject3"
],
"type": "string"
},
"first3": {
"label": "First name 3",
"description": "Given or first name, middle names, or initials of the third author; don't wikilink.",
"aliases": [
"given3",
"author-first3",
"author3-first"
],
"type": "string"
},
"last4": {
"label": "Last name 4",
"description": "The surname of the fourth author; don't wikilink, use 'authorlink4'.",
"aliases": [
"author4",
"surname4",
"author-last4",
"author4-last",
"subject4"
],
"type": "string"
},
"first4": {
"label": "First name 4",
"description": "Given or first name, middle names, or initials of the fourth author; don't wikilink.",
"aliases": [
"given4",
"author-first4",
"author4-first"
],
"type": "string"
},
"last5": {
"label": "Last name 5",
"description": "The surname of the fifth author; don't wikilink, use 'authorlink5'.",
"aliases": [
"author5",
"surname5",
"author-last5",
"author5-last",
"subject5"
],
"type": "string"
},
"first5": {
"label": "First name 5",
"description": "Given or first name, middle names, or initials of the fifth author; don't wikilink.",
"aliases": [
"given5",
"author-first5",
"author5-first"
],
"type": "string"
},
"last6": {
"label": "Last name 6",
"description": "The surname of the sixth author; don't wikilink, use 'authorlink6'.",
"aliases": [
"author6",
"surname6",
"author-last6",
"author6-last",
"subject6"
],
"type": "string"
},
"first6": {
"label": "First name 6",
"description": "Given or first name, middle names, or initials of the sixth author; don't wikilink.",
"aliases": [
"given6",
"author-first6",
"author6-first"
],
"type": "string"
},
"last7": {
"label": "Last name 7",
"description": "The surname of the seventh author; don't wikilink, use 'authorlink7'.",
"aliases": [
"author7",
"surname7",
"author-last7",
"author7-last",
"subject7"
],
"type": "string"
},
"first7": {
"label": "First name 7",
"description": "Given or first name, middle names, or initials of the seventh author; don't wikilink.",
"aliases": [
"given7",
"author-first7",
"author7-first"
],
"type": "string"
},
"last8": {
"label": "Last name 8",
"description": "The surname of the eighth author; don't wikilink, use 'authorlink8'.",
"aliases": [
"author8",
"surname8",
"author-last8",
"author8-last",
"subject8"
],
"type": "string"
},
"first8": {
"label": "First name 8",
"description": "Given or first name, middle names, or initials of the eighth author; don't wikilink.",
"aliases": [
"given8",
"author-first8",
"author8-first"
],
"type": "string"
},
"last9": {
"label": "Last name 9",
"description": "The surname of the ninth author; don't wikilink, use 'authorlink9'. If nine authors are defined, then only eight will show and 'et al.' will show in place of the last author.",
"aliases": [
"author9",
"surname9",
"author-last9",
"author9-last",
"subject9"
],
"type": "string"
},
"first9": {
"label": "First name 9",


{{collapse bottom}}
[[Category:Templates]]
</noinclude>
</noinclude>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.