MATH 416: LaTeX Notes

What are some key commands for getting started with mathematical word processing in LaTeX? In this document, we provide an alphabetical list of fundamental topics for reference. To supplement this introduction, enter questions into a web browser, for example "How do you create larger parentheses in LaTeX?"

You can also visit the ShareLaTeX site. The left column has many useful links, especially under "Mathematics."


Bold Face

To put text in bold face, use
{\bf This is important.}

Braces

See "Grouping Symbols."

Brackets

See "Grouping Symbols."

Double Spacing

For double spacing, add the following lines after the declaration of the documentclass:
\usepackage{setspace}
\doublespacing

Equations

For equations that are within a paragraph, enclose the equation in dollar signs. For example,
$ u(x, y) = xy $.
For equations that are on their own lines, enclose the equation in double dollar signs or \[ and \]. For example,
$$ u(x, y) = xy $$

or

\[ u(x, y) = xy. \]

For automatically numbered equations that are on their own lines, enclose the equation in \begin{equation} and \end{equation}. For example,

\begin{equation}
u(x, y) = xy.
\end{equation}
For equations that are on their own lines but are not numbered, you can also use \nonumber as follows:
\begin{equation}
u(x, y) = xy. \nonumber
\end{equation}
For equations that are larger within a paragraph, use \displaystyle. For example,
${\displaystyle \frac{1}{2x}}$.

Exponentiation

To exponentiate, use the caret symbol. If the expression in the exponent is more than a single variable, enclose the exponent in curly braces. Consider

x^2
or
e^{ \sqrt{\frac{q}{c}} }.

Expressions

See "Equations."

Font Size

Your document can use a twelve-point font size with the declaration:
\documentclass[12pt]{article}

Fractions

Use \frac with the numerator and denominator in curly braces. For example,

\frac{1}{2}.

Greek Letters

For Greek letters, use a backslash and the correct spelling of the Greek letter. Start the name of the letter with a capital if you want a capital Greek letter, for example

\delta
or
\Delta.

Grouping Symbols

Use the standard keyboard keys for parentheses and square brackets. For curly braces, use hit the backslash before the keyboard key, as \{ or \}. Grouping symbols can be made larger as needed by preceeding them with backslash and "left" or "right", as in

\frac{d}{dx}\left( c \frac{du}{dx} \right).

Italics

To emphasize text in italics, use
{\em This is important.}

Parentheses

See "Grouping Symbols."

Partial Derivatives

For the "partial" symbol, use \partial. For example,

\partial x
or
\frac{\partial u}{\partial x}.

Quotation Marks

The keyboard key for quotation marks gives closing quotation marks in LaTeX. To open the quotes, hit the backquote key twice, as in

``Equilibrium" means unchanging in time.

Skipping a line

To skip a line, use \\.

Square Root

For the "square-root" symbol, use \sqrt, and enclose the expression in curly braces that goes under the radical. For example,

\sqrt{x}.

Subscripts

To create a subscript, use the underscore key. If the expression in the subscript is more than a single variable, enclose the subscript in curly braces. Consider

u_h
or
u_{homog}.

Superscripts

See Exponentiation.

Systems of Equations

For systems of equations, use an array of equations, and align the portions that are in ampersands (&). For example,
\begin{eqnarray}
u(x, y) & = & xy, \\
v(x, y) & = & x + y.
\end{eqnarray}