Skip to Main Content

LaTeX: The Basics

The LaTeX Process

Unlike word processing, typesetting with LaTeX is a two step process:

  1. Compose a plain text document containing your content and markup tags using a text editor.

  2. Use a LaTeX compiler to translate the text file, producing a nicely typeset document.

 

The LaTeX process

Anatomy of a LaTeX document

This is a sample .tex document:

 

% Lines that start with the percent symbol
% are ignored by the compiler. In this way,
% you can write notes for yourself in your
% LaTeX code.

% The following section of the document is
% called the preamble. It contains the
% formatting information for your document.  
% If you use a template, this part will be
% filled out for you.

\documentclass[...]{...}
\usepackage[...]{...}
\usepackage[...]{...}
\usepackage[...]{...}

% You should also include your contact information
% so that your professor knows who turned in
% such neatly typeset homework. This is called
% the top matter.

\title{...}
\author{...}
\email{...}
\date{...}

% Your content goes between the \begin{document}
% and \end{document} commands.
%
% The \maketitle command uses the top matter to
% create a formatted title for your document.

\begin{document}
\maketitle
.
.
.
\end{document}

 

% Thats all there is to it!