Community Central
Register
Community Central
m (→‎See also: Mass editing of links)
Tag: Help
(22 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{enabled by default}}
+
{{tocright}}{{enabled by default}}
   
The '''poem extension''' allows for easy inclusion of poems and similar material in MediaWiki pages, by simply putting them between &lt;poem></poem&gt; tags, instead of adding &lt;br&gt; to the end or : to the beginning of every line, which is common practice now. The extension preserves wikilinks, bolding, etc. if they are present in the poem, as well as indenting lines which start with spaces.
+
The '''poem extension''' allows for easy inclusion of poems and similar material on articles, by simply putting them between <tt>&lt;poem></poem&gt;</tt> tags, instead of adding <tt>&lt;br&gt;</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.
   
  +
== An example ==
Minister of our coming doom, preaching
 
  +
{| class="article-table" cellspacing="5" style="width: 100%;"
  +
|-
  +
! Input
  +
|<pre>
  +
<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
On the car radio, how right
 
  +
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>
  +
</pre>
   
  +
|-
Your Hell and damnation sound to me
 
  +
!Output
  +
|<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
As I travel these small, bleak roads
 
  +
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>
  +
|}
   
  +
== Styling a poem ==
Thinking of the mailman’s son
 
 
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: <code><nowiki><poem style="border: 2px dashed #2f6fab; background-color: #eeeeee; color: #000; padding: 1em;"></nowiki></code>
The Army sent back in a sealed coffin.
 
   
 
 
His house is around the next turn.
 
 
A forlorn mutt sits in the yard
 
 
Waiting for someone to come home.
 
 
I can see the TV is on in the living room,
 
 
Canned laughter in the empty house
 
 
Like the sound of beer cans tied to a hearse.
 
 
==Style==
 
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 <pre><poem style="border: 1px dashed #2f6fab;background-color: #eeeeee; padding:1em"></pre>
 
 
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: 1px dashed #2f6fab; background-color: #eeeeee; padding:1em">
 
  +
<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 50: Line 66:
 
</poem>
 
</poem>
   
=="compact" option==
+
== "Compact" option ==
Normally, the parser renders each poem in a paragraph. Occasionally this is not desired; using the ''compact'' option suppresses newlines in the poem, to allow adjacent compact poems to blend together.
+
Normally, the parser renders each poem in a paragraph. Occasionally this is not desired; using the ''compact'' option (<code>&lt;poem compact&gt;</code>) suppresses newlines in the poem, to allow adjacent compact poems to blend together.
  +
  +
== See also ==
  +
* [[mw:Extension:Poem|Extension:Poem]] at MediaWiki.org
   
  +
[[pl:Pomoc:Poezja]]
[[Category:Help|{{PAGENAME}}]]
 
  +
[[pt:Ajuda:Poema]]
  +
[[ru:Справка:Стихи]]
  +
[[tr:Yardım:Şiir]]
  +
[[uk:Довідка:Вірші]]
  +
[[vi:Trợ giúp:Thơ]]
  +
[[zh: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
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.

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