Template:Reduced pull quote/doc

From MozillaWiki
Jump to: navigation, search
Edit-copy green.svg
This is a documentation subpage for Template:Reduced pull quote.
It contains usage information, categories and other content that is not part of the original template page.
Template:Pull quote/boilerplate

Usage

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

Align quote box to the right:

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

Align quote box to the left:

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

Named parameters may also be used:

{{Reduced pull quote |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

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):

{{Reduced pull quote|right|text of quotation|person quoted|cited source}}

Align quote box to the left (compact version):

{{Reduced pull quote|left|text of quotation|person quoted|cited source}}

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

Parameters

Unnamed parameters

  1. Alignment: The first unnamed parameter. "Template:Mono" or "Template:Mono" (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.

Template:Strong

Named parameters

These parameters are all optional.

|width
Width of the pull 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 pull quote. Use only as a last measure.

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:Lorem ipsumTemplate:Lorem ipsumTemplate:Lorem ipsumTemplate:Lorem ipsumTemplate:Lorem ipsumTemplate:Lorem ipsumTemplate:Lorem ipsumTemplate:Lorem ipsumTemplate:Lorem ipsumTemplate:Lorem ipsumTemplate:Lorem ipsumTemplate:Lorem ipsumTemplate:Lorem ipsum[[:Templat


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:Lorem ipsum

Template:Lorem ipsum