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
(Ported Infobox book from wikipedia for use in Encyclopedia pages.)
 
m (replaced with a bad but working example)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<onlyinclude>{{Infobox
<onlyinclude>{{Infobox
| italic title = {{{italic title|<noinclude>no</noinclude>}}}
|bodyclass = vcard
| bodyclass = vcard
|bodystyle = {{#if:{{{infoboxwidth|{{{width|}}}}}} |width:{{{infoboxwidth|{{{width}}}}}} }}
| bodystyle = {{#if:{{{infoboxwidth|{{{width|}}}}}} |width:{{{infoboxwidth|{{{width}}}}}} }}
<!---------------Title----------------->|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----------------->
| titlestyle = font-size:125%; font-style:italic; padding-bottom:0.2em<!--(so title doesn't touch border)-->;
| title = <includeonly>{{#if:{{{name|}}}{{{caption|{{{image_caption|}}}}}}{{{editors|{{{editor|}}}}}}{{{authors|{{{author|}}}}}}{{{audio_read_by|}}}{{{title_orig|}}}{{{title_working|}}}{{{translators|{{{translator|}}}}}}{{{illustrators|{{{illustrator|}}}}}}{{{cover_artist|}}}{{{country|}}}{{{language|}}}{{{series|}}}{{{release_number|}}}{{{subjects|{{{subject|}}}}}}{{{genres|{{{genre|}}}}}}{{{set_in|}}}{{{published|}}}{{{publisher|}}}{{{publisher2|}}}{{{pub_date|{{{release_date|}}}}}}{{{english_pub_date|{{{english_release_date|}}}}}}{{{media_type|}}}{{{pages|}}}{{{awards|{{{award|}}}}}}{{{isbn_note|{{{ISBN_note|}}}}}}{{{dewey|}}}{{{congress|}}}| }}<!-- hack for ref ordering
  -->{{{name|{{PAGENAMEBASE}}}}} <!--
  -->{{{name|{{PAGENAMEBASE}}}}} <!--
--><span class="Z3988"
          title="ctx_ver=Z39.88-2004&rft_val_fmt={{urlencode:info:ofi/fmt:kev:mtx:book}}&rft.genre=book&rft.btitle={{urlencode:{{{name|}}}}}<!--
                -->{{#if:{{{author|}}}    |&rft.author={{urlencode:{{{author}}}}}}}<!--
                -->{{#if:{{{last|}}}      |&rft.aulast={{urlencode:{{{last}}}}}}}<!--
                -->{{#if:{{{first|}}}    |&rft.aufirst={{urlencode:{{{first}}}}}}}<!--
                -->{{#if:{{{pub_date|{{{release_date|}}}}}} |&rft.date={{urlencode:{{{pub_date|{{{release_date}}}}}}}}}}<!--
                -->{{#if:{{{publisher|}}} |&rft.pub={{urlencode:{{{publisher}}}}}}}<!--
                -->{{#if:{{{location|}}}  |&rft.place={{urlencode:{{{location}}}}}}}<!--
                -->{{#if:{{{pages|}}}    |&rft.pages={{urlencode:{{{pages}}}}}}}<!--
                -->{{#if:{{{series|}}}    |&rft.series={{urlencode:{{{series}}}}}}}<!--
                -->{{#if:{{{oclc|}}}      |&rft_id=info:oclcnum/{{{oclc}}}}}"><!--
--></span><!--
      --></includeonly>
<!---------------Image----------------->
<!---------------Image----------------->
| imagestyle = {{#if:{{{image|}}}||display:none}}
| imagestyle = {{#if:{{{image|}}}||display:none}}
| image = {{#if:{{{image|}}} <!--
| image = {{#if:{{{image|}}} <!--
   then:-->|  {{#invoke:InfoboxImage|InfoboxImage |image={{{image|}}} |size={{{image_size|}}} |sizedefault=frameless |upright=1 |alt={{{alt|}}} |title={{{alt|}}} |border={{{border|}}} |suppressplaceholder=yes}}<!--
   then:-->|  {{#invoke:InfoboxImage|InfoboxImage |image={{{image|}}} |size={{{image_size|}}} |sizedefault=frameless |upright=1 |alt={{{alt|}}} |title={{{alt|}}} |border={{{border|}}} |suppressplaceholder=yes}}<!--
   else:-->| {{#ifeq:{{yesno|{{lc:{{{exclude_cover|no}}}}}}}|yes | |{{main other|[[Category:Books with missing cover]]}} }}
   else:-->| {{#ifeq:{{#ifeq: {{lc:{{{exclude_cover|no}}}}} | yes | yes | no }}|yes | |{{main other|[[Category:Books with missing cover]]}} }}
           }}
           }}
| caption = {{{caption|{{{image_caption|}}}}}}
| caption = {{{caption|{{{image_caption|}}}}}}
Line 55: Line 38:
|  data8  = {{{cover_artist|}}}
|  data8  = {{{cover_artist|}}}


| label10 = Country
| label9 = Language
|  data10 = {{{country|}}}
data9 = {{{language|}}}
 
| label11 = Language
data11 = {{{language|}}}


| label12 = Series
| label10 = Series
data12 = {{{series|}}}
data10 = {{{series|}}}


| label13 = {{longitem|Release number}}
| label11 = {{longitem|Release number}}
data13 = {{{release_number|}}}
data11 = {{{release_number|}}}


| label14 = Subject{{#if:{{{subjects|}}}|s}}
| label12 = Subject{{#if:{{{subjects|}}}|s}}
data14 = {{{subjects|{{{subject|}}}}}}
data12 = {{{subjects|{{{subject|}}}}}}


| label15 = Genre{{#if:{{{genres|}}}|s}}
| label13 = Genre{{#if:{{{genres|}}}|s}}
data15 = {{{genres|{{{genre|}}}}}}
data13 = {{{genres|{{{genre|}}}}}}


| label16 = Set&nbsp;in
| label14 = Set&nbsp;in
data16 = {{{set_in|}}}
data14 = {{{set_in|}}}


| label17 = Published
| label15 = Publication
data17 = {{{published|}}}
data15 = {{{publication|}}}


| label18 = Publisher
| label16 = Media&nbsp;type
data18 = {{{publisher|}}}{{#if:{{{publisher2|}}} |, {{{publisher2}}} }}
data16 = {{{media_type|}}}


| label19 = {{longitem|Publication date}}
| label17 = Pages
data19 = {{{pub_date|{{{release_date|}}}}}}
data17 = {{{pages|}}}


| label20 = {{longitem|Published&nbsp;in English}}
| label18 = Award{{#if:{{{awards|}}}|s}}
data20 = {{{english_pub_date|{{{english_release_date|}}}}}}
data18 = {{{awards|{{{award|}}}}}}


| label21 = Media&nbsp;type
| label19 = [[ISBN (identifier)|<abbr title='International Standard Book Number'>ISBN</abbr>]]
data21 = {{{media_type|}}}
data19 = {{{isbn|}}}


| label22 = Pages
| label20 = [[OCLC (identifier)|<abbr title='Online Computer Library Center'>OCLC<abbr/> Number]]
data22 = {{{pages|}}}
data20 = {{#if:{{{oclc|}}} |[https://www.worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]}}


| label23 = Award{{#if:{{{awards|}}}|s}}
| label21 = [[Dewey Decimal Classification|Dewey Decimal]]
data23 = {{{awards|{{{award|}}}}}}
data21 = {{{dewey|}}}


| label30 = [[ISBN (identifier)|ISBN]]
| label22 = [[LCC (identifier)|<abbr title='Library of Congress Classification'>LC&nbsp;Class</abbr>]]
data30 = {{{isbn|}}}
data22 = {{{congress|}}}


| label31 = [[OCLC (identifier)|{{abbr|OCLC|Online Computer Library Center number}}]]
| label23 = Preceded&nbsp;by
|  data31 = {{#if:{{{oclc|}}} |[https://www.worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]}}
data23 = {{#if:{{{preceded_by|}}} |''{{{preceded_by|}}}&nbsp;''
 
| label32 = {{longitem|[[Dewey Decimal Classification|Dewey Decimal]]}}
|  data32 = {{{dewey|}}}
 
| label33 = [[LCC (identifier)|{{abbr|LC&nbsp;Class|Library of Congress Classification}}]]
|  data33 = {{{congress|}}}
 
| label34 = Preceded&nbsp;by
data34 = {{#if:{{{preceded_by|}}} |''{{{preceded_by|}}}&nbsp;''
             | {{#if:{{{preceded_by_quotation_marks|}}} |"{{{preceded_by_quotation_marks|}}}"}}
             | {{#if:{{{preceded_by_quotation_marks|}}} |"{{{preceded_by_quotation_marks|}}}"}}
             }}
             }}


| label35 = Followed&nbsp;by
| label24 = Followed&nbsp;by
data35 = {{#if:{{{followed_by|}}} |''{{{followed_by|}}}&nbsp;''
data24 = {{#if:{{{followed_by|}}} |''{{{followed_by|}}}&nbsp;''
             | {{#if:{{{followed_by_quotation_marks|}}} |"{{{followed_by_quotation_marks|}}}"}}
             | {{#if:{{{followed_by_quotation_marks|}}} |"{{{followed_by_quotation_marks|}}}"}}
             }}
             }}


| label36   = Website
| label25   = Website(s)
| data36   = {{{website|{{{homepage|{{{URL|{{#ifeq:{{{website|{{{homepage|{{{URL|}}}}}}}}}
| data25   = {{{websites|}}}
    | FETCH_WIKIDATA
    | {{#if:{{#property:P856}}|{{Url|1={{#invoke:Wikidata|getValue|P856|FETCH_WIKIDATA}} }} }}
    |}}}}}}}}}}}


| data60 = {{{module|}}}
| data60 = {{{module|}}}
Line 129: Line 97:
| belowstyle = border-top:#aaa 1px solid;font-size:90%;
| belowstyle = border-top:#aaa 1px solid;font-size:90%;
| below = {{{notes|{{{note|}}}}}}
| below = {{{notes|{{{note|}}}}}}
}}</onlyinclude>{{#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 | italic title | language | last | location | media_type | module | name | native_external_host | native_external_url | 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
}}
}}
{{#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
}}</onlyinclude>


<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 138: Line 107:
<pre style="overflow:auto;">
<pre style="overflow:auto;">
{{Infobox book
{{Infobox book
| italic title      = <!--(see above)-->
| name              =  
| name              =  
| image            =  
| image            =  
Line 153: Line 121:
| illustrator      =  
| illustrator      =  
| cover_artist      =  
| cover_artist      =  
| country          =
| language          =  
| language          =  
| series            =  
| series            =  
Line 160: Line 127:
| genre            =  
| genre            =  
| set_in            =  
| set_in            =  
| publisher        =
| publication      =  
| publisher2        =
| pub_date          =
| english_pub_date  =
| published        =  
| media_type        =  
| media_type        =  
| pages            =  
| pages            =  
| awards            =  
| awards            =  
| isbn              =  
| isbn              =  
| isbn_note        =
| oclc              =  
| oclc              =  
| dewey            =  
| dewey            =  
Line 175: Line 137:
| preceded_by      = <!-- for books in a series -->
| preceded_by      = <!-- for books in a series -->
| followed_by      = <!-- for books in a series -->
| followed_by      = <!-- for books in a series -->
| native_wikisource =
| wikisource        =  
| wikisource        =  
| notes            =  
| notes            =  
Line 183: Line 144:


== Parameters ==
== Parameters ==
; name: Book name or [[Title (publishing)|title]]. If parameter is left blank, ''name'' will be inherited from the [[Wikipedia:Article titles|Wikipedia page]] where this infobox is invoked.
; image: Image (prefer 1st edition where permitted), use bare filename: <code><nowiki>Example.jpg</nowiki></code><br>For a title page from a [[:Commons:|Commons]] PDF, specify the page and width in [[WP:EIS|the syntax]]: <code><nowiki>[[File:Lissagaray - Histoire de la Commune de 1871, MS.djvu|page=9|220px]]</nowiki></code>
; image: Image (prefer 1st edition where permitted), use bare filename: <code><nowiki>Example.jpg</nowiki></code><br>For a title page from a [[:Commons:|Commons]] PDF, specify the page and width in [[WP:EIS|the syntax]]: <code><nowiki>[[File:Lissagaray - Histoire de la Commune de 1871, MS.djvu|page=9|220px]]</nowiki></code>
; image_size: Uses image size set by user (default 220px). Use a number to override image size. However, this is discouraged per [[WP:THUMBSIZE]].
; 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 <code>yes</code> 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 {{para|image}} uses the full image syntax (e.g. <code><nowiki>[[File:Example.jpg]]</nowiki></code>); in this case add the border in {{para|image}} (e.g. <code><nowiki>[[File:Example.jpg|border=yes]]</nowiki></code>)
; border: Inserting <code>yes</code> 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 {{code|image}} uses the full image syntax (e.g. <code><nowiki>[[File:Example.jpg]]</nowiki></code>); in this case add the border in {{code|image}} (e.g. <code><nowiki>[[File:Example.jpg|border=yes]]</nowiki></code>)
; 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)
; author/authors: Author(s)
; audio_read_by: For [[audiobook]]s.
; audio_read_by: For [[audiobook]]s.
; title_orig: Original title, if not in English; required if using {{para|native_external_url}} or {{para|native_wikisource}}
; title_orig: Original title, if not in English.
; orig_lang_code: [[ISO 639|ISO 639 code]] of original language, required if using {{para|title_orig}}, {{para|native_wikisource}} or {{para|native_external_url}}
; orig_lang_code: [[ISO 639|ISO 639 code]] of original language.
; working_title: [[Working title]], when different from published title
; working_title: [[Working title]], when different from published title
; translator: Translator(s), if original not in English
; translator: Translator(s), if original not in English
; illustrator: Illustrator (where used throughout and a major feature)
; illustrator: Illustrator (where used throughout and a major feature)
; cover_artist: Cover artist, if any
; cover_artist: Cover artist, if any
; country: Country of original publication
; language: Language of original book. Do not link unless it is an unusual language.
; series: Series (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
; 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
Line 205: Line 160:
; genre/genres: (for fiction) ''See [[literary genre]]''. Use {{tl|hlist}} for sorting multiple entries.
; genre/genres: (for fiction) ''See [[literary genre]]''. Use {{tl|hlist}} for sorting multiple entries.
; set_in: can be both time and place as [[Setting (narrative)|setting]]. No need to create long lists. Use approximate dates/places if it is not clearly specified in the text.
; set_in: can be both time and place as [[Setting (narrative)|setting]]. No need to create long lists. Use approximate dates/places if it is not clearly specified in the text.
; publisher: Publisher of primary publication (prefer 1st edition); also {{para|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 {{tl|plainlist}} when there is more than one notable edition
:Note: {{para|published}} is acceptable, but no longer preferred to {{para|publisher}} and {{para|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)
; 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
; 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 [[International Standard Book Number|standard book number]] (9&nbsp;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{{spnd}}the last character{{spnd}}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: (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 [[International Standard Book Number|standard book number]] (9&nbsp;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.
; oclc: OCLC number (prefer 1st edition), use when book has no ISBN
; oclc: [[OCLC]] number (prefer 1st edition), use when book has no ISBN
; preceded_by_quotation_marks: Title of prior work ''in series'' if a [[Wikipedia:Manual of Style/Text formatting#When not to use italics|minor work]]; will be surrounded with quotation marks by template code (do not use to connect separate books chronologically)
; dewey: [[Dewey Decimal Classification]]
; 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)
; congress: [[Library of Congress Classification]] ('''not''' to be confused with [[Library of Congress Control Number]])
; followed_by_quotation_marks: Title of subsequent work ''in a series or a sequel'' if a [[Wikipedia:Manual of Style/Text formatting#When not to use italics|minor work]]; will be surrounded with quotation marks by template code (do not use to connect separate books chronologically)
; preceded_by: Title of prior book {{em|in series}}; will be italicised 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 [[:Category:Books with missing cover|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 {{code|exclude_cover|yes}}.
; preceded_by_quotation_marks: Title of prior work {{em|in series}} if a [[Wikipedia:Manual of Style/Text formatting#When not to use italics|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 {{em|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 {{em|in a series or a sequel}} if a [[Wikipedia:Manual of Style/Text formatting#When not to use italics|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 {{para|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 {{para|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 {{para|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 [[:Category:Books with missing cover|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 {{para|exclude_cover|yes}}.
; website: for the publisher's or author's website about the book.


== Example ==
== Example ==
 
{{Infobox book
{{Infobox book{{\sandbox}}
| image            = 71ZrrM0-AUL. AC UF1000,1000 QL80 .jpg
| italic title  = no <!--(lest the title of this template is italicised)-->
| author           = [[Xi Jinping]]
| name          = Anne of Green Gables
| isbn              = 9787119105550
| image          = FirstPageGreenGables.gif
| language          = [[Mandarin|Chinese]]
| caption        = The front (first) page of the first edition
| name              = '''Up and Out of Poverty'''
| alt           = Cover
| image_size        =  
| author        = [[Lucy Maud Montgomery]]
| title_orig    =  
| working_title  =
| 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 -->
| oclc          = 367111
| congress      = PR6025.O45 A53
| preceded_by    =
| followed_by    = [[Anne of Avonlea]]
| wikisource    = Anne of Green Gables
}}
}}
<pre style="margin:3.0em 0 0;padding-right:0;overflow:auto;">
<pre style="margin:3.0em 0 0;padding-right:0;overflow:auto;">
{{Infobox book
{{Infobox book
| name          = Anne of Green Gables
| image             = 71ZrrM0-AUL. AC UF1000,1000 QL80 .jpg
| image         = FirstPageGreenGables.gif
| author           = [[Xi Jinping]]
| caption        = The front (first) page of the first edition
| isbn              = 9787119105550
| alt           = Cover
| language          = [[Mandarin|Chinese]]
| author        = [[Lucy Maud Montgomery]]
| name              = '''Up and Out of Poverty'''
| title_orig    =  
| image_size        =  
| working_title =
| 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 -->
| oclc          = 367111
| congress      = PR6025.O45 A53
| preceded_by    =
| followed_by    = [[Anne of Avonlea]]
| wikisource    = Anne of Green Gables
}}
}}
</pre>
</pre>
{{clear}}


== TemplateData ==
== TemplateData ==
Line 304: Line 199:
"type": "string",
"type": "string",
"required": false,
"required": false,
"description": "Book title",
"description": "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"
"default": "Pagename"
},
},
Line 313: Line 208:
"description": "Image (prefer 1st edition where permitted). Use bare filename.",
"description": "Image (prefer 1st edition where permitted). Use bare filename.",
"suggested": true
"suggested": true
},
"alt": {
      "label": "Alternate image text",
      "description": "Alternate text to display if the image cannot be rendered.",
      "type": "string"
},
},
"author": {
"author": {
Line 325: Line 225:
"type": "string",
"type": "string",
"required": false,
"required": false,
"description": "Language of (original) book. Full language name (not a language code).",
"description": "Language of (original) book.",
"example": "English"
"example": "English"
},
"country": {
"label": "Country",
"type": "string",
"required": false,
"description": "Country of (original) publication."
},
},
"genre": {
"genre": {
Line 341: Line 235:
"example": "Science fiction"
"example": "Science fiction"
},
},
"published": {
"publication": {
"label": "Published",
"label": "Publication",
"type": "string",
"type": "content",
"required": false,
"description": "Using the following format: year (publisher) (language, when originally written in a foreign language)"
},
"publisher": {
"label": "Publisher",
"type": "string",
"required": false,
"required": false,
"description": "Name of publisher."
"description": "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)"
},
},
"isbn": {
"isbn": {
Line 357: Line 246:
"type": "string",
"type": "string",
"description": "Format: \"ISBN 1-234-56789-0\" (prefer 1st edition)",
"description": "Format: \"ISBN 1-234-56789-0\" (prefer 1st edition)",
"aliases": [
"ISBN"
],
"suggested": true
"suggested": true
},
},
Line 388: Line 274:
"example": "[[Newspaper]]",
"example": "[[Newspaper]]",
"type": "string"
"type": "string"
},
"pub_date": {
"label": "Date of publication",
"description": "Date the book or work was published",
"example": "December 21, 1787",
"type": "date",
"suggested": true
},
},
"preceded_by": {
"preceded_by": {
Line 408: Line 287:
"type": "string"
"type": "string"
},
},
"italic title": {},
"infoboxwidth": {},
"infoboxwidth": {},
"width": {},
"width": {},
"image_caption": {},
"image_caption": {},
"editors": {},
"editors": {
  "type": "content",
  "label": "Editor(s)",
  "description": "Editor(s) '''only when they are the primary contributor''', e.g. dictionaries, encyclopedias, anthologies.",
  "example": "* [[Karl Marx]] and [[Fredreich Engels]]\n* [[Joseph Stalin]]"
},
"editor": {},
"editor": {},
"authors": {},
"authors": {},
Line 428: Line 311:
"genres": {},
"genres": {},
"set_in": {},
"set_in": {},
"publisher2": {},
"pages": {
"release_date": {},
"type": "number",
"english_pub_date": {},
"label": "Pages",
"english_release_date": {},
"description": "Amount of pages in the book.",
"pages": {},
"example": "453"
},
"awards": {},
"awards": {},
"award": {},
"award": {},
"isbn_note": {
"dewey": {
"aliases": [
"type": "string",
"ISBN_note"
"label": "[[Dewey Decimal Classification]]"
]
},
"congress": {
    "type": "string",
    "label": "Library of Congress Classification",
    "description": "Library of Congress Classification ('''not''' to be confused with Library of Congress Control Number)"
},
},
"dewey": {},
"congress": {},
"last": {},
"first": {},
"location": {},
"oclc": {},
"oclc": {},
"alt": {},
"border": {},
"border": {},
"orig_lang_code": {},
"orig_lang_code": {},
"preceded_by_quotation_marks": {},
"preceded_by_quotation_marks": {},
"followed_by_quotation_marks": {},
"followed_by_quotation_marks": {},
"native_wikisource": {},
"websites": {
"native_external_url": {},
  "type": "string",
"native_external_host": {},
  "label": "Website(s)",
"wikisource": {},
  "description": "The publisher's or author's websites about the book.",
"external_url": {},
  "example": "[https://cpc.people.com.cn cpc.people.com.cn]"
"external_host": {},
},
"website": {},
"homepage": {},
"URL": {},
"notes": {},
"notes": {},
"note": {},
"note": {},
Line 466: Line 345:
}
}
</templatedata>
</templatedata>
</noinclude>

Latest revision as of 21:32, 3 September 2024

Infobox book


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 image uses the full image syntax (e.g. [[File:Example.jpg]]); in this case add the border in image (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 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.
oclc
OCLC number (prefer 1st edition), use when book has no ISBN
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)
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.

Example

Up and Out of Poverty
AuthorXi Jinping
LanguageChinese
ISBN9787119105550
{{Infobox book
| image             = 71ZrrM0-AUL. AC UF1000,1000 QL80 .jpg
| author            = [[Xi Jinping]]
| isbn              = 9787119105550
| language          = [[Mandarin|Chinese]]
| name              = '''Up and Out of Poverty'''
| image_size        = 
}}

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