Template:Sup/doc: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
 
Line 24: Line 24:
! Example case !! What you write !! What you see
! Example case !! What you write !! What you see
|-
|-
| No parameter || <code><nowiki>{{sup|This text is in superscript}}</nowiki></code> || {{sup|This text is in superscript}}
| Text || <code><nowiki>{{sup|This text is in superscript}}</nowiki></code> || {{sup|This text is in superscript}}
|-
|-
| Inline mathematics || <code><nowiki>3{{sup|2}}=9</nowiki></code> || 3{{sup|2}}=9
| Inline mathematics || <code><nowiki>3{{sup|2}}=9</nowiki></code> || 3{{sup|2}}=9

Latest revision as of 12:18, 7 December 2014

Edit-copy green.svg
This is a documentation subpage for Template:Sup.
It contains usage information, categories and other content that is not part of the original template page.

Usage

{{sup}} provides a quick way to define superscript text (e.g. normal text superscript text).

Parameters

The template has one unnamed required parameter.

Syntax

  • {{sup|custom text}}

Required parameters

  • 1: Custom text

Enter the text which you wish to be output as superscript.

Usage
  • {{sup|1}}

Examples

Correct use

Example case What you write What you see
Text {{sup|This text is in superscript}} This text is in superscript
Inline mathematics 3{{sup|2}}=9 32=9
Nested x{{sup|z{{sup|a}}}} xza

Incorrect use

Example case What you write What you see (error)
No parameter {{sup}} {{{1}}}

See also

  • {{sub}} - template used for defining subscript text.