Subscript and superscript

A subscript or superscript is a character (such as a number or letter) that is set slightly below or above the normal line of type, respectively.

The vertical distance that sub- or superscripted text is moved from the original baseline varies by typeface and by use.

Similarly, subscripts are also used frequently in mathematics to define different versions of the same variable: for example, in an equation x0 and xf might indicate the initial and final value of x, while vrocket and vobserver would stand for the velocities of a rocket and an observer.

The only common use of these subscripts is for the denominators of diagonal fractions[citation needed], like ½ or the signs for percent %, permille ‰, and basis point ‱.

Certain standard abbreviations are also composed as diagonal fractions, such as ℅ (care of), ℀ (account of), ℁ (addressed to the subject), or in Spanish ℆ (cada uno/una, "each one").

[5] In modern typefaces, these letters are usually smaller than other superscripts, and their baseline is slightly above the base font's midline, making them extend no higher than a typical ordinal indicator.

On handwritten documents and signs, a monetary amount may be written with the cents value superscripted, as in $8⁰⁰ or 8€⁵⁰.

The currency symbol itself may also be superscripted, as in $80 or 6¢.There is no ruling whether or not these characters need to be supercript, or made smaller than the numbers, or aligned to any of the various guide lines.

This led over time to an "abuse of notation" whereby superscripts indicate iterative function composition, including derivatives.

Another minor adjustment that is often omitted by renderers is the control of the direction of movement[clarification needed] for superscripts and subscripts, when they do not lie on the baseline.

Ideally this should allow for the font, e.g. italics are slanting; most renderers adjust the position only vertically and do not also shift it horizontally.

Professional typesetting programs such as QuarkXPress or Adobe InDesign also have similar features for automatically converting regular type to subscript or superscript.

These programs, however, may also offer native OpenType support for the special subscript and superscript glyphs included in many professional typeface packages (such as those shown in the image above).

In HTML and Wiki syntax, subscript text is produced by putting it inside the tags and .

In TeX's mathematics mode (as used in MediaWiki), subscripts are typeset with the underscore, while superscripts are made with the caret.

As in other systems, when using UTF-8 encoding, the masculine º and feminine ª ordinal indicators can be used as characters, with no need to use a command.

Owing to the popularity of using these characters to make fractions, most modern fonts render most or all of these as cap height superscripts and baseline subscripts.

Other than numbers, the set of super- and subscript letters and other symbols is incomplete and somewhat random, and many fonts do not contain them.

Several advanced features of OpenType typefaces are supported for professionally designed subscript and superscript glyphs.

Example of subscript and superscript. In each example the first "2" is professionally designed, and is included as part of the glyph set; the second "2" is a manual approximation using a small version of the standard "2". The visual weight of the first "2" matches the other characters better. (The top typeface is Adobe Garamond Pro; the size of the subscript is about 62% of the original characters, dropped below the baseline by about 16%. The second typeface is Myriad Pro; the superscript is about 60% of the original characters, raised by about 44% above the baseline.)
The four common locations of subscripts and superscripts. The typeface is Myriad Pro.