Template:Quote2/doc: Difference between revisions

From MEpedia, a crowd-sourced encyclopedia of ME and CFS science and history
(tidy, add example with named parameters)
m (consolidate template data)
Line 48: Line 48:
<templatedata>
<templatedata>
{
{
"description": "Adds a quote with graphical speech marks.",
"description": "Adds a quote with a large quotation mark, without a title",
"format": "inline",
"params": {
"params": {
"1": {
"1": {

Revision as of 13:02, August 13, 2021

Usage[edit source]

{{Quote2}} adds a block quotation to an article page.

Note: Block quotes do not normally contain quotation marks. See Manual of style.

Synopsis[edit source]

Unnamed (positional) parameters

{{quote2|text|author|source}} This markup will fail if any parameter contains an equals sign (=).

Numbered (positional) parameters

{{quote2|1=text|2=author|3=source}}

Examples[edit source]

Wikitext

{{Quote2|1=Cry "Havoc" and let slip the dogs of war.|2=William Shakespeare|3=Julius Caesar (play), act III, scene I}}

Result
Cry "Havoc" and let slip the dogs of war.

—William Shakespeare,  Julius Caesar (play), act III, scene I


Wikitext

{{Quote2|text=We are told not to worry about breakthrough cases because they are ‘mild’ – but long Covid is anything but mild|author=Hannah Davis|source=The Guardian}}

Result
We are told not to worry about breakthrough cases because they are ‘mild’ – but long Covid is anything but mild

—Hannah Davis,  The Guardian


Restrictions[edit source]

If you do not provide quoted 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 named parameters. (The equals sign gets interpreted as a named parameter otherwise.)

If any parameter's actual value contains characters used for wiki markup syntax (such as pipe, brackets, single quotation marks, etc.), you may need to escape it. See Template:! and friends.

Be wary of URLs which contain restricted characters. The equals sign is especially common.

Multiple paragraphs[edit source]

The <blockquote> element and any templates that use it do not honor newlines:

Markup Renders as
<blockquote>
Line 1
Line 2
Line 3
Line 4
</blockquote>

Line 1 Line 2 Line 3 Line 4

The simplest workaround for this is to use the <poem> tag inside <blockquote>, which will convert line breaks to <br /> tags:

Markup Renders as
<blockquote><poem>
Line 1
Line 2
Line 3
Line 4
</poem></blockquote>

<poem>

Line 1 Line 2 Line 3 Line 4

</poem>

TemplateData[edit source]

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly error report for this template.

TemplateData for Quote2

Adds a quote with a large quotation mark, without a title

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
text1 1 quote

The text to quote

Stringrequired
author(s)2 2 person author

The person who is being quoted, can be linked

Example
[[Charles Shepherd]]
Stringsuggested
source3 3 book article

A source for the quote - book, article, etc

Example
The flu vaccine and Chronic Fatigue Syndrome
Stringsuggested

See also[edit source]