The latest update to iWork Pages includes the functionality to include math symbols and operations in a document. To insert math symbols and operations we need to use the LaTeX typesetting markup language. The word LaTeX is pronounced LAH-tek or LAY-tek. This system is used to write documents in plain text format and is often used to format regular text with bold, italics, or justification. This formatting is done with a special set of instructions. The LaTeX code used to generate math symbols and equations is just a small part of what LaTeX does.

We need to learn how to use some simple commands to format math text. There isn’t a set of menu options to help with the instructions like a typical word processor. It brings back memories of the days when we typed all the commands on a computer using a command prompt. It might seem like coding or programming but it’s not. The codes we use change the formatting of text in a document. It is similar to HTML and CSS. In this case, it changes the formatting of letters and numbers to produce math symbols and formulas. The code isn't hard and we can do a great deal with just a few instructions.

In this lesson, we will learn a handful of instructions that can be used to produce basic equations and math problems. We can create more advanced mathematical text with LaTeX but that is beyond the scope of this blog post.

Open Pages and create a new document. Click on the Insert menu option.

Select the Equation option.

An equation box will open where we can type the markup right within the box. The equation text box also supports the MathML typesetting format. We will not cover this markup language in the lesson.

We will begin with something simple. Type 3 + 5 = into the equation box. A preview of our equation will appear in the preview area below.

That was easy. Let’s try something a little more practical, like fractions. Erase the operation we just typed and type “\frac{3}{4}”. Don’t include the quotation marks. These symbols instructed the equation editor to format the fraction three-fourths. The \frac markup instruction is used to instruct the equation editor to generate a fraction with the following numbers. The numbers used in the fraction are surrounded by {} braces. The first number in braces is the numerator and the second is the denominator. Did you think it was going to be harder than that?

Type a space in the equation editor followed by the plus symbol(+). Press the space bar again and type “3\frac{2}{4}”. The equation is now formatted to add a regular fraction to a mixed fraction. Finish the equation by typing the equal sign. When I typed the equal sign this time I didn’t press the space bar. LaTeX placed a space between the mixed fraction and the equal sign. LaTeX will usually take care of the spacing for us if we forget or if we enter too many spaces.

LaTeX ignores unnecessary spaces and formats the math expressions accordingly. In this example, LaTeX ignores the additional spaces added between operators and numbers.

Click the Insert button to insert the equation into the document.

The math equation is inserted at the insertion point and flows through the document like regular text. This is called inline text. The text can be left, right, or center justified. The font can be increased or decreased in size but the font cannot be changed. The equation is more like an image in the document. The equation is placed as inline text and cannot be formatted to float like images. This means we cannot format the equation so text flows around, above or below.

Press the return key to start a new line. Click Insert in the menu and select the equation option. Type the following equation into the editor “\frac{1}{2}*\frac{3}{4}”. Remember, don’t include the quotation marks. Click the Insert button.

The asterisk is usually used to denote a multiplication symbol in applications like spreadsheets but it looks awkward when it shows up as an actual asterisk in this example. The asterisk is not used to denote multiplication in LaTeX. Double click on the equation to open the equation editor. By the way, this is how we edit an equation after inserting it into the document.

Multiplications are sometimes represented by a dot. To use the multiplication dot, erase the asterisk and type “\cdot”.

Click the update button.

The multiplication dot is now part of the updated equation.

Sometimes we would rather use the traditional multiplication symbol(x). Double click the equation to open it in edit mode. Replace “\cdot” with “\times”. Click the Update button to update the equation.

Press the return key and insert a new equation. Enter this equation, "3\frac{2}{3}\div 4\frac{1}{2}".

In this example, we divide one mixed fraction by another. The division symbol is generated by typing “\div”. Notice that the instructions follow a traditional sentence. Three and two-thirds divided by four and one-half.

Algebraic equations can be created using the equation editor. Create a new equation and type "3x+7=35”. Insert the equation into the document. The editor formats the variables slightly differently. Look at the letter ‘x’ in the equation. This helps distinguish the letter ‘x’ from the multiplication symbol.

We can add exponents to our equation by using the caret symbol. The symbol is associated with the number 6 on QWERTY keyboards. Create a new equation and type "3x^2+=34”. Insert the equation into the document.

Square roots are generated by typing \sqrt followed by the number or operation within braces {}. Create a new equation and type "\sqrt{4}+\sqrt {2\cdot 8}”.

The cube root or nth root can be generated in a similar way but we need to place the nth root number or variable within brackets. For example, \sqrt[3]{8} will generate the cube root of eight.

In one of our first examples, we generated fractions. Fractions can be placed within parenthesis but they look awkward. They don't match the height of the fraction.

To adjust the height of the parenthesis we place a \left before the first parenthesis and a \right before the closing right parenthesis. This instructs the LaTeX language that the contents of the equation need to be enclosed in proportional parenthesis.

We can combine everything learned in the previous steps to generate a variety of operations and equations. Try this equation.

\sqrt [4] \frac {left (\frac {2}{3} \cdot 3\frac{3}{4} \right) ^3} {\left (\frac {2} {3} \div 3\frac {2}{3} \div 3 \frac{3} {4} \right)^2}

This entire equation was created with just a handful of instructions we just learned.

This is an introduction to what is possible using LaTeX for math equations. There are hundreds of codes for the various math symbols used and they can be found on the Internet on the LaTex official site https://latex-project.org.