29 LaTex

LaTeX is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation. The brilliant thing about Pressbooks is that it allows you to use LaTex within your book to make mathematical, scientific, and technical notation. 

In this chapter, you’ll learn:

  • Where you can generate LaTex code
  • How to take that code and use it in Pressbooks


 LaTex Code

LaTex rendered looks like this:

$latex 2text{H}_2text{O}(l) rightarrow 2text{H}_2(g) + text{O}_2(g) $

If you want to create mathematical, scientific, and technical notation and formulas, but do not know how to code LaTex, we recommend that you go to:


There you’ll find a WYSIWYG interface where you can build your notation and then generate the LaTex code to copy and paste into your chapters. As you’ll seen in the screenshot below, the LaTex is in the top pane, and how the actual notation will display in your chapter is in the bottom pane. HostMath offers an easy drag and drop interface where you can build your LaTex with ease.

Host Math

Putting LaTex in your Pressbook

If the code it generates does not automatically transfer itself into LaTex, you’ll need to add an opening tag and an end tag.

The opening tag is: $latex

The closing tag is: $

For example, I copied and pasted the code in the generator above, and it looks exactly the same. It doesn’t render into LaTex.


However, by adding “$latex” to beginning of the code, and a “$” the end of the code it now renders properly.


Turns into this:

$latex frac{-bpmsqrt{b^2-4ac}}{2a} $



Icon for the Creative Commons Attribution 4.0 International License

Pressbooks for EDU Guide by Book Oven Inc. (Pressbooks.com) is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book