Template:Su: Difference between revisions

From Vigyanwiki
Template>SkyLined
(Initial version, based on work for Template:PhysicsParticle and Template:val)
 
m (90 revisions imported from alpha:Template:Su)
 
(91 intermediate revisions by 20 users not shown)
Line 1: Line 1:
<noinclude>
{{{{{|safesubst:}}}#invoke:Su|main}}<noinclude>
==Purpose==
{{documentation}}
Template for creating two smaller lines of text on one actual line, this can be used for [[Template:val|scientific notations of uncertainty]] and [[Template:PhysicsParticle|physics]] symbols, such as [[Category:Nuclide templates|nuclides]] and [[Template:SubatomicParticle|particles]].
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
 
</noinclude>
It was named after the '''&lt;sup>''' and '''&lt;sub>''' HTML tags, which share the first two letters of their name with this template. This template uses the third letter of the name of these tags, '''p''' and '''b''', as the name of the argument that drives the output of the top and bottom line, respectively. They are also used in combination with the letter '''a''' to set the alignment of the indivivdual lines.
== Arguments ==
{|
|'''p''' || The contents of the top line.
|-
|'''b''' || The contents of the bottom line.
|-
|'''a''' || The alignment of both lines ('''r''' for right aligned, default is left aligned)
|}
 
==Examples==
Simple example: <code><nowiki>X{{su|p=a}}X{{su|b=b}}X{{su|p=a|b=b}}X</nowiki></code>
:X{{su|p=a}}X{{su|b=b}}X{{su|p=a|b=b}}X
Left aligned (default): <code><nowiki>X{{su|p=aaaaa|b=b}}X{{su|p=a|b=bbbbb}}X</nowiki></code>
:X{{su|p=aaaaa|b=b}}X{{su|p=a|b=bbbbb}}X
Right aligned: <code><nowiki>X{{su|a=r|p=aaaaa|b=b}}X{{su|a=r|p=a|b=bbbbb}}X</nowiki></code>
:X{{su|a=r|p=aaaaa|b=b}}X{{su|a=r|p=a|b=bbbbb}}X
</noinclude><includeonly><SPAN style="font-size:80%; line-height:50%; display: -moz-inline-box; -moz-box-orient:vertical; display:inline-block; position:relative; margin-top:-1em; bottom:-0.2em; vertical-align:bottom;{{#ifeq: {{{a|}}}|r| text-align:right}}"><SPAN style="display:block">{{{p|}}}</SPAN><SPAN style="display:block">{{{b|}}}</SPAN></SPAN></includeonly>

Latest revision as of 10:18, 8 December 2022


Template documentation