Difference between revisions of "Template:Quote/doc"

From Summertime Saga Wiki
Jump to: navigation, search
m (Examples)
m (Limitations)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
The {{tl|quote}} formats block quotations and provides a wrapper with decorative marks for the HTML {{tag|blockquote|open}} element.
+
The {{tlg|quote}} formats block quotations and provides a wrapper with decorative marks for the HTML {{tag|blockquote|open}} element.
  
 
This template should {{strong|not be used}} for block quotations in article text. 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.
 
This template should {{strong|not be used}} for block quotations in article text. 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.
Line 5: Line 5:
 
== Usage ==
 
== Usage ==
  
{{tlc|Quote}} adds a block quotation to an article page. This is easier to type and is more wiki‐like than the equivalent HTML {{tag|blockquote}} tags, and has additional pre‐formatted attribution parameters for author and source.
+
== Usage ==
  
{{note|Block quotes do {{em|not}} normally contain quotation marks.}}
+
: {{tlg|code=yes|nolink=yes|quote|text{{=}}{{var|text}}|source{{=}}{{var|source}}}}
 +
 
 +
{{tlg|nolink=yes|quote}} adds a block quotation to an article page. This is easier to type and is more wiki‐like than the equivalent HTML {{tag|blockquote}} tags, and has additional pre‐formatted attribution parameters for author and source. Block quotes do {{em|not}} normally contain quotation marks.
  
 
== Parameters ==
 
== Parameters ==
  
; {{para|1}} or {{para|quote}} : The material being quoted, without quotation marks around it.
+
; {{para|quote}} or {{para|1}} : The material being quoted, without quotation marks around it.
 
+
; {{para|source}} or {{para|2}} : Optional speaker or source information to display that will appear below the quotation, and preceded with an attribution dash.
; {{para|2}} or {{para|source}} : Optional speaker or source information to display that will appear below the quotation, and preceded with an attribution dash.
 
  
 
== Examples ==
 
== Examples ==
Line 19: Line 20:
  
 
{|class=wikitable style="width:100%;"
 
{|class=wikitable style="width:100%;"
|+ Without source displayed
 
 
! style="width:50%;" | Markup
 
! style="width:50%;" | Markup
 
! Renders as
 
! Renders as
 
|-
 
|-
| {{tlc|quote|Quoted material.}}
+
| {{tlg|code=yes|nolink=yes|quote|Quoted material.}}
 
| {{quote|Quoted material.}}
 
| {{quote|Quoted material.}}
|}
 
 
{|class=wikitable style="width:100%;"
 
|+ With source displayed
 
! style="width:50%;" | Markup
 
! Renders as
 
 
|-
 
|-
| {{tlc|quote|Quoted material.|Source material}}
+
| {{tlg|code=yes|nolink=yes|quote|text{{=}}Quoted material.|source{{=}}Source material}}
 +
| {{quote|text=Quoted material.|source=Source material}}
 +
|-
 +
| {{tlg|code=yes|nolink=yes|quote|Quoted material.|Source material}}
 
| {{quote|Quoted material.|Source material}}
 
| {{quote|Quoted material.|Source material}}
|}
 
 
{|class=wikitable style="width:100%;"
 
|+ With source displayed and named parameters
 
! style="width:50%;" | Markup
 
! Renders as
 
|-
 
| {{tlc|quote|text{{=}}Quoted material.|source{{=}}Source material}}
 
| {{quote|text=Quoted material.|source=Source material}}
 
 
|}
 
|}
  
Line 49: Line 37:
 
If you do not provide text, the template generates a parser error message, which will appear in red text in the rendered page.
 
If you do not provide text, the template generates a parser error message, which will appear in red text in the rendered page.
  
If any parameter’s actual value contains an equals sign “=”, you {{strong|must}} use a named parameter (e.g. {{para|quote|2=“E=MC<sup>2</sup>”}} is a formula everyone knows but few understand</code>, not a blank‐name positional parameter. The text before the equals sign gets misinterpreted as a named parameter otherwise. Be wary of URLs, which frequently contain this character. Named parameters are always safer, in this and other templates.
+
If any parameter’s actual value contains an equals sign “=”, you {{strong|must}} use a named parameter (e.g. {{para|text|2=“E=MC<sup>2</sup>”}}), not a blank‐name positional parameter. The text before the equals sign gets misinterpreted as a named parameter otherwise. Be wary of URLs, which frequently contain this character. Named parameters are always safer, in this and other templates.
  
 
[[Category:Templates]]
 
[[Category:Templates]]
 
[[Category:Templates documentation]]
 
[[Category:Templates documentation]]

Latest revision as of 18:37, 23 July 2020

The {{quote}} formats block quotations and provides a wrapper with decorative marks for the HTML <blockquote> element.

This template should not be used for block quotations in article text. 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.

Usage

Usage

{{quote|text=text|source=source}}

{{quote}} adds a block quotation to an article page. This is easier to type and is more wiki‐like than the equivalent HTML <blockquote>…</blockquote> tags, and has additional pre‐formatted attribution parameters for author and source. Block quotes do not normally contain quotation marks.

Parameters

|quote= or |1= 
The material being quoted, without quotation marks around it.
|source= or |2= 
Optional speaker or source information to display that will appear below the quotation, and preceded with an attribution dash.

Examples

Markup Renders as
{{quote|Quoted material.}}

Quoted material.

{{quote|text=Quoted material.|source=Source material}}

Quoted material.

— Source material

{{quote|Quoted material.|Source material}}

Quoted material.

— Source material

Limitations

If you do not provide text, the template generates a parser error message, which will appear in red text in the rendered page.

If any parameter’s actual value contains an equals sign “=”, you must use a named parameter (e.g. |text=“E=MC2), not a blank‐name positional parameter. The text before the equals sign gets misinterpreted as a named parameter otherwise. Be wary of URLs, which frequently contain this character. Named parameters are always safer, in this and other templates.