Difference between revisions of "Template:Infobox book"
m |
|||
(One intermediate revision by the same user not shown) | |||
Line 105: | Line 105: | ||
}} | }} | ||
− | | label31 = [[ | + | | label31 = [[International Standard Book Number|ISBND]] |
− | | | + | | data31 = {{#if:{{{isbnd|{{{ISBND|}}}}}} |
+ | | {{#ifeq:{{{isbnd|{{{ISBND|}}}}}}|FETCH_WIKIDATA | ||
+ | | {{#invoke:ISBNT|link|{{#property:P212}}}}[[Category:Pages using isbn values obtained from wikidata]] | ||
+ | | {{ISBNT|1={{{isbnd|{{{ISBND}}}}}}}} {{{isbnd_note|{{{ISBND_note|}}}}}} | ||
+ | }} | ||
+ | }} | ||
− | | label32 = {{ | + | | label32 = [[OCLC#Identifiers and linked data|{{abbr|OCLC|Online Computer Library Center number}}]] |
− | | data32 = {{# | + | | data32 = {{#if:{{{oclc|}}} |[https://www.worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]}} |
− | | label33 = [[ | + | | label33 = {{longitem|[[Dewey Decimal Classification|Dewey Decimal]]}} |
− | | data33 = {{#invoke:Wikidata|getValue| | + | | data33 = {{#invoke:Wikidata|getValue|P1036|{{{dewey|}}}}} |
− | | label34 = Preceded by | + | | label34 = [[Library of Congress Classification|{{abbr|LC Class|Library of Congress Classification}}]] |
− | | | + | | data34 = {{#invoke:Wikidata|getValue|P1149|{{{congress|}}}}} |
+ | |||
+ | | label35 = Preceded by | ||
+ | | data35 = {{#if:{{{preceded_by|}}} |''{{{preceded_by|}}}{{nbsp}}'' | ||
| {{#if:{{{preceded_by_quotation_marks|}}} |"{{{preceded_by_quotation_marks|}}}"}} | | {{#if:{{{preceded_by_quotation_marks|}}} |"{{{preceded_by_quotation_marks|}}}"}} | ||
}} | }} | ||
− | | | + | | label36 = Followed by |
− | | | + | | data36 = {{#if:{{{followed_by|}}} |''{{{followed_by|}}}{{nbsp}}'' |
| {{#if:{{{followed_by_quotation_marks|}}} |"{{{followed_by_quotation_marks|}}}"}} | | {{#if:{{{followed_by_quotation_marks|}}} |"{{{followed_by_quotation_marks|}}}"}} | ||
}} | }} | ||
− | | | + | | label37 = {{longitem|Original text}} |
− | | | + | | data37 = {{#if:{{both|{{{native_wikisource|}}}|{{{orig_lang_code|}}}}} <!-- |
then:-->| ''{{lang |{{{orig_lang_code|}}} | then:-->| ''{{lang |{{{orig_lang_code|}}} | ||
| [[s:{{#if:{{{orig_lang_code|}}}|{{{orig_lang_code|}}}:}}{{{native_wikisource|}}}|{{{title_orig|{{{name|{{PAGENAME}}}}}}}}]]<!-- | | [[s:{{#if:{{{orig_lang_code|}}}|{{{orig_lang_code|}}}:}}{{{native_wikisource|}}}|{{{title_orig|{{{name|{{PAGENAME}}}}}}}}]]<!-- | ||
Line 138: | Line 146: | ||
}} }} | }} }} | ||
− | | | + | | label38 = {{#if:{{{native_wikisource|}}} |Translation |{{#if:{{{native_external_url|}}}|Translation|Text}} }} |
− | | | + | | data38 = {{#if:{{{wikisource|}}} <!-- |
then:-->| ''[[s:{{{wikisource|}}}|{{{name|{{PAGENAME}}}}}]]'' at <!-- | then:-->| ''[[s:{{{wikisource|}}}|{{{name|{{PAGENAME}}}}}]]'' at <!-- | ||
-->{{#if:{{{native_wikisource|}}} |Wikisource |[[Wikisource]]}}<!-- | -->{{#if:{{{native_wikisource|}}} |Wikisource |[[Wikisource]]}}<!-- | ||
Line 148: | Line 156: | ||
}} }} | }} }} | ||
− | | | + | | label39 = Website |
− | | | + | | data39 = {{{website|{{{homepage|{{{URL|{{#ifeq:{{{website|{{{homepage|{{{URL|}}}}}}}}} |
| FETCH_WIKIDATA | | FETCH_WIKIDATA | ||
| {{#if:{{#property:P856}}|{{Url|1={{#invoke:Wikidata|getValue|P856|FETCH_WIKIDATA}} }} }} | | {{#if:{{#property:P856}}|{{Url|1={{#invoke:Wikidata|getValue|P856|FETCH_WIKIDATA}} }} }} | ||
Line 157: | Line 165: | ||
| below = {{{notes|{{{note|}}}}}} | | below = {{{notes|{{{note|}}}}}} | ||
− | }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox book with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox book]] with unknown parameter "_VALUE_"|ignoreblank=y| alt | audio_read_by | author | authors | award | awards | border | caption | congress | country | cover_artist | dewey | editor | editors | english_pub_date | english_release_date | exclude_cover | external_host | external_url | first | followed_by | followed_by_quotation_marks | genre | genres | homepage | illustrator | illustrators | image | image_caption | image_size | infoboxwidth | isbn | ISBN | + | }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox book with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox book]] with unknown parameter "_VALUE_"|ignoreblank=y| alt | audio_read_by | author | authors | award | awards | border | caption | congress | country | cover_artist | dewey | editor | editors | english_pub_date | english_release_date | exclude_cover | external_host | external_url | first | followed_by | followed_by_quotation_marks | genre | genres | homepage | illustrator | illustrators | image | image_caption | image_size | infoboxwidth | isbn | ISBN | ISBND |isbnd | isbn_note | ISBN_note | isbnd_note | ISBND_note | italic title | language | last | location | media_type | name | native_external_host | native_external_url | native_wikisource | nocat_wdimage | note | notes | oclc | orig_lang_code | pages | preceded_by | preceded_by_quotation_marks | pub_date | published | publisher | publisher2 | release_date | release_number | series | set_in | subject | subjects | title_orig | title_working | translator | translators | URL | website | width | wikisource |
}}{{Wikidata image |1={{{image|}}} |2={{{nocat_wdimage|}}} | }}{{Wikidata image |1={{{image|}}} |2={{{nocat_wdimage|}}} | ||
}}{{#if:{{{image|}}}|{{#if:{{#property:P18}}||[[Category:Pages to import images to Wikidata]]}} | }}{{#if:{{{image|}}}|{{#if:{{#property:P18}}||[[Category:Pages to import images to Wikidata]]}} | ||
}}<noinclude> | }}<noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</noinclude> | </noinclude> |
Latest revision as of 10:14, 9 January 2019
This template is used on approximately 42,000 pages, so changes to it will be widely noticed. Please test any changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Please consider discussing changes on the talk page before implementing them. |
This infobox should italicize the article title automatically. If this is not required, add |italic title=no to the list of parameters. If this is required but the title is not being italicized, try |italic title=force . |
This template tracks the Wikidata property: Lua error in Module:Uses_Wikidata at line 13: attempt to index field 'wikibase' (a nil value). |
This template uses the Wikidata properties: Lua error in Module:Uses_Wikidata at line 13: attempt to index field 'wikibase' (a nil value). |
This template is used to present a consistently-formatted table for use in articles about books.
Contents
Usage
caption | |
Author | author |
---|---|
Audio read by | audio_read_by |
Original title | title_orig |
Working title | title_working |
Translator | translator |
Illustrator | illustrator |
Cover artist | cover_artist |
Country | country |
Language | language |
Series | series |
Release number | release_number |
Subject | subject |
Genre | genre |
Set in | set_in |
Published | published |
Publisher | publisher, publisher2 |
Publication date | pub_date |
Published in English | english_pub_date |
Media type | media_type |
Pages | pages |
Awards | awards |
ISBN | <templatestyles src="Module:Citation/CS1/styles.css" />isbn Parameter error in {{ISBN}}: Invalid Wikipedia:ISBN. |
OCLC | oclc |
dewey | |
LC Class | congress |
Preceded by | preceded_by |
Followed by | followed_by |
Original text | title_orig at Interlingua Wikisource |
Translation | name at Wikisource |
notes |
{{Infobox book | italic title = <!--(see above)--> | name = | image = | image_size = | border = | alt = | caption = | author = | audio_read_by = | title_orig = | orig_lang_code = | title_working = | translator = | illustrator = | cover_artist = | country = | language = | series = | release_number = | subject = | genre = | set_in = | publisher = | publisher2 = | pub_date = | english_pub_date = | published = | media_type = | pages = | awards = | isbn = | isbn_note = | oclc = | dewey = | congress = | preceded_by = | followed_by = | native_wikisource = | wikisource = | notes = | exclude_cover = | website = }}
Parameters
Please see WikiProject Books and/or WikiProject Novels for standards on presenting names and other data.
- Parameters can be safely left blank. Note that you may include an image with no caption, but a caption will not be shown if there is no image.
- Wikilinks can be used in any of the infobox fields.
- name
- Book name or title. If parameter is left blank, name will be inherited from the Wikipedia page where this infobox is invoked.
- image
- Image (prefer 1st edition where permitted), use bare filename:
Example.jpg
- image_size
- Uses image size set by user (default 220px). Use a number to override image size.
- border
- Inserting
yes
here will result in a 1px grey border around the image, useful for instances where the image and the background will blend together (such as a book cover with a white background). If no border is necessary, this parameter should not be used. Note: does not apply if|image=
uses the full image syntax (e.g.[[Image:Example.jpg]]
); in this case add the border in|image=
(e.g.[[Image:Example.jpg|border=yes]]
) - caption
- Image caption (should describe the edition used)
- alt
- Image alternate text
- editor/editors
- Editor(s) only when they are the primary contributor, e.g. dictionaries, encyclopedias, anthologies
- author/authors
- Author(s)
- audio_read_by
- For audiobooks.
- title_orig
- Original title, if not in English
- orig_lang_code
- ISO 639 code of original language, required if using
|title_orig=
,|native_wikisource=
or|native_external_url=
- working_title
- Working title, when different from published title
- translator
- Translator(s), if original not in English
- illustrator
- Illustrator (where used throughout and a major feature)
- cover_artist
- Cover artist
- country
- Country of original publication
- language
- Language of original book
- series
- Series (if any)
- release_number
- The "release number" of a book within the "series" (also would be called a "volume") - n.b. only relevant for an article where "series" is populated
- subject/subjects
- (for non-fiction) See index term and library classification
- genre/genres
- (for fiction) See literary genre. Use {{hlist}} for sorting multiple entries.
- set_in
- can be both time and place as setting. No need to create long lists.
- publisher
- Publisher of primary publication (prefer 1st edition); also
|publisher2=
for additional publishers. - pub_date
- Date published (1st edition)
- english_pub_date
- Date first published in English if 1st edition is in another language.
- published
- Alternate parameter, using the following composite format: year (publisher) (language, when originally written in a foreign language); use {{plainlist}} when there is more than one notable edition
- Note:
|published=
is acceptable, but no longer preferred to|publisher=
and|pub_date=
, which have been restored to common usage. No consensus has yet been reached regarding the migration of infoboxes to a common format, and none should be "fixed" one way or the other en masse until such consensus is reached. - media_type
- Print / Digital (then binding types etc., if relevant)
- pages
- Pages (prefer 1st edition, specify edition as needed)
- award/awards
- Awards(s) the book has won
- isbn
- (prefer ISBN of 1st edition). Format: "1-234-56789-0" (10-digit) or "978-1-234-56789-0" (13-digit). If the book has a standard book number (9 digits) add a "0" to the beginning of the number. Do not change a 10-digit to a 13-digit ISBN by prefixing a "978" by hand, because the last digit is a calculated check digit, which will be wrong. Similarly, do not remove "978-" from a 13-digit ISBN to make a 10-digit ISBN. If the book was published before the use of ISBN, do not include this parameter. If the 13-digit number you have does not start with "978", "979-10", or "979-11", then it is not an ISBN and should not be used in this parameter. Change spaces in the ISBN to hyphens. The rules for hyphenating an ISBN are complex (currently 29 pages). Do not add spaces or hyphens to an unformatted ISBN which are likely to be wrong if you are guessing. However the "978" prefix of a 13-digit ISBN is always separated by a hyphen and the check digit – the last character – is always separated by a hyphen. The last character of a 10-character ISBN may be an "X". In such case, use the uppercase "X" character, not any alternate character. Do not put "ISBN " in front of the number. ISBNs are checked for validity; articles with invalid ISBNs are placed in Category:Pages with ISBN errors and display a red error message.
- isbn_note
- May be used to add a note following the ISBN.
- isbnd
- (prefer ISBN of 1st edition). Format: "1-234-56789-0" (10-digit) or "978-1-234-56789-0" (13-digit). If the book has a standard book number (9 digits) add a "0" to the beginning of the number. Do not change a 10-digit to a 13-digit ISBN by prefixing a "978" by hand, because the last digit is a calculated check digit, which will be wrong. Similarly, do not remove "978-" from a 13-digit ISBN to make a 10-digit ISBN. If the book was published before the use of ISBN, do not include this parameter. If the 13-digit number you have does not start with "978", "979-10", or "979-11", then it is not an ISBN and should not be used in this parameter. Change spaces in the ISBN to hyphens. The rules for hyphenating an ISBN are complex (currently 29 pages). Do not add spaces or hyphens to an unformatted ISBN which are likely to be wrong if you are guessing. However the "978" prefix of a 13-digit ISBN is always separated by a hyphen and the check digit – the last character – is always separated by a hyphen. The last character of a 10-character ISBN may be an "X". In such case, use the uppercase "X" character, not any alternate character. Do not put "ISBN " in front of the number. ISBNs are checked for validity; articles with invalid ISBNs are placed in Category:Pages with ISBN errors and display a red error message.
- isbnd_note
- May be used to add a note following the ISBND.
- oclc
- OCLC number (prefer 1st edition), use when book has no ISBN
- dewey
- Dewey Decimal Classification
- congress
- Library of Congress Classification (not to be confused with Library of Congress Control Number)
- preceded_by
- Title of prior book in series; will be italicised by template code (do not use to connect separate books chronologically)
- preceded_by_quotation_marks
- Title of prior work in series if a minor work; will be surrounded with quotation marks by template code (do not use to connect separate books chronologically)
- followed_by
- Title of subsequent book in a series or a sequel; will be italicised by template code (do not use to connect separate books chronologically)
- followed_by_quotation_marks
- Title of subsequent work in a series or a sequel if a minor work; will be surrounded with quotation marks by template code (do not use to connect separate books chronologically)
- native_wikisource
- Page name of original text at a foreign language Wikisource (if applicable); use
|orig_lang_code=
to specify which Wikisource. Tracked in Category:Articles that link to foreign-language Wikisources - native_external_url
- URL to a site hosting the original text when in a foreign language, and in the public domain but not yet on Wikisource. Non-commercial, open and accessible sites should be used in preference, sites which rip the text from other sites should be avoided, and illegal content is never to be linked to
- native_external_host
- The name of the website linked to by
|native_external_url=
, e.g. Project Gutenberg, Internet Archive. Should be wikilinked if possible - wikisource
- Title of work if in the public domain and hosted at English Wikisource:. Tracked in Category:Articles that link to Wikisource
- external_url
- URL to a site hosting the text in English (whether the original or a translation), when in the public domain but not yet on Wikisource. Non-commercial, open and accessible sites should be used in preference, sites which rip the text from other sites should be avoided, and illegal content is never to be linked to
- external_host
- The name of the website linked to by
|external_url=
, e.g. Project Gutenberg, Internet Archive. Should be wikilinked if possible - exclude_cover
- This template will place articles with this infobox where no image has been specified into the category Books with missing cover; where this is not desired, e.g because the cover is shown elsewhere in the article, this parameter should be set to
|exclude_cover=yes
. - website
- for the publisher's or author's website about the book.
Example
The front (first) page of the first edition | |
Author | Lucy Maud Montgomery |
---|---|
Illustrator | M. A. and W. A. J. Claus |
Country | United States |
Language | English |
Genre | Children's novel |
Publisher | L. C. Page & Co. |
Publication date | 1908 |
Pages | 429 (first edition) |
OCLC | 367111 |
LC Class | PR6025.O45 A53 |
Followed by | Anne of Avonlea |
Text | Anne of Green Gables at Wikisource |
{{Infobox book | name = Anne of Green Gables | image = FirstPageGreenGables.gif | caption = The front (first) page of the first edition | alt = Cover | author = [[Lucy Maud Montgomery]] | title_orig = | working_titl e = | translator = | illustrator = M. A. and W. A. J. Claus | cover_artist = | country = United States | language = English | series = | release_number = | subject = | genre = [[Children's literature|Children's novel]] | publisher = [[L. C. Page & Co.]] | pub_date = 1908 | pages = 429 ''(first edition)'' | awards = | isbn = <!-- N/A --> | isbnd = <!-- N/A --> | oclc = 367111 | congress = PR6025.O45 A53 | preceded_by = | followed_by = [[Anne of Avonlea]] | wikisource = Anne of Green Gables }}
TemplateData
TemplateData documentation used by VisualEditor and other tools | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
See the monthly error report for this template.
TemplateData for Infobox book Consistently-formatted table for presenting information about books
|
Translated books
About how to handle translated books, see the Translated books case study.
COinS
This template produces COinS metadata; see COinS in Wikipedia for background information.
Tracking categories
- Category:Articles that link to Wikisource (0)
- Category:Articles that link to foreign-language Wikisources (0)
- Category:Books with missing cover (1) – instances without images
- Category:Pages using deprecated image syntax (0)
- Category:Pages using infobox book with unknown parameters (0)
- Category:Pages using deprecated image syntax (0) – Used by Module:InfoboxImage to track articles where an infobox uses image syntax in the format |image=[[File:Example.jpg]]. To exclude articles from this category, change it to |image=Example.jpg.
- Category:No local image but image on Wikidata (70) – Used by Template:Wikidata image to track articles where an infobox has no image but Wikidata has an image name. To exclude articles from this category, add an image or
|nocat_wdimage=yes
to the infobox.
Supporting templates and modules
Lua error in Module:Lua_banner at line 93: attempt to index field 'edit' (a nil value).
The following templates are used directly from this template:
- {{Infobox}}
- {{Abbr}}
- {{Both}}
- {{ISBNT}}
- {{Lang}}
- {{Longitem}}
- {{Main other}}
- {{PAGENAMEBASE}}
- {{URL}}
- {{Wikidata image}}
- {{Yesno}}
See also
- {{Infobox book series}}
- Wikipedia:WikiProject Novels/InfoboxCode
- Wikipedia:WikiProject Novels/ArticleTemplate#Pattern template
The above documentation is transcluded from Template:Infobox book/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |