Template:Rquote/doc: Difference between revisions

Nothing to hide, but nothing to show you either.
Jump to navigation Jump to search
Content added Content deleted
(tweak)
(updating for recent parser changes; note about of limitations)
Line 14: Line 14:
== Usage ==
== Usage ==
Align quote box to the '''right''':
Align quote box to the '''right''':
<nowiki>{{</nowiki>{{BASEPAGENAME}}|right|2={{var|text of quotation}}|{{var|person quoted}}|{{var|cited source}}<nowiki>}}</nowiki>
<nowiki>{{</nowiki>{{BASEPAGENAME}}|1=right |2={{var|text of quotation}} |3={{var|person quoted}} |4={{var|cited source}}<nowiki>}}</nowiki>


Align quote box to the '''left''':
Align quote box to the '''left''':
<nowiki>{{</nowiki>{{BASEPAGENAME}}|left|2={{var|text of quotation}}|{{var|person quoted}}|{{var|cited source}}<nowiki>}}</nowiki>
<nowiki>{{</nowiki>{{BASEPAGENAME}}|1=left |2={{var|text of quotation}} |3={{var|person quoted}} |4={{var|cited source}}<nowiki>}}</nowiki>


It is always safest to explicitly number the second parameter (the quoted text), since the presence of any <code>=</code> character in it will break the template if this parameter is not named.
It is always safest to explicitly number the parameters (the quoted text), since the presence of any <code>=</code> character in it will break the template if this parameter is not named/numbered.

===Compact form===
If you do not want to use numbered parameters, you must use compact form, without whitespace between parameters; [[MediaWiki]] parses the entire contents of unnamed parameters extremely literally, including whitespace.

Align quote box to the '''right''' (compact version):
<nowiki>{{</nowiki>{{BASEPAGENAME}}|right|{{var|text of quotation}}|{{var|person quoted}}|{{var|cited source}}<nowiki>}}</nowiki>

Align quote box to the '''left''' (compact version):
<nowiki>{{</nowiki>{{BASEPAGENAME}}|left|{{var|text of quotation}}|{{var|person quoted}}|{{var|cited source}}<nowiki>}}</nowiki>

If any parameter is numbered, all of them must also be numbered.


== Parameters ==
== Parameters ==
Line 26: Line 37:
# '''Person (or other entity) being quoted''' &ndash; a standard {{tag|ref}} citation can go in this parameter, if a work is not being cited in the 4th parameter
# '''Person (or other entity) being quoted''' &ndash; a standard {{tag|ref}} citation can go in this parameter, if a work is not being cited in the 4th parameter
# '''Citation (book, article, speech, etc.)''' &ndash; standard {{tag|ref}} citations normally go in this parameter.
# '''Citation (book, article, speech, etc.)''' &ndash; standard {{tag|ref}} citations normally go in this parameter.
{{strong|If any parameter is explicitly numbered, they must all be numbered. If none are numbered, do not use any whitespace between them.}}


== Formatting ==
== Formatting ==
[[Quotation marks]] are supplied by the template and should not be included in the quote text. [[Soft hyphen]]s (<code>[[List of XML and HTML character entity references|&amp;shy;]]</code>) can be used to influence [[line break]]s within the quote text.
[[Quotation marks]] are supplied by the template and should not be included in the quote text. [[Soft hyphen]]s (<code>[[List of XML and HTML character entity references|&amp;shy;]]</code>) can be used to influence [[line break]]s within the quote text.

== Limitations ==
# This template does not always "play nice" and wrap properly when it is on the left, especially when what immediately follows it is a heading or a list.
# If the quoted content is extremely short, this template looks terrible. The content needs to be at least reach to the other side of the template. If the content is shorter than that, use {{tlx|Pull quote}} with its {{para|float}} option.
# As noted above, if any parameter is explicitly numbered, they must all be numbered. If none are numbered, do not use any whitespace between them.


== Example ==
== Example ==
Line 34: Line 51:
====Code====
====Code====
<pre>
<pre>
{{Reduced pull quote |right
{{Reduced pull quote |1=right
| This is an example pull-quote with the first option set to ''right''.
|2=This is an example pull-quote with the first option set to ''right''.
|[[Anonymity|Anonymous]] |''Reduced pull quote template page''
|3=[[Anonymity|Anonymous]] |4=''Reduced pull quote template page''
}}
}}
{{str left|{{Lorem ipsum}}|335}}
{{str left|{{Lorem ipsum}}|335}}
</pre>
</pre>
====Result====
====Result====
{{Reduced pull quote |1=right
{{Reduced pull quote|right |This is an example pull-quote with the first option set to ''right''. |[[Anonymity|Anonymous]]|''Reduced pull quote template page''}}
|2=This is an example pull-quote with the first option set to ''right''.
|3=[[Anonymity|Anonymous]] |4=''Reduced pull quote template page''
}}
{{str left|{{Lorem ipsum}}|335}}
{{str left|{{Lorem ipsum}}|335}}



===Align left &larr;===
===Align left &larr;===
====Code====
====Code====
<pre>
<pre>
{{Reduced pull quote |left
{{Reduced pull quote |1=left
| This is another, slightly longer example pull-quote with the first option set to ''left''.
|2=This is another, slightly longer example pull-quote with the first option set to ''left''.
|[[Anonymity|Anonymous]] |''Reduced pull quote template page''
|3=[[Anonymity|Anonymous]] |4=''Reduced pull quote template page''
}}
}}
{{Lorem ipsum}}
{{Lorem ipsum}}
</pre><pre style="overflow:auto;">
</pre><pre style="overflow:auto;">
{{Reduced pull quote |left
{{Reduced pull quote |1=left
| This is another, slightly longer ex&amp;shy;ample pull&amp;shy;quote with the first option set to ''left'' and two soft hyphens included in the quote text.
|2=This is another, slightly longer ex&amp;shy;ample pull&amp;shy;quote with the first option set to ''left'' and two soft hyphens included in the quote text.
|[[Anonymity|Anonymous]] |''Reduced pull quote template page''
|3=[[Anonymity|Anonymous]] |4=''Reduced pull quote template page''
}}
}}
{{Lorem ipsum}}
{{Lorem ipsum}}
</pre>
</pre>
====Result====
====Result====
{{Reduced pull quote |1=left
{{Reduced pull quote |left |This is another, slightly longer example pull quote with the first option set to ''left''. |[[Anonymity|Anonymous]] |''Reduced pull quote template page''}}
|2=This is another, slightly longer example pull-quote with the first option set to ''left''.
|3=[[Anonymity|Anonymous]] |4=''Reduced pull quote template page''
}}
{{Lorem ipsum}}
{{Lorem ipsum}}
{{Reduced pull quote |1=left
{{Reduced pull quote |left |This is another, slightly longer ex&shy;ample pull&shy;quote with the first option set to ''left'' and two soft hyphens included in the quote text. |[[Anonymity|Anonymous]] |''Reduced pull quote template page''}}
|2=This is another, slightly longer ex&amp;shy;ample pull&amp;shy;quote with the first option set to ''left'' and two soft hyphens included in the quote text.
|3=[[Anonymity|Anonymous]] |4=''Reduced pull quote template page''
}}
{{Lorem ipsum}}
{{Lorem ipsum}}
{{clear}}
{{clear}}

Revision as of 00:29, 13 September 2015

  • This template should not be used for block quotations in article text. For long quotations in the text, the Manual of Style recommends using the HTML <blockquote> element or the {{Quote}} template (which produces the blockquote tag).
  • This template should not be used for quotations if they are not repeated elsewhere in the main text. The Manual of Style recommendation is:
    • For a visually distinctive block quotation, use the {{Quotation}} or {{Quote box}} templates. Generally, do not mix-and-match styles in an article.

{{Reduced pull quote}} is a variant of the {{Pull quote}} quotation template, intended for relatively short pull quotes of 50 or 100 words. It results in a floating quote with the article text wrapping around it, like an image.

Pull quotes work best when:

  • used with short sentences, and at the start or end of a section, as a hint of the section's content;
  • used with short quotes, and at the start or end of a section, to help emphasize the content of the section. For longer pull quotes, especially those more than a paragraph, or longer than the rest of the paragraph they are quoted in, a similar effect (across the page) can be produced by {{Cquote}}.

Usage

Align quote box to the right:

{{Rquote|1=right |2=text of quotation |3=person quoted |4=cited source}}

Align quote box to the left:

{{Rquote|1=left |2=text of quotation |3=person quoted |4=cited source}}

It is always safest to explicitly number the parameters (the quoted text), since the presence of any = character in it will break the template if this parameter is not named/numbered.

Compact form

If you do not want to use numbered parameters, you must use compact form, without whitespace between parameters; MediaWiki parses the entire contents of unnamed parameters extremely literally, including whitespace.

Align quote box to the right (compact version):

{{Rquote|right|text of quotation|person quoted|cited source}}

Align quote box to the left (compact version):

{{Rquote|left|text of quotation|person quoted|cited source}}

If any parameter is numbered, all of them must also be numbered.

Parameters

  1. Alignment (Template:Kbd or Template:Kbd).
  2. Text of quotation – remember to use an explicit |2= if material contains a = character
  3. Person (or other entity) being quoted – a standard <ref>...</ref> citation can go in this parameter, if a work is not being cited in the 4th parameter
  4. Citation (book, article, speech, etc.) – standard <ref>...</ref> citations normally go in this parameter.

If any parameter is explicitly numbered, they must all be numbered. If none are numbered, do not use any whitespace between them.

Formatting

Quotation marks are supplied by the template and should not be included in the quote text. Soft hyphens (&shy;) can be used to influence line breaks within the quote text.

Limitations

  1. This template does not always "play nice" and wrap properly when it is on the left, especially when what immediately follows it is a heading or a list.
  2. If the quoted content is extremely short, this template looks terrible. The content needs to be at least reach to the other side of the template. If the content is shorter than that, use {{Pull quote}} with its |float= option.
  3. As noted above, if any parameter is explicitly numbered, they must all be numbered. If none are numbered, do not use any whitespace between them.

Example

Align right →

Code

{{Reduced pull quote |1=right
|2=This is an example pull-quote with the first option set to ''right''.
|3=[[Anonymity|Anonymous]] |4=''Reduced pull quote template page''
}}
{{str left|{{Lorem ipsum}}|335}}

Result

Template:Reduced pull quote Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.


Align left ←

Code

{{Reduced pull quote |1=left
|2=This is another, slightly longer example pull-quote with the first option set to ''left''.
|3=[[Anonymity|Anonymous]] |4=''Reduced pull quote template page''
}}
{{Lorem ipsum}}

{{Reduced pull quote |1=left |2=This is another, slightly longer ex&shy;ample pull&shy;quote with the first option set to ''left'' and two soft hyphens included in the quote text. |3=[[Anonymity|Anonymous]] |4=''Reduced pull quote template page'' }} {{Lorem ipsum}}

Result

Template:Reduced pull quote Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Template:Reduced pull quote Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.