The Not So Short Introduction to LaTeX 2

\documentclass{article}

\begin{document}

Small is beautiful.

\end{document}

latex foo.tex

dvipdf foo.dvi

break a line: \\ or \newline

start a new line without starting a new paragraph \\*

\newpage

\linebreak[n], \nolinebreak[n], \pagebreak[n], \nopagebreak[n]

For the article class:

\section{}

\subsection{}

\subsubsection{}

\paragraph{}

\subparagraph{}

\part{}

\chapter{}

\tableofcontents{}

\footnote{footnote text}

If you want to typeset (advanced) mathematics, you should use AMS-LATEX. The AMS-LATEX bundle is a collection of packages and classes for mathematical typesetting. AMS-LATEX is produced by *The American Mathematical Society* and it is used extensively for mathematical typesetting. LATEX itself does provide some basic features and environments for mathematics, but they are limited and in some cases inconsistent.

AMS-LATEX is a part of the required distribution and is provided with all recent LATEX distributions. We assume amsmath is loaded in the preamble; \usepackage{amsmath}.

A mathematical formula can be typeset in-line within a paragraph (text style), or the paragraph can be broken and the formula typeset separately (display style). Mathematical equations within a paragraph are entered between $ and $.

\(a^2 + b^2 = c^2\)

\(\lim_{x \to 2} f(x) = 5\)

\(\lim_{n \to \infty} \sum_{k=1}^n \frac{1}{k^2} = \frac{\pi^2}{6}\)

If you want to name the equation something specific, you \tag it instead.

3.2.1 Math Mode

There are also differences between math mode and text mode. For example, in math mode:

- Most spaces and line breaks to not have any significance, as all spaces are either derived logically from the mathematical expressions, or have to be specified with special commands such as \, \quad or \qquad
- Empty lines are not allowed. Only one paragraph per formula.
- Each letter is considered to be the name of a variable and will be typeset as such.

\(\forall x \in \mathbf{R}: \qquad x^{2} \geq 0\)

\(x^{2} \geq 0\qquad \text{for all }x\in\mathbf{R}\)

Most of the commands in this section will not require amsmath, but load it anyways.

Lowercase Greek Letters are entered as \alpha, \beta, \gamma, and uppercase letters are entered as \Gamma, \Delta, ...

\(\lambda, \xi, \pi, \theta, \mu, \Phi, \Omega, \Delta\)

Exponents, Superscripts, and Subscripts can be specified using the ^ and _ characters. Most math mode commands act only on the next character, so if you want a command to affect several characters, you have to group them together using curly braces: {...}.

\(p^3_{ij}\)

\(m_\text{Knuth}\)

\(\sum_{k=1}^3 k\)

\(a^x+y \neq a^{x+y}\)

\(e^{x^2}\)

\({e^x}^2\)

The square root is entered as \sqrt; the nth root is generated with \sqrt[n]. The size of the root sign is determined automatically by LaTeX.

\(\sqrt{x} \Leftrightarrow x^{1/2}\)

\(\sqrt[3]{2}\)

\(\sqrt{x^{2} + \sqrt{y}}\)

\(\surd[x^2 + y^2]\)

The dot sign to indicate the multiplication operation is normally left out, it is sometimes written tho help the eye in grouping a formula. Use \cdot to typeset a single centered dot. \cdots is three centered dots while \ldots sets the dots low (on the baseline). Besides that, there are \vdots for vertical and \ddots for diagonal dots.

\(\Psi = v_1 \cdot v_2 \cdot \ldots\)

\(n! = 1 \cdot 2 \cdots (n-1) \cdot n\)

The commands \overline and \underline create horizontal lines directly over or under an

## Share on Social Media