Template:Poem/doc

< Template:Poem
Revision as of 06:57, 5 September 2025 by HyperNervie (talk | contribs) (Created page with "This template serves as an alternative for Extension:Poem before that extension is enabled on this wiki. Pass the content of poem to {{param|1}} and it will act like <code><nowiki><poem>{{{1}}}</poem></nowiki></code>. Adding classes, styles and a "compact" attribute to the poem block is not supported by this template. {|class="wikitable" ! Input !! Output !! Explanation |- | <pre style="white-space:pre"> Hello {{Poem|ABCDEFG HIJ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template serves as an alternative for Extension:Poem before that extension is enabled on this wiki.

Pass the content of poem to {{{1}}} and it will act like <poem>{{{1}}}</poem>. Adding classes, styles and a "compact" attribute to the poem block is not supported by this template.

Input Output Explanation
Hello
{{Poem|ABCDEFG
HIJKLMN
OPQ RST
UVW XYZ
}}
there
Hello

ABCDEFG
HIJKLMN
OPQ RST
UVW XYZ

there

Hello
{{Poem|

ABCDEFG
HIJKLMN
OPQ RST
UVW XYZ

}}
there
Hello



ABCDEFG
HIJKLMN
OPQ RST
UVW XYZ

there

Newlines before the content are reserved. Those after are not.
Hello
{{Poem|1=

ABCDEFG
HIJKLMN
OPQ RST
UVW XYZ
}}
there
Hello

ABCDEFG
HIJKLMN
OPQ RST
UVW XYZ

there

Using the named argument format |1= strips the leading and trailing whitespaces within the content.
{{Poem
|GBA=Rhythm Tengoku
DS=Rhythm Tengoku Gold
Wii=Minna no Rhythm Tengoku
3DS=Rhythm Tengoku: The Best+
Switch=Rhythm Tengoku: Miracle Stars
}}

Oops! The parser thought the template was given an argument named {{{GBA}}} and found nothing for {{{1}}}...
{{Poem
|DS{{=}}Rhythm Heaven
Wii{{=}}Rhythm Heaven Fever
3DS{{=}}Rhythm Heaven Megamix
Switch{{=}}Rhythm Heaven Groove
}}

DS=Rhythm Heaven
Wii=Rhythm Heaven Fever
3DS=Rhythm Heaven Megamix
Switch=Rhythm Heaven Groove

Replacing all = with {{=}} helps, but things will become annoying when there are too many of them.
{{Poem|1=
DS=Rhythm Paradise
Wii=Beat the Beat: Rhythm Paradise
3DS=Rhythm Paradise Megamix
Switch=Rhythm Paradise Groove
}}

DS=Rhythm Paradise
Wii=Beat the Beat: Rhythm Paradise
3DS=Rhythm Paradise Megamix
Switch=Rhythm Paradise Groove

Using the named argument format completely rids you of worries about equal signs.
{{Poem|1=
GBA=Rhythm Tengoku
:DS=Rhythm Tengoku Gold
::Wii=Minna no Rhythm Tengoku
:::3DS=Rhythm Tengoku: The Best+
::::Switch=Rhythm Tengoku: Miracle Stars
}}

GBA=Rhythm Tengoku
DS=Rhythm Tengoku Gold
Wii=Minna no Rhythm Tengoku
3DS=Rhythm Tengoku: The Best+
Switch=Rhythm Tengoku: Miracle Stars

Each colon at the start of a line adds 1em-wide inline margin to that line.