latex

How to Create Superscripts in LaTeX

Superscripts are letters, numbers, and characters written or printed above the standard line.

Whether it’s writing equations, indices, or other use cases, superscripts use becomes nearly impossible to avoid when working with scientific and technical documents.

In this quick guide, we shall discuss how to create superscripts in your LaTeX documents.

Basic Usage: How to Create a Superscript in LaTeX

To create a superscript in LaTeX, we use the ^ operator. This operator adds the following value(s) as the superscript.

For example:

\begin{equation*}

E = mc^2

\end{equation*}

In the above entries, use the amsmath package in your document preamble to avoid errors.

The result is:

The code below shows another example:

\begin{equation*}

H(s) = \int^\infty_0e^-st_h(t)dt

\end{equation*}

Here is the result of the code:

To combine multiple values as a subscript, you can use the ^{values} syntax. For example:

\begin{equation*}

(a^2)^{x+y} = {a^{i_y}}

\end{equation*}

The resulting equation is:

Conclusion

In this quick tutorial, we covered how to create superscripts in LaTeX documents. To learn more, check out how to create subscripts in LaTeX.

About the author

John Otieno

My name is John and am a fellow geek like you. I am passionate about all things computers from Hardware, Operating systems to Programming. My dream is to share my knowledge with the world and help out fellow geeks. Follow my content by subscribing to LinuxHint mailing list