Template:Poem quote: Difference between revisions
| [checked revision] | [checked revision] |
Caleb Cooper (talk | contribs) Created page with "{{Documentation subpage}} {{Commons Import}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) -..." |
Caleb Cooper (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} |
|||
{{Commons Import}} |
|||
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> |
|||
A template for quoting poems, song lyrics, and other things that have frequent line breaks and other things that would generally be ignored in standard wiki formatting. Based on {{tl|Quote}}; see there for further usage details. |
|||
==Example== |
|||
{{Markup| |
|||
<syntaxhighlight lang="HTML"> |
|||
{{Poemquote |
|||
|text=<!-- or: 1= -->The sun was shining on the sea, |
|||
Shining with all his might: |
|||
He did his very best to make |
|||
The billows smooth and bright-- |
|||
And this was odd, because it was |
|||
The middle of the night. |
|||
|char=Tweedledum and Tweedledee |
|||
|sign= Lewis Carroll |
|||
|source=<!-- or 4= -->Through the Looking-Glass |
|||
|title=<!-- or: 3= -->The Walrus and The Carpenter |
|||
|style=<!-- standard CSS style goes here --> |
|||
}}</syntaxhighlight>| |
|||
{{Poemquote |
|||
|text=<!-- or: 1= -->The sun was shining on the sea, |
|||
Shining with all his might: |
|||
He did his very best to make |
|||
The billows smooth and bright-- |
|||
And this was odd, because it was |
|||
The middle of the night. |
|||
|char=Tweedledum and Tweedledee |
|||
|sign= Lewis Carroll |
|||
|source=<!-- or 4= -->Through the Looking-Glass |
|||
|title=<!-- or: 3= -->The Walrus and The Carpenter |
|||
|style=<!-- standard CSS style goes here --> |
|||
}} |
|||
}} |
|||
Compare with {{tl|Quote}}: |
|||
{{Markup| |
|||
<syntaxhighlight lang="HTML"> |
|||
{{Quote |
{{Quote |
||
|text={{#if:{{{text|<noinclude>{{lorem}}</noinclude>}}}{{{quote|}}}{{{quotetext|}}}{{{content|}}}{{{1|}}}|{{#tag:poem|{{trim quotes|{{if empty|{{{text|<noinclude>{{lorem}}</noinclude>}}}|{{{quote|}}}|{{{quotetext|}}}|{{{content|}}}|{{{1|}}}}}}}}}}} |
|||
|text=<!-- or: 1= -->The sun was shining on the sea, |
|||
|char={{{char|{{{character|<noinclude>John Roe</noinclude>}}}}}} |
|||
Shining with all his might: |
|||
|2={{{2|}}} |
|||
He did his very best to make |
|||
|author={{{author|}}} |
|||
The billows smooth and bright-- |
|||
|by={{{by|}}} |
|||
And this was odd, because it was |
|||
|cite={{{cite|}}} |
|||
The middle of the night. |
|||
|personquoted={{{personquoted|}}} |
|||
|char=Tweedledum and Tweedledee |
|||
|sign={{{sign|<noinclude>Jane Doe</noinclude>}}} |
|||
|sign= Lewis Carroll |
|||
|3={{{3|}}} |
|||
|source=<!-- or 4= -->Through the Looking-Glass |
|||
|publication={{{publication|}}} |
|||
|title=<!-- or: 3= -->The Walrus and The Carpenter |
|||
|quotesource={{{quotesource|}}} |
|||
|style=<!-- standard CSS style goes here --> |
|||
|source={{{source|<noinclude>"My Dinner with Alien Invaders"</noinclude>}}} |
|||
}}</syntaxhighlight> |
|||
|title={{{title|}}} |
|||
|{{Quote |
|||
|ts={{{ts|}}} |
|||
|text=<!-- or: 1= -->The sun was shining on the sea, |
|||
|style={{{style|}}} |
|||
Shining with all his might: |
|||
|4={{{4|}}} |
|||
He did his very best to make |
|||
|5={{{5|}}} |
|||
The billows smooth and bright-- |
|||
|class={{{class|}}} |
|||
And this was odd, because it was |
|||
|id={{{id|}}} |
|||
The middle of the night. |
|||
|diff={{{diff|}}} |
|||
|char=Tweedledum and Tweedledee |
|||
}}<noinclude> |
|||
|sign= Lewis Carroll |
|||
{{documentation}}<!-- Add categories to the /doc subpage, not here! --> |
|||
|source=<!-- or 4= -->Through the Looking-Glass |
|||
</noinclude> |
|||
|title=<!-- or: 3= -->The Walrus and The Carpenter |
|||
|style=<!-- standard CSS style goes here --> |
|||
}} |
|||
}} |
|||
Note that while the version above using {{tl|Quote}} may appear to work in some browsers, it does not do so consistently in all of them. Use {{tag|poem}} – or a template like {{tlx|Poemquote}} that implements it – around material that requires that whitespace formatting be preserved as in the original, such as poems and interlinear glosses. Due to limitations of how MediaWiki parses wikimarkup and HTML, attempts to do this by just inserting blank lines and extra spaces will not work. This is true of all block elements. |
|||
(Technical note: Although {{tl|Poemquote}} uses the <code>Tag:#poem</code> markup rather than using {{tag|poem|o}}, it is functionally the same.) |
|||
== TemplateData == |
|||
{{TemplateData header}} |
|||
<templatedata> |
|||
{ |
|||
"description": "Adds a block quotation.", |
|||
"params": { |
|||
"text": { |
|||
"label": "text", |
|||
"description": "The text to quote", |
|||
"type": "content", |
|||
"required": true, |
|||
"aliases": [ |
|||
"1", |
|||
"quote" |
|||
] |
|||
}, |
|||
"char": { |
|||
"label": "char", |
|||
"description": "The character being quoted", |
|||
"type": "content", |
|||
"required": false, |
|||
"example": "Alice", |
|||
"suggested": true |
|||
}, |
|||
"sign": { |
|||
"label": "sign", |
|||
"description": "The person being quoted", |
|||
"type": "content", |
|||
"required": false, |
|||
"aliases": [ |
|||
"2", |
|||
"cite", |
|||
"author" |
|||
], |
|||
"example": "Lewis Carroll ", |
|||
"suggested": true |
|||
}, |
|||
"title": { |
|||
"label": "title", |
|||
"description": "The title of the poem being quoted", |
|||
"type": "content", |
|||
"required": false, |
|||
"aliases": [ |
|||
"3" |
|||
], |
|||
"example": "Jabberwocky", |
|||
"suggested": true |
|||
}, |
|||
"source": { |
|||
"label": "source", |
|||
"description": "A source for the quote", |
|||
"type": "content", |
|||
"required": false, |
|||
"aliases": [ |
|||
"4" |
|||
], |
|||
"example": "Through the Looking-Glass, and What Alice Found There", |
|||
"suggested": true |
|||
}, |
|||
"style": { |
|||
"label": "style", |
|||
"description": "Standard CSS style", |
|||
"type": "string", |
|||
"required": false |
|||
} |
|||
} |
|||
} |
|||
</templatedata> |
|||
==See also== |
|||
{{Quotation templates}} |
|||
<includeonly>{{Sandbox other|| |
|||
<!-- Categories below this line, please; interwikis at Wikidata --> |
|||
[[Category:Quotation templates]] |
|||
}}</includeonly> |
|||
Latest revision as of 17:09, 20 October 2020
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
— John Roe, in Jane Doe, "My Dinner with Alien Invaders"
| This page was automatically imported from Commons any changes will be overwritten, the source page is here () |
A template for quoting poems, song lyrics, and other things that have frequent line breaks and other things that would generally be ignored in standard wiki formatting. Based on {{Quote}}; see there for further usage details.
Example
| Markup | Renders as |
|---|---|
|
|
Compare with {{Quote}}:
| Markup | Renders as |
|---|---|
|
|
Note that while the version above using {{Quote}} may appear to work in some browsers, it does not do so consistently in all of them. Use <poem>...</poem> – or a template like {{Template:Poem quote}} that implements it – around material that requires that whitespace formatting be preserved as in the original, such as poems and interlinear glosses. Due to limitations of how MediaWiki parses wikimarkup and HTML, attempts to do this by just inserting blank lines and extra spaces will not work. This is true of all block elements.
(Technical note: Although {{Template:Poem quote}} uses the Tag:#poem markup rather than using <poem>, it is functionally the same.)
TemplateData
TemplateData for Poem quote
Adds a block quotation.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| text | text 1 quote | The text to quote | Content | required |
| char | char | The character being quoted
| Content | suggested |
| sign | sign 2 cite author | The person being quoted
| Content | suggested |
| title | title 3 | The title of the poem being quoted
| Content | suggested |
| source | source 4 | A source for the quote
| Content | suggested |
| style | style | Standard CSS style | String | optional |