Latex Primer | Continuous Function | Typefaces

Getting Started with L

A
T
E
X
David R. Wilkins
2nd Edition
Copyright c ( David R. Wilkins 1995
Contents
1 Introduction to L
A
T
E
X 2
1.1 What is L
A
T
E
X? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 A Typical L
A
T
E
X Input File . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Characters and Control Sequences . . . . . . . . . . . . . . . . . . . . . 4
2 Producing Simple Documents using L
A
T
E
X 5
2.1 Producing a L
A
T
E
X Input File . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Producing Ordinary Text using L
A
T
E
X . . . . . . . . . . . . . . . . . . . 6
2.3 Blank Spaces and Carriage Returns in the Input File . . . . . . . . . . 8
2.4 Quotation Marks and Dashes . . . . . . . . . . . . . . . . . . . . . . . 9
2.5 Section Headings in L
A
T
E
X . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.6 Changing Fonts in Text Mode . . . . . . . . . . . . . . . . . . . . . . . 11
2.7 Accents used in Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.8 Active Characters and Special Symbols in Text . . . . . . . . . . . . . 14
3 Producing Mathematical Formulae using L
A
T
E
X 15
3.1 Mathematics Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2 Characters in Mathematics Mode . . . . . . . . . . . . . . . . . . . . . 17
3.3 Superscripts and Subscripts . . . . . . . . . . . . . . . . . . . . . . . . 17
3.4 Greek Letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.5 Mathematical Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.6 Changing Fonts in Mathematics Mode . . . . . . . . . . . . . . . . . . 22
3.7 Standard Functions (sin, cos etc.) . . . . . . . . . . . . . . . . . . . . . 23
3.8 Text Embedded in Displayed Equations . . . . . . . . . . . . . . . . . . 24
3.9 Fractions and Roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.10 Ellipsis (i.e., ‘three dots’) . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.11 Accents in Mathematics Mode . . . . . . . . . . . . . . . . . . . . . . . 26
1
3.12 Brackets and Norms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.13 Multiline Formulae in L
A
T
E
X . . . . . . . . . . . . . . . . . . . . . . . . 28
3.14 Matrices and other arrays in L
A
T
E
X . . . . . . . . . . . . . . . . . . . . 29
3.15 Derivatives, Limits, Sums and Integrals . . . . . . . . . . . . . . . . . . 31
4 Further Features of L
A
T
E
X 35
4.1 Producing White Space in L
A
T
E
X . . . . . . . . . . . . . . . . . . . . . 35
4.2 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.3 Displayed Quotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.4 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.5 The Preamble of the L
A
T
E
X Input file . . . . . . . . . . . . . . . . . . . 43
4.6 Defining your own Control Sequences in L
A
T
E
X . . . . . . . . . . . . . . 45
1 Introduction to L
A
T
E
X
1.1 What is L
A
T
E
X?
L
A
T
E
X is a computer program for typesetting documents. It takes a computer file,
prepared according to the rules of L
A
T
E
X and converts it to a form that may be printed
on a high-quality printer, such as a laser writer, to produce a printed document of a
quality comparable with good quality books and journals. Simple documents, which do
not contain mathematical formulae or tables may be produced very easily: effectively
all one has to do is to type the text straight in (though observing certain rules relating
to quotation marks and punctuation dashes). Typesetting mathematics is somewhat
more complicated, but even here L
A
T
E
X is comparatively straightforward to use when
one considers the complexity of some of the formulae that it has to produce and the
large number of mathematical symbols which it has to produce.
L
A
T
E
X is one of a number of ‘dialects’ of T
E
X, all based on the version of T
E
X created
by D. E. Knuth which is known as Plain T
E
X. L
A
T
E
X (created by L. B. Lamport) is
one of these ‘dialects’. It is particularly suited to the production of long articles
and books, since it has facilities for the automatic numbering of chapters, sections,
theorems, equations etc., and also has facilities for cross-referencing. It is probably
one of the most suitable version of L
A
T
E
X for beginners to use.
1.2 A Typical L
A
T
E
X Input File
In order to produce a document using L
A
T
E
X, we must first create a suitable input
file on the computer. We apply the L
A
T
E
X program to the input file and then use
the printer to print out the so-called ‘DVI’ file produced by the L
A
T
E
X program (after
first using another program to translate the ‘DVI’ file into a form that the printer can
understand). Here is an example of a typical L
A
T
E
X input file:
2
\documentclass[a4paper,12pt]{article}
\begin{document}
The foundations of the rigorous study of \textit{analysis}
were laid in the nineteenth century, notably by the
mathematicians Cauchy and Weierstrass. Central to the
study of this subject are the formal definitions of
\textit{limits} and \textit{continuity}.
Let $D$ be a subset of $\bf R$ and let
$f \colon D \to \textbf{R}$ be a real-valued function on
$D$. The function $f$ is said to be \textit{continuous} on
$D$ if, for all $\epsilon > 0$ and for all $x \in D$,
there exists some $\delta > 0$ (which may depend on $x$)
such that if $y \in D$ satisfies
\[ |y - x| < \delta \]
then
\[ |f(y) - f(x)| < \epsilon. \]
One may readily verify that if $f$ and $g$ are continuous
functions on $D$ then the functions $f+g$, $f-g$ and
$f.g$ are continuous. If in addition $g$ is everywhere
non-zero then $f/g$ is continuous.
\end{document}
When we apply L
A
T
E
X to these paragraphs we produce the text
The foundations of the rigorous study of analysis were laid in the nine-
teenth century, notably by the mathematicians Cauchy and Weierstrass.
Central to the study of this subject are the formal definitions of limits and
continuity.
Let 1 be a subset of R and let 1: 1 →R be a real-valued function on
1. The function 1 is said to be continuous on 1 if, for all c 0 and for
all r ∈ 1, there exists some δ 0 (which may depend on r) such that if
n ∈ 1 satisfies
[n −r[ < δ
then
[1(n) −1(r)[ < c.
3
One may readily verify that if 1 and o are continuous functions on 1
then the functions 1 + o, 1 −o and 1.o are continuous. If in addition o is
everywhere non-zero then 1o is continuous.
This example illustrates various features of L
A
T
E
X. Note that the lines
\documentclass[a4paper,12pt]{article}
\begin{document}
are placed at the beginning of the input file. These are followed by the main body of
the text, followed by the concluding line
\end{document}
Note also that, although most characters occurring in this file have their usual meaning,
yet there are special characters such as \, $, { and } which have special meanings within
L
A
T
E
X. Note in particular that there are sequences of characters which begin with a
‘backslash’ \ which are used to produce mathematical symbols and Greek letters and
to accomplish tasks such as changing fonts. These sequences of characters are known
as control sequences.
1.3 Characters and Control Sequences
We now describe in more detail some of the features of L
A
T
E
X illustrated in the above
example.
Most characters on the keyboard, such as letters and numbers, have their usual
meaning. However the characters
\ { } $ ^ _ % ~ # &
are used for special purposes within L
A
T
E
X. Thus typing one of these characters will not
produce the corresponding character in the final document. Of course these characters
are very rarely used in ordinary text, and there are methods of producing them when
they are required in the final document.
In order to typeset a mathematical document it is necessary to produce a consid-
erable number of special mathematical symbols. One also needs to be able to change
fonts. Also mathematical documents often contain arrays of numbers or symbols (ma-
trices) and other complicated expressions. These are produced in L
A
T
E
X using control
sequences. Most control sequences consist of a backslash \ followed by a string of
(upper or lower case) letters. For example, \alpha, \textit and \sum are control
sequences.
In the example above we used the control sequences \textit and \textbf to change
the font to italic and boldface respectively. Also we used the control sequences \to,
4
\in, \delta and \epsilon to produce the mathematical symbols → and ∈ and the
Greek letters δ and c
There is another variety of control sequence which consists of a backslash followed
by a single character that is not a letter. Examples of control sequences of this sort
are \{, \" and \$.
The special characters { and } are used for grouping purposes. Everything enclosed
within matching pair of such brackets is treated as a single unit. We have applied these
brackets in the example above whenever we changed fonts. We shall see other instances
where one needs to use { and } in L
A
T
E
X to group words and symbols together (e.g.,
when we need to produce superscripts and subscripts which contain more than one
symbol).
The special character $ is used when one is changing from ordinary text to a
mathematical expression and when one is changing back to ordinary text. Thus we
used
for all $\epsilon > 0$ and for all $x \in D$,
to produce the phrase
for all c 0 and for all r ∈ 1,
in the example given above. Note also that we used \[ and \] in the example above to
mark the beginning and end respectively of a mathematical formula that is displayed
on a separate line.
The remaining special characters
^ _ % ~ # &
have special purposes within L
A
T
E
X that we shall discuss later.
2 Producing Simple Documents using L
A
T
E
X
2.1 Producing a L
A
T
E
X Input File
We describe the structure of a typical L
A
T
E
X input file.
The first line of the input file should consist of a \documentclass command. The
recommended such \documentclass command for mathematical articles and similar
documents has the form
\documentclass[a4paper,12pt]{article}
5
(You do not have to worry about what this command means when first learning to use
L
A
T
E
X: its effect is to ensure that the final document is correctly positioned on A4 size
paper and that the text is of a size that is easy to read.) There are variants of this
\documentclass command which are appropriate for letters or for books.
The documentstyle command may be followed by certain other optional com-
mands, such as the \pagestyle command. It is not necessary to find out about these
commands when first learning to use L
A
T
E
X.
After the \documentclass command and these other optional commands, we place
the command
\begin{document}
This command is then followed by the main body of the text, in the format pre-
scribed by the rules of L
A
T
E
X.
Finally, we end the input file with a line containing the command
\end{document}
2.2 Producing Ordinary Text using L
A
T
E
X
To produce a simple document using L
A
T
E
X one should create a L
A
T
E
X input file, be-
ginning with a \documentclass command and the \begin{document} command, as
described above. The input file should end with the \end{document} command, and
the text of the document should be sandwiched between the \begin{document} and
\end{document} commands in the manner described below.
If one merely wishes to type in ordinary text, without complicated mathematical
formulae or special effects such as font changes, then one merely has to type it in as
it is, leaving a completely blank line between successive paragraphs. You do not have
to worry about paragraph indentation: L
A
T
E
X will automatically indent all paragraphs
with the exception of the first paragraph of a new section (unless you take special
action to override the conventions adopted by L
A
T
E
X)
For example, suppose that we wish to create a document containing the following
paragraphs:
If one merely wishes to type in ordinary text, without complicated math-
ematical formulae or special effects such as font changes, then one merely
has to type it in as it is, leaving a completely blank line between successive
paragraphs.
You do not have to worry about paragraph indentation: all paragraphs
will be indented with the exception of the first paragraph of a new section.
One must take care to distinguish between the ‘left quote’ and the ‘right
quote’ on the computer terminal. Also, one should use two ‘single quote’
6
characters in succession if one requires “double quotes”. One should never
use the (undirected) ‘double quote’ character on the computer terminal,
since the computer is unable to tell whether it is a ‘left quote’ or a ‘right
quote’. One also has to take care with dashes: a single dash is used for
hyphenation, whereas three dashes in succession are required to produce a
dash of the sort used for punctuation—such as the one used in this sentence.
To create this document using L
A
T
E
X we use the following input file:
\documentclass[a4paper,12pt]{article}
\begin{document}
If one merely wishes to type in ordinary text, without
complicated mathematical formulae or special effects such
as font changes, then one merely has to type it in as it
is, leaving a completely blank line between successive
paragraphs.
You do not have to worry about paragraph indentation:
all paragraphs will be indented with the exception of
the first paragraph of a new section.
One must take care to distinguish between the ‘left quote’
and the ‘right quote’ on the computer terminal. Also, one
should use two ‘single quote’ characters in succession if
one requires ‘‘double quotes’’. One should never use the
(undirected) ‘double quote’ character on the computer
terminal, since the computer is unable to tell whether it
is a ‘left quote’ or a ‘right quote’. One also has to
take care with dashes: a single dash is used for
hyphenation, whereas three dashes in succession are required
to produce a dash of the sort used for punctuation---such as
the one used in this sentence.
\end{document}
Having created the input file, one then has to run it through the L
A
T
E
X program
and then print it out the resulting output file (known as a ‘DVI’ file).
7
2.3 Blank Spaces and Carriage Returns in the Input File
L
A
T
E
X treats the carriage return at the end of a line as though it were a blank space.
Similarly L
A
T
E
X treats tab characters as blank spaces. Moreover, L
A
T
E
X regards a
sequence of blank spaces as though it were a single space, and similarly it will ignore
blank spaces at the beginning or end of a line in the input file. Thus, for example, if
we type
This is
a
silly
example of a
file with many spaces.
This is the beginning
of a new paragraph.
then we obtain
This is a silly example of a file with many spaces.
This is the beginning of a new paragraph.
It follows immediately from this that one will obtain the same results whether one
types one space or two spaces after a full stop: L
A
T
E
X does not distinguish between the
two cases.
Any spaces which follow a control sequence will be ignored by L
A
T
E
X.
If you really need a blank space in the final document following whatever is produced
by the control sequence, then you must precede this blank by a backslash \. Thus in
order to obtain the sentence
L
A
T
E
X is a very powerful computer typesetting program.
we must type
\LaTeX\ is a very powerful computer typesetting program.
(Here the control sequence TeX is used to produce the L
A
T
E
X logo.)
In general, preceding a blank space by a backslash forces L
A
T
E
X to include the blank
space in the final document.
As a general rule, you should never put a blank space after a left parenthesis or
before a right parenthesis. If you were to put a blank space in these places, then you
run the risk that L
A
T
E
X might start a new line immediately after the left parenthesis
or before the right parenthesis, leaving the parenthesis marooned at the beginning or
end of a line.
8
2.4 Quotation Marks and Dashes
Single quotation marks are produced in L
A
T
E
X using ‘ and ’. Double quotation marks
are produced by typing ‘‘ and ’’. (The ‘undirected double quote character " produces
double right quotation marks: it should never be used where left quotation marks are
required.)
L
A
T
E
X allows you to produce dashes of various length, known as ‘hyphens’, ‘en-
dashes’ and ‘em-dashes’. Hyphens are obtained in L
A
T
E
X by typing -, en-dashes by
typing -- and em-dashes by typing ---.
One normally uses en-dashes when specifying a range of numbers. Thus for exam-
ple, to specify a range of page numbers, one would type
on pages 155--219.
Dashes used for punctuating are often typeset as em-dashes, especially in older
books. These are obtained by typing ---.
The dialogue
“You were a little grave,” said Alice.
“Well just then I was inventing a new way of getting over a gate—would
you like to hear it?”
“Very much indeed,” Alice said politely.
“I’ll tell you how I came to think of it,” said the Knight. “You see, I
said to myself ‘The only difficulty is with the feet: the head is high enough
already.’ Now, first I put my head on the top of the gate—then the head’s
high enough—then I stand on my head—then the feet are high enough, you
see—then I’m over, you see.”
(taken from Alice through the Looking Glass, by Lewis Carroll) illustrates the use of
quotation marks and dashes. It is obtained in L
A
T
E
X from the following input:
‘‘You \emph{were} a little grave,’’ said Alice.
‘‘Well just then I was inventing a new way of
getting over a gate---would you like to hear it?’’
‘‘Very much indeed,’’ Alice said politely.
‘‘I’ll tell you how I came to think of it,’’ said
the Knight. ‘‘You see, I said to myself ‘The only
difficulty is with the feet: the \emph{head} is
high enough already.’ Now, first I put my head on
the top of the gate---then the head’s high
9
enough---then I stand on my head---then the feet
are high enough, you see---then I’m over, you see.’’
Sometimes you need single quotes immediately following double quotes, or vica
versa, as in
“I regard computer typesetting as being reasonably ‘straightforward’ ”
he said.
The way to typeset this correctly in L
A
T
E
X is to use the control sequence \, between
the quotation marks, so as to obtain the necessary amount of separation. The above
example is thus produced with the input
‘‘I regard computer typesetting as being reasonably
‘straightforward’\,’’ he said.
2.5 Section Headings in L
A
T
E
X
Section headings of various sizes are produced (in the article document style) using
the commands \section,\subsection and \subsubsection commands. L
A
T
E
X will
number the sections and subsections automatically. The title of the section should
be surrounded by curly brackets and placed immediately after the relevant command.
Thus if we type
\section{Section Headings}
We explain in this section how to obtain headings
for the various sections and subsections of our
document.
\subsection{Headings in the ‘article’ Document Style}
In the ‘article’ style, the document may be divided up
into sections, subsections and subsubsections, and each
can be given a title, printed in a boldface font,
simply by issuing the appropriate command.
then the title of the section and that of the subsection will be printed in a large boldface
font, and will be numbered accordingly.
Other document styles (such as the book and letter styles) have other ‘section-
ing’ commands available (for example, the book style has a \chapter command for
beginning a new chapter).
10
Sometimes one wishes to suppress the automatic numbering provided by L
A
T
E
X.
This can be done by placing an asterisk before the title of the section or subsection.
Thus, for example, the section numbers in the above example could be suppressed by
typing
\section*{Section Headings}
We explain in this section how to obtain headings
for the various sections and subsections of our
document.
\subsection*{Headings in the ‘article’ Document Style}
In the ‘article’ style, the document may be divided up
into sections, subsections and subsubsections, and each
can be given a title, printed in a boldface font,
simply by issuing the appropriate command.
2.6 Changing Fonts in Text Mode
L
A
T
E
X has numerous commands for changing the typestyle. The most useful of these
is \emph{text} which emphasizes some piece of text, setting it usually in an italic font
(unless the surrounding text is already italicized). Thus for example, the text
The basic results and techniques of Calculus were discovered and devel-
oped by Newton and Leibniz, though many of the basic ideas can be traced
to earlier work of Cavalieri, Fermat, Barrow and others.
is obtained by typing
The basic results and techniques of \emph{Calculus}
were discovered and developed by \emph{Newton}
and \emph{Leibniz}, though many of the basic ideas
can be traced to earlier work of \emph{Cavalieri},
\emph{Fermat}, \emph{Barrow} and others.
Another useful font-changing command is \textbf{text}, which typesets the spec-
ified portion of text in boldface.
A font family or typeface in L
A
T
E
X consists of a collection of related fonts charac-
terized by size, shape and series. The font families available in L
A
T
E
X include roman,
sans serif and typewriter:
• Roman is normally the default family and includes upright, italic, slanted, small
caps and boldface fonts of various sizes.
11
• There is a sans serif family with upright, slanted and boldface fonts of various sizes.
• There is a typewriter family with upright, italic, slanted
and small caps fonts of various sizes.
The sizes of fonts used in L
A
T
E
X are can be determined and changed by means of
the control sequences \tiny, \scriptsize, \footnotesize, \small, \normalsize,
\large, \Large, \LARGE, \huge and \HUGE:
This text is tiny.
This text is scriptsize.
This text is footnotesize.
This text is small.
This text is normalsize.
This text is large.
This text is Large.
This text is LARGE.
This text is huge.
This text is Huge.
The shape of a font can be upright, italic, slanted or small caps:
• The LaTeX command \textup{text} typesets the specified text with an upright
shape: this is normally the default shape.
• The LaTeX command \textit{text} typesets the specified text with an italic
shape.
• The LaTeX command \textsl{text} typesets the specified text with a slanted
shape: slanted text is similar to italic.
• The LaTeX command \textsc{text} typesets the specified text with
a small caps shape in which all letters are capitals (with upper-
case letters taller than lowercase letters).
The series of a font can be medium (the default) or boldface:
• The LaTeX command \textmd{text} typesets the specified text with a medium
series font.
12
• The LaTeX command \textbf{text} typesets the specified text with a
boldface series font.
If the necessary fonts are available, one can combine changes to the size, shape and
series of a font, for example producing boldface slanted text by typing
\textbf{\textsl{boldface slanted text}}.
There are in L
A
T
E
X font declarations corresponding to the the font-changing com-
mands described above. When included in the L
A
T
E
X input such declarations determine
the type-style of the subsequent text (till the next font declaration or the end of the
current ‘group’ delimited by curly brackets or by appropriate \begin and \end com-
mands). Here is a list of font-changing commands and declarations in text mode:
Command Declaration
\textrm \rmfamily Roman family
\textsf \sffamily Sans serif family
\texttt \ttfamily Typewriter family
\textup \upshape Upright shape
\textit \itshape Italic shape
\textsl \slshape Slanted shape
\textsc \scshape Small caps shape
\textmd \mdseries Medium series
\textbf \bfseries Boldface series
2.7 Accents used in Text
There are a variety of control sequences for producing accents. For example, the control
sequence \’{o} produces an acute accent on the letter o. Thus typing
Se\’{a}n \’{O} Cinn\’{e}ide.
produces
Se´an
´
O Cinn´eide.
Similarly we use the control sequence \‘ to produce the grave accent in ‘alg`ebre’ and
we use \" to produce the umlaut in ‘Universit¨at’. The accents provided by L
A
T
E
X
include the following:
13
\’{e} ´e e.g., math\’{e}matique yields ‘math´ematique’
\‘{e} `e e.g., alg\‘{e}bre yields ‘alg`ebre’
\^{e} ˆe e.g., h\^{o}te yields ‘hˆote’
\"{o} ¨o e.g., H\"{o}lder yields ‘H¨older’
\~{n} ˜ n e.g., ma\~{n}ana yields ‘ma˜ nana’
\={o} ¯o
\.{o} ˙ o
\u{o} ˘o
\v{c} ˇc e.g., \v{C}ech yields ‘
ˇ
Cech’
\H{o} ˝o
\t{oo} ´ oo
\c{c} ¸c e.g., gar\c{c}on yields ‘gar¸ con’
\d{o} o
.
\b{o} o
¯
These accents are for use in ordinary text. They cannot be used within mathematical
formulae, since different control sequences are used to produce accents within mathe-
matics.
The control sequences \i and \j produce dotless ‘i’ and ‘j’. These are required
when placing an accent on the letter. Thus
´
i is produced by typing \’{\i}.
2.8 Active Characters and Special Symbols in Text
The ‘active characters’
# $ % & \ ^ _ { } ~
have special purposes within L
A
T
E
X. Thus they cannot be produced in the final doc-
ument simply by typing them directly. On the rare occasions when one needs to use
the special characters
# $ % & ¦ ¦
in the final document, they can be produced by typing the control sequences
\# \$ \% \& \_ \{ \}
respectively. However the characters \, ^ and ~ cannot be produced simply by pre-
ceding them with a backslash. They can however be produced using \char92 (in the
\texttt font only), \char94 and \char126 respectively. (The decimal numbers 92,
94 and 126 are the ASCII codes of these characters.)
Other special symbols can be introduced into text using the appropriate control
sequences:
14
Symbol Control Sequence
œ, Œ \oe, \OE
æ, Æ \ae, \AE
˚a,
˚
A \aa, \AA
ø, Ø \o, \O
l, L \l, \L
ß \ss
¿ ?‘
¡ !‘
† \dag
‡ \ddag
' \S
¹ \P
c ( \copyright
£ \pounds
ı \i
 \j
3 Producing Mathematical Formulae using L
A
T
E
X
3.1 Mathematics Mode
In order to obtain a mathematical formula using L
A
T
E
X, one must enter mathematics
mode before the formula and leave it afterwards. Mathematical formulae can occur
either embedded in text or else displayed between lines of text. When a formula occurs
within the text of a paragraph one should place a $ sign before and after the formula,
in order to enter and leave mathematics mode. Thus to obtain a sentence like
Let 1 be the function defined by 1(r) = 3r + 7, and let c be a positive
real number.
one should type
Let $f$ be the function defined by $f(x) = 3x + 7$, and
let $a$ be a positive real number.
In particular, note that even mathematical expressions consisting of a single character,
like 1 and c in the example above, are placed within $ signs. This is to ensure that
they are set in italic type, as is customary in mathematical typesetting.
L
A
T
E
X also allows you to use \( and \) to mark the beginning and the end respec-
tively of a mathematical formula embedded in text. Thus
Let 1 be the function defined by 1(r) = 3r + 7.
15
may be produced by typing
Let \( f \) be the function defined by \( f(x) = 3x + 7 \).
However this use of \( ... \) is only permitted in L
A
T
E
X: other dialects of TeX such as
Plain T
E
X and AmSTeX use $ ... $.
In order to obtain an mathematical formula or equation which is displayed on a
line by itself, one places \[ before and \] after the formula. Thus to obtain
If 1(r) = 3r + 7 and o(r) = r + 4 then
1(r) + o(r) = 4r + 11
and
1(r)o(r) = 3r
2
+ 19r + 28.
one would type
If $f(x) = 3x + 7$ and $g(x) = x + 4$ then
\[ f(x) + g(x) = 4x + 11 \]
and
\[ f(x)g(x) = 3x^2 + 19x +28. \]
(Here the character ^ is used to obtain a superscript.)
L
A
T
E
X provides facilities for the automatic numbering of displayed equations. If you
want an numbered equation then you use \begin{equation} and \end{equation}
instead of using \[ and \] . Thus
If $f(x) = 3x + 7$ and $g(x) = x + 4$ then
\begin{equation}
f(x) + g(x) = 4x + 11
\end{equation}
and
\begin{equation}
f(x)g(x) = 3x^2 + 19x +28.
\end{equation}
produces
If 1(r) = 3r + 7 and o(r) = r + 4 then
1(r) + o(r) = 4r + 11 (1)
and
1(r)o(r) = 3r
2
+ 19r + 28. (2)
16
3.2 Characters in Mathematics Mode
All the characters on the keyboard have their standard meaning in mathematics mode,
with the exception of the characters
# $ % & ~ _ ^ \ { } ’
Letters are set in italic type. In mathematics mode the character ’ has a special
meaning: typing $u’ + v’’$ produces n

When in mathematics mode the spaces
you type between letters and other symbols do not affect the spacing of the final
result, since L
A
T
E
X determines the spacing of characters in formulae by its own internal
rules. Thus $u v + w = x$ and $uv+w=x$ both produce n· + u = r You can also
type carriage returns where necessary in your input file (e.g., if you are typing in a
complicated formula with many Greek characters and funny symbols) and this will
have no effect on the final result if you are in mathematics mode.
To obtain the characters
# $ % & _ { }
in mathematics mode, one should type
\# \$ \% \& \_ \{ \} .
To obtain in mathematics mode, one may type \backslash.
3.3 Superscripts and Subscripts
Subscripts and superscripts are obtained using the special characters _ and ^ respec-
tively. Thus the identity
d:
2
= dr
2
1
+ dr
2
2
+ dr
2
3
−c
2
dt
2
is obtained by typing
\[ ds^2 = dx_1^2 + dx_2^2 + dx_3^2 - c^2 dt^2 \]
It can also be obtained by typing
\[ ds^2 = dx^2_1 + dx^2_2 + dx^2_3 - c^2 dt^2 \]
since, when a superscript is to appear above a subscript, it is immaterial whether the
superscript or subscript is the first to be specified.
Where more than one character occurs in a superscript or subscript, the characters
involved should be enclosed in curly brackets. For example, the polynomial r
17
−1 is
obtained by typing $x^{17} - 1$.
17
One may not type expressions such as $s^n^j$ since this is ambiguous and could be
interpreted either as :
nj
or as :
n
j
The first of these alternatives is obtained by typing
$s^{n j}$, the second by typing $s^{n^j}$. A similar remark applies to subscripts.
Note that one can obtain in this way double superscripts (where a superscript is placed
on a superscript) and double subscripts.
It is sometimes necessary to obtain expressions in which the horizontal ordering of
the subscripts is significant. One can use an ‘empty group’ {} to separate superscripts
and subscripts that must follow one another. For example, the identity
1
i
j
kl
= o
jm
1
imkl
= −o
jm
1
mikl
= −1
j
ikl
can be obtained by typing
\[ R_i{}^j{}_{kl} = g^{jm} R_{imkl}
= - g^{jm} R_{mikl} = - R^j{}_{ikl} \]
3.4 Greek Letters
Greek letters are produced in mathematics mode by preceding the name of the letter
by a backslash \. Thus to obtain the formula ¹ = π:
2
one types A = \pi r^2.
Here are the control sequences for the standard forms of the lowercase Greek letters:-
α \alpha ι \iota ρ \rho
β \beta κ \kappa σ \sigma
γ \gamma λ \lambda τ \tau
δ \delta j \mu υ \upsilon
c \epsilon ν \nu φ \phi
ζ \zeta ξ \xi χ \chi
η \eta o o ψ \psi
θ \theta π \pi ω \omega
There is no special command for omicron: just use o.
Some Greek letters occur in variant forms. The variant forms are obtained by
preceding the name of the Greek letter by ‘var’. The following table lists the usual
form of these letters and the variant forms:-
c \epsilon ε \varepsilon
θ \theta ϑ \vartheta
π \pi ¬ \varpi
ρ \rho · \varrho
σ \sigma ς \varsigma
φ \phi ϕ \varphi
18
Upper case Greek letters are obtained by making the first character of the name
upper case. Here are the control sequence for the uppercase letters:—
Γ \Gamma Ξ \Xi Φ \Phi
∆ \Delta Π \Pi Ψ \Psi
Θ \Theta Σ \Sigma Ω \Omega
Λ \Lambda Υ \Upsilon
3.5 Mathematical Symbols
There are numerous mathematical symbols that can be used in mathematics mode.
These are obtained by typing an appropriate control sequence.
Miscellaneous Symbols:
ℵ \aleph / \prime ∀ \forall
¯ / \hbar ∅ \emptyset ∃ \exists
ı \imath ∇ \nabla \neg
, \jmath

\surd : \flat
/ \ell · \top : \natural
℘ \wp ⊥ \bot : \sharp
1 \Re | \| ♣ \clubsuit
· \Im

\angle ♦ \diamondsuit
∂ \partial ´ \triangle ♥ \heartsuit
∞ \infty ` \backslash ♠ \spadesuit
“Large” Operators:
¸
\sum
¸
\bigcap

\bigodot
¸
\prod
¸
\bigcup

\bigotimes
¸
\coprod
¸
\bigsqcup

\bigoplus

\int
¸
\bigvee
¸
\biguplus

\oint

\bigwedge
Binary Operations:
19
± \pm ∩ \cap ∨ \vee
∓ \mp ∪ \cup ∧ \wedge
` \setminus ¬ \uplus ⊕ \oplus
\cdot ¯ \sqcap \ominus
\times . \sqcup ⊗ \otimes
∗ \ast \triangleleft . \oslash
- \star \triangleright \odot
\diamond t \wr † \dagger
◦ \circ ( \bigcirc ‡ \ddagger
• \bullet ´ \bigtriangleup H \amalg
÷ \div \bigtriangledown
Relations:
≤ \leq ≥ \geq ≡ \equiv
≺ \prec ~ \succ ∼ \sim
_ \preceq _ \succeq · \simeq
< \ll \gg · \asymp
⊂ \subset ⊃ \supset ≈ \approx
⊆ \subseteq ⊇ \supseteq

= \cong
_ \sqsubseteq _ \sqsupseteq \bowtie
∈ \in ÷ \ni ∝ \propto
¬ \vdash ¬ \dashv [= \models
\smile [ \mid
.
= \doteq
· \frown | \parallel ⊥ \perp
Negated Relations:
< \not< \not> = \not=
≤ \not\leq ≥ \not\geq ≡ \not\equiv
≺ \not\prec ~ \not\succ ∼ \not\sim
_ \not\preceq _ \not\succeq · \not\simeq
⊂ \not\subset ⊃ \not\supset ≈ \not\approx
⊆ \not\subseteq ⊇ \not\supseteq

= \not\cong
_ \not\sqsubseteq _ \not\sqsupseteq · \not\asymp
Arrows:
20
← \leftarrow → \rightarrow
←− \longleftarrow −→ \longrightarrow
⇐ \Leftarrow ⇒ \Rightarrow
⇐= \Longleftarrow =⇒ \Longrightarrow
↔ \leftrightarrow ⇔ \Leftrightarrow
←→\longleftrightarrow ⇐⇒\Longleftrightarrow
← \hookleftarrow → \hookrightarrow
÷ \leftharpoonup ÷ \rightharpoonup
÷ \leftharpoondown ÷ \rightharpoondown
↑ \uparrow ↓ \downarrow
⇑ \Uparrow ⇓ \Downarrow
| \updownarrow ¨ \Updownarrow
\nearrow ` \nwarrow
` \searrow \swarrow
→ \mapsto −→ \longmapsto
÷
÷ \rightleftharpoons
Openings:
[ \lbrack \lfloor \lceil
¦ \lbrace ' \langle
Closings:
] \rbrack | \rfloor | \rceil
¦ \rbrace ` \rangle
Alternative Names:
21
= \ne or \neq (same as \not=)
≤ \le (same as \leq)
≥ \ge (same as \geq)
¦ \{ (same as \lbrace)
¦ \} (same as \lbrace)
→ \to (same as \rightarrow)
← \gets (same as \leftarrow)
÷ \owns (same as \ni)
∧ \land (same as \wedge)
∨ \lor (same as \vee)
\lnot (same as \neg)
[ \vert (same as |)
| \Vert (same as \|)
⇐⇒ \iff (same as \Longleftrightarrow, but with
extra space at each end)
: \colon (same as :, but with less space around it and
less likelihood of a line break after it)
3.6 Changing Fonts in Mathematics Mode
(The following applies to L
A
T
E
X2c, a recent version of L
A
T
E
X. It does not apply to older
versions of L
A
T
E
X.)
The ‘math italic’ font is automatically used in mathematics mode unless you ex-
plicitly change the font. The rules for changing the font in mathematics mode are
rather different to those applying when typesetting ordinary text. In mathematics
mode any change only applies to the single character or symbol that follows (or to any
text enclosed within curly brackets immediately following the control sequence). Also,
to change a character to the roman or boldface font, the control sequences \mathrm
and \mathbf must be used (rather than \textrm and \textbf).
The following example illustrates the use of boldface in mathematical formulae. To
obtain
Let u,v and w be three vectors in R
3
. The volume \ of the paral-
lelepiped with corners at the points 0, u, v, w, u + v, u + w, v + w and
u +v +w is given by the formula
\ = (u v) w.
one could type
Let $\mathbf{u}$,$\mathbf{v}$ and $\mathbf{w}$ be three
22
vectors in ${\mathbf R}^3$. The volume~$V$ of the
parallelepiped with corners at the points
$\mathbf{0}$, $\mathbf{u}$, $\mathbf{v}$,
$\mathbf{w}$, $\mathbf{u}+\mathbf{v}$,
$\mathbf{u}+\mathbf{w}$, $\mathbf{v}+\mathbf{w}$
and $\mathbf{u}+\mathbf{v}+\mathbf{w}$
is given by the formula
\[ V = (\mathbf{u} \times \mathbf{v}) \cdot \mathbf{w}.\]
There is also a ‘calligraphic’ font available in mathematics mode. This is obtained
using the control sequence \cal. This font can only be used for uppercase letters.
These calligraphic letters have the form
/B(TcT(H1./L´^O{O1oT |1¼A\Z.
3.7 Standard Functions (sin, cos etc.)
The names of certain standard functions and abbreviations are obtained by typing a
backlash \ before the name. For example, one obtains
cos(θ + φ) = cos θ cos φ −sin θ sin φ
by typing
\[ \cos(\theta + \phi) = \cos \theta \cos \phi
- \sin \theta \sin \phi \]
The following standard functions are represented by control sequences defined in
L
A
T
E
X:
`arccos `cos `csc `exp `ker `limsup `min `sinh
`arcsin `cosh `deg `gcd `lg `ln `Pr `sup
`arctan `cot `det `hom `lim `log `sec `tan
`arg `coth `dim `inf `liminf `max `sin `tanh
Names of functions and other abbreviations not in this list can be obtained by con-
verting to the roman font. Thus one obtains cosec¹ by typing $\mathrm{cosec} A$.
Note that if one were to type simply $cosec A$ one would obtain co:cc¹, because
L
A
T
E
X has treated cosec A as the product of six quantities c, o, :, c, c and ¹ and
typeset the formula accordingly.
23
3.8 Text Embedded in Displayed Equations
Text can be embedded in displayed equations (in L
A
T
E
X) by using \mbox{embedded
text}. For example, one obtains
`

= ¦1 ∈ \

: 1(:) = 0 for all : ∈ `¦.
by typing
\[ M^\bot = \{ f \in V’ : f(m) = 0 \mbox{ for all } m \in M \}.\]
Note the blank spaces before and after the words ‘for all’ in the above example. Had
we typed
\[ M^\bot = \{ f \in V’ : f(m) = 0 \mbox{for all} m \in M \}.\]
we would have obtained
`

= ¦1 ∈ \

: 1(:) = 0for all: ∈ `¦.
(In Plain T
E
X one should use \hbox in place of \mbox.)
3.9 Fractions and Roots
Fractions of the form
numerator
denominator
are obtained in L
A
T
E
X using the construction
\frac{numerator}{denominator}.
For example, to obtain
The function 1 is given by
1(r) = 2r +
r −7
r
2
+ 4
for all real numbers r.
one would type
The function $f$ is given by
\[ f(x) = 2x + \frac{x - 7}{x^2 + 4}\]
for all real numbers $x$.
To obtain square roots one uses the control sequence
24
\sqrt{expression}.
For example, to obtain
The roots of a quadratic polynomial cr
2
+ /r + c with c = 0 are given
by the formula
−/ ±

/
2
−4cc
2c
one would type
The roots of a quadratic polynomial $a x^2 + bx + c$ with
$a \neq 0$ are given by the formula
\[ \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \]
In L
A
T
E
X, an :th root is produced using
\sqrt[n]{expression}.
For example, to obtain
The roots of a cubic polynomial of the form r
3
−3jr −2¡ are given by
the formula
3

¡ +

¡
2
−j
3
+
3

¡ −

¡
2
−j
3
where the values of the two cube roots must are chosen so as to ensure that
their product is equal to j.
in L
A
T
E
X, one would type
The roots of a cubic polynomial of the form $x^3 - 3px - 2q$
are given by the formula
\[ \sqrt[3]{q + \sqrt{ q^2 - p^3 }}
+ \sqrt[3]{q - \sqrt{ q^2 - p^3 }} \]
where the values of the two cube roots must are chosen
so as to ensure that their product is equal to $p$.
3.10 Ellipsis (i.e., ‘three dots’)
Ellipsis (three dots) is produced in mathematics mode using the control sequences
\ldots (for dots aligned with tbe baseline of text), and \cdots (for dots aligned with
the centreline of mathematical formulae). Thus the formula
1(r
1
. r
2
. . . . . r
n
) = r
2
1
+ r
2
2
+ + r
2
n
is obtained by typing
25
\[ f(x_1, x_2,\ldots, x_n) = x_1^2 + x_2^2 + \cdots + x_n^2 \]
Similarly the formula
1 −r
n+1
1 −r
= 1 + r + r
2
+ + r
n
is produced using \cdots, by typing
\[ \frac{1 - x^{n+1}}{1 - x} = 1 + x + x^2 + \cdots + x^n \]
3.11 Accents in Mathematics Mode
There are various control sequences for producing underlining, overlining and vari-
ous accents in mathematics mode. The following table lists these control sequences,
applying them to the letter c:
c \underline{a}
c \overline{a}
ˆ c \hat{a}
ˇ c \check{a}
˜ c \tilde{a}
´ c \acute{a}
` c \grave{a}
˙ c \dot{a}
¨ c \ddot{a}
˘ c \breve{a}
¯ c \bar{a}
c \vec{a}
It should be borne in mind that when a character is underlined in a mathematical
manuscript then it is normally typeset in bold face without any underlining. Under-
lining is used very rarely in print.
The control sequences such as \’ and \", used to produce accents in ordinary text,
may not be used in mathematics mode.
3.12 Brackets and Norms
The frequently used left delimiters include (, [ and ¦, which are obtained by typing (,
[ and \{ respectively. The corresponding right delimiters are of course obtained by
typing ), ] and \}. In addition [ and | are used as both left and right delimiters, and
are obtained by typing | and \| respectively. For example, we obtain
26
Let A be a Banach space and let 1: 1 → R be a bounded linear func-
tional on A. The norm of 1, denoted by |1|, is defined by
|1| = inf¦1 ∈ [0. +∞) : [1(r)[ ≤ 1|r| for all r ∈ A¦.
by typing
Let $X$ be a Banach space and let $f \colon B \to \textbf{R}$
be a bounded linear functional on $X$. The \textit{norm} of
$f$, denoted by $\|f\|$, is defined by
\[ \|f\| = \inf \{ K \in [0,+\infty) :
|f(x)| \leq K \|x\| \mbox{ for all } x \in X \}.\]
Larger delimiters are sometimes required which have the appropriate height to
match the size of the subformula which they enclose. Consider, for instance, the
problem of typesetting the following formula:
1(r. n. .) = 3n
2
.

3 +
7r + 5
1 + n
2

.
The way to type the large parentheses is to type \left( for the left parenthesis and
\right) for the right parenthesis, and let L
A
T
E
X do the rest of the work for you. Thus
the above formula was obtained by typing
\[ f(x,y,z) = 3y^2 z \left( 3 + \frac{7x+5}{1 + y^2} \right).\]
If you type a delimiter which is preceded by \left then L
A
T
E
X will search for a cor-
responding delimiter preceded by \right and calculate the size of the delimiters re-
quired to enclose the intervening subformula. One is allowed to balance a \left( with
a \right] (say) if one desires: there is no reason why the enclosing delimiters have to
have the same shape. One may also nest pairs of delimiters within one another: by
typing
\[ \left| 4 x^3 + \left( x + \frac{42}{1+x^4} \right) \right|.\]
we obtain

4r
3
+

r +
42
1 + r
4

.
By typing \left. and \right. one obtains null delimiters which are completely
invisible. Consider, for example, the problem of typesetting
dn
dr

x=0
.
We wish to make the vertical bar big enough to match the derivative preceding it.
To do this, we suppose that the derivative is enclosed by delimiters, where the left
delimiter is invisible and the right delimiter is the vertical line. The invisible delimiter
is produced using \left. and thus the whole formula is produced by typing
\[ \left. \frac{du}{dx} \right|_{x=0}.\]
27
3.13 Multiline Formulae in L
A
T
E
X
Consider the problem of typesetting the formula
cos 2θ = cos
2
θ −sin
2
θ
= 2 cos
2
θ −1.
It is necessary to ensure that the = signs are aligned with one another. In L
A
T
E
X,
such a formula is typeset using the eqnarray* environment. The above example was
obtained by typing the lines
\begin{eqnarray*}
\cos 2\theta & = & \cos^2 \theta - \sin^2 \theta \\
& = & 2 \cos^2 \theta - 1.
\end{eqnarray*}
Note the use of the special character & as an alignment tab. When the formula is
typeset, the part of the second line of the formula beginning with an occurrence of
& will be placed immediately beneath that part of the first line of the formula which
begins with the corresponding occurrence of &. Also \\ is used to separate the lines of
the formula.
Although we have placed corresponding occurrences of & beneath one another in
the above example, it is not necessary to do this in the input file. It was done in the
above example merely to improve the appearance (and readability) of the input file.
The more complicated example
If / ≤
1
2
[ζ −.[ then
[ζ −. −/[ ≥
1
2
[ζ −.[
and hence

1
ζ −. −/

1
ζ −.

=

(ζ −.) −(ζ −. −/)
(ζ −. −/)(ζ −.)

=

/
(ζ −. −/)(ζ −.)


2[/[
[ζ −.[
2
.
was obtained by typing
28
If $h \leq \frac{1}{2} |\zeta - z|$ then
\[ |\zeta - z - h| \geq \frac{1}{2} |\zeta - z|\]
and hence
\begin{eqnarray*}
\left| \frac{1}{\zeta - z - h} - \frac{1}{\zeta - z} \right|
& = & \left|
\frac{(\zeta - z) - (\zeta - z - h)}{(\zeta - z - h)(\zeta - z)}
\right| \\ & = &
\left| \frac{h}{(\zeta - z - h)(\zeta - z)} \right| \\
& \leq & \frac{2 |h|}{|\zeta - z|^2}.
\end{eqnarray*}
The asterisk in eqnarray* is put there to suppress the automatic equation number-
ing produced by L
A
T
E
X. If you wish for an automatically numbered multiline formula,
you should use \begin{eqnarray} and \end{eqnarray}.
3.14 Matrices and other arrays in L
A
T
E
X
Matrices and other arrays are produced in L
A
T
E
X using the array environment. For
example, suppose that we wish to typeset the following passage:
The characteristic polynomial χ(λ) of the 3 3 matrix

¸
¸
c / c
d c 1
o / i
¸

is given by the formula
χ(λ) =

λ −c −/ −c
−d λ −c −1
−o −/ λ −i

.
This passage is produced by the following input:
The \emph{characteristic polynomial} $\chi(\lambda)$ of the
$3 \times 3$~matrix
\[ \left( \begin{array}{ccc}
a & b & c \\
d & e & f \\
g & h & i \end{array} \right)\]
is given by the formula
\[ \chi(\lambda) = \left| \begin{array}{ccc}
29
\lambda - a & -b & -c \\
-d & \lambda - e & -f \\
-g & -h & \lambda - i \end{array} \right|.\]
First of all, note the use of \left and \right to produce the large delimiters around
the arrays. As we have already seen, if we use
\left) ... \right)
then the size of the parentheses is chosen to match the subformula that they enclose.
Next note the use of the alignment tab character & to separate the entries of the matrix
and the use of \\ to separate the rows of the matrix, exactly as in the construction
of multiline formulae described above. We begin the array with \begin{array} and
end it with \end{array}. The only thing left to explain, therefore, is the mysterious
{ccc} which occurs immediately after \begin{array}. Now each of the c’s in {ccc}
represents a column of the matrix and indicates that the entries of the column should
be centred. If the c were replaced by l then the corresponding column would be typeset
with all the entries flush left, and r would produce a column with all entries flush right.
Thus
\[ \begin{array}{lcr}
\mbox{First number} & x & 8 \\
\mbox{Second number} & y & 15 \\
\mbox{Sum} & x + y & 23 \\
\mbox{Difference} & x - y & -7 \\
\mbox{Product} & xy & 120 \end{array}\]
produces
First number r 8
Second number n 15
Sum r + n 23
Difference r −n −7
Product rn 120
We can use the array environment to produce formulae such as
[r[ =

r if r ≥ 0;
−r if r < 0.
Note that both columns of this array are set flush left. Thus we use {ll} immediately
after \begin{array}. The large curly bracket is produced using \left\{. However
this requires a corresponding \right delimiter to match it. We therefore use the
null delimiter \right. discussed earlier. This delimiter is invisible. We can therefore
obtain the above formula by typing
30
\[ |x| = \left\{ \begin{array}{ll}
x & \mbox{if $x \geq 0$};\\
-x & \mbox{if $x < 0$}.\end{array} \right. \]
3.15 Derivatives, Limits, Sums and Integrals
The expressions
dn
dt
and
d
2
n
dr
2
are obtained in L
A
T
E
X by typing \frac{du}{dt} and \frac{d^2 u}{dx^2} respec-
tively. The mathematical symbol ∂ is produced using \partial. Thus the Heat
Equation
∂n
∂t
=

2
n
∂r
2
+

2
n
∂n
2
+

2
n
∂.
2
is obtained in L
A
T
E
X by typing
\[\frac{\partial u}{\partial t}
= \frac{\partial^2 u}{\partial x^2}
+ \frac{\partial^2 u}{\partial y^2}
+ \frac{\partial^2 u}{\partial z^2} \]
To obtain mathematical expressions such as
lim
x→+∞
, inf
x>s
and sup
K
in displayed equations we type \lim_{x \to +\infty}, \inf_{x > s} and \sup_K
respectively. Thus to obtain
lim
x→+∞
3r
2
+ 7
r
2
+ 1
= 3.
(in L
A
T
E
X) we type
\[ \lim_{x \to +\infty} \frac{3x^2 +7x^3}{x^2 +5x^4} = 3.\]
To obtain a summation sign such as
2n
¸
i=1
we type sum_{i=1}^{2n}. Thus
n
¸
k=1
/
2
=
1
2
:(: + 1).
is obtained by typing
31
\[ \sum_{k=1}^n k^2 = \frac{1}{2} n (n+1).\]
We now discuss how to obtain integrals in mathematical documents. A typical
integral is the following:

b
a
1(r) dr.
This is typeset using
\[ \int_a^b f(x)\,dx.\]
The integral sign

is typeset using the control sequence \int, and the limits of inte-
gration (in this case c and / are treated as a subscript and a superscript on the integral
sign.
Most integrals occurring in mathematical documents begin with an integral sign
and contain one or more instances of d followed by another (Latin or Greek) letter, as
in dr, dn and dt. To obtain the correct appearance one should put extra space before
the d, using \,. Thus

+∞
0
r
n
c
−x
dr = :!.

cos θ dθ = sin θ.

x
2
+y
2
≤R
2
1(r. n) dr dn =


θ=0

R
r=0
1(: cos θ. : sin θ): d: dθ.
and

R
0
2r dr
1 + r
2
= log(1 + 1
2
).
are obtained by typing
\[ \int_0^{+\infty} x^n e^{-x} \,dx = n!.\]
\[ \int \cos \theta \,d\theta = \sin \theta.\]
\[ \int_{x^2 + y^2 \leq R^2} f(x,y)\,dx\,dy
= \int_{\theta=0}^{2\pi} \int_{r=0}^R
f(r\cos\theta,r\sin\theta) r\,dr\,d\theta.\]
and
\[ \int_0^R \frac{2x\,dx}{1+x^2} = \log(1+R^2).\]
32
respectively.
In some multiple integrals (i.e., integrals containing more than one integral sign)
one finds that L
A
T
E
X puts too much space between the integral signs. The way to
improve the appearance of of the integral is to use the control sequence \! to remove
a thin strip of unwanted space. Thus, for example, the multiple integral

1
0

1
0
r
2
n
2
dr dn.
is obtained by typing
\[ \int_0^1 \! \int_0^1 x^2 y^2\,dx\,dy.\]
Had we typed
\[ \int_0^1 \int_0^1 x^2 y^2\,dx\,dy.\]
we would have obtained

1
0

1
0
r
2
n
2
dr dn.
A particularly noteworthy example comes when we are typesetting a multiple inte-
gral such as

D
1(r. n) dr dn.
Here we use \! three times to obtain suitable spacing between the integral signs. We
typeset this integral using
\[ \int \!\!\! \int_D f(x,y)\,dx\,dy.\]
Had we typed
\[ \int \int_D f(x,y)\,dx\,dy.\]
we would have obtained
D
1(r. n) dr dn.
The following (reasonably complicated) passage exhibits a number of the features
which we have been discussing:
In non-relativistic wave mechanics, the wave function ψ(r. t) of a particle
satisfies the Schr¨odinger Wave Equation
i¯ /
∂ψ
∂t
=
−¯ /
2
2:


2
∂r
2
+

2
∂n
2
+

2
∂.
2

ψ + \ ψ.
33
It is customary to normalize the wave equation by demanding that

R
3
[ψ(r. 0)[
2
dr dn d. = 1.
A simple calculation using the Schr¨odinger wave equation shows that
d
dt

R
3
[ψ(r. t)[
2
dr dn d. = 0.
and hence
R
3
[ψ(r. t)[
2
dr dn d. = 1
for all times t. If we normalize the wave function in this way then, for any
(measurable) subset \ of R
3
and time t,

V
[ψ(r. t)[
2
dr dn d.
represents the probability that the particle is to be found within the re-
gion \ at time t.
One would typeset this in L
A
T
E
X by typing
In non-relativistic wave mechanics, the wave function
$\psi(\mathbf{r},t)$ of a particle satisfies the
\textit{Schr\"{o}dinger Wave Equation}
\[ i\hbar\frac{\partial \psi}{\partial t}
= \frac{-\hbar^2}{2m} \left(
\frac{\partial^2}{\partial x^2}
+ \frac{\partial^2}{\partial y^2}
+ \frac{\partial^2}{\partial z^2}
\right) \psi + V \psi.\]
It is customary to normalize the wave equation by
demanding that
\[ \int \!\!\! \int \!\!\! \int_{\textbf{R}^3}
\left| \psi(\mathbf{r},0) \right|^2\,dx\,dy\,dz = 1.\]
A simple calculation using the Schr\"{o}dinger wave
equation shows that
\[ \frac{d}{dt} \int \!\!\! \int \!\!\! \int_{\textbf{R}^3}
\left| \psi(\mathbf{r},t) \right|^2\,dx\,dy\,dz = 0,\]
and hence
\[ \int \!\!\! \int \!\!\! \int_{\textbf{R}^3}
\left| \psi(\mathbf{r},t) \right|^2\,dx\,dy\,dz = 1\]
for all times~$t$. If we normalize the wave function in this
34
way then, for any (measurable) subset~$V$ of $\textbf{R}^3$
and time~$t$,
\[ \int \!\!\! \int \!\!\! \int_V
\left| \psi(\mathbf{r},t) \right|^2\,dx\,dy\,dz\]
represents the probability that the particle is to be found
within the region~$V$ at time~$t$.
4 Further Features of L
A
T
E
X
4.1 Producing White Space in L
A
T
E
X
To produce (horizontal) blank space within a paragraph, use \hspace, followed by the
length of the blank space enclosed within curly brackets. The length of the skip should
be expressed in a unit recognized by L
A
T
E
X. These recognized units are given in the
following table:
pt point (1 in = 72.27 pt)
pc pica (1 pc = 12 pt)
in inch (1 in = 25.4 mm)
bp big point (1 in = 72 bp)
cm centimetre (1 cm = 10 mm)
mm millimetre
dd didot point (1157 dd = 1238 pt)
cc cicero (1 cc = 12 dd)
sp scaled point (65536 sp = 1 pt)
Thus to produce a horizontal blank space of 20 mm in the middle of a paragraph one
would type \hspace{20 mm}.
If L
A
T
E
X decides to break between lines at a point in the document where an \hspace
is specified, then no white space is produced. To ensure that white space is produced
even at points in the document where line breaking takes place, one should replace
\hspace by \hspace*
To produce (vertical) blank space between paragraphs, use \vspace, followed by
the length of the blank space enclosed within curly brackets. Thus to obtain
This is the first paragraph of some text. It is separated from the second
paragraph by a vertical skip of 10 millimetres.
This is the second paragraph.
one should type
35
This is the first paragraph of some text. It is
separated from the second paragraph by a vertical skip of
10 millimetres.
\vspace{10 mm}
This is the second paragraph.
If L
A
T
E
X decides to introduce at a point in the document where a \vspace is specified,
then no white space is produced. To ensure that white space is produced even at
points in the document where page breaking takes place, one should replace \vspace
by \vspace*
We now describe certain features of L
A
T
E
X relating to blank spaces and paragraph
indentation which will improve the appearance of the final document. Experienced
users of L
A
T
E
X will improve the appearance of their documents if they bear these
remarks in mind.
First note that, as a general rule, you should never put a blank space after a left
parenthesis or before a right parenthesis. If you were to put a blank space in these
places, then you run the risk that L
A
T
E
X might start a new line immediately after the
left parenthesis or before the right parenthesis, leaving the parenthesis marooned at
the beginning or end of a line.
L
A
T
E
X has its own rules for deciding the lengths of blank spaces. For instance,
L
A
T
E
X will put an extra amount of space after a full stop if it considers that the full
stop marks the end of a sentence.
The rule adopted by L
A
T
E
X is to regard a period (full stop) as the end of a sentence
if it is preceded by a lowercase letter. If the period is preceded by an uppercase letter
then L
A
T
E
X assumes that it is not a full stop but follows the initials of somebody’s
name.
This works very well in most cases. However L
A
T
E
X occasionally gets things wrong.
This happens with a number of common abbreviations (as in ‘Mr. Smith’ or in ‘etc.’),
and, in particular, in the names of journals given in abbreviated form (e.g., ‘Proc.
Amer. Math. Soc.’). The way to overcome this problem is to put a backslash before
the blank space in question. Thus we should type
Mr.\ Smith
etc.\ and
Proc.\ Amer.\ Math.\ Soc.
L
A
T
E
X determines itself how to break up a paragraph into lines, and will occasionally
hyphenate long words where this is desirable. However it is sometimes necessary to
tell L
A
T
E
X not to break at a particular blank space. The special character used for this
purpose is ~. It represents a blank space at which L
A
T
E
X is not allowed to break between
36
lines. It is often desirable to use ~ in names where the forenames are represented by
initials. Thus to obtain ‘W. R. Hamilton’ it is best to type W.~R.~Hamilton. It is also
desirable in phrases like ‘Example 7’ and ‘the length | of the rod’, obtained by typing
Example~7 and the length~$l$ of the rod.
L
A
T
E
X will automatically indent paragraphs (with the exception of the first para-
graph of a new section). One can prevent L
A
T
E
X from indenting a paragraph though
by beginning the paragraph with the control sequence \noindent. Thus one obtains
This is the beginning of a paragraph which is not indented in the usual
way. This has been achieved by placing an appropriate control sequence at
the beginning of the paragraph.
by typing
\noindent
This is the beginning of a paragraph which is not
indented in the usual way. This has been achieved
by placing an appropriate control sequence at the
beginning of the paragraph.
Conversely, the control sequence \indent forces L
A
T
E
X to indent the paragraph.
4.2 Lists
L
A
T
E
X provides the following list environments:
• enumerate for numbered lists,
• itemize for un-numbered lists,
• description for description lists
Numbered lists are produced using
\begin{enumerate} ... \end{enumerate}
The items in the list should be enclosed between
\begin{enumerate} and \end{enumerate}
and should each be preceded by the control sequence \item (which will automatically
generate the number labelling the item). For example, the text
A metric space (A. d) consists of a set A on which is defined a distance
function which assigns to each pair of points of A a distance between them,
and which satisfies the following four axioms:
37
1. d(r. n) ≥ 0 for all points r and n of A;
2. d(r. n) = d(n. r) for all points r and n of A;
3. d(r. .) ≤ d(r. n) + d(n. .) for all points r, n and . of A;
4. d(r. n) = 0 if and only if the points r and n coincide.
is generated by L
A
T
E
X from the following input:
A \emph{metric space} $(X,d)$ consists of a set~$X$ on
which is defined a \emph{distance function} which assigns
to each pair of points of $X$ a distance between them,
and which satisfies the following four axioms:
\begin{enumerate}
\item
$d(x,y) \geq 0$ for all points $x$ and $y$ of $X$;
\item
$d(x,y) = d(y,x)$ for all points $x$ and $y$ of $X$;
\item
$d(x,z) \leq d(x,y) + d(y,z)$ for all points $x$, $y$
and $z$ of $X$;
\item
$d(x,y) = 0$ if and only if the points $x$ and $y$
coincide.
\end{enumerate}
Un-numbered lists are produced using
\begin{itemize} ... \end{itemize}
If we replace
\begin{enumerate} and \end{enumerate}
in the above input by
\begin{itemize} and \end{itemize}
respectively, L
A
T
E
X generates an itemized list in which each item is preceeded by a
‘bullet’:
A metric space (A. d) consists of a set A on which is defined a distance
function which assigns to each pair of points of A a distance between them,
and which satisfies the following four axioms:
• d(r. n) ≥ 0 for all points r and n of A;
38
• d(r. n) = d(n. r) for all points r and n of A;
• d(r. .) ≤ d(r. n) + d(n. .) for all points r, n and . of A;
• d(r. n) = 0 if and only if the points r and n coincide.
Description lists (for glossaries etc.) are produced using
\begin{description} ... \end{description}
The items in the list should be enclosed between
\begin{description} and \end{description}
and should each be preceded by \item[label ], where label is the label to be assigned
to each item. For example, the text
We now list the definitions of open ball, open set and closed set in a
metric space.
open ball The open ball of radius : about any point r is the set of all
points of the metric space whose distance from r is strictly less than
:;
open set A subset of a metric space is an open set if, given any point of
the set, some open ball of sufficiently small radius about that point is
contained wholly within the set;
closed set A subset of a metric space is a closed set if its complement is
an open set.
is generated by L
A
T
E
X from the following input:
We now list the definitions of \emph{open ball},
\emph{open set} and \emph{closed set} in a metric space.
\begin{description}
\item[open ball]
The \emph{open ball} of radius~$r$ about any point~$x$
is the set of all points of the metric space whose
distance from $x$ is strictly less than $r$;
\item[open set]
A subset of a metric space is an \emph{open set} if,
given any point of the set, some open ball of
sufficiently small radius about that point is contained
wholly within the set;
\item[closed set]
A subset of a metric space is a \emph{closed set} if its
complement is an open set.
\end{description}
39
4.3 Displayed Quotations
Displayed quotations can be embedded in text using the quote and quotation envi-
ronments
\begin{quote} ... \end{quote}
and
\begin{quotation} ... \end{quotation}.
The quote environment is recommended for short quotations: the whole quotation is
indended in the quote environment, but the first lines of individual paragraphs are
not further indented. The input file
Isaac Newton discovered the basic techiques of
the differential and integral calculus, and
applied them in the study of many problems
in mathematical physics. His main mathematical
works are the \emph{Principia} and the \emph{Optics}.
He summed up his own estimate of his work as follows:
\begin{quote}
I do not know what I may appear to the world; but to
myself I seem to have been only like a boy, playing
on the sea-shore, and diverting myself, in now and
then finding a smoother pebble, or a prettier shell
than ordinary, whilst the great ocean of truth lay
all undiscovered before me.
\end{quote}
In later years Newton became embroiled in a bitter
priority dispute with Leibniz over the discovery
of the basic techniques of calculus.
is typeset by L
A
T
E
X as follows:
Isaac Newton discovered the basic techiques of the differential and in-
tegral calculus, and applied them in the study of many problems in math-
ematical physics. His main mathematical works are the Principia and the
Optics. He summed up his own estimate of his work as follows:
I do not know what I may appear to the world; but to myself I
seem to have been only like a boy, playing on the sea-shore, and
diverting myself, in now and then finding a smoother pebble, or
a prettier shell than ordinary, whilst the great ocean of truth lay
all undiscovered before me.
40
In later years Newton became embroiled in a bitter priority dispute with
Leibniz over the discovery of the basic techniques of calculus.
For longer quotations one may use the quotation environment: the whole quo-
tation is indented, and the openings of paragraphs are then further indented in the
normal fashion.
4.4 Tables
Tables can be produced in L
A
T
E
X using the tabular environment. For example, the
text
The first five International Congresses of Mathematicians were held in
the following cities:
Chicago U.S.A. 1893
Z¨ urich Switzerland 1897
Paris France 1900
Heidelberg Germany 1904
Rome Italy 1908
is produced in L
A
T
E
Xusing the following input file:
The first five International Congresses of Mathematicians
were held in the following cities:
\begin{quote}
\begin{tabular}{lll}
Chicago&U.S.A.&1893\\
Z\"{u}rich&Switzerland&1897\\
Paris&France&1900\\
Heidelberg&Germany&1904\\
Rome&Italy&1908
\end{tabular}
\end{quote}
The \begin{tabular} command must be followed by a string of characters enclosed
within braces which specifies the format of the table. In the above example, the string
{lll} is a format specification for a table with three columns of left-justified text.
Within the body of the table the ampersand character & is used to separate columns
of text within each row, and the double backslash \\ is used to separate the rows of
the table.
The next example shows how to obtain a table with vertical and horizontal lines.
The text
41
The group of permutations of a set of : elements has order :!, where
:!, the factorial of :, is the product of all integers between 1 and :. The
following table lists the values of the factorial of each integer : between 1
and 10:
: :!
1 1
2 2
3 6
4 24
5 120
6 720
7 5040
8 40320
9 362880
10 3628800
Note how rapidly the value of :! increases with :.
is produced in L
A
T
E
Xusing the following input file:
The group of permutations of a set of $n$~elements has
order $n!$, where $n!$, the factorial of $n$, is the
product of all integers between $1$ and $n$. The
following table lists the values of the factorial of each
integer~$n$ between 1 and 10:
\begin{quote}
\begin{tabular}{|r|r|}
\hline
$n$&$n!$\\
\hline
1&1\\
2&2\\
3&6\\
4&24\\
5&120\\
6&720\\
7&5040\\
8&40320\\
9&362880\\
10&3628800\\
\hline
\end{tabular}
42
\end{quote}
Note how rapidly the value of $n!$ increases with $n$.
In this example the format specification {|r|r|} after \begin{tabular} specifies that
the table should consist of two columns of right-justified text, with vertical lines to the
left and to the right of the table, and between columns.
Within the body of the table, the command \hline produces a horizontal line;
this command can only be placed between the format specification and the body of
the table (to produce a line along the top of the table) or immediately after a row
separator (to produce a horizontal line between rows or at the bottom of the table).
In a tabular environment, the format specification after \begin{tabular} should
consist of one or more of the following, enclosed within braces { and }:
l specifies a column of left-justified text
c specifies a column of centred text
r specifies a column of right-justified text
p{width} specifies a left-justified column of the given width
| inserts a vertical line between columns
@{text} inserts the given text between columns
A string str of characters in the format specification can be repeated num times
using the construction *{num}{str}. For example, a table with 15 columns of right-
justified text enclosed within vertical lines can be produced using the format specifi-
cation {|*{15}{r|}}.
If additional vertical space is required between rows of the table, then this can
be produced by specifying the amount of space within square brackets after \\. For
example, on would use \\[6pt] to separate two rows of the table by 6 points of blank
space.
A horizontal line in a table from column i to column , inclusive can be produced
using \cline{i-,}. For example \cline{3-5} produces a horizontal line spanning
columns 3, 4 and 5 of some table.
A command of the form \multicolumn{num}{fmt}{text} can be used within the
body of a table to produce an entry spanning several columns. Here num specifies the
number of columns to be spanned, fmt specifies the format for the entry (e.g., l if the
entry is to be left-justified entry, or c if the entry is to be centred), and text is the text
of the entry. For example, to span three columns of a table with the words ‘Year of
Entry’ (centred with respect to the three columns), one would use
\multicolumn{3}{c}{Year of entry}
4.5 The Preamble of the L
A
T
E
X Input file
We describe the options available in L
A
T
E
X for specifying the overall style of a document.
43
A L
A
T
E
X document should begin with a \documentclass command and any text
to be printed must be included between
\begin{document} and \end{document}
commands. The \begin{document} command is sometimes preceded by commands
that set the page-style and set up user-defined control sequences.
Here is a typical L
A
T
E
X input file:
\documentclass[a4paper,12pt]{article}
\begin{document}
This is the first paragraph of a typical document. It is
produced in a ‘12~point’ size. A \textit{point} is a unit
of length used by printers. One point is approximately
$1/72$~inch. In a ‘12~point’ font the height of the
parentheses is 12~points (i.e. about $1/6$~inch) and the
letter~‘m’ is about 12 points long.
This is the second paragraph of the document. There are
also ‘10 point’ and ‘11 point’ styles available in \LaTeX.
The required size is specified in the ‘documentstyle’
command. If no such size is specified then the 10~point
size is assumed.
\end{document}
The syntax of the \documentclass command is as follows. The command begins
with \documentclass and ends with the names of one of the available styles, enclosed
in curly brackets. The available styles are article, report, book and letter. Between
the “\documentclass” and the name of the document style, one may place a list of
options. These options are separated by commas and the list of options is enclosed in
square brackets (as in the above example). The options available (which are usually
the names of certain ‘style files’) include the following:
11pt Specifies a size of type known as eleven-point, which is ten percent larger than
the ten-point type normally used.
12pt Specifies a twelve-point type size, which is twenty percent larger than ten-point.
twocolumn Produces two-column output.
a4paper This ensures that the page is appropriately positioned on A4 size paper.
44
Typing simply \documentclass{article} will produce a document in ten-point
type size. However the printed output will not be nicely positioned on A4 paper, since
the default size is intended for a different (American) paper size.
Pages will be automatically numbered at the bottom of the page, unless you specify
otherwise. This can be done using the \pagestyle command. This command should
come after the \documentclass command and before the \begin{document} com-
mand. This command has the syntax \pagestyle{option}, where the option is one of
the following:
plain The page number is at the foot of the page. This is the default page style for
the article and report document styles.
empty No page number is printed.
headings The page number (and any other information determined by the document
style) is put at the top of the page.
myheadings Similar to the headings pagestyle, except that the material to go at
the top of the page is determined by \markboth and \markright commands (see
the L
A
T
E
X manual).
For example, the input file
\documentclass[a4paper]{article}
\pagestyle{empty}
\begin{document}
The main body of the document is placed here.
\end{document}
produces a document without page numbers, using the standard ten-point type size.
4.6 Defining your own Control Sequences in L
A
T
E
X
Suppose that we are producing a paper that makes frequent use of some mathematical
expression. For example, suppose that integrals like

+∞
−∞
1(r) dr.
occur frequently throughout the text. This formula is obtained by typing
\[ \int_{-\infty}^{+\infty} f(x)\,dx.\]
It would be nice if we could type \inftyint (say) to obtain the integral sign at the
beginning. This can be done using \newcommand. What we do is to place a line with
the command
45
\newcommand{\inftyint}{\int_{-\infty}^{+\infty}}
near the beginning of the input file (e.g., after the \documentclass command but
before the \begin{document} command). Then we only have to type
\[ \inftyint f(x)\,dx.\]
to obtain the above formula.
We can modify this procedure slightly. Suppose that we we defined a new control
sequence \intwrtx by putting the line
\newcommand{\intwrtx}[1]{\int_{-\infty}^{+\infty} #1 \,dx}
at the beginning of the input file. If we then type the line
\[ \intwrtx{f(x)}.\]
then we obtain

+∞
−∞
1(r) dr.
What has happened is that the expression in curly brackets after \intwrtx has been
substituted in the expression defining \intwrtx, replacing the #1 in that expression.
The number 1 inside square brackets in the \newcommand line defining \intwrtx
indicates to L
A
T
E
X that it is to expect one expression (in curly brackets) after \intwrtx
to substitute for #1 in the definition of \intwrtx. If we defined a control sequence
\intwrt by
\newcommand{\intwrt}[2]{\int_{-\infty}^{+\infty} #2 \,d #1}
then it would expect two expressions to substitute in for #1 and #2 in the definition of
\intwrt. Thus if we then type
\[ \intwrt{y}{f(y)}.\]
we obtain

+∞
−∞
1(n) dn.
46

3.12 3.13 3.14 3.15

Brackets and Norms . . . . . . . . . . A Multiline Formulae in L TEX . . . . . . A Matrices and other arrays in L TEX . . Derivatives, Limits, Sums and Integrals

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

26 28 29 31 35 35 37 40 41 43 45

A 4 Further Features of L TEX A 4.1 Producing White Space in L TEX . . . . . . . 4.2 Lists . . . . . . . . . . . . . . . . . . . . . . . 4.3 Displayed Quotations . . . . . . . . . . . . . . 4.4 Tables . . . . . . . . . . . . . . . . . . . . . . A 4.5 The Preamble of the L TEX Input file . . . . . A 4.6 Defining your own Control Sequences in L TEX

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

1
1.1

A Introduction to LTEX
A What is L TEX?

A L TEX is a computer program for typesetting documents. It takes a computer file, A prepared according to the rules of L TEX and converts it to a form that may be printed on a high-quality printer, such as a laser writer, to produce a printed document of a quality comparable with good quality books and journals. Simple documents, which do not contain mathematical formulae or tables may be produced very easily: effectively all one has to do is to type the text straight in (though observing certain rules relating to quotation marks and punctuation dashes). Typesetting mathematics is somewhat A more complicated, but even here L TEX is comparatively straightforward to use when one considers the complexity of some of the formulae that it has to produce and the large number of mathematical symbols which it has to produce. A L TEX is one of a number of ‘dialects’ of TEX, all based on the version of TEX created A by D. E. Knuth which is known as Plain TEX. L TEX (created by L. B. Lamport) is one of these ‘dialects’. It is particularly suited to the production of long articles and books, since it has facilities for the automatic numbering of chapters, sections, theorems, equations etc., and also has facilities for cross-referencing. It is probably A one of the most suitable version of L TEX for beginners to use.

1.2

A A Typical LTEX Input File

A In order to produce a document using L TEX, we must first create a suitable input A file on the computer. We apply the L TEX program to the input file and then use A the printer to print out the so-called ‘DVI’ file produced by the L TEX program (after first using another program to translate the ‘DVI’ file into a form that the printer can A understand). Here is an example of a typical L TEX input file:

2

\documentclass[a4paper,12pt]{article} \begin{document} The foundations of the rigorous study of \textit{analysis} were laid in the nineteenth century, notably by the mathematicians Cauchy and Weierstrass. Central to the study of this subject are the formal definitions of \textit{limits} and \textit{continuity}. Let $D$ be a subset of $\bf R$ and let $f \colon D \to \textbf{R}$ be a real-valued function on $D$. The function $f$ is said to be \textit{continuous} on $D$ if, for all $\epsilon > 0$ and for all $x \in D$, there exists some $\delta > 0$ (which may depend on $x$) such that if $y \in D$ satisfies \[ |y - x| < \delta \] then \[ |f(y) - f(x)| < \epsilon. \] One may readily verify that if $f$ and $g$ are continuous functions on $D$ then the functions $f+g$, $f-g$ and $f.g$ are continuous. If in addition $g$ is everywhere non-zero then $f/g$ is continuous. \end{document}
A When we apply L TEX to these paragraphs we produce the text

The foundations of the rigorous study of analysis were laid in the nineteenth century, notably by the mathematicians Cauchy and Weierstrass. Central to the study of this subject are the formal definitions of limits and continuity. Let D be a subset of R and let f : D → R be a real-valued function on D. The function f is said to be continuous on D if, for all > 0 and for all x ∈ D, there exists some δ > 0 (which may depend on x) such that if y ∈ D satisfies |y − x| < δ then |f (y) − f (x)| < .

3

One may readily verify that if f and g are continuous functions on D then the functions f + g, f − g and f.g are continuous. If in addition g is everywhere non-zero then f /g is continuous.
A This example illustrates various features of L TEX. Note that the lines

\documentclass[a4paper,12pt]{article} \begin{document} are placed at the beginning of the input file. These are followed by the main body of the text, followed by the concluding line \end{document} Note also that, although most characters occurring in this file have their usual meaning, yet there are special characters such as \, $, { and } which have special meanings within A L TEX. Note in particular that there are sequences of characters which begin with a ‘backslash’ \ which are used to produce mathematical symbols and Greek letters and to accomplish tasks such as changing fonts. These sequences of characters are known as control sequences.

1.3

Characters and Control Sequences

A We now describe in more detail some of the features of L TEX illustrated in the above example. Most characters on the keyboard, such as letters and numbers, have their usual meaning. However the characters

\ { } $ ^ _ % ~ # &
A are used for special purposes within L TEX. Thus typing one of these characters will not produce the corresponding character in the final document. Of course these characters are very rarely used in ordinary text, and there are methods of producing them when they are required in the final document. In order to typeset a mathematical document it is necessary to produce a considerable number of special mathematical symbols. One also needs to be able to change fonts. Also mathematical documents often contain arrays of numbers or symbols (maA trices) and other complicated expressions. These are produced in L TEX using control sequences. Most control sequences consist of a backslash \ followed by a string of (upper or lower case) letters. For example, \alpha, \textit and \sum are control sequences. In the example above we used the control sequences \textit and \textbf to change the font to italic and boldface respectively. Also we used the control sequences \to,

4

to produce the phrase for all > 0 and for all x ∈ D. Everything enclosed within matching pair of such brackets is treated as a single unit. when we need to produce superscripts and subscripts which contain more than one symbol).1 A Producing Simple Documents using LTEX A Producing a LTEX Input File A We describe the structure of a typical L TEX input file. We shall see other instances A where one needs to use { and } in L TEX to group words and symbols together (e. in the example given above. The remaining special characters ^ _ % ~ # & A have special purposes within L TEX that we shall discuss later. 2 2.\in.12pt]{article} 5 .g. The first line of the input file should consist of a \documentclass command. \delta and \epsilon to produce the mathematical symbols → and ∈ and the Greek letters δ and There is another variety of control sequence which consists of a backslash followed by a single character that is not a letter. Thus we used for all $\epsilon > 0$ and for all $x \in D$. Examples of control sequences of this sort are \{. Note also that we used \[ and \] in the example above to mark the beginning and end respectively of a mathematical formula that is displayed on a separate line. The special characters { and } are used for grouping purposes.. We have applied these brackets in the example above whenever we changed fonts. The special character $ is used when one is changing from ordinary text to a mathematical expression and when one is changing back to ordinary text. The recommended such \documentclass command for mathematical articles and similar documents has the form \documentclass[a4paper. \" and \$.

without complicated mathematical formulae or special effects such as font changes. then one merely has to type it in as it is.(You do not have to worry about what this command means when first learning to use A L TEX: its effect is to ensure that the final document is correctly positioned on A4 size paper and that the text is of a size that is easy to read. It is not necessary to find out about these A commands when first learning to use L TEX. The documentstyle command may be followed by certain other optional commands. then one merely has to type it in as it is. If one merely wishes to type in ordinary text. You do not have A to worry about paragraph indentation: L TEX will automatically indent all paragraphs with the exception of the first paragraph of a new section (unless you take special A action to override the conventions adopted by L TEX) For example. and the text of the document should be sandwiched between the \begin{document} and \end{document} commands in the manner described below. one should use two ‘single quote’ 6 .) There are variants of this \documentclass command which are appropriate for letters or for books. leaving a completely blank line between successive paragraphs. Also. we place the command \begin{document} This command is then followed by the main body of the text. without complicated mathematical formulae or special effects such as font changes. in the format preA scribed by the rules of L TEX. suppose that we wish to create a document containing the following paragraphs: If one merely wishes to type in ordinary text. One must take care to distinguish between the ‘left quote’ and the ‘right quote’ on the computer terminal. You do not have to worry about paragraph indentation: all paragraphs will be indented with the exception of the first paragraph of a new section. we end the input file with a line containing the command \end{document} 2. After the \documentclass command and these other optional commands.2 A Producing Ordinary Text using LTEX A A To produce a simple document using L TEX one should create a L TEX input file. Finally. The input file should end with the \end{document} command. beginning with a \documentclass command and the \begin{document} command. as described above. leaving a completely blank line between successive paragraphs. such as the \pagestyle command.

since the computer is unable to tell whether it is a ‘left quote’ or a ‘right quote’. \end{document} A Having created the input file. leaving a completely blank line between successive paragraphs. One also has to take care with dashes: a single dash is used for hyphenation. 7 . one then has to run it through the L TEX program and then print it out the resulting output file (known as a ‘DVI’ file). One should never use the (undirected) ‘double quote’ character on the computer terminal. whereas three dashes in succession are required to produce a dash of the sort used for punctuation—such as the one used in this sentence. one should use two ‘single quote’ characters in succession if one requires ‘‘double quotes’’. You do not have to worry about paragraph indentation: all paragraphs will be indented with the exception of the first paragraph of a new section. One must take care to distinguish between the ‘left quote’ and the ‘right quote’ on the computer terminal. A To create this document using L TEX we use the following input file: \documentclass[a4paper. since the computer is unable to tell whether it is a ‘left quote’ or a ‘right quote’. without complicated mathematical formulae or special effects such as font changes. Also.characters in succession if one requires “double quotes”. One should never use the (undirected) ‘double quote’ character on the computer terminal. whereas three dashes in succession are required to produce a dash of the sort used for punctuation---such as the one used in this sentence. then one merely has to type it in as it is. One also has to take care with dashes: a single dash is used for hyphenation.12pt]{article} \begin{document} If one merely wishes to type in ordinary text.

preceding a blank space by a backslash forces L TEX to include the blank space in the final document. then we obtain This is a silly example of a file with many spaces. A A Similarly L TEX treats tab characters as blank spaces. then you A run the risk that L TEX might start a new line immediately after the left parenthesis or before the right parenthesis. Thus in order to obtain the sentence A L TEX is a very powerful computer typesetting program. This is the beginning of a new paragraph. we must type \LaTeX\ is a very powerful computer typesetting program. L TEX regards a sequence of blank spaces as though it were a single space. then you must precede this blank by a backslash \. If you were to put a blank space in these places. Moreover. As a general rule. if we type This is a silly example of a file with many spaces. you should never put a blank space after a left parenthesis or before a right parenthesis.3 Blank Spaces and Carriage Returns in the Input File A L TEX treats the carriage return at the end of a line as though it were a blank space.2. It follows immediately from this that one will obtain the same results whether one A types one space or two spaces after a full stop: L TEX does not distinguish between the two cases. 8 . leaving the parenthesis marooned at the beginning or end of a line. If you really need a blank space in the final document following whatever is produced by the control sequence. for example. This is the beginning of a new paragraph. A (Here the control sequence TeX is used to produce the L TEX logo.) A In general. A Any spaces which follow a control sequence will be ignored by L TEX. and similarly it will ignore blank spaces at the beginning or end of a line in the input file. Thus.

” (taken from Alice through the Looking Glass.’’ said the Knight. The dialogue “You were a little grave. first I put my head on the top of the gate—then the head’s high enough—then I stand on my head—then the feet are high enough.and em-dashes by typing ---. I said to myself ‘The only difficulty is with the feet: the head is high enough already. you see. ‘‘I’ll tell you how I came to think of it. ‘‘Well just then I was inventing a new way of getting over a gate---would you like to hear it?’’ ‘‘Very much indeed. known as ‘hyphens’. One normally uses en-dashes when specifying a range of numbers. by Lewis Carroll) illustrates the use of A quotation marks and dashes. “Well just then I was inventing a new way of getting over a gate—would you like to hear it?” “Very much indeed. I said to myself ‘The only difficulty is with the feet: the \emph{head} is high enough already. en-dashes by typing -.’ Now. you see—then I’m over. Dashes used for punctuating are often typeset as em-dashes. Double quotation marks are produced by typing ‘‘ and ’’. ‘enA dashes’ and ‘em-dashes’. These are obtained by typing ---. one would type on pages 155--219.’’ said Alice.” said the Knight.” said Alice. to specify a range of page numbers.’’ Alice said politely. “You see. first I put my head on the top of the gate---then the head’s high 9 .’ Now. especially in older books. It is obtained in L TEX from the following input: ‘‘You \emph{were} a little grave.2.” Alice said politely. Thus for example. Hyphens are obtained in L TEX by typing -. (The ‘undirected double quote character " produces double right quotation marks: it should never be used where left quotation marks are required.4 Quotation Marks and Dashes A Single quotation marks are produced in L TEX using ‘ and ’. “I’ll tell you how I came to think of it.) A L TEX allows you to produce dashes of various length. ‘‘You see.

enough---then I stand on my head---then the feet are high enough. \subsection{Headings in the ‘article’ Document Style} In the ‘article’ style. and will be numbered accordingly. as in “I regard computer typesetting as being reasonably ‘straightforward’ ” he said. 2. The above example is thus produced with the input ‘‘I regard computer typesetting as being reasonably ‘straightforward’\. 10 . you see---then I’m over. subsections and subsubsections. Thus if we type \section{Section Headings} We explain in this section how to obtain headings for the various sections and subsections of our document. A The way to typeset this correctly in L TEX is to use the control sequence \.’’ he said.\subsection and \subsubsection commands. Other document styles (such as the book and letter styles) have other ‘sectioning’ commands available (for example. simply by issuing the appropriate command. the book style has a \chapter command for beginning a new chapter). the document may be divided up into sections. between the quotation marks. so as to obtain the necessary amount of separation. The title of the section should be surrounded by curly brackets and placed immediately after the relevant command. you see. L TEX will number the sections and subsections automatically.5 A Section Headings in LTEX Section headings of various sizes are produced (in the article document style) using A the commands \section. or vica versa.’’ Sometimes you need single quotes immediately following double quotes. and each can be given a title. then the title of the section and that of the subsection will be printed in a large boldface font. printed in a boldface font.

the section numbers in the above example could be suppressed by typing \section*{Section Headings} We explain in this section how to obtain headings for the various sections and subsections of our document. the document may be divided up into sections. \emph{Fermat}. printed in a boldface font. This can be done by placing an asterisk before the title of the section or subsection. Barrow and others. Thus. A A font family or typeface in L TEX consists of a collection of related fonts characA terized by size. \emph{Barrow} and others. and each can be given a title. which typesets the specified portion of text in boldface. Another useful font-changing command is \textbf{text}. sans serif and typewriter: • Roman is normally the default family and includes upright. is obtained by typing The basic results and techniques of \emph{Calculus} were discovered and developed by \emph{Newton} and \emph{Leibniz}. Fermat. The font families available in L TEX include roman. 11 . small caps and boldface fonts of various sizes. though many of the basic ideas can be traced to earlier work of Cavalieri. for example.A Sometimes one wishes to suppress the automatic numbering provided by L TEX. The most useful of these is \emph{text} which emphasizes some piece of text. the text The basic results and techniques of Calculus were discovered and developed by Newton and Leibniz. though many of the basic ideas can be traced to earlier work of \emph{Cavalieri}. slanted. setting it usually in an italic font (unless the surrounding text is already italicized). subsections and subsubsections. italic.6 Changing Fonts in Text Mode A L TEX has numerous commands for changing the typestyle. shape and series. 2. simply by issuing the appropriate command. \subsection*{Headings in the ‘article’ Document Style} In the ‘article’ style. Thus for example.

\scriptsize. This text is Large. italic. This text is footnotesize. This text is small. \huge and \HUGE: This text is tiny . italic. This text is Huge. slanted and small caps fonts of various sizes. • The LaTeX command \textsl{text} typesets the specified text with a slanted shape: slanted text is similar to italic. • There is a typewriter family with upright.• There is a sans serif family with upright. The series of a font can be medium (the default) or boldface: • The LaTeX command \textmd{text} typesets the specified text with a medium series font. \small. The shape of a font can be upright. This text is LARGE. \footnotesize. \LARGE. • The LaTeX command \textsc{text} typesets the specified text with a small caps shape in which all letters are capitals (with uppercase letters taller than lowercase letters). 12 . \Large. This text is huge. \normalsize. • The LaTeX command \textit{text} typesets the specified text with an italic shape. A The sizes of fonts used in L TEX are can be determined and changed by means of the control sequences \tiny. slanted or small caps: • The LaTeX command \textup{text} typesets the specified text with an upright shape: this is normally the default shape. slanted and boldface fonts of various sizes. This text is large. \large. This text is normalsize. This text is scriptsize.

produces Se´n O Cinn´ide. shape and series of a font. Thus typing Se\’{a}n \’{O} Cinn\’{e}ide. When included in the L TEX input such declarations determine the type-style of the subsequent text (till the next font declaration or the end of the current ‘group’ delimited by curly brackets or by appropriate \begin and \end commands).• The LaTeX command \textbf{text} typesets the specified text with a boldface series font. The accents provided by L TEX a include the following: 13 . one can combine changes to the size. A There are in L TEX font declarations corresponding to the the font-changing comA mands described above. the control sequence \’{o} produces an acute accent on the letter o. If the necessary fonts are available.7 Accents used in Text There are a variety of control sequences for producing accents. for example producing boldface slanted text by typing \textbf{\textsl{boldface slanted text}}. a ´ e Similarly we use the control sequence \‘ to produce the grave accent in ‘alg`bre’ and e A we use \" to produce the umlaut in ‘Universit¨t’. Here is a list of font-changing commands and declarations in text mode: Command \textrm \textsf \texttt \textup \textit \textsl \textsc \textmd \textbf Declaration \rmfamily \sffamily \ttfamily \upshape \itshape \slshape \scshape \mdseries \bfseries Roman family Sans serif family Typewriter family Upright shape Italic shape Slanted shape Small caps shape Medium series Boldface series 2. For example.

\v{C}ech yields ‘Cech’ o ˝ oo c ¸ e. The control sequences \i and \j produce dotless ‘i’ and ‘j’.g.) Other special symbols can be introduced into text using the appropriate control sequences: 14 .g.g. since different control sequences are used to produce accents within mathematics.g.g.{o} \u{o} \v{c} \H{o} \t{oo} \c{c} \d{o} \b{o} 2. 94 and 126 are the ASCII codes of these characters.. On the rare occasions when one needs to use the special characters #$%& {} in the final document. However the characters \.g. ma\~{n}ana yields ‘ma˜ana’ ˜ n o ¯ o ˙ o ˘ ˇ ˇ c e.. alg\‘{e}bre yields ‘alg`bre’ e ˆ e e.´ e e. gar\c{c}on yields ‘gar¸on’ c o . math\’{e}matique yields ‘math´matique’ e ` e e. They can however be produced using \char92 (in the \texttt font only).8 Active Characters and Special Symbols in Text The ‘active characters’ # $ % & \ ^ _ { } ~ A have special purposes within L TEX.g. i \’{e} \‘{e} \^{e} \"{o} \~{n} \={o} \. Thus they cannot be produced in the final document simply by typing them directly.. they can be produced by typing the control sequences \# \$ \% \& \_ \{ \} respectively. o ¯ These accents are for use in ordinary text. These are required when placing an accent on the letter.. They cannot be used within mathematical formulae. ^ and ~ cannot be produced simply by preceding them with a backslash. H\"{o}lder yields ‘H¨lder’ o n e. \char94 and \char126 respectively. Thus ´ is produced by typing \’{\i}. (The decimal numbers 92.... h\^{o}te yields ‘hˆte’ o o ¨ e.

15 . are placed within $ signs. When a formula occurs within the text of a paragraph one should place a $ sign before and after the formula.Symbol œ. note that even mathematical expressions consisting of a single character. \AA \o. This is to ensure that they are set in italic type. A ø. Thus to obtain a sentence like Let f be the function defined by f (x) = 3x + 7.1 A Producing Mathematical Formulae using LTEX Mathematics Mode A In order to obtain a mathematical formula using L TEX. Mathematical formulae can occur either embedded in text or else displayed between lines of text. A L TEX also allows you to use \( and \) to mark the beginning and the end respectively of a mathematical formula embedded in text. Thus Let f be the function defined by f (x) = 3x + 7. \L \ss ?‘ !‘ \dag \ddag \S \P \copyright \pounds \i \j 3 3. one should type Let $f$ be the function defined by $f(x) = 3x + 7$. \OE \ae. and let a be a positive real number. Æ ˚ ˚ a. one must enter mathematics mode before the formula and leave it afterwards. Ø l. L ß ¿ ¡ † ‡ § ¶ c £ ı  Control Sequence \oe. In particular. and let $a$ be a positive real number. as is customary in mathematical typesetting. in order to enter and leave mathematics mode. \O \l. like f and a in the example above. Œ æ. \AE \aa.

Thus to obtain If f (x) = 3x + 7 and g(x) = x + 4 then f (x) + g(x) = 4x + 11 and f (x)g(x) = 3x2 + 19x + 28.. If you want an numbered equation then you use \begin{equation} and \end{equation} instead of using \[ and \] . A However this use of \( . \) is only permitted in L TEX: other dialects of TeX such as Plain TEX and AmSTeX use $ . 16 (2) (1) ..may be produced by typing Let \( f \) be the function defined by \( f(x) = 3x + 7 \). \] (Here the character ^ is used to obtain a superscript. one places \[ before and \] after the formula. $.. \end{equation} produces If f (x) = 3x + 7 and g(x) = x + 4 then f (x) + g(x) = 4x + 11 and f (x)g(x) = 3x2 + 19x + 28. Thus If $f(x) = 3x + 7$ and $g(x) = x + 4$ then \begin{equation} f(x) + g(x) = 4x + 11 \end{equation} and \begin{equation} f(x)g(x) = 3x^2 + 19x +28.) A L TEX provides facilities for the automatic numbering of displayed equations. In order to obtain an mathematical formula or equation which is displayed on a line by itself.. one would type If $f(x) = 3x + 7$ and $g(x) = x + 4$ then \[ f(x) + g(x) = 4x + 11 \] and \[ f(x)g(x) = 3x^2 + 19x +28.

the characters involved should be enclosed in curly brackets. For example. one should type \# \$ \% \& \_ \{ \} .3. if you are typing in a complicated formula with many Greek characters and funny symbols) and this will have no effect on the final result if you are in mathematics mode. one may type \backslash. since L TEX determines the spacing of characters in formulae by its own internal rules. the polynomial x17 − 1 is obtained by typing $x^{17} .c^2 dt^2 \] since.. with the exception of the characters # $ % & ~ _ ^ \ { } ’ Letters are set in italic type.3 Superscripts and Subscripts Subscripts and superscripts are obtained using the special characters _ and ^ respectively. when a superscript is to appear above a subscript. Thus the identity ds2 = dx2 + dx2 + dx2 − c2 dt2 1 2 3 is obtained by typing \[ ds^2 = dx_1^2 + dx_2^2 + dx_3^2 .2 Characters in Mathematics Mode All the characters on the keyboard have their standard meaning in mathematics mode. 3.1$. Thus $u v + w = x$ and $uv+w=x$ both produce uv + w = x You can also type carriage returns where necessary in your input file (e. Where more than one character occurs in a superscript or subscript.g. To obtain in mathematics mode. In mathematics mode the character ’ has a special meaning: typing $u’ + v’’$ produces u + v When in mathematics mode the spaces you type between letters and other symbols do not affect the spacing of the final A result. To obtain the characters # $ % & _ { } in mathematics mode.c^2 dt^2 \] It can also be obtained by typing \[ ds^2 = dx^2_1 + dx^2_2 + dx^2_3 . 17 . it is immaterial whether the superscript or subscript is the first to be specified.

the identity Ri j kl = g jm Rimkl = −g jm Rmikl = −Rj ikl can be obtained by typing \[ R_i{}^j{}_{kl} = g^{jm} R_{imkl} = . The variant forms are obtained by preceding the name of the Greek letter by ‘var’.One may not type expressions such as $s^n^j$ since this is ambiguous and could be j interpreted either as snj or as sn The first of these alternatives is obtained by typing $s^{n j}$. the second by typing $s^{n^j}$. Note that one can obtain in this way double superscripts (where a superscript is placed on a superscript) and double subscripts. It is sometimes necessary to obtain expressions in which the horizontal ordering of the subscripts is significant. Here are the control sequences for the standard forms of the lowercase Greek letters:α β γ δ ζ η θ \alpha \beta \gamma \delta \epsilon \zeta \eta \theta ι κ λ µ ν ξ o π \iota \kappa \lambda \mu \nu \xi o \pi ρ σ τ υ φ χ ψ ω \rho \sigma \tau \upsilon \phi \chi \psi \omega There is no special command for omicron: just use o.g^{jm} R_{mikl} = .R^j{}_{ikl} \] 3. A similar remark applies to subscripts. For example. Thus to obtain the formula A = πr2 one types A = \pi r^2. One can use an ‘empty group’ {} to separate superscripts and subscripts that must follow one another.4 Greek Letters Greek letters are produced in mathematics mode by preceding the name of the letter by a backslash \. Some Greek letters occur in variant forms. The following table lists the usual form of these letters and the variant forms:\epsilon \theta \pi \rho \sigma \phi ε ϑ \varepsilon \vartheta \varpi \varrho \varsigma \varphi θ π ρ σ φ ς ϕ 18 .

These are obtained by typing an appropriate control sequence. Miscellaneous Symbols: ℵ h ¯ ı  \aleph \hbar \imath \jmath \ell ℘ \wp \Re \Im ∂ \partial ∞ \infty ∅ √ ⊥ \ \prime \emptyset \nabla \surd \top \bot \| \angle \triangle \backslash ∀ ∃ ¬ ♣ ♦ ♥ ♠ \forall \exists \neg \flat \natural \sharp \clubsuit \diamondsuit \heartsuit \spadesuit “Large” Operators: \sum \prod \coprod \int \oint Binary Operations: \bigcap \bigcup \bigsqcup \bigvee \bigwedge \bigodot \bigotimes \bigoplus \biguplus 19 .5 Mathematical Symbols There are numerous mathematical symbols that can be used in mathematics mode. Here are the control sequence for the uppercase letters:— Γ ∆ Θ Λ \Gamma \Delta \Theta \Lambda Ξ Π Σ Υ \Xi \Pi \Sigma \Upsilon Φ Ψ Ω \Phi \Psi \Omega 3.Upper case Greek letters are obtained by making the first character of the name upper case.

± \ · × ∗ ◦ • ÷ Relations: ≤ \pm \mp \setminus \cdot \times \ast \star \diamond \circ \bullet \div ∩ ∪ \cap \cup \uplus \sqcap \sqcup \triangleleft \triangleright \wr \bigcirc \bigtriangleup \bigtriangledown ∨ ∧ ⊕ ⊗ † ‡ \vee \wedge \oplus \ominus \otimes \oslash \odot \dagger \ddagger \amalg ⊂ ⊆ ∈ \leq \prec \preceq \ll \subset \subseteq \sqsubseteq \in \vdash \smile \frown ≥ ⊃ ⊇ | \geq \succ \succeq \gg \supset \supseteq \sqsupseteq \ni \dashv \mid \parallel ≡ ∼ ≈ ∼ = ∝ |= . = ⊥ \equiv \sim \simeq \asymp \approx \cong \bowtie \propto \models \doteq \perp Negated Relations: < ≤ ⊂ ⊆ Arrows: \not< \not\leq \not\prec \not\preceq \not\subset \not\subseteq \not\sqsubseteq > ≥ ⊃ ⊇ \not> \not\geq \not\succ \not\succeq \not\supset \not\supseteq \not\sqsupseteq = ≡ ∼ ≈ ∼ = \not= \not\equiv \not\sim \not\simeq \not\approx \not\cong \not\asymp 20 .

← \leftarrow ←− \longleftarrow ⇐ \Leftarrow ⇐= \Longleftarrow ↔ \leftrightarrow ←→ \longleftrightarrow ← \hookleftarrow \leftharpoonup \leftharpoondown ↑ \uparrow ⇑ \Uparrow \updownarrow \nearrow \searrow → \mapsto \rightleftharpoons Openings: [ { Closings: ] } Alternative Names: \rbrack \rbrace \lbrack \lbrace → \rightarrow −→ \longrightarrow ⇒ \Rightarrow =⇒ \Longrightarrow ⇔ \Leftrightarrow ⇐⇒ \Longleftrightarrow → \hookrightarrow \rightharpoonup \rightharpoondown ↓ \downarrow ⇓ \Downarrow \Updownarrow \nwarrow \swarrow −→ \longmapsto \lfloor \langle \lceil \rfloor \rangle \rceil 21 .

6 Changing Fonts in Mathematics Mode A A (The following applies to LTEX2 . u. to change a character to the roman or boldface font. To obtain Let u. u + w. Also.$\mathbf{v}$ and $\mathbf{w}$ be three 22 . u + v. The following example illustrates the use of boldface in mathematical formulae. v + w and u + v + w is given by the formula V = (u × v) · w. v.) The ‘math italic’ font is automatically used in mathematics mode unless you explicitly change the font. but with extra space at each end) (same as :. but with less space around it and less likelihood of a line break after it) 3.v and w be three vectors in R3 . a recent version of LTEX. The rules for changing the font in mathematics mode are rather different to those applying when typesetting ordinary text. The volume V of the parallelepiped with corners at the points 0. w. the control sequences \mathrm and \mathbf must be used (rather than \textrm and \textbf). In mathematics mode any change only applies to the single character or symbol that follows (or to any text enclosed within curly brackets immediately following the control sequence).= ≤ ≥ { } → ← ∧ ∨ ¬ | ⇐⇒ : \ne or \neq \le \ge \{ \} \to \gets \owns \land \lor \lnot \vert \Vert \iff \colon (same as \not=) (same as \leq) (same as \geq) (same as \lbrace) (same as \lbrace) (same as \rightarrow) (same as \leftarrow) (same as \ni) (same as \wedge) (same as \vee) (same as \neg) (same as |) (same as \|) (same as \Longleftrightarrow. one could type Let $\mathbf{u}$. It does not apply to older A versions of LTEX.

) The names of certain standard functions and abbreviations are obtained by typing a backlash \ before the name. e. $\mathbf{u}+\mathbf{w}$. For example.7 Standard Functions (sin.vectors in ${\mathbf R}^3$. 23 . Thus one obtains cosecA by typing $\mathrm{cosec} A$. $\mathbf{v}+\mathbf{w}$ and $\mathbf{u}+\mathbf{v}+\mathbf{w}$ is given by the formula \[ V = (\mathbf{u} \times \mathbf{v}) \cdot \mathbf{w}. $\mathbf{u}$. $\mathbf{u}+\mathbf{v}$.\] There is also a ‘calligraphic’ font available in mathematics mode. cos etc. c and A and typeset the formula accordingly. because A L TEX has treated cosec A as the product of six quantities c. $\mathbf{w}$. This font can only be used for uppercase letters. This is obtained using the control sequence \cal. one obtains cos(θ + φ) = cos θ cos φ − sin θ sin φ by typing \[ \cos(\theta + \phi) = \cos \theta \cos \phi . The volume~$V$ of the parallelepiped with corners at the points $\mathbf{0}$. 3. o. $\mathbf{v}$. These calligraphic letters have the form ABCDEFGHIJ KLMN OPQRST UVWX YZ.\sin \theta \sin \phi \] The following standard functions are represented by control sequences defined in A L TEX: \arccos \arcsin \arctan \arg \cos \cosh \cot \coth \csc \deg \det \dim \exp \gcd \hom \inf \ker \lg \lim \liminf \limsup \ln \log \max \min \Pr \sec \sin \sinh \sup \tan \tanh Names of functions and other abbreviations not in this list can be obtained by converting to the roman font. Note that if one were to type simply $cosec A$ one would obtain cosecA. s.

(In Plain TEX one should use \hbox in place of \mbox. Had we typed \[ M^\bot = \{ f \in V’ : f(m) = 0 \mbox{for all} m \in M \}.\] Note the blank spaces before and after the words ‘for all’ in the above example.7}{x^2 + 4}\] for all real numbers $x$. by typing \[ M^\bot = \{ f \in V’ : f(m) = 0 \mbox{ for all } m \in M \}. one would type The function $f$ is given by \[ f(x) = 2x + \frac{x . one obtains M ⊥ = {f ∈ V : f (m) = 0 for all m ∈ M }. For example.\] we would have obtained M ⊥ = {f ∈ V : f (m) = 0for allm ∈ M }. For example.) 3.3. to obtain The function f is given by f (x) = 2x + for all real numbers x. To obtain square roots one uses the control sequence 24 x−7 x2 + 4 Fractions of the form .9 Fractions and Roots numerator denominator A are obtained in L TEX using the construction \frac{numerator }{denominator }.8 Text Embedded in Displayed Equations A Text can be embedded in displayed equations (in L TEX) by using \mbox{embedded text}.

.3px . For example. A in L TEX. ‘three dots’) Ellipsis (three dots) is produced in mathematics mode using the control sequences \ldots (for dots aligned with tbe baseline of text).p^3 }} \] where the values of the two cube roots must are chosen so as to ensure that their product is equal to $p$. Thus the formula f (x1 . . xn ) = x2 + x2 + · · · + x2 1 2 n is obtained by typing 25 . 3. x2 .10 Ellipsis (i. an nth root is produced using \sqrt[n]{expression}.\sqrt{expression}.4ac}}{2a} \] A In L TEX.2q$ are given by the formula \[ \sqrt[3]{q + \sqrt{ q^2 . .. and \cdots (for dots aligned with the centreline of mathematical formulae).p^3 }} + \sqrt[3]{q .e. to obtain The roots of a quadratic polynomial ax2 + bx + c with a = 0 are given by the formula √ −b ± b2 − 4ac 2a one would type The roots of a quadratic polynomial $a x^2 + bx + c$ with $a \neq 0$ are given by the formula \[ \frac{-b \pm \sqrt{b^2 . one would type The roots of a cubic polynomial of the form $x^3 .\sqrt{ q^2 . to obtain The roots of a cubic polynomial of the form x3 − 3px − 2q are given by the formula 3 q+ q 2 − p3 + 3 q− q 2 − p3 where the values of the two cube roots must are chosen so as to ensure that their product is equal to p. . For example.

x} = 1 + x + x^2 + \cdots + x^n \] 3.\[ f(x_1. ] and \}. we obtain 26 . The control sequences such as \’ and \". used to produce accents in ordinary text.12 Brackets and Norms The frequently used left delimiters include (. overlining and various accents in mathematics mode.11 Accents in Mathematics Mode There are various control sequences for producing underlining. may not be used in mathematics mode. The following table lists these control sequences.\ldots. 3. and are obtained by typing | and \| respectively. Underlining is used very rarely in print. For example. [ and \{ respectively. x_2. x_n) = x_1^2 + x_2^2 + \cdots + x_n^2 \] Similarly the formula 1 − xn+1 = 1 + x + x2 + · · · + xn 1−x is produced using \cdots. The corresponding right delimiters are of course obtained by typing ). which are obtained by typing (.x^{n+1}}{1 . by typing \[ \frac{1 . In addition | and are used as both left and right delimiters. [ and {. applying them to the letter a: a a a ˆ a ˇ a ˜ a ´ a ` a ˙ a ¨ a ˘ a ¯ a \underline{a} \overline{a} \hat{a} \check{a} \tilde{a} \acute{a} \grave{a} \dot{a} \ddot{a} \breve{a} \bar{a} \vec{a} It should be borne in mind that when a character is underlined in a mathematical manuscript then it is normally typeset in bold face without any underlining.

denoted by f .\] 27 . One may also nest pairs of delimiters within one another: by typing \[ \left| 4 x^3 + \left( x + \frac{42}{1+x^4} \right) \right|. and let L TEX do the rest of the work for you.\] A If you type a delimiter which is preceded by \left then L TEX will search for a corresponding delimiter preceded by \right and calculate the size of the delimiters required to enclose the intervening subformula.+\infty) : |f(x)| \leq K \|x\| \mbox{ for all } x \in X \}. for instance. The norm of f .y. y. and \right. To do this. the problem of typesetting 4x3 + x + du dx . 1 + y2 The way to type the large parentheses is to type \left( for the left parenthesis and A \right) for the right parenthesis. 1 + x4 By typing \left. z) = 3y 2 z 3 + 7x + 5 . \frac{du}{dx} \right|_{x=0}. we suppose that the derivative is enclosed by delimiters. denoted by $\|f\|$. x=0 We wish to make the vertical bar big enough to match the derivative preceding it. the problem of typesetting the following formula: f (x. for example.\] Larger delimiters are sometimes required which have the appropriate height to match the size of the subformula which they enclose. where the left delimiter is invisible and the right delimiter is the vertical line. Thus the above formula was obtained by typing \[ f(x. Consider. by typing Let $X$ be a Banach space and let $f \colon B \to \textbf{R}$ be a bounded linear functional on $X$. is defined by f = inf{K ∈ [0. One is allowed to balance a \left( with a \right] (say) if one desires: there is no reason why the enclosing delimiters have to have the same shape. is defined by \[ \|f\| = \inf \{ K \in [0.\] we obtain 42 .z) = 3y^2 z \left( 3 + \frac{7x+5}{1 + y^2} \right). Consider. and thus the whole formula is produced by typing \[ \left. The invisible delimiter is produced using \left. one obtains null delimiters which are completely invisible.Let X be a Banach space and let f : B → R be a bounded linear functional on X. +∞) : |f (x)| ≤ K x for all x ∈ X}. The \textit{norm} of $f$.

It was done in the above example merely to improve the appearance (and readability) of the input file. The above example was obtained by typing the lines \begin{eqnarray*} \cos 2\theta & = & \cos^2 \theta .13 A Multiline Formulae in LTEX Consider the problem of typesetting the formula cos 2θ = cos2 θ − sin2 θ = 2 cos2 θ − 1. When the formula is typeset. Although we have placed corresponding occurrences of & beneath one another in the above example.1. A It is necessary to ensure that the = signs are aligned with one another. such a formula is typeset using the eqnarray* environment. In L TEX. \end{eqnarray*} Note the use of the special character & as an alignment tab. |ζ − z|2 = was obtained by typing 28 . The more complicated example 1 If h ≤ 2 |ζ − z| then 1 |ζ − z − h| ≥ |ζ − z| 2 and hence 1 1 − ζ −z−h ζ −z (ζ − z) − (ζ − z − h) (ζ − z − h)(ζ − z) h = (ζ − z − h)(ζ − z) 2|h| ≤ . it is not necessary to do this in the input file.3.\sin^2 \theta \\ & = & 2 \cos^2 \theta . the part of the second line of the formula beginning with an occurrence of & will be placed immediately beneath that part of the first line of the formula which begins with the corresponding occurrence of &. Also \\ is used to separate the lines of the formula.

If $h \leq \frac{1}{2} |\zeta .z .h| \geq \frac{1}{2} |\zeta . you should use \begin{eqnarray} and \end{eqnarray}. suppose that we wish to typeset the following passage: The characteristic polynomial χ(λ) of the 3 × 3 matrix  a b c    d e f  g h i is given by the formula λ − a −b −c χ(λ) = −d λ − e −f .z|\] and hence \begin{eqnarray*} \left| \frac{1}{\zeta . \end{eqnarray*} The asterisk in eqnarray* is put there to suppress the automatic equation numberA ing produced by L TEX.h)(\zeta .14 A Matrices and other arrays in LTEX A Matrices and other arrays are produced in L TEX using the array environment.h)}{(\zeta . If you wish for an automatically numbered multiline formula.h)(\zeta . 3.\frac{1}{\zeta .z . −g −h λ − i This passage is produced by the following input: The \emph{characteristic polynomial} $\chi(\lambda)$ of the $3 \times 3$~matrix \[ \left( \begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array} \right)\] is given by the formula \[ \chi(\lambda) = \left| \begin{array}{ccc} 29  .z)} \right| \\ & = & \left| \frac{h}{(\zeta .(\zeta .z} \right| & = & \left| \frac{(\zeta . For example.z)} \right| \\ & \leq & \frac{2 |h|}{|\zeta .z .z|$ then \[ |\zeta .h} .z .z) .z .z|^2}.

Next note the use of the alignment tab character & to separate the entries of the matrix and the use of \\ to separate the rows of the matrix. and r would produce a column with all entries flush right. Now each of the c’s in {ccc} represents a column of the matrix and indicates that the entries of the column should be centred.e & -f \\ -g & -h & \lambda . \right) then the size of the parentheses is chosen to match the subformula that they enclose. If the c were replaced by l then the corresponding column would be typeset with all the entries flush left. if we use \left) . therefore.. This delimiter is invisible. The only thing left to explain.i \end{array} \right|. We begin the array with \begin{array} and end it with \end{array}. Thus we use {ll} immediately after \begin{array}. −x if x < 0. Note that both columns of this array are set flush left. We can therefore obtain the above formula by typing 30 . Thus \[ \begin{array}{lcr} \mbox{First number} & x & 8 \\ \mbox{Second number} & y & 15 \\ \mbox{Sum} & x + y & 23 \\ \mbox{Difference} & x . The large curly bracket is produced using \left\{. We therefore use the null delimiter \right.\lambda . As we have already seen.a & -b & -c \\ -d & \lambda . discussed earlier.\] First of all. However this requires a corresponding \right delimiter to match it.. note the use of \left and \right to produce the large delimiters around the arrays. exactly as in the construction of multiline formulae described above.y & -7 \\ \mbox{Product} & xy & 120 \end{array}\] produces First number x 8 Second number y 15 Sum x + y 23 Difference x − y −7 Product xy 120 We can use the array environment to produce formulae such as |x| = x if x ≥ 0. is the mysterious {ccc} which occurs immediately after \begin{array}.

\] 3. x→+∞ x2 + 1 A (in L TEX) we type \[ \lim_{x \to +\infty} \frac{3x^2 +7x^3}{x^2 +5x^4} = 3. 2 k=1 is obtained by typing 31 n . Limits. Thus to obtain 3x2 + 7 lim = 3.\] To obtain a summation sign such as 2n i=1 we type sum_{i=1}^{2n}.\\ -x & \mbox{if $x < 0$}. inf and sup x>s K in displayed equations we type \lim_{x \to +\infty}. The mathematical symbol ∂ is produced using \partial. Thus the Heat Equation ∂u ∂2u ∂2u ∂2u = + + ∂t ∂x2 ∂y 2 ∂z 2 A is obtained in L TEX by typing \[\frac{\partial u}{\partial t} = \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} + \frac{\partial^2 u}{\partial z^2} \] To obtain mathematical expressions such as x→+∞ lim . Sums and Integrals The expressions du d2 u and 2 dt dx A X by typing \frac{du}{dt} and \frac{d^2 u}{dx^2} respecare obtained in L TE tively. Thus 1 k 2 = n(n + 1).\[ |x| = \left\{ \begin{array}{ll} x & \mbox{if $x \geq 0$}.15 Derivatives.\end{array} \right. \inf_{x > s} and \sup_K respectively.

y) dx dy = θ=0 R 0 r=0 f (r cos θ. a This is typeset using \[ \int_a^b f(x)\. as in dx.\] \[ \int \cos \theta \. 2π x2 +y 2 ≤R2 R f (x.dx = n!. A typical integral is the following: b f (x) dx.\[ \sum_{k=1}^n k^2 = \frac{1}{2} n (n+1).d\theta. and the limits of integration (in this case a and b are treated as a subscript and a superscript on the integral sign.\] We now discuss how to obtain integrals in mathematical documents. and 2x dx = log(1 + R2 ).dy = \int_{\theta=0}^{2\pi} \int_{r=0}^R f(r\cos\theta. 0 cos θ dθ = sin θ.r\sin\theta) r\.dx\.\] The integral sign is typeset using the control sequence \int. To obtain the correct appearance one should put extra space before the d. Most integrals occurring in mathematical documents begin with an integral sign and contain one or more instances of d followed by another (Latin or Greek) letter.dx}{1+x^2} = \log(1+R^2).\] 32 .dr\. Thus +∞ xn e−x dx = n!. 1 + x2 are obtained by typing \[ \int_0^{+\infty} x^n e^{-x} \. r sin θ)r dr dθ.\] \[ \int_{x^2 + y^2 \leq R^2} f(x.y)\.dx. using \.d\theta = \sin \theta.. dy and dt.\] and \[ \int_0^R \frac{2x\.

D The following (reasonably complicated) passage exhibits a number of the features which we have been discussing: In non-relativistic wave mechanics.\] Had we typed \[ \int_0^1 \int_0^1 x^2 y^2\.respectively. the wave function ψ(r. Thus.\] we would have obtained f (x. for example. ∂x2 ∂y ∂z 33 . We typeset this integral using \[ \int \!\!\! \int_D f(x.e.. y) dx dy.\] we would have obtained 0 1 0 1 x2 y 2 dx dy.dx\. A particularly noteworthy example comes when we are typesetting a multiple integral such as f (x.dx\.dy. t) of a particle satisfies the Schr¨dinger Wave Equation o i¯ h −¯ 2 h ∂ψ = ∂t 2m ∂2 ∂2 ∂2 + 2 + 2 ψ + V ψ. The way to improve the appearance of of the integral is to use the control sequence \! to remove a thin strip of unwanted space. is obtained by typing \[ \int_0^1 \! \int_0^1 x^2 y^2\.dx\. integrals containing more than one integral sign) A one finds that L TEX puts too much space between the integral signs.dy. D Here we use \! three times to obtain suitable spacing between the integral signs. the multiple integral 1 0 0 1 x2 y 2 dx dy. y) dx dy.dx\.y)\. In some multiple integrals (i.dy.y)\.\] Had we typed \[ \int \int_D f(x.dy.

|ψ(r. t)|2 dx dy dz represents the probability that the particle is to be found within the region V at time t. 0)|2 dx dy dz = 1.dz = 1. t)|2 dx dy dz = 1 |ψ(r.\] It is customary to normalize the wave equation by demanding that \[ \int \!\!\! \int \!\!\! \int_{\textbf{R}^3} \left| \psi(\mathbf{r}. If we normalize the wave function in this way then.dy\.\] and hence \[ \int \!\!\! \int \!\!\! \int_{\textbf{R}^3} \left| \psi(\mathbf{r}. V 3 R 3 |ψ(r.0) \right|^2\.dy\.dx\.t) \right|^2\.dz = 0.dy\.\] A simple calculation using the Schr\"{o}dinger wave equation shows that \[ \frac{d}{dt} \int \!\!\! \int \!\!\! \int_{\textbf{R}^3} \left| \psi(\mathbf{r}. t)|2 dx dy dz = 0. for any (measurable) subset V of R3 and time t.It is customary to normalize the wave equation by demanding that R 3 |ψ(r.dx\.t) \right|^2\.t)$ of a particle satisfies the \textit{Schr\"{o}dinger Wave Equation} \[ i\hbar\frac{\partial \psi}{\partial t} = \frac{-\hbar^2}{2m} \left( \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} + \frac{\partial^2}{\partial z^2} \right) \psi + V \psi.dx\. the wave function $\psi(\mathbf{r}. If we normalize the wave function in this 34 . A One would typeset this in L TEX by typing In non-relativistic wave mechanics.dz = 1\] for all times~$t$. A simple calculation using the Schr¨dinger wave equation shows that o d dt and hence R for all times t.

followed by the length of the blank space enclosed within curly brackets. one should type 35 . The length of the skip should A be expressed in a unit recognized by L TEX. 4 4. \[ \int \!\!\! \int \!\!\! \int_V \left| \psi(\mathbf{r}. Thus to obtain This is the first paragraph of some text.4 mm) in = 72 bp) cm = 10 mm) (1157 dd = 1238 pt) (1 cc = 12 dd) (65536 sp = 1 pt) Thus to produce a horizontal blank space of 20 mm in the middle of a paragraph one would type \hspace{20 mm}. followed by the length of the blank space enclosed within curly brackets.27 pt) pc = 12 pt) in = 25. use \hspace.dy\. These recognized units are given in the following table: pt pc in bp cm mm dd cc sp point pica inch big point centimetre millimetre didot point cicero scaled point (1 (1 (1 (1 (1 in = 72. A If L TEX decides to break between lines at a point in the document where an \hspace is specified. for any (measurable) subset~$V$ of $\textbf{R}^3$ and time~$t$. To ensure that white space is produced even at points in the document where line breaking takes place. It is separated from the second paragraph by a vertical skip of 10 millimetres.dx\. then no white space is produced. one should replace \hspace by \hspace* To produce (vertical) blank space between paragraphs.way then. This is the second paragraph. use \vspace.t) \right|^2\.dz\] represents the probability that the particle is to be found within the region~$V$ at time~$t$.1 A Further Features of LTEX A Producing White Space in LTEX To produce (horizontal) blank space within a paragraph.

A The rule adopted by L TEX is to regard a period (full stop) as the end of a sentence if it is preceded by a lowercase letter. leaving the parenthesis marooned at the beginning or end of a line. It is separated from the second paragraph by a vertical skip of 10 millimetres. However it is sometimes necessary to A tell L TEX not to break at a particular blank space. Amer. Math. A L TEX has its own rules for deciding the lengths of blank spaces. To ensure that white space is produced even at points in the document where page breaking takes place. in particular.\ Math. ‘Proc. and.. and will occasionally hyphenate long words where this is desirable. The special character used for this A purpose is ~.\ Amer. as a general rule. A X will put an extra amount of space after a full stop if it considers that the full L TE stop marks the end of a sentence. A This works very well in most cases. Soc. For instance. If the period is preceded by an uppercase letter A then L TEX assumes that it is not a full stop but follows the initials of somebody’s name. A If L TEX decides to introduce at a point in the document where a \vspace is specified. If you were to put a blank space in these A places. then no white space is produced. in the names of journals given in abbreviated form (e.’). This happens with a number of common abbreviations (as in ‘Mr. one should replace \vspace by \vspace* A We now describe certain features of L TEX relating to blank spaces and paragraph indentation which will improve the appearance of the final document.\ Smith etc.\ Soc. Thus we should type Mr.\ and Proc. A L TEX determines itself how to break up a paragraph into lines.’). Experienced A users of L TEX will improve the appearance of their documents if they bear these remarks in mind. First note that. Smith’ or in ‘etc. \vspace{10 mm} This is the second paragraph. However L TEX occasionally gets things wrong. then you run the risk that L TEX might start a new line immediately after the left parenthesis or before the right parenthesis. It represents a blank space at which L TEX is not allowed to break between 36 . The way to overcome this problem is to put a backslash before the blank space in question. you should never put a blank space after a left parenthesis or before a right parenthesis.This is the first paragraph of some text.g.

2 Lists A L TEX provides the following list environments: • enumerate for numbered lists. A L TEX will automatically indent paragraphs (with the exception of the first paraA graph of a new section). This has been achieved by placing an appropriate control sequence at the beginning of the paragraph. It is also desirable in phrases like ‘Example 7’ and ‘the length l of the rod’. the control sequence \indent forces L TEX to indent the paragraph. 4. A Conversely. This has been achieved by placing an appropriate control sequence at the beginning of the paragraph. R. One can prevent L TEX from indenting a paragraph though by beginning the paragraph with the control sequence \noindent.lines..~Hamilton. Hamilton’ it is best to type W. and which satisfies the following four axioms: 37 . • itemize for un-numbered lists. For example. \end{enumerate} The items in the list should be enclosed between \begin{enumerate} and \end{enumerate} and should each be preceded by the control sequence \item (which will automatically generate the number labelling the item). • description for description lists Numbered lists are produced using \begin{enumerate} . It is often desirable to use ~ in names where the forenames are represented by initials.~R. Thus to obtain ‘W.. obtained by typing Example~7 and the length~$l$ of the rod. d) consists of a set X on which is defined a distance function which assigns to each pair of points of X a distance between them. by typing \noindent This is the beginning of a paragraph which is not indented in the usual way. the text A metric space (X. Thus one obtains This is the beginning of a paragraph which is not indented in the usual way.

3.y) = d(y.x)$ for all points $x$ and $y$ of $X$. y and z of X.z) \leq d(x. A is generated by L TEX from the following input: A \emph{metric space} $(X.1. 4.d)$ consists of a set~$X$ on which is defined a \emph{distance function} which assigns to each pair of points of $X$ a distance between them. $y$ and $z$ of $X$. y) = d(y. and which satisfies the following four axioms: \begin{enumerate} \item $d(x. y) + d(y. \item $d(x. \item $d(x. d(x. \end{itemize} If we replace \begin{enumerate} and \end{enumerate} in the above input by \begin{itemize} and \end{itemize} A respectively. z) for all points x. d(x.z)$ for all points $x$. d(x.. x) for all points x and y of X.. 2. d(x. 38 .y) \geq 0$ for all points $x$ and $y$ of $X$. y) = 0 if and only if the points x and y coincide. d) consists of a set X on which is defined a distance function which assigns to each pair of points of X a distance between them. y) ≥ 0 for all points x and y of X. L TEX generates an itemized list in which each item is preceeded by a ‘bullet’: A metric space (X. \end{enumerate} Un-numbered lists are produced using \begin{itemize} . and which satisfies the following four axioms: • d(x.y) = 0$ if and only if the points $x$ and $y$ coincide. y) ≥ 0 for all points x and y of X.y) + d(y. \item $d(x. z) ≤ d(x.

given any point of the set. \item[closed set] A subset of a metric space is a \emph{closed set} if its complement is an open set. • d(x. • d(x.) are produced using \begin{description} . open set and closed set in a metric space. z) for all points x. \end{description} 39 . some open ball of sufficiently small radius about that point is contained wholly within the set. z) ≤ d(x. closed set A subset of a metric space is a closed set if its complement is an open set. y) = d(y.. where label is the label to be assigned to each item. Description lists (for glossaries etc. y) = 0 if and only if the points x and y coincide. x) for all points x and y of X. \item[open set] A subset of a metric space is an \emph{open set} if. given any point of the set. open ball The open ball of radius r about any point x is the set of all points of the metric space whose distance from x is strictly less than r. some open ball of sufficiently small radius about that point is contained wholly within the set. open set A subset of a metric space is an open set if. \emph{open set} and \emph{closed set} in a metric space. the text We now list the definitions of open ball. \begin{description} \item[open ball] The \emph{open ball} of radius~$r$ about any point~$x$ is the set of all points of the metric space whose distance from $x$ is strictly less than $r$. \end{description} The items in the list should be enclosed between \begin{description} and \end{description} and should each be preceded by \item[label ].• d(x. A is generated by L TEX from the following input: We now list the definitions of \emph{open ball}. For example. y) + d(y. y and z of X..

or a prettier shell than ordinary. A is typeset by L TEX as follows: Isaac Newton discovered the basic techiques of the differential and integral calculus. He summed up his own estimate of his work as follows: \begin{quote} I do not know what I may appear to the world. 40 .4. but the first lines of individual paragraphs are not further indented.. and diverting myself. playing on the sea-shore. playing on the sea-shore. but to myself I seem to have been only like a boy. He summed up his own estimate of his work as follows: I do not know what I may appear to the world. \end{quotation}. \end{quote} and \begin{quotation} . His main mathematical works are the \emph{Principia} and the \emph{Optics}.. His main mathematical works are the Principia and the Optics.. The quote environment is recommended for short quotations: the whole quotation is indended in the quote environment.3 Displayed Quotations Displayed quotations can be embedded in text using the quote and quotation environments \begin{quote} .. or a prettier shell than ordinary. The input file Isaac Newton discovered the basic techiques of the differential and integral calculus. and diverting myself. in now and then finding a smoother pebble. in now and then finding a smoother pebble. and applied them in the study of many problems in mathematical physics. \end{quote} In later years Newton became embroiled in a bitter priority dispute with Leibniz over the discovery of the basic techniques of calculus. whilst the great ocean of truth lay all undiscovered before me. but to myself I seem to have been only like a boy. and applied them in the study of many problems in mathematical physics. whilst the great ocean of truth lay all undiscovered before me.

A.4 Tables A Tables can be produced in L TEX using the tabular environment. The text 41 . Switzerland France Germany Italy 1893 1897 1900 1904 1908 A is produced in L TEXusing the following input file: The first five International Congresses of Mathematicians were held in the following cities: \begin{quote} \begin{tabular}{lll} Chicago&U. and the openings of paragraphs are then further indented in the normal fashion. In the above example.S. the text The first five International Congresses of Mathematicians were held in the following cities: Chicago Z¨rich u Paris Heidelberg Rome U. 4. the string {lll} is a format specification for a table with three columns of left-justified text. The next example shows how to obtain a table with vertical and horizontal lines.&1893\\ Z\"{u}rich&Switzerland&1897\\ Paris&France&1900\\ Heidelberg&Germany&1904\\ Rome&Italy&1908 \end{tabular} \end{quote} The \begin{tabular} command must be followed by a string of characters enclosed within braces which specifies the format of the table. For example. and the double backslash \\ is used to separate the rows of the table. For longer quotations one may use the quotation environment: the whole quotation is indented.S.In later years Newton became embroiled in a bitter priority dispute with Leibniz over the discovery of the basic techniques of calculus. Within the body of the table the ampersand character & is used to separate columns of text within each row.A.

where $n!$. the factorial of $n$. where n!. The following table lists the values of the factorial of each integer~$n$ between 1 and 10: \begin{quote} \begin{tabular}{|r|r|} \hline $n$&$n!$\\ \hline 1&1\\ 2&2\\ 3&6\\ 4&24\\ 5&120\\ 6&720\\ 7&5040\\ 8&40320\\ 9&362880\\ 10&3628800\\ \hline \end{tabular} 42 . A is produced in L TEXusing the following input file: The group of permutations of a set of $n$~elements has order $n!$. The following table lists the values of the factorial of each integer n between 1 and 10: n n! 1 1 2 2 3 6 4 24 5 120 6 720 7 5040 8 40320 9 362880 10 3628800 Note how rapidly the value of n! increases with n. the factorial of n.The group of permutations of a set of n elements has order n!. is the product of all integers between 1 and n. is the product of all integers between $1$ and $n$.

.g. In a tabular environment. For example. or c if the entry is to be centred). For example. For example \cline{3-5} produces a horizontal line spanning columns 3.5 A The Preamble of the LTEX Input file A We describe the options available in L TEX for specifying the overall style of a document. 4 and 5 of some table. to span three columns of a table with the words ‘Year of Entry’ (centred with respect to the three columns). In this example the format specification {|r|r|} after \begin{tabular} specifies that the table should consist of two columns of right-justified text. and between columns. a table with 15 columns of rightjustified text enclosed within vertical lines can be produced using the format specification {|*{15}{r|}}. with vertical lines to the left and to the right of the table. If additional vertical space is required between rows of the table. one would use \multicolumn{3}{c}{Year of entry} 4. l if the entry is to be left-justified entry. this command can only be placed between the format specification and the body of the table (to produce a line along the top of the table) or immediately after a row separator (to produce a horizontal line between rows or at the bottom of the table). 43 . on would use \\[6pt] to separate two rows of the table by 6 points of blank space. the format specification after \begin{tabular} should consist of one or more of the following. For example. Here num specifies the number of columns to be spanned. then this can be produced by specifying the amount of space within square brackets after \\. A command of the form \multicolumn{num}{fmt}{text} can be used within the body of a table to produce an entry spanning several columns. the command \hline produces a horizontal line. fmt specifies the format for the entry (e. and text is the text of the entry. enclosed within braces { and }: l c r p{width} | @{text} specifies a column of left-justified text specifies a column of centred text specifies a column of right-justified text specifies a left-justified column of the given width inserts a vertical line between columns inserts the given text between columns A string str of characters in the format specification can be repeated num times using the construction *{num}{str }.\end{quote} Note how rapidly the value of $n!$ increases with $n$. Within the body of the table. A horizontal line in a table from column i to column j inclusive can be produced using \cline{i-j}.

report. The \begin{document} command is sometimes preceded by commands that set the page-style and set up user-defined control sequences. This is the second paragraph of the document. The command begins with \documentclass and ends with the names of one of the available styles. which is twenty percent larger than ten-point.A A L TEX document should begin with a \documentclass command and any text to be printed must be included between \begin{document} and \end{document} commands. enclosed in curly brackets. These options are separated by commas and the list of options is enclosed in square brackets (as in the above example). It is produced in a ‘12~point’ size. If no such size is specified then the 10~point size is assumed. 44 .e. \end{document} The syntax of the \documentclass command is as follows. twocolumn Produces two-column output. One point is approximately $1/72$~inch. A Here is a typical L TEX input file: \documentclass[a4paper.12pt]{article} \begin{document} This is the first paragraph of a typical document. one may place a list of options. In a ‘12~point’ font the height of the parentheses is 12~points (i. 12pt Specifies a twelve-point type size. which is ten percent larger than the ten-point type normally used. There are also ‘10 point’ and ‘11 point’ styles available in \LaTeX. The options available (which are usually the names of certain ‘style files’) include the following: 11pt Specifies a size of type known as eleven-point. a4paper This ensures that the page is appropriately positioned on A4 size paper. about $1/6$~inch) and the letter~‘m’ is about 12 points long. Between the “\documentclass” and the name of the document style. book and letter. The required size is specified in the ‘documentstyle’ command. The available styles are article. A \textit{point} is a unit of length used by printers.

4. unless you specify otherwise. Pages will be automatically numbered at the bottom of the page. This command should come after the \documentclass command and before the \begin{document} command. For example. −∞ occur frequently throughout the text. suppose that integrals like +∞ f (x) dx.6 A Defining your own Control Sequences in LTEX Suppose that we are producing a paper that makes frequent use of some mathematical expression. However the printed output will not be nicely positioned on A4 paper. headings The page number (and any other information determined by the document style) is put at the top of the page. For example. This can be done using the \pagestyle command.dx. This can be done using \newcommand. This is the default page style for the article and report document styles. using the standard ten-point type size. empty No page number is printed. \end{document} produces a document without page numbers. the input file \documentclass[a4paper]{article} \pagestyle{empty} \begin{document} The main body of the document is placed here. What we do is to place a line with the command 45 . except that the material to go at the top of the page is determined by \markboth and \markright commands (see A the L TEX manual).Typing simply \documentclass{article} will produce a document in ten-point type size. where the option is one of the following: plain The page number is at the foot of the page.\] It would be nice if we could type \inftyint (say) to obtain the integral sign at the beginning. since the default size is intended for a different (American) paper size. This command has the syntax \pagestyle{option}. This formula is obtained by typing \[ \int_{-\infty}^{+\infty} f(x)\. myheadings Similar to the headings pagestyle.

If we defined a control sequence \intwrt by \newcommand{\intwrt}[2]{\int_{-\infty}^{+\infty} #2 \.\] then we obtain +∞ f (x) dx.g. after the \documentclass command but before the \begin{document} command). Thus if we then type \[ \intwrt{y}{f(y)}. We can modify this procedure slightly. −∞ What has happened is that the expression in curly brackets after \intwrtx has been substituted in the expression defining \intwrtx.\] we obtain +∞ f (y) dy..dx. −∞ 46 .\] to obtain the above formula.\newcommand{\inftyint}{\int_{-\infty}^{+\infty}} near the beginning of the input file (e. If we then type the line \[ \intwrtx{f(x)}.d #1} then it would expect two expressions to substitute in for #1 and #2 in the definition of \intwrt. Then we only have to type \[ \inftyint f(x)\. replacing the #1 in that expression.dx} at the beginning of the input file. The number 1 inside square brackets in the \newcommand line defining \intwrtx A indicates to L TEX that it is to expect one expression (in curly brackets) after \intwrtx to substitute for #1 in the definition of \intwrtx. Suppose that we we defined a new control sequence \intwrtx by putting the line \newcommand{\intwrtx}[1]{\int_{-\infty}^{+\infty} #1 \.

Sign up to vote on this title
UsefulNot useful