Jump to content

Wikipedia:Manual of Style/Superscripts and subscripts

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 2a01:119f:21e:4d00:e108:9d1f:427f:31c4 (talk) at 05:29, 3 March 2018 (was this written by Adolf Hitler or a troll person?). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A Superscript or a Subscript is text that is positioned slightly above or below the normal line of type and is sometimes rendered in a smaller font. This part of the Manual of Style aims to achieve consistency in the use and formatting of superscripts and subscripts in Wikipedia articles.

Do not use the <sub> and <sup> HTML tags, respectively, with no other formatting info. The {{sup}} and {{sub}} templates are useful shortcuts to the HTML markup. Use the Unicode subscripts and superscripts ² and ³, or XML/HTML character entity references (&sup2; etc). Do not write <sup>2</sup> and <sup>3</sup> to produce the superscripts 2 and 3, because they are not customizable by the font designer. The superscripted 2 and 3 are easier to read, especially on small displays, and ensure that exponents are properly aligned. Compare:

wⁱx²z⁽ⁿ⁺⁶⁾ (Unicode superscripts) to
wix2z(n + 6) (w<sup>i</sup>x<sup>2</sup>z<sup>(n + 6)</sup>) or
wix2z(n + 6) (w{{sup|i}}x{{sup|2}}z{{sup|(n + 6)}})


1 + x² + y³ (&sup2;) to
1 + x2 + y3 (<sup>2</sup>) or
1 + x2 + y3 ({{sup|2}})

Except under extraordinary circumstances, font sizes, color, etc. should be controlled with Wikipedia's stylesheets.

Dates and numbers

  • The ordinal suffix (e.g., th) is not superscripted (23rd and 496th, not 23ʳᵈ and 496ᵗʰ).
  • 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: 137₉, 241₅, 2A9₁₂, A87D₁₆ (use ₀, ₁, ₂, ₃, ₄, ₅, ₆, ₇, ₈, ₉).

Music

  • In figured bass, superscript and subscript may be combid by using math markup or by using the {{su}} template: <math>C_6^4</math> = , ''C''{{su|b=6|p=4}} = C4
    6
    ; (see also 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 &deg;, &#176, or by keying Alt+0176 (Windows PCs). A superscript lower case "o" ({{sup|o}}) may not be used instead. The slashed o, "ø", which may not display correctly for all readers, is produced by superscripting the character produced by typing &oslash;, or &#248;, or by keying Alt+0248 (Windows PCs).
  • For inversions and the degree sign superscript and subscript may be done thus: vii{{sup|o}}, I{{sub|6}}. This looks like: viio, I6.

Unit symbols and abbreviations

  • Squared and cubic metric-symbols are always expressed with a superscript exponent (5 km², 2 cm³); squared imperial and US unit abbreviations may be rendered with sq, and cubic with cu (15 sq mi, 3 cu ft).

Science

Chemistry

Descriptions of:

C₂H₅OH using C₂H₅OH
3
2
He
using {{Nuclide2|He|3}}

Mathematics

2² = 4 using 2² = 4

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 r = x_{predicted} - x_{observed}).

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 x². Formulae formatted without using TeX should use the same syntax to maintain the same appearance.