Шаблон:Su2
{{#ifeq:su2 |док
|
{{#ifeq:show |show
|| Ово је документациона подстраница за Шаблон:Su2. Садржи информације о коришћењу, категоријама и другом садржају који није део оригиналне странице. |
}}{{#if: |
| {{#ifexist:Шаблон:Su2
| [[Категорија:Документација {{#switch:Шаблон |Шаблон=шаблона |Модул=модула |Корисник=корисничких страница |#default=Википедије}}]]
|
}}
}}
|
}}
| {{#if:{{#ifeq: n|n|Stop hand nuvola.svg}} |[[File:{{#ifeq: n|n|Stop hand nuvola.svg}}|40px|Обавештење]]}} | {{#if: | ' }}{{#ifeq: n|n
|Овај шаблон не би требало да се користи у шаблонима за навођење извора као што је CS1 или CS2, зато што укључује означавање које ће да загади COinS метаподатке који се производе; погледајте COinS на Википедији. |Овај шаблон је сигуран за употребу у шаблонима за навођење извора који производе COinS метаподатке; погледајте COinS на Википедији. Ако се дода HTML или друго означавање, онда се шаблон мора поново оценити.}} | {{#if: |{{{imageright}}} |{{#if: | {{#if:| }}{{#if:| }}{{#if:| }}{{#if:| }}{{#if:| }}Пречиц{{#if:|е|а}}: }} }}
|
| Ovaj šablon pokreće Lua: |
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 nuclides 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.
Arguments
|{{SAFESUBST:#if:p|p=}} |
The contents of the top line. |
| b=}} | The contents of the bottom line. |
| a=}} | a=}}r: right-aligned; |{{SAFESUBST:#if:a|a=}}c: center-aligned; default is left-aligned).
|
| w=}} | w=}}f: fixed-width (monospace), otherwise template inherits the current font and context by default). |
| lh=}} | The line height or distance from top to bottom (including top character). Default is 1.2em. |
Note on fractions
Usually, when using vulgar fractions it is MOS habit to use ⁄ ⁄ (MOS:FRAC) and {{frac}}.
However, in <sub> or <sup> tags, best use the keyboard slash / for readability in most browsers:
- X1⁄2
7⁄8 (fraction slash)
N
and
- X1/2
7/8 (keyboard slash)
Д
Examples
- Simple
X{{su2|p=a}}X{{su2|b=b}}X{{su2|p=a|b=b}}X- Xa
X
bXa
bX
- Left-aligned (default)
X{{su2|p=aaaaa|b=b}}X{{su2|p=a|b=bbbbb}}X- Xaaaaa
bXa
bbbbbX
- Right-aligned
X{{su2|a=r|p=aaaaa|b=b}}X{{su2|a=r|p=a|b=bbbbb}}X- Xaaaaa
bXa
bbbbbX
- Center-aligned
X{{su2|a=c|p=aaaaa|b=b}}X{{su2|a=c|p=a|b=bbbbb}}X- Xaaaaa
bXa
bbbbbX
- Smaller font
{{small|X{{su2|p=a}}X{{su|b=b}}X{{su2|p=a|b=b}}X}}- Xa
X
bXa
bX{{SAFESUBST:#if:Xa
X
bXa
bX||}}
- Larger font
{{big|X{{su2|p=a}}X{{su2|b=b}}X{{su2|p=a|b=b}}X}}- Xa
X
bXa
bX
- Fixed-width
X{{su2|p=...|b=www}}X{{su2|w=f|p=...|b=www}}X- X...
wwwX...
wwwX
- Close-spacing
{{su2|p=4|b=4}} {{su2|lh=0.8em|p=4|b=4}}- 4
4 4
4
Line breaks
Unlike <sup> and <sub> tags, this template does not prevent line breaks between the two small lines and the preceding text. Thus, if this template is used to supply a subscript and superscript over a base symbol, the whole structure has to be enclosed in a {{nowrap}}, or this template should be invoked through another template that takes care of the wrapping in an appropriate way.
Example: {{nowrap|X{{su2|p=a|b=b}}}} → Xa
b
See also
Superscript and subscript-related templates | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{#if:{{sup}} and related templates|{{#if:Combined super/subscripts|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}{{#if:|}}}}{{#if:
| ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| su.
}} | textp=superscript b=subscript{{#iferror:{{#expr:4}} |{{#switch:4
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}p=superscript | |
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| sup sub
}} | textsup sub{{#iferror:{{#expr:4}} |{{#switch:4
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}sup | |
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| ±
}} | 1.23{{#if:4
|{{#if:2
|+4
}} | |
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| overunderset
}} / {{#if: | [[Template:{{{2}}}|{{{2}}}]]
| underoverset
}} | superscripttextsubscript |
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| su.
}} | textp=superscript b=subscript{{#iferror:{{#expr:4}} |{{#switch:4
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}p=superscript | |
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| sup sub
}} | textsup sub{{#iferror:{{#expr:4}} |{{#switch:4
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}sup | |
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| ±
}} | 1.23{{#if:4
|{{#if:2
|+4
}} | |
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| overunderset
}} / {{#if: | [[Template:{{{2}}}|{{{2}}}]]
| underoverset
}} | superscripttextsubscript |
{{{col3}}}
{{{col4}}}
{{{col5}}}
{{{col6}}}
{{{col7}}}
{{{col8}}}
{{{col9}}}
{{{col10}}}
{{{col11}}}
{{{col12}}}
{{{col13}}}
{{{col14}}}
{{{col15}}}
{{{col16}}}
{{{col17}}}
{{{col18}}}
{{{col19}}}
{{{col20}}}
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| sup
}} | textsuperscript{{#iferror:{{#expr:4}}
|{{#switch:4
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}superscripttext | |
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| smallsup
}} | ({{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| ssup
}}) | textsmall superscript{{#iferror:{{#expr:4}}
|{{#switch:4
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}small superscripttext |
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| i sup
}} | ({{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| isup
}} · {{#if: | [[Template:{{{2}}}|{{{2}}}]]
| padlsup
}}) | text{{#if: |{{{2}}} |superscript}}{{#iferror:{{#expr:2}}
|{{#switch:2
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}({{safesubst:#if:rather than: |rather than: |90% }} textsuperscript) |
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| i smallsup
}} | ({{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| issup
}} · {{#if: | [[Template:{{{2}}}|{{{2}}}]]
| padlssup
}}) | text{{#if: |{{{2}}} |small superscript}}{{#iferror:{{#expr:2}}
|{{#switch:2
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}({{safesubst:#if:rather than: |rather than: |90% }} textsmall superscript) |
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| sub
}} | textsubscript{{#iferror:{{#expr:4}}
|{{#switch:4
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}subscripttext | |
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| smallsub
}} | ({{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| ssub
}}) | textsmall subscript{{#iferror:{{#expr:4}}
|{{#switch:4
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}small subscripttext |
{{#if:
| [[Template:{{{2}}}|{{{2}}}]]
| subsub
}} | textdouble-subscripted{{#iferror:{{#expr:4}}
|{{#switch:4
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}double-subscriptedtext |
Math templates | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{#if:
|
}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:Conversions
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:Notation
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
|
}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#if:
| |}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{{#ifeq:Su2|sandbox | | }}
Уредници могу да експериментишу на подстраницама песак (направи | дуплирај) и тест (направи) овог шаблона.
Категорије додајите на подстраницу /док. Подстранице овог шаблона.