You are on page 1of 61

Outline

Introduction to L
A
T
E
X for physicists
Stephen Blundell
Department of Physics
University of Oxford
October 2009
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Outline
Outline
1
Why L
A
T
E
X?
Introduction
The big idea
Advantages of using L
A
T
E
X?
Using L
A
T
E
X?
2
Examples
First attempts
Environments
Documentclass
Errors
3
Useful information
History
Tables
Internet resources
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Outline
Outline
1
Why L
A
T
E
X?
Introduction
The big idea
Advantages of using L
A
T
E
X?
Using L
A
T
E
X?
2
Examples
First attempts
Environments
Documentclass
Errors
3
Useful information
History
Tables
Internet resources
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Outline
Outline
1
Why L
A
T
E
X?
Introduction
The big idea
Advantages of using L
A
T
E
X?
Using L
A
T
E
X?
2
Examples
First attempts
Environments
Documentclass
Errors
3
Useful information
History
Tables
Internet resources
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
Introduction
The big idea
Advantages
Using L
A
T
E
X
Outline
1
Why L
A
T
E
X?
Introduction
The big idea
Advantages of using L
A
T
E
X?
Using L
A
T
E
X?
2
Examples
First attempts
Environments
Documentclass
Errors
3
Useful information
History
Tables
Internet resources
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
Introduction
The big idea
Advantages
Using L
A
T
E
X
Introduction
This is an attempt to give you some information to get you
started in using the L
A
T
E
X Document Preparation System.
Further details can be obtained elsewhere, in particular from
the main reference for L
A
T
E
X which is The L
A
T
E
X Users guide
and Reference Manual by Leslie Lamport, and also from the
internet resources shown at the end.
This presentation will be available on my website.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
Introduction
The big idea
Advantages
Using L
A
T
E
X
The big idea of L
A
T
E
X
L
A
T
E
X is a professional typesetting system, and not a botched
together word processor.
Rather than encourage you to dictate exactly how your
document should be laid out, L
A
T
E
X instructions allow you
describe its logical structure.
You concentrate on the logic of your document, L
A
T
E
X can
concentrate on the typesetting
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
Introduction
The big idea
Advantages
Using L
A
T
E
X
The big idea of L
A
T
E
X
There are a number of good reasons for concentrating on the
logical structure rather than on the appearance of a document.
It prevents you from making elementary typographical errors
in the mistaken idea that they improve the aesthetics of a
document. The primary function of document design is to
make documents easier to read, not prettier.
It is more exible, since you only need to alter the denition
of some particular type of structure and this will change the
appearance of all appearances of that structure in a document.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
Introduction
The big idea
Advantages
Using L
A
T
E
X
The big idea of L
A
T
E
X
Logical design encourages better writing.
A visual system makes it easier to create visual eects rather
than a coherent structure.
Logical design encourages you to concentrate on your writing
and makes it harder to use formatting as a substitute for good
writing.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
Introduction
The big idea
Advantages
Using L
A
T
E
X
Advantages of using L
A
T
E
X:
It produces beautiful results.
It is free.
It runs on every computer you could ever think of.
It has been tried and tested for years.
It typesets maths easily and cleanly.
Its the majority-choice in the physics community.
It emails around easily.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
Introduction
The big idea
Advantages
Using L
A
T
E
X
Advantages of using L
A
T
E
X:
The rest of the world uses it and they all use eectively the
same version. It is backwards compatible.
You can submit your research papers to most journals
electronically in L
A
T
E
X.
It is the best thing to do a thesis in citations, references, and
gures are all linked so that if you swap around two chapters,
all the cross-references follow cleanly without you having to
do anything more. It is the most logical way to write a thesis.
Many more which I cant currently think of.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
Introduction
The big idea
Advantages
Using L
A
T
E
X
Disadvantages of using L
A
T
E
X:
None.
Well thats not quite true, there are some disadvantages which are
basically:
Its not WYSIWIG (What You See Is What You Get) and
therefore. . .
It takes a short while to get used to . . .
but if you have more than half a brain, you have no serious
alternative!
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
Introduction
The big idea
Advantages
Using L
A
T
E
X
Disadvantages of using L
A
T
E
X:
None.
Well thats not quite true, there are some disadvantages which are
basically:
Its not WYSIWIG (What You See Is What You Get) and
therefore. . .
It takes a short while to get used to . . .
but if you have more than half a brain, you have no serious
alternative!
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
Introduction
The big idea
Advantages
Using L
A
T
E
X
Using L
A
T
E
X
In order to use L
A
T
E
X you have to generate a le containing
both the text that you wish to print and instructions to tell
L
A
T
E
X how you want it to appear.
You will normally create this le using your systems text
editor.
It is an ASCII le. Being an ASCII le means that it doesnt
contain any control characters. Therefore the text editor that
you choose to use should not be Microsoft Word or even
WordPad. These absolutely stu every le with every control
character under the sun to control all their formatting. What
is more, dierent versions of Microsoft Word appear to be
incapable of speaking to each other reliably.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
Introduction
The big idea
Advantages
Using L
A
T
E
X
Using L
A
T
E
X
The le can have any name but should end .tex to identify
the les contents.
L
A
T
E
X then creates a new le of typesetting commands; this
has the same name as your le but the .tex ending is
replaced by .dvi. This stands for device i ndependent
and, as the name implies, this le can be used to create
output on a range of printing devices. A dvi le is not an
ASCII le and contains lots of control characters.
The dvi file can be converted to PostScript (the language
that laser printers talk) which is interestingly (yawn are you
still following?) also an ASCII language, so its easy to hack
(for those wishing to try). This can also be converted to a
pdf le.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Outline
1
Why L
A
T
E
X?
Introduction
The big idea
Advantages of using L
A
T
E
X?
Using L
A
T
E
X?
2
Examples
First attempts
Environments
Documentclass
Errors
3
Useful information
History
Tables
Internet resources
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
First attempt
What I am showing here is that
the input file looks rather like
the output. The stuff
gets
typed in in some sort of an order and the returns
go all over the place. But \LaTeX\ sorts them out.
this becomes:
What I am showing here is that the input le looks rather like the
output. The stu gets typed in in some sort of an order and the
returns go all over the place. But L
A
T
E
X sorts them out.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
First attempt
What I am showing here is that
the input file looks rather like
the output. The stuff
gets
typed in in some sort of an order and the returns
go all over the place. But \LaTeX\ sorts them out.
this becomes:
What I am showing here is that the input le looks rather like the
output. The stu gets typed in in some sort of an order and the
returns go all over the place. But L
A
T
E
X sorts them out.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
First attempt
....sorts them out.
Its {\bf only} if I leave a {\it blank} line that \LaTeX\ starts
a new paragraph. One other thing is that I
would like to define a variable called $a$ which
is given by $a=b^2+\sigma_i$ which I
have now done.
this becomes:
What I am showing here is that the input le looks rather like the
output. The stu gets typed in in some sort of an order and the
returns go all over the place. But L
A
T
E
X sorts them out.
Its only if I leave a blank line that L
A
T
E
X starts a new paragraph.
One other thing is that I would like to dene a variable called a
which is given by a = b
2
+
i
which I have now done.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
First attempt
....sorts them out.
Its {\bf only} if I leave a {\it blank} line that \LaTeX\ starts
a new paragraph. One other thing is that I
would like to define a variable called $a$ which
is given by $a=b^2+\sigma_i$ which I
have now done.
this becomes:
What I am showing here is that the input le looks rather like the
output. The stu gets typed in in some sort of an order and the
returns go all over the place. But L
A
T
E
X sorts them out.
Its only if I leave a blank line that L
A
T
E
X starts a new paragraph.
One other thing is that I would like to dene a variable called a
which is given by a = b
2
+
i
which I have now done.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Now do some displayed equations
There are two types of equations. The equations that are in the text,
like $E=mc^2$ like this, but also displayed equations which are written as
\begin{equation}
E=mc^2,
\end{equation}
and get a line to themselves.
Notice that the equation gets automatically numbered.
this becomes:
There are two types of equations. The equations that are in the
text, like E = mc
2
like this, but also displayed equations which are
written as
E = mc
2
, (1)
and get a line to themselves. Notice that the equation gets
automatically numbered.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Now do some displayed equations
There are two types of equations. The equations that are in the text,
like $E=mc^2$ like this, but also displayed equations which are written as
\begin{equation}
E=mc^2,
\end{equation}
and get a line to themselves.
Notice that the equation gets automatically numbered.
this becomes:
There are two types of equations. The equations that are in the
text, like E = mc
2
like this, but also displayed equations which are
written as
E = mc
2
, (1)
and get a line to themselves. Notice that the equation gets
automatically numbered.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Now have some fun
You probably noticed that superscripts go like $a^2$ and subscripts
go like this $a_i$. Note that $a^23$ works like that so if you
want to raise something to the 23rd power you should use
$a^{23}$. In other words you put the 23 in curly brackets.
this becomes:
You probably noticed that superscripts go like a
2
and subscripts go like
this a
i
. Note that a
2
3 works like that so if you want to raise something
to the 23rd power you should use a
23
. In other words you put the 23 in
curly brackets.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Now have some fun
You probably noticed that superscripts go like $a^2$ and subscripts
go like this $a_i$. Note that $a^23$ works like that so if you
want to raise something to the 23rd power you should use
$a^{23}$. In other words you put the 23 in curly brackets.
this becomes:
You probably noticed that superscripts go like a
2
and subscripts go like
this a
i
. Note that a
2
3 works like that so if you want to raise something
to the 23rd power you should use a
23
. In other words you put the 23 in
curly brackets.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Now have some fun
Consider the function
\begin{equation}
f(x) = \sum_{i=1}^N a_i^{j+k+l}.
\end{equation}
this becomes:
Consider the function
f (x) =
N

i =1
a
j +k+l
i
. (2)
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Now have some fun
Consider the function
\begin{equation}
f(x) = \sum_{i=1}^N a_i^{j+k+l}.
\end{equation}
this becomes:
Consider the function
f (x) =
N

i =1
a
j +k+l
i
. (2)
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Now have some fun
Consider the function
\begin{equation}
g(x) = \int_0^\infty e^{-y^2} \, dy,
\label{donkey}
\end{equation}
and I have labelled this equation which I can now refer
to as equation~\ref{donkey}.
this becomes:
Consider the function
g(x) =
_

0
e
y
2
dy, (3)
and I have labelled this equation which I can now refer to as equation 3.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Now have some fun
Consider the function
\begin{equation}
g(x) = \int_0^\infty e^{-y^2} \, dy,
\label{donkey}
\end{equation}
and I have labelled this equation which I can now refer
to as equation~\ref{donkey}.
this becomes:
Consider the function
g(x) =
_

0
e
y
2
dy, (3)
and I have labelled this equation which I can now refer to as equation 3.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Itemize
There are a number of rather useful environments in L
A
T
E
X for producing
particular eects. They all begin with a begin and end with an end and
show which kind of environment they are.
Items in a list:
\begin{itemize}
\item Feed the cat
\item Hug a tree
\end{itemize}
this becomes:
Items in a list:
Feed the cat
Hug a tree
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Itemize
There are a number of rather useful environments in L
A
T
E
X for producing
particular eects. They all begin with a begin and end with an end and
show which kind of environment they are.
Items in a list:
\begin{itemize}
\item Feed the cat
\item Hug a tree
\end{itemize}
this becomes:
Items in a list:
Feed the cat
Hug a tree
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Enumerate
\begin{enumerate}
\item Here is one.
\item Its good for making lists.
\item If you like numbered lists.
\end{enumerate}
this becomes:
1
Here is one.
2
Its good for making lists.
3
If you like numbered lists.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Enumerate
\begin{enumerate}
\item Here is one.
\item Its good for making lists.
\item If you like numbered lists.
\end{enumerate}
this becomes:
1
Here is one.
2
Its good for making lists.
3
If you like numbered lists.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Center
And also
\begin{center}
For making something {\bf centred}.
\end{center}
this becomes:
And also
For making something centred.
Note the US spelling!
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Center
And also
\begin{center}
For making something {\bf centred}.
\end{center}
this becomes:
And also
For making something centred.
Note the US spelling!
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Quote
There is rather a nice effect you can use if
\begin{quote}
You would like to say something
in poetry, maybe quoting something that somebody
said to you that you thought was worth repeating.
Oh why oh why am I typing this drivel?
\end{quote}
this becomes:
There is rather a nice eect you can use if
You would like to say something in poetry, maybe quoting
something that somebody said to you that you thought was
worth repeating. Oh why oh why am I typing this drivel?
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Quote
There is rather a nice effect you can use if
\begin{quote}
You would like to say something
in poetry, maybe quoting something that somebody
said to you that you thought was worth repeating.
Oh why oh why am I typing this drivel?
\end{quote}
this becomes:
There is rather a nice eect you can use if
You would like to say something in poetry, maybe quoting
something that somebody said to you that you thought was
worth repeating. Oh why oh why am I typing this drivel?
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Eqnarray
Another useful trick is that of having a set of equations
that line up, as in
\begin{eqnarray}
f(x) & = & \sqrt{g(x)} , \\
g(x) & = & e^{-h(x)} , \\
h(x) & = & \alpha_\nu \xi_\psi (\eta_\beta ) .
\end{eqnarray}
this becomes:
Another useful trick is that of having a set of equations that line up, as in
f (x) =
_
g(x), (4)
g(x) = e
h(x)
, (5)
h(x) =

). (6)
Here note that you use the & characters to indicate what you want to
line up.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Eqnarray
Another useful trick is that of having a set of equations
that line up, as in
\begin{eqnarray}
f(x) & = & \sqrt{g(x)} , \\
g(x) & = & e^{-h(x)} , \\
h(x) & = & \alpha_\nu \xi_\psi (\eta_\beta ) .
\end{eqnarray}
this becomes:
Another useful trick is that of having a set of equations that line up, as in
f (x) =
_
g(x), (4)
g(x) = e
h(x)
, (5)
h(x) =

). (6)
Here note that you use the & characters to indicate what you want to
line up.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
You actually do need some stu at the beginning and end of your
document to tell L
A
T
E
X what sort of a document this is. It might
look like magic at the moment, but it does the job. A simple
example is the following:
\documentclass[12pt]{report}
\begin{document}
A terribly simple document.
\end{document}
The rst-line says what size point you want in general, and that
the document is a report. This controls the way that section
headings and other things work.
This le produces a single page with the words:
A terribly simple document.
on it.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
A much more exotic example is the following:
\documentclass[aps,prb,superscriptaddress,twocolumn,floatfix]{revtex4}
\usepackage{graphicx}
\usepackage[]{amsmath}
\begin{document}
\title{My paper}
\author{My name}
\affiliation{Clarendon Laboratory, University of Oxford, Parks Road, Oxford OX1 3PU, United Kingdom}
\begin{abstract}
This is my paper
\end{abstract}
\maketitle
A whole bunch of stuff. In this paper we refer to \cite{nernst}.
\begin{thebibliography}{**}
\bibitem{nernst}
M. S. Nam, A. Ardavan, S. J. Blundell and J. A. Schlueter,
Nature {\bf 449} 584, (2007).
\end{thebibliography}
\end{document}
which would be a starting point for writing a paper for Physical
Review using the revtex macros If this le were to be processed it
would produce something looking just like a real paper. If you
want to do this, as with most things in L
A
T
E
X, the easiest way to
start is to edit someone elses document! Dont reinvent the wheel.
See examples on arXiv.org
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Class les
L
A
T
E
X can input lots of dierent class les for setting up
documents to have various dierent standard formats.
These typically have the extension .sty for document-styles
(an older version) and .cls for document-classes. If you want
to make your document look a particular way, then you will
need to get the relevant class les.
Some, like article.cls come with L
A
T
E
X. Others, like
revtex4.cls, the Physical Review macros may need to be
downloaded from a web site or taken from someones
computer. Please ask around!
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Errors
If you have written junk in your le, L
A
T
E
X may give you some
error messages. It usually tells you which line the error is in. It
also usually gives you some options, of which the best ones to
use are either H (give me some more help), or X (quit and
Ill go and edit my le and sort the problem out).
It may take a while to get used to some of L
A
T
E
Xs error
messages but after a bit of practice it will come naturally. It
is usually a good idea to keep L
A
T
E
Xing the document regularly
as you write it.
Typing in 200 pages and then expecting it to work rst time is
perhaps asking a bit much. Build it up slowly and check each
new bit of text. Computers are so fast now that this is not
really a problem.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
First attempts
Environments
Documentclass
Errors
Do it twice!
L
A
T
E
X needs to process your le twice. This is because on the rst
sweep it loads all your cross-references, and the second time it puts
them all in properly. Therefore you need to L
A
T
E
X the document
twice.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Outline
1
Why L
A
T
E
X?
Introduction
The big idea
Advantages of using L
A
T
E
X?
Using L
A
T
E
X?
2
Examples
First attempts
Environments
Documentclass
Errors
3
Useful information
History
Tables
Internet resources
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
A bit of history
L
A
T
E
X was written on top of a program called T
E
X, which is
harder to program in and is now not used as much, but you
may come across it.
L
A
T
E
X was for many years standardised on version 2.09. In
1993, a new version L
A
T
E
X2e appeared which is almost the
same but uses documentclass rather than documentstyle.
It is backwards compatible so the old les still work.
In the future, L
A
T
E
X3 will appear. The idea is that the version
number is tending aymptotically towards . [NB this is not a
joke!]
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Typefaces
\rm Roman
\it Italic
\bf Boldface
\sl Slanted
\sf Sans serif
\sc Small Caps
\tt Typewriter
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
L
A
T
E
X environments
abstract gure quote
array ushleft tabbing
center ushright table
description itemize tabular
displaymath list theorem
enumerate math titlepage
eqnarray minipage verbatim
equation picture verse
quotation
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Text-mode accents
`o \{o} o \={o} oo \t{oo}
o \{o} o \.{o} o \c{o}
o \^{o} o \u{o} o
.
\d{o}
o \"{o} o \v{o} o

\b{o}
o \~{o} o \H{o}
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
National symbols
\oe a \aa l \l
\OE

A \AA L \L
\ae \o \ss
\AE \O
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Miscellaneous symbols
\dag \S c _ \copyright
\ddag \P \pounds
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Math-mode accents
a \hat{a} a \dot{a}
a \check{a} a \ddot{a}
a \tilde{a} a \breve{a}
a \acute{a} a \bar{a}
`a \grave{a} a \vec{a}
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Greek letters (math mode)
\alpha \nu
\beta \xi
\gamma o o
\delta \pi
c \epsilon \rho
\zeta \sigma
\eta \tau
\theta \upsilon
\iota \phi
\kappa \chi
\lambda \psi
j \mu \omega
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Greek letters (math mode)
\varepsilon \varsigma
\vartheta \varphi
\varrho
\Gamma \Sigma
\Delta \Upsilon
\Theta \Phi
\Lambda \Psi
\Xi \Omega
\Pi
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Binary operations (math mode)
\pm \cap
\mp \cup
\ \setminus \uplus
\cdot \sqcap
\times \sqcup
\ast \triangleleft
\star \triangleright
\diamond ; \wr
\circ _ \bigcirc
\bullet . \bigtriangleup
\div _ \bigtriangledown
\lhd \rhd
\vee \odot
\wedge \dagger
\oplus \ddagger
\ominus U \amalg
\otimes \unlhd
\oslash \unrhd
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Relational symbols (math mode)
\leq \geq
\prec ~ \succ
\preceq \succeq
\ll \gg
\subset \supset
\subseteq \supseteq
\sqsubset \sqsupset
\sqsubseteq \sqsupseteq
\in \ni
\vdash \dashv
\smile [ \mid
\frown | \parallel
,= \neq \perp
\equiv

= \cong
\sim \bowtie
\simeq \propto
\asymp [= \models
\approx
.
= \doteq
\Join
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Variable-size symbols (math mode)


\sum


\bigcap


\prod

_
\bigcup


\coprod

_
\bigsqcup
_
_
\int
_

\bigvee
_
_
\oint
_

\bigwedge

_
\bigodot


\bigotimes


\bigoplus


\biguplus
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Delimiters
( ( ) )
[ [ ] ]
\{ \}
\lfloor | \rfloor
\lceil | \rceil
\langle ) \rangle
, / \backslash
[ \vert | \Vert
\uparrow \Uparrow
\downarrow \Downarrow
\updownarrow \Updownarrow
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Log-like functions (math mode)
\arccos \csc \ker \min
\arcsin \deg \lg \Pr
\arctan \det \lim \sec
\arg \dim \liminf \sin
\cos \exp \limsup \sinh
\cosh \gcd \ln \sup
\cot \hom \log \tan
\coth \inf \max \tanh
Compare $sin^2x+cos^2x=1$ with $\sin^2x+\cos^2x=1$.
produces: Compare sin
2
x + cos
2
x = 1 with sin
2
x + cos
2
x = 1.
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Arrow symbols (math mode)
\leftarrow \longleftarrow
\Leftarrow = \Longleftarrow
\rightarrow \longrightarrow
\Rightarrow = \Longrightarrow
\leftrightarrow \longleftrightarrow
\Leftrightarrow \Longleftrightarrow
\mapsto \longmapsto
\hookleftarrow \hookrightarrow
\leftharpoonup \rightharpoonup
\leftharpoondown \rightharpoondown
\rightleftharpoons \leadsto
\uparrow \Updownarrow
\Uparrow \nearrow
\downarrow \searrow
\Downarrow \swarrow
\updownarrow \nwarrow
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Misc. symbols (math mode)
\aleph / \prime
\hbar \emptyset
\imath \nabla
, \jmath

\surd
/ \ell \top
\wp \bot
' \Re | \|
\Im \angle
\partial \triangle
\infty \backslash
\Box \Diamond
\forall ; \sharp
\exists \clubsuit
\neg \diamondsuit
. \flat \heartsuit
; \natural \spadesuit
\mho
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists
Why L
A
T
E
X?
Examples
Useful information
History
Tables
Internet resources
Internet resources
And nally...
http://www.latex-project.org/
http://en.wikibooks.org/wiki/LaTeX
For Linux users, install the tetex package (should already be
installed). On the Mac, use X11 and see:
http://www.icg.port.ac.uk/~edmonde/mac.html
For the PC, the most popular implementation seems to be
http://www.miktex.org/
http://users.ox.ac.uk/sjb Introduction to L
A
T
E
X for physicists

You might also like