Template:Subsup/doc: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{dochead}}{{wikipedia}}
{{dochead}}{{wikipedia}}
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.
=== Usage ===
=== Usage ===
Pass in, as unnamed parameters, the expression followed by the subscript and then the superscript. If you only need a superscript or only a subscript, just use <code>&lt;sup&gt;</code> or <code>&lt;sub&gt;</code> tags.
Pass in, as three unnamed parameters, the expression followed by the subscript and then the superscript:
 
<pre>
{{subsup|expression|subscript|superscript}}
</pre>
 
If you only need a superscript or only a subscript, just use <code><<nowiki />sup></code> or <code><<nowiki />sub></code> tags.


For example:
For example:


<code>{<nowiki />{subsup|''x''|2|3}}</code>
<code><nowiki>{{subsup|''x''|2|3}}</nowiki></code>


gives
gives


{{{{ROOTPAGENAME}}|''x''|2|3}}
{{{{ROOTPAGENAME}}|''x''|2|3}}