440
edits
(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}}
== Usage ==
For
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
===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''': 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
# '''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
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|&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|
# 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>
{{
|2=This is an example
|3=[[Anonymity|Anonymous]] |4=''Reduced
}}
{{str left|{{Lorem ipsum}}|335}}
</pre>
====Result====
{{
|2=This is an example
|3=[[Anonymity|Anonymous]] |4=''Reduced
}}
{{str left|{{Lorem ipsum}}|335}}
Line 70 ⟶ 73:
====Code====
<pre>
{{
|2=This is another, slightly longer example
|3=[[Anonymity|Anonymous]] |4=''Reduced
}}
{{Lorem ipsum}}
</pre><pre style="overflow:auto;">
{{
|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
}}
{{Lorem ipsum}}
</pre>
====Result====
{{
|2=This is another, slightly longer example
|3=[[Anonymity|Anonymous]] |4=''Reduced
}}
{{Lorem ipsum}}
{{
|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
}}
{{Lorem ipsum}}
Line 98 ⟶ 101:
{{Quotation templates}}
<includeonly>{{Sandbox other||
<!-- CATEGORIES BELOW THIS LINE, PLEASE: -->
[[Category:
}}</includeonly>
|