Template:Su: Difference between revisions
Template>SkyLined m (Changed bottom to -0.1em) |
Template>SkyLined m (→Examples: Added smaller and bigger example) |
||
Line 14: | Line 14: | ||
==Examples== | ==Examples== | ||
Simple example: <code><nowiki>X{{su|p=a}}X{{su|b=b}}X{{su|p=a|b=b}}X</nowiki></code> | '''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 | :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> | '''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 | :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> | '''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 | :X{{su|a=r|p=aaaaa|b=b}}X{{su|a=r|p=a|b=bbbbb}}X | ||
'''Smaller font''': <code><nowiki><small>X{{su|p=a}}X{{su|b=b}}X{{su|p=a|b=b}}X</small></nowiki></code> | |||
:<small>X{{su|p=a}}X{{su|b=b}}X{{su|p=a|b=b}}X</small> | |||
'''Larger font''': <code><nowiki><big>X{{su|p=a}}X{{su|b=b}}X{{su|p=a|b=b}}X</big></nowiki></code> | |||
:<big>X{{su|p=a}}X{{su|b=b}}X{{su|p=a|b=b}}X</big> | |||
</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.1em; vertical-align:bottom;{{#ifeq: {{{a|}}}|r| text-align:right}}"><SPAN style="display:block">{{{p|}}}</SPAN><SPAN style="display:block">{{{b|}}}</SPAN></SPAN></includeonly> | </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.1em; vertical-align:bottom;{{#ifeq: {{{a|}}}|r| text-align:right}}"><SPAN style="display:block">{{{p|}}}</SPAN><SPAN style="display:block">{{{b|}}}</SPAN></SPAN></includeonly> |
Revision as of 20:15, 9 April 2008
Purpose
Template for creating two smaller lines of text on one actual line, this can be used for scientific notations of uncertainty and physics symbols, such as and particles.
It was named after the <sup> and <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: X{{su|p=a}}X{{su|b=b}}X{{su|p=a|b=b}}X
- XaXbXabX
Left aligned (default): X{{su|p=aaaaa|b=b}}X{{su|p=a|b=bbbbb}}X
- XaaaaabXabbbbbX
Right aligned: X{{su|a=r|p=aaaaa|b=b}}X{{su|a=r|p=a|b=bbbbb}}X
- XaaaaabXabbbbbX
Smaller font: <small>X{{su|p=a}}X{{su|b=b}}X{{su|p=a|b=b}}X</small>
- XaXbXabX
Larger font: <big>X{{su|p=a}}X{{su|b=b}}X{{su|p=a|b=b}}X</big>
- XaXbXabX