Superscripted and subscripted letters

rendition superscript subscript
sup sub rend

Use of the sub and sup keywords to encode subscription and superscription of letters

The sup and sub keywords are used to indicate superscripted or subscripted letters. Technically they are designed to take a value which is a measurement (in points or some other unit) of the distance above the baseline, but the WWP does not recommend using this feature; it proposes a level of precision that is far beyond the likely capacity or need of most encoding projects. The value should remain blank, indicating simply that the letter(s) in question are superscripted. See example 1.

In cases where sub- or superscripted characters are encoded as part of the markup (for instance, as footnote numbering, where the character is encoded as part of the rend attribute on note), the sub and sup keywords cannot be used, since it is not possible to embed markup within markup. In these cases, you can use an entity reference which signifies the appropriate character, as in example 2. This approach could also be used for superscription and subscription generally. The necessary entity references for the basic alphabetic and numeric characters are included in the WWP DTD that accompanies this guide.

Superscripted letters, as they are typically used in modern texts, need to be distinguished from a class of characters which appears in very old texts whose typography attempts to imitate manscript conventions. This class of characters includes composite characters, often consisting of a letter with a small letter or letters attached to it. These may be directly over the main letter, or they may be in the position of a conventional modern superscript. The encoding of these letters is discussed in the entry on Special characters: Brevigraphs and diacritical marks.

Examples

Example 1.

M<hi rend="sup()">rs</hi>Phillips

Example 2.

<note rend="pre(&sup-2;)"><p>The common or garden yarrow.</p></note>