Template:Subsup: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{#ifeq: {{{1|}}}{{{2|}}}{{{3|}}}||<!-- no output if no parameters -->|{{nowrap|{{#ifeq: {{{1|}}}||<!-- do nothing -->|{{{1}}}{{#ifeq: {{{s|}}}|0|<!-- no spacing -->|{{nbhsp}}}}}}{{#ifeq: {{{2|}}}{{{3|}}}||<!-- do nothing if neither parameter -->|<span style{{=}}"font-size: 70%;">{{#ifeq: {{{3|}}}||<!-- subscript --><span style{{=}}"vertical-align: -0.4em;">{{{2}}}</span>|{{#ifeq: {{{2|}}}||<!-- superscript --><span style{{=}}"vertical-align: 0.7em;">{{{3}}}</span>|<!-- superscript and subscript --><span style{{=}}"display: inline-block; vertical-align: -0.4em; line-height: 1.1em;">{{{3}}}<br />{{{2}}}</span>}}<!-- end subscript and superscript -->}}<span style{{=}}"font-size: 40%;">&nbsp;</span></span><!-- end font-size italic -->}}}}}}</includeonly><noinclude>
<includeonly>{{#ifeq: {{{1|}}}{{{2|}}}{{{3|}}}||<!-- no output if no parameters -->|{{nowrap|{{#ifeq: {{{1|}}}||<!-- do nothing -->|{{{1}}}{{#ifeq: {{{s|}}}|0|<!-- no spacing -->|<span style{{=}}"font-size: 40%;">&nbsp;</span>}}}}{{#ifeq: {{{2|}}}{{{3|}}}||<!-- do nothing if neither parameter -->|<span style{{=}}"font-size: 70%;">{{#ifeq: {{{3|}}}||<!-- subscript --><span style{{=}}"vertical-align: -0.4em;">{{{2}}}</span>|{{#ifeq: {{{2|}}}||<!-- superscript --><span style{{=}}"vertical-align: 0.7em;">{{{3}}}</span>|<!-- superscript and subscript --><span style{{=}}"display: inline-block; vertical-align: -0.4em; line-height: 1.1em;">{{{3}}}<br />{{{2}}}</span>}}<!-- end subscript and superscript -->}}<span style{{=}}"font-size: 40%;">&nbsp;</span></span><!-- end font-size italic -->}}}}}}</includeonly><noinclude>
This template provides a simple means of coding inline expressions that have both a subscript and a superscript, for display in the same typeface as the surrounding text.
 
{{documentation}}
{{documentation}}


[[Category:Formatting templates]]
[[Category:Formatting templates]]
</noinclude>
</noinclude>