Template:Quote/doc: Difference between revisions
m (1 revision imported) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
== Usage == | == Usage == | ||
{{tlx|Quote}} adds a | {{tlx|Quote}} adds a block quotation to an article page. | ||
This is easier to type and is more wiki-like than the equivalent | This is easier to type and is more wiki-like than the equivalent HTML {{tag|blockquote}} tags, and has additional pre-formatted attribution parameters for author and source (though these are not usually used in articles; see [[#Reference citations|Reference citations]], below). | ||
'''Note:''' Block quotes do {{em|not}} normally contain quotation marks | '''Note:''' Block quotes do {{em|not}} normally contain quotation marks. | ||
{{warning|heading=This template is for actual quotations only.|text=Do not use it for block indentation of other material; see {{tlx|Block indent}} for that purpose.}} | {{warning|heading=This template is for actual quotations only.|text=Do not use it for block indentation of other material; see {{tlx|Block indent}} for that purpose.}} | ||
=== Examples === | === Examples === | ||
'''Basic use:''' | |||
<pre>{{Quote | <pre>{{Quote | ||
|text=Quoted material. | |text=Quoted material. | ||
}}</pre> | }}</pre> | ||
'''With attribution displayed:''' | |||
<pre>{{Quote | <pre>{{Quote | ||
|text=Quoted material. | |text=Quoted material. | ||
Line 25: | Line 23: | ||
}}</pre> | }}</pre> | ||
'''With more attribution:''' | |||
<pre>{{Quote | <pre>{{Quote | ||
|text=Quoted material. | |text=Quoted material. | ||
Line 36: | Line 34: | ||
=== Displayed attribution === | === Displayed attribution === | ||
These parameters for for {{em|displaying}} attribution information below the quote; this should not be confused with a citing a source | These parameters for for {{em|displaying}} attribution information below the quote; this should not be confused with a citing a source (see [[#Reference citations]], below)}}. These parameters are entirely optional, and are usually used with famous quotations, not routine block quotations, which are usually sourced at the end of the introductory line immediately before the quotation, with a normal {{tag|ref}} tag. | ||
{{para|author}} a.k.a. {{para|2}}—Optional Author/speaker attribution information that will appear below the quotation, and preceded with an attribution dash. | {{para|author}} a.k.a. {{para|2}}—Optional Author/speaker attribution information that will appear below the quotation, and preceded with an attribution dash. | ||
{{para|title}} a.k.a. {{para|3}}—Optional title of the work the quote appears in, to display below the quotation. This parameter immediately follows the output of {{para|author}} (and an auto-generated comma), if one is provided. It does not auto-italicize. Major works (books, plays, albums, feature films, etc.) should be italicized; minor works (articles, chapters, poems, songs, TV episodes, etc.) go in quotation marks | {{para|title}} a.k.a. {{para|3}}—Optional title of the work the quote appears in, to display below the quotation. This parameter immediately follows the output of {{para|author}} (and an auto-generated comma), if one is provided. It does not auto-italicize. Major works (books, plays, albums, feature films, etc.) should be italicized; minor works (articles, chapters, poems, songs, TV episodes, etc.) go in quotation marks. Additional citation information can be provided in a fourth parameter, {{para|source}}, below, which will appear after the title. | ||
{{para|source}} a.k.a. {{para|4}}—Optionally used for additional source information to display, after {{para|title}}, like so: {{para|title|"The Aerodynamics of Shaved Weasels"}}{{para|source| | {{para|source}} a.k.a. {{para|4}}—Optionally used for additional source information to display, after {{para|title}}, like so: {{para|title|"The Aerodynamics of Shaved Weasels"}}{{para|source|<nowiki>''Perspectives on Mammal Barbering''</nowiki>, 2016}}; a comma will be auto-generated between the two parameters. If {{para|source}} is used without {{para|title}}, it simply acts as {{para|title}}. | ||
{{para|character}} a.k.a. {{para|char}}—to attribute fictional speech to a fictional character, {{em|with}} other citation information. Can also be used to attribute real speech to a specific speaker among many, e.g. in a roundtable/panel transcript, a band interview, etc. This parameter outputs "[{{Var|Character's name}}], in" after the attribution dash and before the output of the parameters above, thus one or more of those parameters must also be supplied. If you need to cite a fictional speaker in an article about a single work of fiction, where repeating the author and title information would be redundant, you can just use the {{para|author}} parameter instead of {{para|character}}. | {{para|character}} a.k.a. {{para|char}}—to attribute fictional speech to a fictional character, {{em|with}} other citation information. Can also be used to attribute real speech to a specific speaker among many, e.g. in a roundtable/panel transcript, a band interview, etc. This parameter outputs "[{{Var|Character's name}}], in" after the attribution dash and before the output of the parameters above, thus one or more of those parameters must also be supplied. If you need to cite a fictional speaker in an article about a single work of fiction, where repeating the author and title information would be redundant, you can just use the {{para|author}} parameter instead of {{para|character}}. | ||
Line 58: | Line 56: | ||
{{para|multiline}}—some of the issues with the formatting of quotes with line breaks can be fixed by using {{para|multiline|y}} (see [[#Line breaks|the line breaks section]] for other options). | {{para|multiline}}—some of the issues with the formatting of quotes with line breaks can be fixed by using {{para|multiline|y}} (see [[#Line breaks|the line breaks section]] for other options). | ||
{{para|style}}—allows specifying additional | {{para|style}}—allows specifying additional CSS styles (''not'' classes) to apply to the {{tag|blockquote}} element. (See [[#Nested quotations]], below, for the most common use case.) | ||
===Parameter list=== | ===Parameter list=== | ||
Line 75: | Line 73: | ||
==Reference citations== | ==Reference citations== | ||
{{anchor|Attribution|reason=Old section name}} | {{anchor|Attribution|reason=Old section name}} | ||
A [[ | A [[GoArch:Citation guidelines|reference citation]] can be placed before the quote, after the quote, or in the <code>source</code> parameter: | ||
<ul> | <ul> | ||
<li>'''Typical use''': In the regular-prose introduction to the quotation, when a quotation is given without the displayed <code>author</code>, <code>title</code>, or <code>source</code> parameters:< | <li>'''Typical use''': In the regular-prose introduction to the quotation, when a quotation is given without the displayed <code>author</code>, <code>title</code>, or <code>source</code> parameters: <code><nowiki>According to Pat Doe, in "Underwater Basketweaving Tips" (2015):<ref>...</ref> {{quote |text=Quoted material.}}</nowiki></code></li> | ||
<li>At the end of the quotation, when a quotation is given without the displayed <code>author</code>, <code>title</code>, or <code>source</code> parameters, and placement before the quote isn't appropriate (e.g. because the material immediately before the quote isn't cited to the same source or introduces multiple quotes from different sources:< | <li>At the end of the quotation, when a quotation is given without the displayed <code>author</code>, <code>title</code>, or <code>source</code> parameters, and placement before the quote isn't appropriate (e.g. because the material immediately before the quote isn't cited to the same source or introduces multiple quotes from different sources: <code><nowiki>Pat Doe and Chris Foo took opposing positions: {{quote |text=Doe's Quoted material.<ref>...</ref>}} {{quote |text=Foo's Quoted material.<ref>...</ref>}}</nowiki></code></li> | ||
<li>After the <code>source</code> value (if a value is given for the <code>source</code> parameter other than the {{tag|ref}} itself):< | <li>After the <code>source</code> value (if a value is given for the <code>source</code> parameter other than the {{tag|ref}} itself): <code><nowiki>One expert noted in 2015: {{quote |text=Quoted material. |author=Pat Doe |source="Underwater Basketweaving Tips" (2015)<ref>...</ref>}}</nowiki></code></li> | ||
</ul> | </ul> | ||
Please do not place the citation in a {{para|author}} or {{para|source}} parameter by itself, as it will produce a nonsensical attribution line | Please do not place the citation in a {{para|author}} or {{para|source}} parameter by itself, as it will produce a nonsensical attribution line. Please also do not put it just outside the {{tnull|Quote}} template, as this will cause an attribution on a line by itself. | ||
== Style == | == Style == | ||
Styling is applied through CSS rules in [[MediaWiki:Common.css]]. | Styling is applied through CSS rules in [[MediaWiki:Common.css]]. | ||
< | <pre> | ||
/* Styling for Template:Quote */ | /* Styling for Template:Quote */ | ||
blockquote.templatequote { | blockquote.templatequote { | ||
Line 100: | Line 97: | ||
margin-top: 0; | margin-top: 0; | ||
} | } | ||
</ | </pre> | ||
HTML: | HTML: | ||
< | <pre> | ||
<blockquote class="templatequote"> | <blockquote class="templatequote"> | ||
<p>Quote text.</p> | <p>Quote text.</p> | ||
<div class="templatequotecite"><cite>—Author, Source</cite></div> | <div class="templatequotecite"><cite>—Author, Source</cite></div> | ||
</blockquote> | </blockquote> | ||
</ | </pre> | ||
== Examples == | == Examples == | ||
'''Markup:'''<br /> | |||
<pre>{{Quote|text=Cry "Havoc" and let slip the dogs of war.|character=Mark Antony|author=[[William Shakespeare]]|title=''[[Julius Caesar (play)|Julius Caesar]]''|source=act III, scene I}}</pre> | |||
'''Creates:'''<br /> | |||
{{Quote|text=Cry "Havoc" and let slip the dogs of war.|character=Mark Antony|author=[[William Shakespeare]]|title=''[[Julius Caesar (play)|Julius Caesar]]''|source=act III, scene I}} | {{Quote|text=Cry "Havoc" and let slip the dogs of war.|character=Mark Antony|author=[[William Shakespeare]]|title=''[[Julius Caesar (play)|Julius Caesar]]''|source=act III, scene I}} | ||
== Limitations == | == Limitations == | ||
{{ | {{see|w:Template:Quote/doc#Limitations}} | ||
# | |||
== Errors == | == Errors == | ||
Line 194: | Line 163: | ||
} | } | ||
</templatedata> | </templatedata> | ||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox| | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox| |
Latest revision as of 06:42, 20 January 2018
![]() | This is a documentation subpage for Template:Quote. It contains usage information, categories and other content that is not part of the original template page. |
Usage[edit source]
{{Quote}}
adds a block quotation to an article page.
This is easier to type and is more wiki-like than the equivalent HTML <blockquote>...</blockquote>
tags, and has additional pre-formatted attribution parameters for author and source (though these are not usually used in articles; see Reference citations, below).
Note: Block quotes do not normally contain quotation marks.
![]() | This template is for actual quotations only. Do not use it for block indentation of other material; see {{Block indent}} for that purpose. |
Examples[edit source]
Basic use:
{{Quote |text=Quoted material. }}
With attribution displayed:
{{Quote |text=Quoted material. |author=First M. Last }}
With more attribution:
{{Quote |text=Quoted material. |author=First M. Last |title="Article Title" |source=''Book Title'' (date) }}
Parameters[edit source]
|text=
a.k.a. |1=
—The material being quoted, without quotation marks around it. It is always safest to name this parameter (rather than use an unnamed positional parameter), because, otherwise, any inclusion of a (e.g., in a URL in a source citation) will break the template.
Displayed attribution[edit source]
These parameters for for displaying attribution information below the quote; this should not be confused with a citing a source (see #Reference citations, below)}}. These parameters are entirely optional, and are usually used with famous quotations, not routine block quotations, which are usually sourced at the end of the introductory line immediately before the quotation, with a normal <ref>...</ref>
tag.
|author=
a.k.a. |2=
—Optional Author/speaker attribution information that will appear below the quotation, and preceded with an attribution dash.
|title=
a.k.a. |3=
—Optional title of the work the quote appears in, to display below the quotation. This parameter immediately follows the output of |author=
(and an auto-generated comma), if one is provided. It does not auto-italicize. Major works (books, plays, albums, feature films, etc.) should be italicized; minor works (articles, chapters, poems, songs, TV episodes, etc.) go in quotation marks. Additional citation information can be provided in a fourth parameter, |source=
, below, which will appear after the title.
|source=
a.k.a. |4=
—Optionally used for additional source information to display, after |title=
, like so: |title="The Aerodynamics of Shaved Weasels"
|source=''Perspectives on Mammal Barbering'', 2016
; a comma will be auto-generated between the two parameters. If |source=
is used without |title=
, it simply acts as |title=
.
|character=
a.k.a. |char=
—to attribute fictional speech to a fictional character, with other citation information. Can also be used to attribute real speech to a specific speaker among many, e.g. in a roundtable/panel transcript, a band interview, etc. This parameter outputs "[Character's name], in" after the attribution dash and before the output of the parameters above, thus one or more of those parameters must also be supplied. If you need to cite a fictional speaker in an article about a single work of fiction, where repeating the author and title information would be redundant, you can just use the |author=
parameter instead of |character=
.
Technically, all citation information can be given in a single parameter, as in:
|source=Anonymous interview subject, in Jane G. Arthur, "The Aerodynamics of Shaved Weasels", Perspectives on Mammal Barbering(2016), Bram Xander Yojimbo (ed.)
But this is a bit messy, and will impede later efforts to generate metadata from quotation attribution the way we are already doing with source citations. This is much more usable:
|character=Anonymous interview subject
|author=Jane G. Arthur
|title="The Aerodynamics of Shaved Weasels"
|source=
Perspectives on Mammal Barbering (2016), Bram Xander Yojimbo (ed.)
Later development can assign a CSS class
and so forth to these separate parameters, upon which scripts would be able to operate (e.g. to look up things in WikiQuote).
Rarely used technical parameters[edit source]
|multiline=
—some of the issues with the formatting of quotes with line breaks can be fixed by using |multiline=y
(see the line breaks section for other options).
|style=
—allows specifying additional CSS styles (not classes) to apply to the <blockquote>...</blockquote>
element. (See #Nested quotations, below, for the most common use case.)
Parameter list[edit source]
{{Quote | quote = | author = | title = | source = | character = | multiline = | style = }}
Reference citations[edit source]
A reference citation can be placed before the quote, after the quote, or in the source
parameter:
- Typical use: In the regular-prose introduction to the quotation, when a quotation is given without the displayed
author
,title
, orsource
parameters:According to Pat Doe, in "Underwater Basketweaving Tips" (2015):<ref>...</ref> {{quote |text=Quoted material.}}
- At the end of the quotation, when a quotation is given without the displayed
author
,title
, orsource
parameters, and placement before the quote isn't appropriate (e.g. because the material immediately before the quote isn't cited to the same source or introduces multiple quotes from different sources:Pat Doe and Chris Foo took opposing positions: {{quote |text=Doe's Quoted material.<ref>...</ref>}} {{quote |text=Foo's Quoted material.<ref>...</ref>}}
- After the
source
value (if a value is given for thesource
parameter other than the<ref>...</ref>
itself):One expert noted in 2015: {{quote |text=Quoted material. |author=Pat Doe |source="Underwater Basketweaving Tips" (2015)<ref>...</ref>}}
Please do not place the citation in a |author=
or |source=
parameter by itself, as it will produce a nonsensical attribution line. Please also do not put it just outside the {{quote}}
template, as this will cause an attribution on a line by itself.
Style[edit source]
Styling is applied through CSS rules in MediaWiki:Common.css.
/* Styling for Template:Quote */ blockquote.templatequote { margin-top: 0; } blockquote.templatequote div.templatequotecite { line-height: 1.5em; /* @noflip */ text-align: left; /* @noflip */ padding-left: 1.6em; margin-top: 0; }
HTML:
<blockquote class="templatequote"> <p>Quote text.</p> <div class="templatequotecite"><cite>—Author, Source</cite></div> </blockquote>
Examples[edit source]
Markup:
{{Quote|text=Cry "Havoc" and let slip the dogs of war.|character=Mark Antony|author=[[William Shakespeare]]|title=''[[Julius Caesar (play)|Julius Caesar]]''|source=act III, scene I}}
Creates:
Cry "Havoc" and let slip the dogs of war.
— Mark Antony, in William Shakespeare, Julius Caesar, act III, scene I
Limitations[edit source]
Errors[edit source]
Pages where this template is not used correctly populate Category:Pages incorrectly using the quote template. The category tracks tranclusions of Template:Quote that have no text given for quotation or use an equals sign in the argument of an unnamed parameter. It also tracks usage of |class=
, |id=
, |diff=
, |4=
, or |5=
.
TemplateData[edit source]
TemplateData for Quote
Adds a block quotation.
Parameter | Description | Type | Status | |
---|---|---|---|---|
text | text 1 quote | The text to quote
| Content | required |
sign | sign 2 cite author | The person being quoted
| Content | suggested |
source | source 3 | A source for the quote
| Content | suggested |