m (Bot: Adding uk:Довідка:Вірші) Tag: Help |
m (→See also: Mass editing of links) Tag: Help |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | {{tocright}} |
+ | {{tocright}}{{enabled by default}} |
− | {{enabled by default}} |
||
− | The '''poem extension''' allows for easy inclusion of poems and similar material on articles, by simply putting them between <tt><poem></poem></tt> tags, instead of adding <tt><br></tt> to the end or <tt>:</tt> to the beginning of every line |
+ | The '''poem extension''' allows for easy inclusion of poems and similar material on articles, by simply putting them between <tt><poem></poem></tt> tags, instead of adding <tt><br></tt> to the end or <tt>:</tt> to the beginning of every line. |
+ | The extension preserves [[Help:Links|wikilinks]], bolding, etc. if they are present in the poem, as well as indenting lines which start with spaces. |
||
− | == Example == |
||
+ | |||
⚫ | |||
+ | == An example == |
||
⚫ | |||
|- |
|- |
||
− | ! Input |
+ | ! Input |
⚫ | |||
⚫ | |||
+ | <poem> |
||
− | |- valign="top" |
||
+ | In Xanadu did [[wikipedia:Kubla Khan|Kubla Khan]] |
||
⚫ | |||
− | In [[Wikipedia:Xanadu|Xanadu]] did Kubla Khan |
||
A stately pleasure-dome decree: |
A stately pleasure-dome decree: |
||
Where Alph, the sacred river, ran |
Where Alph, the sacred river, ran |
||
Line 23: | Line 23: | ||
And here were forests ancient as the hills, |
And here were forests ancient as the hills, |
||
Enfolding sunny spots of greenery. |
Enfolding sunny spots of greenery. |
||
− | </poem |
+ | </poem> |
− | + | </pre> |
|
+ | |||
− | In [[Wikipedia:Xanadu|Xanadu]] did Kubla Khan |
||
+ | |- |
||
⚫ | |||
+ | |<poem> |
||
+ | In Xanadu did [[wikipedia:Kubla Khan|Kubla Khan]] |
||
A stately pleasure-dome decree: |
A stately pleasure-dome decree: |
||
Where Alph, the sacred river, ran |
Where Alph, the sacred river, ran |
||
Line 40: | Line 44: | ||
|} |
|} |
||
− | == |
+ | == Styling a poem == |
The poem text is wrapped in a div, which has no style by default, but inherits any ''style'' or ''class'' option passed to the poem. |
The poem text is wrapped in a div, which has no style by default, but inherits any ''style'' or ''class'' option passed to the poem. |
||
⚫ | |||
− | For example, while indented text can be used for simple examples to prevent filling and draw a nice blue box, it can be hard to read in some cases, since long lines aren't broken. A similar, but somewhat better effect can be obtained with: |
||
+ | |||
⚫ | |||
When applied to the above example, the result is as follows: |
When applied to the above example, the result is as follows: |
||
+ | |||
− | <poem style="border: |
+ | <poem style="border: 2px dashed #2f6fab; background-color: #eeeeee; color: #000; padding: 1em;"> |
− | In [[Wikipedia:Xanadu|Xanadu]] did Kubla Khan |
||
+ | In Xanadu did [[wikipedia:Kubla Khan|Kubla Khan]] |
||
A stately pleasure-dome decree: |
A stately pleasure-dome decree: |
||
Where Alph, the sacred river, ran |
Where Alph, the sacred river, ran |
||
Line 62: | Line 67: | ||
== "Compact" option == |
== "Compact" option == |
||
− | Normally, the parser renders each poem in a paragraph. Occasionally this is not desired; using the ''compact'' option (< |
+ | Normally, the parser renders each poem in a paragraph. Occasionally this is not desired; using the ''compact'' option (<code><poem compact></code>) suppresses newlines in the poem, to allow adjacent compact poems to blend together. |
== See also == |
== See also == |
||
* [[mw:Extension:Poem|Extension:Poem]] at MediaWiki.org |
* [[mw:Extension:Poem|Extension:Poem]] at MediaWiki.org |
||
+ | [[pl:Pomoc:Poezja]] |
||
[[pt:Ajuda:Poema]] |
[[pt:Ajuda:Poema]] |
||
[[ru:Справка:Стихи]] |
[[ru:Справка:Стихи]] |
||
+ | [[tr:Yardım:Şiir]] |
||
[[uk:Довідка:Вірші]] |
[[uk:Довідка:Вірші]] |
||
[[vi:Trợ giúp:Thơ]] |
[[vi:Trợ giúp:Thơ]] |
||
[[zh:Help:詩歌]] |
[[zh:Help:詩歌]] |
||
− | |||
[[Category:Help]] |
[[Category:Help]] |
Revision as of 07:05, 1 December 2019
- This extension is enabled by default on Fandom.
The poem extension allows for easy inclusion of poems and similar material on articles, by simply putting them between <poem></poem> tags, instead of adding <br> to the end or : to the beginning of every line.
The extension preserves wikilinks, bolding, etc. if they are present in the poem, as well as indenting lines which start with spaces.
An example
Input | <poem> In Xanadu did [[wikipedia:Kubla Khan|Kubla Khan]] A stately pleasure-dome decree: Where Alph, the sacred river, ran Through caverns measureless to man Down to a sunless sea. So twice five miles of fertile ground With walls and towers were girdled round: And there were gardens bright with sinuous rills, Where blossomed many an incense-bearing tree; And here were forests ancient as the hills, Enfolding sunny spots of greenery. </poem> |
---|---|
Output | In Xanadu did Kubla Khan |
Styling a poem
The poem text is wrapped in a div, which has no style by default, but inherits any style or class option passed to the poem.
For example: <poem style="border: 2px dashed #2f6fab; background-color: #eeeeee; color: #000; padding: 1em;">
When applied to the above example, the result is as follows:
In Xanadu did Kubla Khan
A stately pleasure-dome decree:
Where Alph, the sacred river, ran
Through caverns measureless to man
Down to a sunless sea.
So twice five miles of fertile ground
With walls and towers were girdled round:
And there were gardens bright with sinuous rills,
Where blossomed many an incense-bearing tree;
And here were forests ancient as the hills,
Enfolding sunny spots of greenery.
"Compact" option
Normally, the parser renders each poem in a paragraph. Occasionally this is not desired; using the compact option (<poem compact>
) suppresses newlines in the poem, to allow adjacent compact poems to blend together.
See also
- Extension:Poem at MediaWiki.org