# 52 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?

# Fractions

$\frac{1}{2}$

$4\frac{1}{2}$

# Long Division

$4\enclose{longdiv}{8}$

$\begin{array}{r}5\\3 \enclose{longdiv}{15} \end{array}$

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

`\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

$\begin{array}{rr}&73\\\times&12\\\hline\end{array}$

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

$\begin{array}{rr}&84\\\times&12\\\hline&168\\+&840\\\hline&1008\end{array}$ 