Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Infobox book: Difference between revisions

Template page
mNo edit summary
mNo edit summary
Line 1: Line 1:
<includeonly>{{Infobox
<includeonly>{{Infobox
| bodyclass = vcard
|bodyclass = vcard
| bodystyle = {{#if:{{{infoboxwidth|{{{width|}}}}}} |width:{{{infoboxwidth|{{{width}}}}}} }}
|bodystyle = {{#if:{{{infoboxwidth|{{{width|}}}}}} |width:{{{infoboxwidth|{{{width}}}}}} }}
 
<!---------------Title----------------->
<!---------------Title----------------->
| titlestyle = font-size:125%; font-style:italic; padding-bottom:0.2em<!--(so title doesn't touch border)-->;
|titlestyle = font-size:125%; font-style:italic; padding-bottom:0.2em<!--(so title doesn't touch border)-->;
| title = {{#if:{{{name|}}}{{{caption|{{{image_caption|}}}}}}{{{editors|{{{editor|}}}}}}{{{authors|{{{author|}}}}}}{{{audio_read_by|}}}{{{title_orig|}}}{{{title_working|}}}{{{translators|{{{translator|}}}}}}{{{illustrators|{{{illustrator|}}}}}}{{{cover_artist|}}}{{{language|}}}{{{series|}}}{{{release_number|}}}{{{subjects|{{{subject|}}}}}}{{{genres|{{{genre|}}}}}}{{{set_in|}}}{{{publication|}}}{{{media_type|}}}{{{pages|}}}{{{awards|{{{award|}}}}}}{{{dewey|}}}{{{congress|}}}| }}<!-- hack for ref ordering
|title = {{#if:{{{name|}}}{{{caption|{{{image_caption|}}}}}}{{{editors|{{{editor|}}}}}}{{{authors|{{{author|}}}}}}{{{audio_read_by|}}}{{{title_orig|}}}{{{title_working|}}}{{{translators|{{{translator|}}}}}}{{{illustrators|{{{illustrator|}}}}}}{{{cover_artist|}}}{{{language|}}}{{{series|}}}{{{release_number|}}}{{{subjects|{{{subject|}}}}}}{{{genres|{{{genre|}}}}}}{{{set_in|}}}{{{publication|}}}{{{media_type|}}}{{{pages|}}}{{{awards|{{{award|}}}}}}{{{dewey|}}}{{{congress|}}}| }}<!-- hack for ref ordering
  -->{{{name|{{PAGENAMEBASE}}}}} <!--
  -->{{{name|{{PAGENAMEBASE}}}}} <!--
  --><span class="Z3988"
  --><span class="Z3988"
Line 14: Line 13:
                 -->{{#if:{{{series|}}}    |&rft.series={{urlencode:{{{series}}}}}}}<!--
                 -->{{#if:{{{series|}}}    |&rft.series={{urlencode:{{{series}}}}}}}<!--
                 -->{{#if:{{{oclc|}}}      |&rft_id=info:oclcnum/{{{oclc}}}}}"><!--
                 -->{{#if:{{{oclc|}}}      |&rft_id=info:oclcnum/{{{oclc}}}}}"><!--
  --></span><!--
  --></span>
      -->
 
<!---------------Image----------------->
<!---------------Image----------------->
| imagestyle = {{#if:{{{image|}}}||display:none}}
| imagestyle = {{#if:{{{image|}}}||display:none}}
Line 109: Line 106:
| belowstyle = border-top:#aaa 1px solid;font-size:90%;
| belowstyle = border-top:#aaa 1px solid;font-size:90%;
| below = {{{notes|{{{note|}}}}}}
| below = {{{notes|{{{note|}}}}}}
}}</includeonly>{{#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 | cover_artist | dewey | editor | editors | exclude_cover | followed_by | followed_by_quotation_marks | genre | genres | illustrator | illustrators | image | image_caption | image_size | infoboxwidth | isbn | language | media_type | module | name | nocat_wdimage | note | notes | oclc | orig_lang_code | pages | preceded_by | preceded_by_quotation_marks | publication | release_number | series | set_in | subject | subjects | title_orig | title_working | translator | translators | website | width  
}}{{#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 | cover_artist | dewey | editor | editors | exclude_cover | followed_by | followed_by_quotation_marks | genre | genres | illustrator | illustrators | image | image_caption | image_size | infoboxwidth | isbn | language | media_type | module | name | nocat_wdimage | note | notes | oclc | orig_lang_code | pages | preceded_by | preceded_by_quotation_marks | publication | release_number | series | set_in | subject | subjects | title_orig | title_working | translator | translators | website | width  
}}
}}</includeonly>
 


<noinclude>
This template is used to present a consistently-formatted table for use in articles about books.
This template is used to present a consistently-formatted table for use in articles about books.


Line 393: Line 390:
}
}
</templatedata>
</templatedata>
</noinclude>

Revision as of 22:49, 20 September 2022


This template is used to present a consistently-formatted table for use in articles about books.

Usage

{{Infobox book
| name              = 
| image             = 
| image_size        = 
| border            = 
| alt               = 
| caption           = 
| author            = 
| audio_read_by     = 
| title_orig        = 
| orig_lang_code    = 
| title_working     = 
| translator        = 
| illustrator       = 
| cover_artist      = 
| language          = 
| series            = 
| release_number    = 
| subject           = 
| genre             = 
| set_in            = 
| publication       = 
| media_type        = 
| pages             = 
| awards            = 
| isbn              = 
| oclc              = 
| dewey             = 
| congress          = 
| preceded_by       = <!-- for books in a series -->
| followed_by       = <!-- for books in a series -->
| wikisource        = 
| notes             = 
| exclude_cover     = 
| website           = 
}}

Parameters

image
Image (prefer 1st edition where permitted), use bare filename: Example.jpg
For a title page from a Commons PDF, specify the page and width in the syntax: [[File:Lissagaray - Histoire de la Commune de 1871, MS.djvu|page=9|220px]]
image_size
Uses image size set by user (default 220px). Use a number to override image size. However, this is discouraged per WP:THUMBSIZE.
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 Template:Para uses the full image syntax (e.g. [[File:Example.jpg]]); in this case add the border in Template:Para (e.g. [[File:Example.jpg|border=yes]])
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.
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, if any
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. Use approximate dates/places if it is not clearly specified in the text.
media_type
Print / Digital (then binding types etc., if relevant)
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 digitTemplate:Spndthe last characterTemplate:Spndis 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.
oclc
OCLC number (prefer 1st edition), use when book has no ISBN
preceded_by_quotation_marks
Title of prior work Template:Em 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 Template:Em; will be italicised by template code (do not use to connect separate books chronologically)
followed_by_quotation_marks
Title of subsequent work Template:Em if a minor work; will be surrounded with quotation marks by template code (do not use to connect separate books chronologically)
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 Template:Para.

Example

{{Infobox bookTemplate:\sandbox | 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_title = | translator = | illustrator = M. A. and W. A. J. Claus | cover_artist = | language = English | series = | release_number = | subject = | genre = Children's novel | publication = 1908 in the United States by L. C. Page & Co. (originally in English) | pages = 429 (first edition) | awards = | isbn = | oclc = 367111 | congress = PR6025.O45 A53 | preceded_by = | followed_by = Anne of Avonlea | wikisource = Anne of Green Gables }}

{{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_title = 
| translator     = 
| illustrator    = M. A. and W. A. J. Claus
| cover_artist   = 
| language       = English
| series         = 
| release_number = 
| subject        = 
| genre          = [[Children's literature|Children's novel]]
| publication      = 1908 in the [[United States]] by [[L. C. Page & Co.]] (originally in English)
| pages          = 429 ''(first edition)''
| awards         = 
| isbn           = <!-- N/A -->
| oclc           = 367111
| congress       = PR6025.O45 A53
| preceded_by    = 
| followed_by    = [[Anne of Avonlea]]
| wikisource     = Anne of Green Gables
}}

TemplateData

Consistently-formatted table for presenting information about books

Template parameters[Edit template data]

This template has custom formatting.

ParameterDescriptionTypeStatus
Namename

Book name or title. If parameter is left blank, ''name'' will be inherited from the [[Wikipedia:Article titles|Wikipedia page]] where this infobox is invoked.

Default
Pagename
Stringoptional
Imageimage

Image (prefer 1st edition where permitted). Use bare filename.

Filesuggested
Alternate image textalt

Alternate text to display if the image cannot be rendered.

Stringoptional
Authorauthor

Author(s) of the book (should be link to their respective article if there is one).

Stringsuggested
Languagelanguage

Language of (original) book.

Example
English
Stringoptional
Genregenre

The book's genre

Example
Science fiction
Stringoptional
Publicationpublication

Information about the publishment of the book. The following format: year (publisher) (language, when originally written in a foreign language)

Example
1867 by Verlag von Otto Meisner (German)
Contentoptional
ISBNisbn

Format: "ISBN 1-234-56789-0" (prefer 1st edition)

Stringsuggested
exclude cover?exclude_cover

"yes" if no image is present and adding this article to "Category:Books with missing cover" is not desired

Example
yes
Stringoptional
Seriesseries

Series the book is part of

Example
[[The Federalist Papers]]
Stringoptional
Image sizeimage_size

no description

Example
200 px
Stringoptional
Image captioncaption

a caption for the image used

Contentoptional
Type of mediamedia_type

no description

Example
[[Newspaper]]
Stringoptional
Preceded bypreceded_by

The previous installment in the series/from the author

Example
[[Federalist No. 4]]
Stringoptional
Followed byfollowed_by

The next installment in the series/from the author

Example
[[Federalist No. 6]]
Stringoptional
infoboxwidthinfoboxwidth

no description

Unknownoptional
widthwidth

no description

Unknownoptional
image_captionimage_caption

no description

Unknownoptional
Editor(s)editors

Editor(s) '''only when they are the primary contributor''', e.g. dictionaries, encyclopedias, anthologies.

Example
* [[Karl Marx]] and [[Fredreich Engels]]
  • [[Joseph Stalin]]
Contentoptional
editoreditor

no description

Unknownoptional
authorsauthors

no description

Unknownoptional
audio_read_byaudio_read_by

no description

Unknownoptional
title_origtitle_orig

no description

Unknownoptional
title_workingtitle_working

no description

Unknownoptional
translatorstranslators

no description

Unknownoptional
translatortranslator

no description

Unknownoptional
illustratorsillustrators

no description

Unknownoptional
illustratorillustrator

no description

Unknownoptional
cover_artistcover_artist

no description

Unknownoptional
release_numberrelease_number

no description

Unknownoptional
subjectssubjects

no description

Unknownoptional
subjectsubject

no description

Unknownoptional
genresgenres

no description

Unknownoptional
set_inset_in

no description

Unknownoptional
Pagespages

Amount of pages in the book.

Example
453
Numberoptional
awardsawards

no description

Unknownoptional
awardaward

no description

Unknownoptional
[[Dewey Decimal Classification]]dewey

no description

Stringoptional
Library of Congress Classificationcongress

Library of Congress Classification ('''not''' to be confused with Library of Congress Control Number)

Stringoptional
oclcoclc

no description

Unknownoptional
borderborder

no description

Unknownoptional
orig_lang_codeorig_lang_code

no description

Unknownoptional
preceded_by_quotation_markspreceded_by_quotation_marks

no description

Unknownoptional
followed_by_quotation_marksfollowed_by_quotation_marks

no description

Unknownoptional
Website(s)websites

The publisher's or author's websites about the book.

Example
[https://cpc.people.com.cn cpc.people.com.cn]
Stringoptional
notesnotes

no description

Unknownoptional
notenote

no description

Unknownoptional
nocat_wdimagenocat_wdimage

no description

Unknownoptional