Template:Style P-Poem custom: Difference between revisions

m
подпись под стихом выступает вправо по умолчанию
(новый шаблон стихов)
 
m (подпись под стихом выступает вправо по умолчанию)
Line 19: Line 19:


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


{| class="wikitable"
{| class="wikitable"
Line 30: Line 27:
| <code>signature style</code> || <code>italic</code>, <code>caps</code>, <code>plain</code>, <code>caps italic</code> || <code>italic</code> || how the signature is set
| <code>signature style</code> || <code>italic</code>, <code>caps</code>, <code>plain</code>, <code>caps italic</code> || <code>italic</code> || how the signature is set
|-
|-
| <code>signshift</code> || <code>2em</code> || — || 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
| <code>signshift</code> || <code>2em</code>, <code>0</code> || <code>2em</code> || how far the signature stands out to the right of the poem. In printed books the signature under verse is set a little to the right of the verse itself: measured on the first edition of ''The Secret Doctrine'', the overhang is 2.1 em. Use <code>0</code> to line the signature up with the right edge of the poem instead
|}
|}


Line 94: Line 91:
| <div class="poem-aligned" style="text-align: {{{align|left}}};">{{#tag:poem|{{{poem}}}}}</div>
| <div class="poem-aligned" style="text-align: {{{align|left}}};">{{#tag:poem|{{{poem}}}}}</div>
|-
|-
| style="text-align:right; font-size: 80%; {{#switch:{{{signature style|italic}}}|caps=font-variant: small-caps;|plain=|caps italic=font-variant: small-caps; font-style: italic;|#default=font-style: italic;}}" | {{#if:{{{signshift|}}}|<div style="margin-right: -{{{signshift|}}};">{{{signature|}}}</div>|{{#if: {{{signature|}}}|{{{signature}}}|}} }}
| style="text-align:right; font-size: 80%; {{#switch:{{{signature style|italic}}}|caps=font-variant: small-caps;|plain=|caps italic=font-variant: small-caps; font-style: italic;|#default=font-style: italic;}}" | {{#if:{{{signature|}}}|<div style="margin-right: -{{{signshift|2em}}};">{{{signature}}}</div>|}}
|}</includeonly>
|}
</includeonly>