Subscript and Superscript

On this page, you’ll learn:

  • How to mark up a subscript character or word with AsciiDoc.

  • How to mark up a superscript character or word with AsciiDoc.

Subscript syntax

Text is subscripted when enclosed in a set of tildes (~).

Example 1. Subscript
The chemical formula for water is H~2~O.
Result

The chemical formula for water is H2O.

Superscript syntax

Text is superscripted when enclosed in a set of carets (^).

Example 2. Superscript
What is the answer to E=mc^2^?
Result

What is the answer to E=mc2?