Difference between revisions of "Template:Cite book"
m (1 revision(s)) |
|||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
|{{#if:{{{last|}}} | {{#if:{{{year|}}} | id="Reference-{{{last}}}-{{{year}}}" }} }} | |{{#if:{{{last|}}} | {{#if:{{{year|}}} | id="Reference-{{{last}}}-{{{year}}}" }} }} | ||
}}>{{ | }}>{{ | ||
− | #if: {{{author|{{{last| | + | #if: {{{author|}}}{{{last|}}} |
| {{ | | {{ | ||
#if: {{{authorlink|}}} | #if: {{{authorlink|}}} | ||
Line 19: | Line 19: | ||
}} | }} | ||
}}{{ | }}{{ | ||
− | #if: {{{author|{{{last| | + | #if: {{{author|}}}{{{last|}}} |
− | | {{ #if: {{{coauthors|}}} | | + | | {{ #if: {{{coauthors|}}} | <nowiki>;</nowiki> {{{coauthors}}} }} |
}}{{ | }}{{ | ||
#if: {{{origdate|}}} | #if: {{{origdate|}}} | ||
Line 43: | Line 43: | ||
}} | }} | ||
}} | }} | ||
− | }}{{ #if: {{{author|{{{last| | + | }}{{ #if: {{{author|}}}{{{last|}}} | . |
}}{{ | }}{{ | ||
#if: {{{chapter|}}} | #if: {{{chapter|}}} | ||
− | |   | + | |  "{{ |
#if: {{{chapterurl|}}} | #if: {{{chapterurl|}}} | ||
| [{{{chapterurl}}} {{{chapter}}}] | | [{{{chapterurl}}} {{{chapter}}}] | ||
| {{{chapter}}} | | {{{chapter}}} | ||
− | }} | + | }}",}}{{ |
#if: {{{editor|}}} | #if: {{{editor|}}} | ||
− | |  {{{editor}}} | + | |  in {{{editor}}}: |
− | }} | + | }} <i>{{ |
#if: {{{url|}}} | [{{{url}}} {{{title}}}] | {{{title}}} | #if: {{{url|}}} | [{{{url}}} {{{title}}}] | {{{title}}} | ||
− | }} | + | }}</i>{{ |
#if: {{{format|}}} |  ({{{format}}}) | #if: {{{format|}}} |  ({{{format}}}) | ||
}}{{ | }}{{ | ||
Line 61: | Line 61: | ||
}}{{ | }}{{ | ||
#if: {{{edition|}}} | , {{{edition}}} | #if: {{{edition|}}} | , {{{edition}}} | ||
+ | }}{{ | ||
+ | #if: {{{series|}}} | , {{{series}}} | ||
}}{{ | }}{{ | ||
#if: {{{language|}}} |  (in {{{language}}}) | #if: {{{language|}}} |  (in {{{language}}}) | ||
Line 70: | Line 72: | ||
}}{{{publisher}}} | }}{{{publisher}}} | ||
}}{{ | }}{{ | ||
− | #if: {{{pages|}}} | , {{{pages}}} | + | #if: {{{pages|{{{page|}}}}}} | , {{{pages|{{{page}}}}}} |
}}{{ | }}{{ | ||
− | #if: {{{doi|}}} | . [[Digital object identifier|DOI]]:[http://dx.doi.org/{{{doi}}} {{{doi}}}] | + | #if: {{{doi|}}} | . [[Digital object identifier|DOI]]:[http://dx.doi.org/{{{doi|{{{doilabel|}}}}}} {{{doi}}}] |
}}{{ | }}{{ | ||
#if: {{{id|}}} | . {{{id}}} | #if: {{{id|}}} | . {{{id}}} | ||
}}{{ | }}{{ | ||
− | #if: {{{accessdate|}}} | + | #if: {{{isbn|}}} | . ISBN {{{isbn}}} |
− | + | }}{{ | |
+ | #if: {{{oclc|}}} | . [[OCLC]] [http://worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}] | ||
+ | }}{{ | ||
+ | #if: {{{url|}}} | {{ | ||
+ | #if: {{{accessdate|}}} | | ||
+ | . Retrieved on [[{{{accessdate}}}]] | ||
| {{ | | {{ | ||
#if: {{{accessyear|}}} | #if: {{{accessyear|}}} | ||
Line 84: | Line 91: | ||
| on [[{{{accessmonth}}} {{{accessyear}}}]] | | on [[{{{accessmonth}}} {{{accessyear}}}]] | ||
| during [[{{{accessyear}}}]] | | during [[{{{accessyear}}}]] | ||
− | + | }}}} | |
}} | }} | ||
}}.{{ #if: {{{quote|}}} | “{{{quote}}}” | }}.{{ #if: {{{quote|}}} | “{{{quote}}}” | ||
− | }}</cite></includeonly><noinclude>{{ | + | }}</cite><!-- |
+ | |||
+ | This is a COinS tag (http://ocoins.info), which allows automated tools to parse the citation information: | ||
+ | --><span class="Z3988" title="ctx_ver=Z39.88-2004<!-- | ||
+ | -->&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}}}}}<!-- | ||
+ | -->{{#if: {{{year|}}} | &rft.date={{urlencode:{{{year}}}}} }} }}<!-- Date of publication. Book dates are assumed to be a single year. (or ISO 8601) | ||
+ | -->{{#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></includeonly><noinclude>{{documentation}}</noinclude> |
Revision as of 18:51, 13 February 2008
<templatestyles src="Module:Documentation/styles.css"></templatestyles>
- This template documentation is transcluded from Template:Cite book/doc [edit]
This template is used to cite sources in Wikipedia. It is specifically for books.
Usage
All fields must be lowercase. Copy a blank version to use. Remember that the "|" character must be between each field, the fields must be in lowercase, please delete all the fields that are not being used to clear clutter in the edit window, and ISBN should be in the id field and separated from the number with a space. See also the complete description of fields.
Full version (copy and paste text below and delete parameters you don't need) | ||
---|---|---|
| ||
Most commonly used fields (or you can use this and not have to delete as much) | ||
| ||
Example 1 |
{{cite book |last= Cordell |first= Bruce R. |coauthors= Jeff Grubb, David Yu |title= [[Manual of the Planes]] |publisher= [[Wizards of the Coast]] |year= 2001 |month= September |id= ISBN 0-7869-1850-8 }} |
Cordell, Bruce R.; Jeff Grubb, David Yu (September 2001). Manual of the Planes. Wizards of the Coast. ISBN 0-7869-1850-8. |
Example 2 | {{cite book | last = Mumford | first = David | authorlink = David Mumford | title = The Red Book of Varieties and Schemes | publisher = [[Springer-Verlag]] | year = 1999 | doi = 10.1007/b62130 | id = ISBN 354063293X }} |
Mumford, David (1999). The Red Book of Varieties and Schemes. Springer-Verlag. DOI:10.1007/b62130. ISBN 354063293X. |
Vertical list | Prerequisites and Brief Instructions | |
{{cite book | last = | first = | authorlink = | coauthors = | editor = | others = | title = | origdate = | origyear = | origmonth = | url = | format = | accessdate = | accessyear = | accessmonth = | edition = | date = | year = | month = | publisher = | location = | language = | id = | doi = | pages = | chapter = | chapterurl = | quote = }} |
Prerequisites* Brief Instructions -------------- ----------------------- (no wikilink) last (no wikilink) last last REQUIRED** †preferred (no wikilink) alternative to origdate alternative to origdate url url †preferred (no wikilink) alternative to accessdate alternative to accessdate †preferred (no wikilink) alternative to date alternative to date publisher (no wikilink)‡ chapter |
∗ | The field listed below is a prerequisite for the field to the left. For example last is a prerequisite to first meaning first will NOT be displayed even if it has a value unless last also has a value. |
∗∗ | Wikilinks must link to an existing article, and cannot be used if url is used below. |
† | This is the preferred field with its alternates listed below. |
‡ | If chapterurl is provided then chapter can not have wikilinks. |
Fields
Wikilinks
Most fields can be wikilinked (ie. title = [[book article|book title]]), but should generally only be linked to an existing Wikipedia article. Any wikilinked field must not contain any brackets apart from normal round brackets ()
— don't use <>[]{}
.
Description of fields
Syntax (for the technical-minded)
Nested fields either rely on their parent fields, or replace them:
- parent
- child — may be used with parent (and is ignored if parent is not used)
- OR: child2 — may be used instead of parent (and is ignored if parent is used)
Description
- last: Surname of author. Don't wikilink (use authorlink instead).
- first: First name(s) of author, including title(s) (eg. Firstname Middlename or Firstname M. or Dr. Firstname M., Snr.). Don't wikilink (use authorlink instead).
- The `last' and `first' fields are poorly named for the case of an author whose surname is usually written first (e.g. as in Chinese). They also have the problem of only communicating which is the surname, not communicating where the surname is usually written. Consider deprecating first,last fields, and reinstating author field, using the notation "Smith, John" or "Hu Ke Jie" as appropriate (i.e. always writing surname first, and using comma or not depending on whether the name is usually written surname last or first).
- authorlink: Title of Wikipedia article about author. Article should already exist. Must not be wikilinked itself. Do not use this on its own, but along with "author" or "first" and "last".
- coauthors: Full name of additional author or authors, surname last, separated by ", " (eg. Joe Bloggs, John F. Kennedy, H. R. Dent).
- Someone please confirm that surname is to go last even for people whose name is usually written surname first. Consider rethinking this field, e.g. using Bloggs, Joe and Kennedy, John F. and Dent, H. R. and Hu Ke Jie.
- OR: author: Full name of author, preferably surname first.
- first: First name(s) of author, including title(s) (eg. Firstname Middlename or Firstname M. or Dr. Firstname M., Snr.). Don't wikilink (use authorlink instead).
- editor: Name of editor/editors. No text is added, so labels such as "(ed.)" have to be supplied by the user.
- others: For uses such as "illustrated by Smith" or "trans. Smith".
- title: Title of book. This is the only required parameter. Can be wikilinked only to an existing Wikipedia article. Do not use italics.
- url: URL of an online book. Cannot be used if you wikilinked title.
- format: Format, e.g. PDF. HTML implied if not specified.
- accessdate: Full date when item was accessed, in ISO 8601 YYYY-MM-DD format, eg. 2006-02-17. Required when url field is used. Must not be wikilinked.
- OR: accessyear: Year when item was accessed, and accessmonth: Month when item was accessed. If you also have the day, use accessdate instead. Must not be wikilinked.
- edition: When the book has more than one edition. eg: "2nd edition".
- origdate: Full date of publication of original edition, in ISO 8601 YYYY-MM-DD format, eg. 2004-06-27. Must not be wikilinked.
- OR: origyear: Year of publication of original edition, and origmonth: Month of publication of original edition. If you also have the day, use date instead. Must not be wikilinked.
- date: Full date of publication, in ISO 8601 YYYY-MM-DD format, eg. 2006-02-17. Must not be wikilinked.
- OR: year: Year of publication, and month: Name of the month of publication. If you also have the day, use date instead. Must not be wikilinked.
- publisher: Publisher should not include corporate designation such is "Ltd" or "Inc".
- location: Place of publication.
- language: The language the book is written in, if it is not English.
- id: Identifier such as ISBN 1-111-22222-9, {{LCC|Z253.U69}} or {{OCLC|123456789}}. Remember, you must specify the kind of identifier, not just give a number.
- doi: digital object identifier. See also {{doi}}
- pages: 5–7: first page and optional last page. This is for listing the pages relevant to the citation, not the total number of pages in the book.
- chapter: The chapter of the book, written in full. Punctuation other than quotes should be included in the value passed to the parameter, eg. chapter = Meet Dick and Jane. produces "Meet Dick and Jane." ahead of title.
- chapterurl: URL of an individual chapter of online book. Should be at the same site as url, if any.
- quote: Relevant quote from the book.
Examples
- Just a title
* {{cite book | title=Mysterious book }}
- Mysterious book.
- Year and title
* {{cite book | title=Mysterious book | year=1901 }}
- (1901) Mysterious book.
- Basic usage
* {{cite book | first=Joe | last=Bloggs | authorlink=Joe Bloggs | year=1974 | title=Book of Bloggs }}
- Bloggs, Joe (1974). Book of Bloggs.
- Basic usage with url
* {{cite book | last=Bloggs | first=Joe | authorlink=Joe Bloggs | year=1974 | title=Book of Bloggs | edition=1st Edition | url=http://en.wikipedia.org/ | accessdate=2006-02-17 }}
- Bloggs, Joe (1974). Book of Bloggs, 1st Edition. Retrieved on 2006-02-17.
- Three authors, title with a piped wikilink, edition
* {{cite book | last=Bloggs | first=Joe | authorlink=Joe Bloggs | coauthors=John Smith, Jim Smythe | title=[[A Thousand Acres|1000 Acres]] | edition=2nd Edition }}
- Bloggs, Joe; John Smith, Jim Smythe. 1000 Acres, 2nd Edition.
- Date without day, wikilinked title and publisher, id, pages, location
* {{cite book | last=Cordell | first=Bruce R. | coauthors=Jeff Grubb, David Noonan | year=2001 | month=September | title=[[Manual of the Planes]] | publisher=[[Wizards of the Coast]] | location=Timbuktu | id=ISBN 0-7869-1850-8 | pages=pp. 134-137 }}
- Cordell, Bruce R.; Jeff Grubb, David Noonan (September 2001). Manual of the Planes. Timbuktu: Wizards of the Coast, pp. 134-137. ISBN 0-7869-1850-8.
- Date of first edition, other language, illustrator
* {{cite book | last=Bloggs | first=Joe | origyear=1463 | year=1974 | title=Book of Bloggs | edition=1st Edition | others=illustrated by Smith | language=German | url=http://en.wikipedia.org/ | accessdate=2006-02-17 }}
- Bloggs, Joe [1463] (1974). Book of Bloggs, illustrated by Smith, 1st Edition (in German). Retrieved on 2006-02-17.
- Using a DOI
*{{cite book | last=Mumford | first=David | authorlink=David Mumford | year=1999 | title=The Red Book of Varieties and Schemes: Includes the Michigan Lectures (1974) on Curves and Their Jacobians | edition=2nd ed. | publisher=[[Springer-Verlag]] | doi=10.1007/b62130 | id=ISBN 354063293X }}
- Mumford, David (1999). The Red Book of Varieties and Schemes: Includes the Michigan Lectures (1974) on Curves and Their Jacobians, 2nd ed., Springer-Verlag. DOI:10.1007/b62130. ISBN 354063293X.
Testing
See Template:cite book/regression tests.
Note
Note the extra full-stop when the last author ends with an initial, and there is no date:
- Invisible, M.. Mysterious book.
We don't know of a practical solution to this — unless there is a way to test the characters of a field?
Citation styles
Established citation styles for coauthors:
- MLA style: Last, First and First Last. "If there are more than three authors, you may list only the first author followed by the phrase et al."
- APA style: Last, F. & Last, F.
- Chicago Manual of Style: Last, First, and First Last.
- Turabian: same as Chicago Reference List, above.
- Harvard: Last, F., Last, F. & Last, F.
See also
- Wikipedia:Cite sources: Style guide
- Wikipedia:Citation templates: Related templates
- Wikipedia:WikiProject Wikicite
- Category:Citation templates