A subscript refers to a number, figure, or symbol written below the line. When working with scientific documents, you should expect Subscripts at some point or the other.

In this tutorial, we shall discuss using LaTex features to write subscript texts in our documents.

How to Write and Display Subscripts In LaTeX

To write a subscript, you start by telling math to enter math mode. Use the [ to enter math mode.

However, if you do not need math mode, you can use ( formulae ). To write a subscript in LaTex, use the _{subscript value}

For example, consider the code below:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/07/echo/word-image-274.png" data-lazy- height="102" src="data:image/svg xml,” width=”690″>

You can also use $_${subscript value}

For example:

documentclass{article}

usepackage[utf8]{inputenc}

usepackage{amsmath}

begin{document}

The chemical formulae for water is H$_2$O

end{document}

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/07/echo/word-image-275.png" data-lazy- height="109" src="data:image/svg xml,” width=”645″>

Examples

Let us look at a few examples.

documentclass{article}

usepackage[utf8]{inputenc}

usepackage{amsmath}

begin{document}

The following equation shows the combustion of Heptane:

[C_{7}H_{16} O_{2} rightarrow CO_{2}(g) H_{2}O(g)]

end{document}

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/07/echo/word-image-276.png" data-lazy- height="144" src="data:image/svg xml,” width=”748″>

Here is another example:

documentclass{article}

usepackage[utf8]{inputenc}

usepackage{amsmath}

begin{document}

[

sqrt{

{frac{sum(x_{i} – mu)^2}{N}}

}

]

end{document}

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/07/echo/word-image-277.png" data-lazy- height="145" src="data:image/svg xml,” width=”609″>

And now for a simple example:

documentclass{article}

usepackage[utf8]{inputenc}

usepackage{amsmath}

begin{document}

[ sum_{i=1} ^ {infty ]

end{document}

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/07/echo/word-image-278.png" data-lazy- height="253" src="data:image/svg xml,” width=”489″>

Final example:

documentclass{article}

usepackage[utf8]{inputenc}

usepackage{amsmath}

begin{document}

The precipitation of Lead (II) Chloride

[ Pb(NO_{3})_{2}(aq) NaCl(aq) rightarrow NaNO_{3}(aq) PbCl_{2}(s) ]

end{document}

The code above displays the output below:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/07/echo/word-image-279.png" data-lazy- height="173" src="data:image/svg xml,” width=”798″>

Conclusion

In this tutorial, we discussed how to insert subscripts in LaTex documents.

Thank you for reading!

About the author

<img alt="" data-del="avatar" data-lazy-src="https://kirelos.com/wp-content/uploads/2021/07/echo/john-150×150.png60f5e5f5e8f74.jpg" height="112" src="data:image/svg xml,” width=”112″>

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