- The Galois Group
- Activities
- The Graduate Program
- Funding
- Other Advice
- Student-run Seminars
- Technical Tutorials
- About Davis
- External Links
This is an old revision of the document!
Before beginning the tutorial, we present a selection of example LaTeX files.
samplearticle.tex | A LaTeX sample that shows some basics so you can copy and learn by example. |
quals_proposal_template.tex | A template for a proposal for the qualifying exam. |
The fast-growing list of dissertation templates has moved. |
A great place to find many examples of LaTeX source code is the arXiv. Virtually every preprint on the arXiv is typeset using LaTeX and has source code available for download from the summary page.
Decide whether you're going to use the department computers (Linux) or your own (Windows, Mac, or Linux). Get a valid LaTeX file (such as "samplearticle.tex" above). Follow the instructions below specific to your operating system (Windows, Mac, or Linux) to typeset/compile the file.
Compare the LaTeX file to the PDF file to see how the correspond. Once you mostly get the LaTeX file, you can try making some changes, save, and recompile!
Install MacTeX, which includes TeXShop. Open a LaTeX file in TeXShop and click the "Typeset" button. You can make changes in the editing window and view the results in the PDF preview window.
Install proTeXt.
Using a terminal, change into the directory where your LaTeX file is. If your file is called "myfile.tex", then run the command "pdflatex myfile.tex". In the same directory should be "myfile.pdf". You can make changes using any text editor (or retransfer / download your updated LaTeX file) and rerun "pdflatex".
If you get a "command doesn't exist" error, some of the "local machines" (like the math department computers in the grab lab) don't have TeX/LaTeX installed. First, SSH into one point/round/line/tangent, cd to the right directory, and try again. If you're running Linux on your own computer at home, you might need to first install tetex.
An error message indicates invalid LaTeX. When you get a message like
! LaTeX Error: Bad math environment delimiter.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.12 \begin{displaymath}
?
Enter either q
or x
to get out. LaTeX suggests the error is at line 12. In reality, it may be on some line nearbay.
LaTeX
preambles contain lines starting with \usepackage. This is how you load packages, which are even more macros that work on top of the basic LaTeX
setup. For example, the diagrams package below enables easier-to-use commands to create commutative diagrams than in standard LaTeX
.
Some of these packages may already be installed in your version of TeX
.
TeX
distribution will most likely already have this installed.TeX
distribution will most likely already have this installed.There are many resources there for learning LaTeX:
TeX
Users' Group (TUG) is a good place to look for all things related to using (La
)TeX
. In particular, TUG maintains the also aptly named Comprehensive TeX
Archive Network (CTAN), which contains many files for learning about and extending the capabilities of LaTeX
.La
)TeX
encyclopaediaLaTeX
Tutorial.LaTeX
commands.LaTeX
: A Document Preparation System, by LaTeX
creator Leslie Lamport.LaTeX
, the first part of which is available online. (This file contains a rather comprehensive introduction for getting started with LaTeX
as well as well-formated tables of special characters.)