LaTeX Examples
This post contains some links and examples I threw together to help students getting started with LaTeX.
LaTeX is a markup language for academic and technical writing. It is the defacto standard way to produce publication-ready documents in mathematics, including books and journal articles. The goal of this tutorial is to help you learn to use LaTeX to produce documents.
Why should I learn LaTeX?
The only real answer to this question is “because you want to”. You can certainly have a happy life without knowing anything at all about LaTeX, and it does have a steep learning curve.
BUT.
If you find yourself frequently writing complex equations, or writing documents with complicated cross-referencing or bibliographies, or wanting to publish a technical book or paper, or wanting to communicate math over the web, then LaTeX can make your life better in several concrete ways.
What is LaTeX?
- It is a markup language for technical writing.
- It is not a single monolithic program. It is an ecosystem of tools that work together.
- It gives the author control. There are IDEs which behave like word processors, hiding away some of the details. Experienced users can also dig into the guts for more power.
- It does not have a single designer. Many people have worked together over many years to build and maintain the LaTeX ecosystem we have today.
- It is not a commercial product. You do not have to buy a license or get permission to use it.
- It is industrial strength. TeX, the software at the heart of the ecosystem, was explicitly designed for producing “camera-ready” books, and there are commercial publishing houses which use it.
- It is designed for technical and academic text. Complex equations and diagrams, cross references, bibliographies, numbering
Installing LaTeX
On Windows:
Resources
- LaTeX Wikibook: Really great place to find quick answers.
- TeX StackExchange: I wouldn’t start searching here, but if you Google search for
latex blah
whereblah
is some problem you have, typically links here have good info.
Examples
This is a list of example LaTeX documents which demonstrate how to do some specific things.
A (nearly) minimal latex document (tex windows) (tex unix) (pdf)
Not the simplest possible tex document, but pretty close.
Styling text (tex windows) (tex unix) (pdf)
Bold, italics, underlined text, quotation marks, as well as diacritics.
The parts of a tex file (tex windows) (tex unix) (pdf)
A bit about what “documentclass” and “begin document” mean.
Writing mathematics (tex windows) (tex unix) (pdf)
Typing equations.
Lists (tex windows) (tex unix) (pdf)
For when you have a bunch of things and want to write them.
Graphics (tex windows) (tex unix) (pdf) (image)
Including pictures in your documents. To compile this example, you will need to put the image file
dice.png
inside a folder calledgfx
next to your tex file.Packages (tex windows) (tex unix) (pdf)
Going beyond plain LaTeX.
Document Structure (tex windows) (tex unix) (pdf)
Breaking up a large document into subparts.
Files (tex windows) (tex unix) (pdf)
The files that make up a LaTeX project.
Counters, Labels, and Cross References (tex windows) (tex unix) (pdf)
Linking from one part of a document to another.
Bibliographies (tex windows) (tex unix) (pdf) (bib windows) (bib unix)
Citing other works. For this example you will also need the
bib
file.Slideshows (tex windows) (tex unix) (pdf)
Slick presentations with the
beamer
class.