A Quick and Dirty Guide to LaTeX

introduction

This page assumes you know the basics about LaTeX - what it is, its benefits over WYSIWYG editors and so on - and that you just want to get started with making LaTeX documents. If you want some more introductory information concerning LaTeX, check out the resources page. To get more out of LaTeX, you should read up on some more thorough and detailed LaTeX material (again, this is just to get you started). So, make sure to make use of the other resources listed.

First things first: the software. To run LaTeX, you first need to install the appropriate software, which includes a TeX distribution as well as a good text editor. Refer to the resources page for a listing of some software links for various platforms. Most of the software is either open source or shareware (i.e., free or pretty cheap)

LaTeX is much like HTML - you define the structure of your document via commands. Commands are preceded by a backslash, and are made up of lowercase letters (e.g., "\clearpage"). Many LaTeX commands take one or more arguments. Arguments are placed in curly braces (e.g., "\chapter{Introduction}"). You can make a LaTeX document with any standard text editor, such as GNU emacs (for Linux) or WinEdt (for Windows), and save it as a .tex document.

Further introductory info:


back to top

basic document structure

You begin the latex document with a document class declaration: \documentclass{argument}. There are four default classes available:

You can also add other options here (all options in brackets "[ ] and separated by commas) such as:

After your document class declaration, you enclose your document within the commands: \begin{document}...\end{document} Right after your \begin{document} declaration, you can put your document title, author, and date. So, a sample LaTeX document would start out looking like this:

\documentclass[12pt,a4paper,twoside]{article}


\begin{document}


\title{My Brilliant Article}
\author{Sally Bright}
\date{February 2004}
\maketitle


\end{document}

You can add a table of contents here if you want - LaTeX uses to information from your sectioning commands to automatically generate one. Just use the following command after \maketitle: \tableofcontents

You can also include an abstract at the beginning of your document (a summary of your article or whatnot). You enclose your abstract within the commands: \begin{abstract}...\end{abstract}.

Note that you can also include comments in your LaTeX document: LaTeX ignores anything on a line after the "%" symbol.

back to top

paragraphs and sections

You define a new paragraph via a blank line in the LaTeX document (note: the finished document will not include an actual blank line in it!)

LaTeX has several levels of sectioning to help structure your document:

  1. part (not in articles or letters): \part
  2. chapter (not in articles or letters): \chapter
  3. section (not in letters): \section
  4. subsection (not in letters): \subsection
  5. titled paragraph (not in letters): \paragraph
  6. titled subparagraph (not in letters): \subparagraph

The title of each of these sections goes in curly braces after the command (e.g., \chapter{The Very Long Journey Home}). You also have the option of citing an alternate name (perhaps a shorter one) that would appear in the table of contents. Put the alternate name in brackets (e.g., \chapter[Journey Home]{The Very Long Journey Home}. LaTeX automatically numbers your sections - there are arguments for different options concerning numbering, but I won't include them here. To learn more about these options, please check out the further resources listed.

back to top

font styles

LaTeX automatically sets the font for you, but you can specify these additional font styles within your document (putting your styled text in the curly braces):

back to top

lists

There are four different types of lists in LaTeX:

Note that you can also make nested lists by defining another list environment within a list environment. LaTeX will automatically nest the list for you and make an alternate bullet or numbering scheme. There are default number schemes that you can change if you'd like, but I'm not going to be getting into that here.

go to page 2