Wikipedia:Manual of Style/Superscripts and subscripts
![]() | This guideline is a part of the English Wikipedia's Manual of Style. Editors should generally follow it, though exceptions may apply. Substantive edits to this page should reflect consensus. When in doubt, discuss first on this guideline's talk page. |
Manual of Style (MoS) |
---|
Superscripts and subscripts appears smaller than the normal line of type and is set slightly below or above it and have many uses. This part of the Manual of Style aims to achieve consistency in the use and formatting of superscripts and subscripts in Wikipedia articles.
Subscripts and superscripts should be wrapped in <sub>
and <sup>
tags, respectively, with no other formatting info. Do not use the Unicode subscripts and superscripts ² and ³, or XML/HTML character entity references (²
). Rather write <sup>2</sup>
and <sup>3</sup>
to produce the superscripts 2 and 3. The superscripted 2 and 3 are easier to read, especially on small displays, and ensure that exponents are properly aligned. Compare:
- wⁱx²y³z⁽ⁿ⁺⁶⁾ to
- wix2y3z(n + 6); (
w<sup>i</sup>x<sup>2</sup>y<sup>3</sup>z<sup>(n + 6)</sup>
)
- 1 + x + x² + x3 + x4 (
²
) to - 1 + x + x2 + x3 + x4 (
<sup>2</sup>
).)
Font sizes and such should be entrusted to be handled with stylesheets.
Dates and numbers
- Centuries and millennia are written using ordinal numbers, without superscripts and without Roman numerals: the second millennium, the 19th century, a 19th-century book (see also Wikipedia:Manual of Style#Numbers as figures or words).
- Non-base-10 notations in non-computer-related articles use subscript notation. For example: 1379, 2416, 2A912, A87D16 (use
<sub>
and</sub>
).
Music
- In figured bass, superscript and subscript may be combined, in math markup,
<math>C_6^4</math>
= , see Wikipedia:TeX markup or m:Help:Formula. - A superscript circle, or degree sign, which indicates a diminished chord, that may not display correctly for everyone, "°", can be produced by typing
°
,°
, or (on Windows PCs) Alt+0176. A superscript lower case "o" (<sup>o</sup>
) may be used instead. The slashed o, "ø", which may not display correctly for all readers, is produced by superscripting the character produced by typingø
orø
, or by keying Alt+0248. - For inversions and the degree sign superscript and subscript may be done thus:
vii<sup>o</sup>
,I<sub>6</sub>
. This looks like: viio, I6.
Unit symbols and abbreviations
- Squared and cubic metric-symbols are always expressed with a superscript exponent (5 km2, 2 cm3); squared imperial and US unit abbreviations may be rendered with sq, and cubic with cu (15 sq mi, 3 cu ft).
Science
- Descriptions of chemical compounds or isotopes.
Mathematics
- Exponentiation is indicated using a superscript.
Special care is needed with subscripted labels to distinguish the purpose of the subscript (as this is a common error): variables and constants in subscripts should be italic, while textual labels should be in normal text font (Roman, upright). For example:
- (correct—typeset from
<math> x_\text{this one} = y_\text{that one} \,\!</math>
),
and
- (correct—typeset from
<math>\sum_{i=1}^n { y_i^2 }\!</math>
),
but not
- (incorrect—typeset from
<math>r = x_{predicted} - x_{observed}</math>
).
Moreover, the TeX engine used on Wikipedia may format simple superscripts using <sup>...</sup>
depending on user preferences. Thus, instead of the image , many users see x2. Formulae formatted without using TeX should use the same syntax to maintain the same appearance.