Template:Rquote/doc: Difference between revisions

m
66 revisions imported from wikipedia:Template:Rquote/doc
(crossref. to Template:Quote frame)
m (66 revisions imported from wikipedia:Template:Rquote/doc)
 
(15 intermediate revisions by 8 users not shown)
Line 1:
{{Documentation subpage}}
{{Uses TemplateStyles|Template:Rquote/styles.css}}
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE. -->__NOTOC__
 
{{Quote/doc/boilerplate}}
{{warning|'''NOTE''': This template should '''not be used''' for block quotations in article text.}}
 
This template is meant for [[pull quote]]s, the visually distinctive {{em|repetition}} of text that is {{em|already present}} on the same page. In most cases, this is not appropriate for use in encyclopedia articles. The [[Wikipedia:Manual of Style#Block quotations|Manual of Style guidelines for block quotations]] recommend formatting block quotations using the {{tlx|Quote}} template or the HTML &lt;[[blockquote]]&gt; element, for which that template provides a wrapper.
 
* Pull 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 pull quotes, especially those longer than the rest of the paragraph in which they are quoted, {{tlx|Pull quote}} provides a borderless quote with decorative quotation marks, and {{tlx|Quote frame}} provided a bordered quote. Both span the article width.
* For very short pull quotes, {{tlx|Reduced pull quote}} (with decorative quotation marks) or {{tlx|Quote box}} (framed) can be used to set the quote off to either the right or left as in a magazine [[Sidebar (publishing)|sidebar]]. This can be effective on [[WP:ESSAY|essay]] pages and [[WP:WIKIPROJECT|WikiProject]] homepages.
 
For a visually distinctive block quotation, use the {{tlx|Quotation}} template. Generally, do not mix-and-match styles in an article.
 
== Usage ==
For actual pull quotes, this template, a variant of the {{tlx|Pull quoteCquote}}, results in a floating quote with the article text wrapping around it, like an image. It is intended for relatively short [[pull quote]]squotes of 50 or 100 words.
 
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>
 
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:
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.
<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 thisthe parameter is not named/numbered.
 
===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.
 
Align quote box to the '''right''' (compact version):
Line 35 ⟶ 31:
 
== Parameters ==
===Unnamed parameters===
# '''Alignment''' ({{kbd|left}} or {{kbd|right}}).
# '''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''' &ndash; remember to use an explicit {{para|2}} if material contains a <code>=</code> character
# '''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 in the quote texthere. [[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.
# '''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
# '''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.
# '''Citation (book, article, speech, etc.)''' &ndash; standard {{tag|ref}} citations normally go in this parameter.
# '''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 Formatting parameters===
These parameters are all optional.
[[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.
;{{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|Pull quoteCquote}} 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.
 
Line 53 ⟶ 56:
====Code====
<pre>
{{Reduced pull quoteRquote |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}}
</pre>
====Result====
{{Reduced pull quoteRquote |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}}
Line 70 ⟶ 73:
====Code====
<pre>
{{Reduced pull quoteRquote |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}}
</pre><pre style="overflow:auto;">
{{Reduced pull quoteRquote |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 pull quote template page''
}}
{{Lorem ipsum}}
</pre>
====Result====
{{Reduced pull quoteRquote |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 quoteRquote |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 pull quote template page''
}}
{{Lorem ipsum}}
Line 98 ⟶ 101:
{{Quotation templates}}
 
<includeonly>{{Sandbox other||
<!-- CATEGORIES BELOW THIS LINE, PLEASE: -->
[[Category:PullEnhanced quote templates]]
}}</includeonly>