Template:Cquote/doc: Difference between revisions

since the quotewidth generally does not work anyhow, I'm marking it as deprecated and simplifying the documentation greatly
No edit summary
(since the quotewidth generally does not work anyhow, I'm marking it as deprecated and simplifying the documentation greatly)
Line 13:
===Syntax===
# <code><nowiki>{{cquote|quote text}}</nowiki></code>
# <code><nowiki>{{cquote|quote text|quotewidthauthor=40px}}</nowiki></code>author or <code><nowiki>{{cquote|quote text|40px|speaker}}</nowiki></code>
# <code><nowiki>{{cquote|quote text|quote width in pixels||author=author or speaker|source=title of article, speech, book, etc.}}</nowiki></code>
 
;Only the first parameter is required.
:But since sizes are slotted into the second parameter place by default, to cite a source one must deliberately define dummy parameters for those (abusing the template logic, which expects numbers), or explicitly define the source author and publication as 4= and 5= respectively (using them as named parameters—the preprocessor takes such fine):
 
{{cquote|This is one.
|4=Author
|5=Publication}}
 
 
which is generated by:
<pre>
{{cquote|This is one.
|4=Author
|5=Publication}}
</pre>
or
<pre>{{cquote|This is one.
|author=Author
|source=Publication}} </pre>
 
===Parameters===
Line 39 ⟶ 20:
: '''''Required'''''
: '''Note''': if the quote text contains one or more "=" (equal signs), then the template must be called as <nowiki>{{cquote|</nowiki>'''<span style="color:red;">1=</span>'''<nowiki>quote text}}</nowiki> (see [[m:Help:Templates#Equals sign in parameter value|"Equals sign in parameter value"]])
;ParameterDeprecated positional parameter 2: "size", "quotewidth", or "width" can also be used.&nbsp;– deprecated; desiredDesired size of the quotation marks. Currently this value is ignored and the size is always 35px, except for the values 10px, 20px, 30px, 40px, 50px, and 60px retained for historical reasons. This was used to scale the graphical [[quotation mark]]s up and down to suit larger or smaller quotes.
;<del>ParameterDeprecated positional parameter 3</del>:<del>"quoteheight"</del>&nbsp;– it was used for desired height of the quotation marks, but nois now longerignored.
; author / Parameter 4: Name of the person that wrote or spoke the text being quoted. Can include linkswiki syntax.
; source / publication / Parameter 5: Source of the quote (publication title, speech, etc.). Can include linkswiki syntax.
: '''Note''': if the text contains one or more "=" (equal signs), then the template must be called as <nowiki>{{cquote|</nowiki>'''<span style="color:red;">4=</span>'''<nowiki>text}}</nowiki>
; source / publication / Parameter 5: Source of the quote (publication title, speech, etc.). Can include links.
: '''Note''': if the text contains one or more "=" (equal signs), then the template must be called as <nowiki>{{cquote|</nowiki>'''<span style="color:red;">5=</span>'''<nowiki>text}}</nowiki>
; bgcolor: The color of the background.
; wide: When set to "yes", the quote expands to the entire width of the page. UsefullUseful for small quotes, but may clash with other floating objects, such as infoboxes.
 
===ExamplesSimple example===
<pre>{{cquote|quote text}}</pre>
{{cquote|To be, or not to be.}}
{{cquote|External success has to do with people who may see me as a model, or an example, or a representative. As much as I may dislike or want to reject that responsibility, this is something that comes with public success. It's important to give others a sense of hope that it is possible and you can come from really different places in the world and find your own place in the world that's unique for yourself.|4=[[Amy Tan]]}}<!--This is a bad example, as it is illustrating use of the template in article text, not as a pull-quote!-->
 
===Sourced example===
<pre>{{cquote|1=quote text}}</pre> (quote text contains an equal sign)
<pre style="overflow:scroll">{{cquote|Life is like riding a bicycle. To keep your balance you must keep moving.|author=[[Albert Einstein]]|source=in a letter to his son<ref>[[Walter Isaacson]], ''Einstein: His Life and Universe'' (2007), p. 367.</ref>}}</pre>
{{cquote|1=The essential point, established by Lorentz, is that the equations of the electromagnetic field are not altered by a certain transformation (which I will call by the name of Lorentz) of the form<sup id="refQLT1904"><small>[[#endnoteQLT1904|2]]</small></sup>:
:<math>x^\prime = k\ell\left(x + \varepsilon t\right),t^\prime = k\ell\left(t + \varepsilon x\right),y^\prime = \ell y,z^\prime = \ell z, k = 1/\sqrt{1-\varepsilon^2}.</math>}}
 
{{cquote|Life is like riding a bicycle. To keep your balance you must keep moving.|author=[[Albert Einstein]]|source=in a letter to his son<ref>[[Walter Isaacson]], ''Einstein: His Life and Universe'' (2007), p. 367.</ref>}}
<pre>{{cquote|quote text|40px}}</pre>
{{Cquote|You have the right to remain silent. If you give up that right, anything you say can and will be used against you in a court of law. You have the right to an attorney and to have an attorney present during questioning. If you cannot afford an attorney, one will be provided to you at no cost. During any questioning, you may decide at any time to exercise these rights, not answer any questions, or make any statements.|40px}}
 
<references />
<pre>{{cquote|quote text|30px||Origin of quote|Cited source}}</pre>
 
===Other examples===
For example:
<pre>{{cquote|quote text1=F=ma|40pxauthor=[[Isaac Newton]]}}</pre>
<pre>{{cquote|(the ''1=quote'' text}}</pre>is necessary as (quote text contains an equal sign)
{{cquote|1=F=ma|author=[[Isaac Newton]]}}
 
<pre>{{cquote|This is one.1=Thus:
<pre style="overflow:scroll">{{cquote|And when they've given you their all / Some stagger and fall, after all it's not easy / Banging your heart against some mad bugger's wall.|30px||[[Pink Floyd]]|''[[The Wall]]''}}</pre>
:<math>E=mc^2</math>|author=[[Albert Einstein]]}}</pre>
is rendered as
(quote text contains an equal sign and math syntax)
 
{{cquote|This is one.1=Thus:
{{cquote|And when they've given you their all / Some stagger and fall, after all it's not easy / Banging your heart against some mad bugger's wall.|30px||[[Pink Floyd]]|''[[The Wall]]''}}
:<math>E=mc^2</math>|author=[[Albert Einstein]]}}
 
Example with ref tags:
 
<pre style="overflow:scroll">{{cquote|You don't get everything you want. A dictatorship would be a lot easier.|200px||George W. Bush<ref>http://www.governing.com/archive/1998/jul/bush.txt</ref>}}</pre>
 
{{cquote|You don't get everything you want. A dictatorship would be a lot easier.|200px||George W. Bush<ref>http://www.governing.com/archive/1998/jul/bush.txt</ref>}}
 
<references />
 
==See also==
Anonymous user