LaTeX Questions Answered

56 LaTeX Equation Templates

The following are templates of different types of equations that can be copied. To access the LaTeX code, right click on the equation, select “Show Math As” and then select “TeX Commands.” A pop-up window will display with the LaTeX code. Copy that into your book in Pressbooks and customize as needed.

Many of these equations use multiple rows. To add or remove rows, you will need to understand how LaTeX arrays work. For more information, see How do I create an array using LaTeX?




Long Division


[latex]\begin{array}{r}5\\3 \enclose{longdiv}{15} \end{array}[/latex]

[latex]\begin{array}{r}42\\7 \enclose{longdiv}{294}\\-28\hspace{0.35cm}\\\hline14\\-14\\\hline0\end{array}[/latex]

\hspace{0.35cm} can be used to shift numbers so they line up where you want them to be vertically. Change the value to increase or decrease the space until a number is lined up where you want.

Stacked Equations


Replace the × (\times) operator in the above equation to make a subtraction (-) or addition (+) equation.




Icon for the Creative Commons Attribution 4.0 International License

Pressbooks Guide Copyright © 2016-2022 by OER Production Team is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book