Template:Style P-Poem custom: Difference between revisions

From Teopedia
(новый шаблон стихов)
(No difference)

Revision as of 10:43, 5 August 2026

This style is to design paragraph in text. To highligt just several symbols use templates for symbol styles.

The same poem block as {{Style P-Poem}}, with three switches added: the lines can be centered, the signature can be set in small capitals, and the signature can be shifted out to the right, the way it is done in printed books. The older {{Style P-Poem}} is kept unchanged for the pages that already use it; this one is a separate template, so nothing that exists is affected. For a poem used as an epigraph before the main text see {{Style P-Epigraph custom}}.


Modifications:

  • text floats in the column and placed at the center of the page
  • no extra empty line is required in text
  • the lines of the poem, the style of the signature and its shift to the right are switched by named parameters, see the table below


To copy:

{{Style P-Poem custom|title= |poem= |signature=}}

or

{{Style P-Poem custom
 | title =
 | poem =
 | signature =
}}

Only poem parameter is required, so template can be used in short form:

{{Style P-Poem custom |poem = Text}}

Optional parameters

Three optional parameters. All of them are left out by default, and then the template looks exactly like {{Style P-Poem}}.

Parameter Values Default What it does
align left, center, right left how the lines of the poem are aligned. center centres every line — the way short verses are often set in books
signature style italic, caps, plain, caps italic italic how the signature is set
signshift 2em — in printed books the signature under a poem stands a little to the right of the poem itself. This parameter moves it out by the given amount

The name signature is already taken by the text of the signature, hence the longer signature style.

This template needs one rule in MediaWiki:Common.css, next to the existing exceptions for .poem p and .gallerytext p, otherwise align has no effect:

.epigraph p,
.poem-aligned p {
    text-indent: inherit;
    text-align: inherit;
}
{{Style P-Poem custom |poem = Text |signature = A. B. Writer |signature style = caps |signshift = 2em}}

Every line centred:

{{Style P-Poem custom
 |poem = The quality of mercy is not strain’d,
It droppeth as the gentle rain from heaven
Upon the place beneath.
 |signature = Shakespeare, ''The Merchant of Venice''
 |align = center
 |signature style = caps
}}

The quality of mercy is not strain’d,
It droppeth as the gentle rain from heaven
Upon the place beneath.

Shakespeare, The Merchant of Venice

Example:

{{Style P-Poem custom|title=Pioneer
|poem= Pioneer! Be always gallant,
No vows that doesn’t cost a dime,
Prove your words with deeds and talents.
"I am ready all the time!"

|signature= Vasily Lebedev-Kumach<br>Fragments, 1936
}}

Result:


Pioneer

Pioneer! Be always gallant,
No vows that doesn’t cost a dime,
Prove your words with deeds and talents.
"I am ready all the time!"

Vasily Lebedev-Kumach
Fragments, 1936