You are on page 1of 2

LATEX quick reference guide Text environments Text properties and symbols

Environments are contained within matching \begin{...} and Font transformation


Basic document template \end{...}. Command Effect
\begin{center} Centred text. \textbf{text} Bold
\begin{enumerate}Numbered list. \textit{text} Italic
\begin{itemize} Bulleted list. \underline{text} Underline
\documentclass{article} \item text Add a bulleted or numbered item. \textsc{text} Small Caps
\usepackage{amsmath} \item[x ] text Use x instead of normal bullet or number. \textsf{text} Sans serif
\usepackage{amssymb} \texttt{text} Typewriter
\usepackage{graphicx} Graphics
Font size
\author{A.N. Other} Using the graphicx package, include images in your document.
\title{Title of Document} Using pdflatex to process your document, you can include .jpg, Unless you want to apply the size to the whole document, use these
\date{1st January 2013} .png and .pdf files. within curly brackets. For example: {\large . . . }
\begin{document} \includegraphics{file} \tiny tiny \Large Large
\maketitle To add options, separate multiple options with commas:
\includegraphics[option1,option2,. . . ]{file}
\scriptsize scriptsize
\footnotesize footnotesize
\LARGE LARGE
\section{Title of a section}
\subsection*{Title of an unnumbered subsection} Options
\small small
\normalsize normalsize
\huge huge
Text goes here. Mathematics inline: $x^2+y^2=z^2$. scale=x
width=x cm
Sets scale factor of x
Sets width to x cm
\large
Symbols
large \Huge Huge
Displayed mathematics: height=x cm Sets height to x cm Symbols used by LATEX for other purposes can usually be inserted
\[ \sin^2\theta + \cos^2\theta = 1.\] angle=x Rotates image by x degrees anticlockwise by adding a backslash before.
page=x When including .pdf files, specifies which & \& \_ . . . \dots £ \pounds
Leave a blank line to start a new paragraph. page of the PDF to use. $ \$ ˆ \^{} ∼ $\sim$ \ \backslash
trim=lcm bcm r cm tcm Trims picture on the left, bottom, r ight % \% ˜ \~{} # \# § \S
\end{document} and top by specified amounts.
clip=true Required if using trim Accents
ò \‘o ó \’o ô \^o õ \~o ō \=o
Tables ȯ \.o ö \"o o̧ \c o ǒ \v o ő \H o
\begin{tabular}{cols} ç \c c o. \d o o \b o o
o \t oo œ \oe
Document structure Œ \OE æ \ae
¯
Æ \AE å \aa Å \AA
tabular column specification ø \o Ø \O l \l L \L ı \i
Packages  \j ¡ ~‘ ¿ ?‘
Include in the preamble (before \begin{document}) with l Left-justified column.
\usepackage{...}. c Centred column. Brackets
r Right-justified column. Curly brackets: \{...\} to produce {...}.
amsmath Provides maths commands, such as matrices. p{width} Fixed-width column for longer text.
amssymb Provides extra symbols, such as N, R, Z. Other brackets: type as normal text.
| Inserts a vertical line between columns.
graphicx Include images, using: \includegraphics{file}.
Quotation marks
tabular elements
Title, author, date Opening quotation mark achieved using the ‘backtick’ symbol
& Separator between columns (usually found on the top left corner of your keyboard).
These commands go before \begin{document}. \\ Starts a new row ‘ Opening quotation mark: ‘
\author{text} Author of document. \hline Horizontal line between rows. ’ Closing quotation mark: ’
\title{text} Title of document. ‘‘ Double opening mark: “
\date{text} Date. Example ’’ or " Double closing mark: ”
Use \maketitle at the top of the document (after
\begin{document}) to create the title. \begin{tabular}{|p{2cm}|r|c|} Hyphens and dashes
\hline
Fixed width&right-aligned&centred\\ Name Source Example Usage
Document structure \hline hyphen - open-source Hyphenated words.
cell 1&cell 2&cell 3.\\ en-dash -- pages 6–8 For ranges of numbers.
\section{title}
\hline em-dash --- Yes—or no? Punctuation.
\subsection{title}
\subsubsection{title} \end{tabular} Line and page breaks
\paragraph{title}
\\ Begins new line without creating new paragraph.
Use a *, as in \section*{title}, to create unnumbered sections, Fixed width right-aligned centred \pagebreak Inserts a page break.
subsections, and so on. cell 1 cell 2 cell 3. \noindent Do not indent line (e.g. first line of a paragraph).
Mathematics Greek letters \left[\left\{ hn a E
Inline mathematics α \alpha β \beta γ \gamma δ \delta \frac{a}{b}
b
Contain within dollar signs $...$  \epsilon ζ \zeta η \eta ε \varepsilon \right.\right\rangle
Use inline maths for shorter expressions or single symbols which do θ \theta ϑ \vartheta ι \iota κ \kappa
not take up much room. λ \lambda µ \mu ν \nu ξ \xi Matrices
π \pi ρ \rho σ \sigma τ \tau \begin{pmatrix} Matrix with (. . . ) brackets
Displayed mathematics and alignment υ \upsilon φ \phi χ \chi ψ \psi \begin{bmatrix} Matrix with [. . . ] brackets
For longer expressions and equations, needing one or more lines. ω \omega Γ \Gamma ∆ \Delta Θ \Theta \begin{vmatrix} Matrix with |. . . | brackets
\[...\] Single line, unnumbered Λ \Lambda Ξ \Xi Π \Pi Σ \Sigma & Separator between columns
\begin{equation} Single line, numbered Υ \Upsilon Φ \Phi Ψ \Psi Ω \Omega \\ Starts a new row
\begin{align*} Aligned equations, unnumbered
\begin{align} Aligned equations, numbered Maths decorations and structures Example
& Specifies the alignment point in align and √
abc \sqrt{abc} \begin{pmatrix}
align*. √
n a & b & c \\
 
abc \sqrt[n]{abc} a b c
\\ Starts a new line in align and align*. d & e & f \\ d e f
\nonumber Current line in align is not numbered. abc
\frac{abc}{xyz} g & h & i g h i
xyz \end{pmatrix}
Common mathematics commands
ȧ \dot{a}
All commands to be used within maths mode. ä \ddot{a}
xy x^y xy x_y Further reading
≤ \le ≥ \ge â \hat{a}
6 = \neq ≈ \approx ā \bar{a} • The Not So Short Introduction to LATEX2, written by Tobias
∝ ∼ ã \tilde{a} Oetiker.
\propto = \cong
≡ \equiv (mod n) \pmod{n} abc
c \widehat{abc} http://tobi.oetiker.ch/lshort/lshort.pdf
× \times ÷ \div abc
f \widetilde{abc} This is an excellent in-depth introduction to LATEX. You can
←− download it for free.
± \pm · \cdot abc \overleftarrow{abc}
⊕ \oplus \ominus −→ • The LATEX wikibook.
abc \overrightarrow{abc}
⊗ \otimes ◦ \circ abc \overline{abc} http://en.wikibooks.org/wiki/LaTeX
0 \prime | \mid z}|{ This is a useful free online reference, which also contains
sin \sin cos \cos abc \overbrace{abc} several ‘sample’ LATEX files for you to copy and modify.
tan \tan lim \lim abc \underbrace{abc}
|{z} • The LATEX companion, written by Frank Mittelbach and
ln \ln log \log
abc \underline{abc} Michel Goossens. 2nd edition, published by Addison Wesley
exp \exp det \det
in 2004, ISBN-10: 0201362996.
max \max min \min Maths fonts
n n This book (available to purchase online) is an encyclopedia
for LATEX, with almost 1,000 pages.
X Y
\sum_{k=1}^n \prod_{k=1}^n mathbb and mathfrak require the amssymb package to be included.
k=1 k=1 mathcal and mathbb only provide uppercase letters. • Further information, including links to more books about
Z 1
ABCdef ABCdef . . . Default (italic) LATEX, can be obtained from the ‘LATEX project’ website:
\int_0^1
0 \mathrm{ABCdef} ABCdef . . . Upright (non-italic) http://www.latex-project.org/
··· \cdots ... \ldots \mathbf{ABCdef} ABCdef . . . Bold-face
.. .. \mathcal{ABCDEF} ABCDEF . . . Calligraphic font
. \vdots . \ddots \mathbb{ABCDEF} ABCDEF . . . Blackboard bold
→ \rightarrow ← \leftarrow \mathfrak{ABCdef} ABCdef . . . ‘Fraktur’ gothic font.
⇒ \Rightarrow ⇐ \Leftarrow
⇔ \Leftrightarrow Brackets
∞ \infty ∅ \emptyset
(...) (...)
∈ \in ∈
/ \notin
[...] [...]
∀ \forall ∃ \exists
|...| |...|
∪ \cup ∩ \cap
\{...\} {...}
¬ \neg
\langle...\rangle h...i
∧ \wedge ∨ \vee
⊃ \supset ⊂ \subset For scalable brackets, use \left and \right. Use ‘\right.’ to create
⊇ \supseteq ⊆ \subseteq an empty bracket to match a \left bracket. Example: 2013
c The Open University

You might also like