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
(iw +fi)
m (66 revisions imported from wikipedia:Template:Rquote/doc)
 
(37 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
{{Uses TemplateStyles|Template:Rquote/styles.css}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. -->
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE. -->__NOTOC__


{{Quote/doc/boilerplate}}
* <font color="red">'''NOTE''': This template should '''not be used''' for block quotations in article text.</font> For long quotations in the text, the [[Wikipedia:Manual_of_Style#Quotations|Manual of Style]] recommends using the HTML &lt;[[blockquote]]> element or the {{tl|quote}} template (which produces the blockquote tag).

*'''{{tl|Rquote}}''' (for '''Reduced pull-quote''') is a variant of the {{tl|Cquote}} [[:Category:Quotation templates|quotation template]], intended for relatively short [[pull quote]]s of 50 or 100 words. It results in a floating quote with the article text wrapping around it, like an image.
== Usage ==
* Pull-quotes work best when 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 which are more than a paragraph, or are longer than the rest of the paragraph they are quoted in, a similar effect (across the page) can be produced by [[:Template:Cquote|Cquote]].
For quotes, this template, a variant of the {{tlx|Cquote}}, results in a floating quote with the article text wrapping around it, like an image. It is intended for relatively short quotes of 50 or 100 words.


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

<nowiki>{{Rquote|right|Quote text|Origin of quote|Cited source}}</nowiki>


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


Named parameters may also be used:
<nowiki>{{Rquote|left|Quote text|Origin of quote|Cited source}}</nowiki>
<nowiki>{{</nowiki>{{BASEPAGENAME}} |align=right |quote={{var|text of quotation}} |author={{var|person quoted}} |source={{var|cited source}}<nowiki>}}</nowiki>


It is always safest to explicitly number or name the parameters (especially the quoted text, author, and source), since the presence of any <code>=</code> character in it will break the template if the parameter is not named/numbered.
==Parameters==
# '''Alignment''' (''left'', ''right'').
# '''Quote text'''
# '''Source''' (who said it?)
# '''Citation''' (where was it said?)


==Formatting==
===Compact form===
If you do not want to use numbered/named parameters, you must use compact form, without whitespace between parameters; [[MediaWiki]] parses the entire contents of unnamed parameters extremely literally, including whitespace.
[[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.


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

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 ==
===Unnamed parameters===
# '''Alignment''': The first unnamed parameter. "{{mono|left}}" or "{{mono|right}}" (case-sensitive) are acceptable values. This parameter is mandatory; there is no default.
# '''Text of quotation''': The second unnamed parameter. If the material contains = characters, remember to either replace those characters with <nowiki>{{=}}</nowiki> or use an explicit {{para|2}}. [[Quotation marks]] are supplied by the template and should not be included here. [[Soft hyphen]]s (<code>[[List of XML and HTML character entity references|&amp;shy;]]</code>) or {{Tag|[[HTML element#wbr_tag|wbr]]|s}} can be used to influence [[line break]]s within the quote text.
# '''Entity being quoted''': The third unnamed parameter. This should not be confused with the author of the source who published the quotation. For example, imagine a John Doe publishes a book, in which he attributes a quotation to Albert Einstein. In that case, "Albert Einstein" is what should be put in this parameter, not "John Doe". This parameter is only mandatory when the fourth parameter is also specified.
# '''Extra identifier''': An optional extra identifier that better identifies the location or time of the occurrence of the quotation. It must not be confused with the title of the source. For example, imagine a John Doe publishes a book; in it, he attributes a quotation to Albert Einstein, claiming Einstein said it in a letter to his colleague. What is put in this parameter is "in a letter to his colleague", not the title of John Doe's book. This parameter is fully optional.

A standard {{tag|ref}} citations is normally attached to the second, third or fourth parameter, whichever comes last.

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

===Named parameters===
These parameters are all optional.
;{{Para|width}}: Width of the quote. It should be a number with a CSS unit of length added to it. Default is 33%. Examples: 20em, 300px. Use of the "px" unit is discouraged.

;{{Para|style}}: Additional CSS style for the quote. Use only as a last measure.

== 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|Cquote}} 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 ==
===Align right &rarr;===
====Code====
====Code====
<pre>
<pre><nowiki>{{Rquote|right|
{{Rquote |1=right
This is an example pullquote with the first option set to ''right''.|
|2=This is an example quote with the first option set to ''right''.
[[Anonymity|Anonymous]]|''Rquote template page''}}{{Str left|{{Lorem ipsum}}|335}}</nowiki></pre>
|3=[[Anonymity|Anonymous]] |4=''Reduced quote template page''
}}
{{str left|{{Lorem ipsum}}|335}}
</pre>
====Result====
====Result====
{{Rquote|right|
{{Rquote |1=right
This is an example pullquote with the first option set to ''right''.|
|2=This is an example quote with the first option set to ''right''.
[[Anonymity|Anonymous]]|''Rquote template page''}}{{Str left|{{Lorem ipsum}}|335}}
|3=[[Anonymity|Anonymous]] |4=''Reduced quote template page''
}}
{{str left|{{Lorem ipsum}}|335}}


===Align Left &larr;===
====Code====
<pre><nowiki>{{Rquote|left|
This is another, slightly longer example pullquote with the first option set to ''left''.|
[[Anonymity|Anonymous]]|''Rquote template page''}}{{Lorem Ipsum}}</nowiki></pre>
<pre><nowiki>{{Rquote|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.|
[[Anonymity|Anonymous]]|''Rquote template page''}}{{Lorem Ipsum}}</nowiki></pre>


===Align left &larr;===
====Code====
<pre>
{{Rquote |1=left
|2=This is another, slightly longer example quote with the first option set to ''left''.
|3=[[Anonymity|Anonymous]] |4=''Reduced quote template page''
}}
{{Lorem ipsum}}
</pre><pre style="overflow:auto;">
{{Rquote |1=left
|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 quote template page''
}}
{{Lorem ipsum}}
</pre>
====Result====
====Result====
{{Rquote|left|
{{Rquote |1=left
This is another, slightly longer example pullquote with the first option set to ''left''.|
|2=This is another, slightly longer example quote with the first option set to ''left''.
[[Anonymity|Anonymous]]|''Rquote template page''}}{{Lorem ipsum}}
|3=[[Anonymity|Anonymous]] |4=''Reduced quote template page''
}}
{{Rquote|left|
{{Lorem ipsum}}
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.|
{{Rquote |1=left
[[Anonymity|Anonymous]]|''Rquote template page''}}{{Lorem ipsum}}
|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 quote template page''
}}
{{Lorem ipsum}}
{{clear}}
{{clear}}


==See also==
{{Quotation templates see also}}


{{Quotation templates}}
<includeonly><!--
++++ PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. -->
[[Category:Quotation templates|{{PAGENAME}}]]


<includeonly>{{Sandbox other||
[[ar:قالب:اقتباس3]]
<!-- CATEGORIES BELOW THIS LINE, PLEASE: -->
[[cs:Šablona:P-citát]]
[[Category:Enhanced quote templates]]
[[eu:Txantiloi:Esaera]]
}}</includeonly>
[[fa:الگو:Rquote]]
[[fi:Malline:Sitaatti2]]
[[hu:Sablon:Rquote]]
[[it:Template:RQuote]]
[[ja:Template:Rquote]]
[[ko:틀:인용문3]]
[[pl:Szablon:CytatD]]
[[uk:Шаблон:Rquote]]
[[ro:Format:CitareText]]
[[tl:Template:Rquote]]
</includeonly>

Latest revision as of 09:02, 16 June 2021

Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.


The Manual of Style guidelines for block quotations recommend formatting block quotations using the {{Blockquote}} template or the HTML <blockquote> element, for which that template provides a wrapper.

  • Quotes work best when used with short sentences, and at the start or end of a section, as a hint of or to help emphasize the section's content.
  • For typical quotes, especially those longer than the rest of the paragraph in which they are quoted, {{Cquote}} (for use outside of article space only) provides a borderless quote with decorative quotation marks, and {{Quote frame}} provides a bordered quote. Both span the page width.
  • For very short quotes, {{Rquote}} (with decorative quotation marks, for use outside of article space only) or {{Quote box}} (framed) can be used to set the quote off to either the right or left as in a magazine sidebar. This can be effective on essay pages and WikiProject homepages.

Usage[edit source]

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

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}}

Named parameters may also be used:

{{Rquote |align=right |quote=text of quotation |author=person quoted |source=cited source}}

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

Compact form[edit source]

If you do not want to use numbered/named 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[edit source]

Unnamed parameters[edit source]

  1. Alignment: The first unnamed parameter. "left" or "right" (case-sensitive) are acceptable values. This parameter is mandatory; there is no default.
  2. Text of quotation: The second unnamed parameter. If the material contains = characters, remember to either replace those characters with {{=}} or use an explicit |2=. Quotation marks are supplied by the template and should not be included here. Soft hyphens (&shy;) or <wbr /> can be used to influence line breaks within the quote text.
  3. Entity being quoted: The third unnamed parameter. This should not be confused with the author of the source who published the quotation. For example, imagine a John Doe publishes a book, in which he attributes a quotation to Albert Einstein. In that case, "Albert Einstein" is what should be put in this parameter, not "John Doe". This parameter is only mandatory when the fourth parameter is also specified.
  4. Extra identifier: An optional extra identifier that better identifies the location or time of the occurrence of the quotation. It must not be confused with the title of the source. For example, imagine a John Doe publishes a book; in it, he attributes a quotation to Albert Einstein, claiming Einstein said it in a letter to his colleague. What is put in this parameter is "in a letter to his colleague", not the title of John Doe's book. This parameter is fully optional.

A standard <ref>...</ref> citations is normally attached to the second, third or fourth parameter, whichever comes last.

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

Named parameters[edit source]

These parameters are all optional.

|width=
Width of the quote. It should be a number with a CSS unit of length added to it. Default is 33%. Examples: 20em, 300px. Use of the "px" unit is discouraged.
|style=
Additional CSS style for the quote. Use only as a last measure.

Limitations[edit source]

  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 {{Cquote}} 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[edit source]

Align right →[edit source]

Code[edit source]

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

Result[edit source]

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 ←[edit source]

Code[edit source]

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

{{Rquote |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 quote template page'' }} {{Lorem ipsum}}

Result[edit source]

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.

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.