Introduction to the Internet
Computer Science 1604

Sample LaTeX Document

The text below is the LaTeX format codes that describe how the document should be formatted by the LaTeX program.

Click on the following button to see the results of the formatting of the document by LaTeX:


%
% This is a sample LaTeX input file.
%
\documentstyle{article}  % other choices are book, report, vpithesis, ...
\title{A Sample Document}
\author{John Doe}
\date{}

\begin{document}
\maketitle

This is a sample input file.  Comparing it with the output it
generates can show you how to produce a simple document of
your own.

\section{Ordinary Text} 

The ends  of words and sentences are marked 
  by   spaces. It  doesn't matter how many 
spaces    you type; one is as good as 100.  The
end of   a line counts as a space.

One   or more   blank lines denote the  end 
of  a paragraph.  

\LaTeX\ is built ``on top'' of \TeX\ in that it includes {\em macros\/}
which make \TeX\ easier to use.

\subsection{Lists, etc.}
You can also do lists, displayed text, and so on in \LaTeX:
\begin{itemize}
 \item lists with bullets,
 \item enumerated lists,
 \item descriptions,
 \item indented quotations
\end{itemize}

Footnotes\footnote{This is an example of a footnote.}
pose no problem.  Other useful things like a bibliography,
a table of contents, a list of figures or tables are handled
as well.

\section{Math, tables, and figures}
\TeX\ is good at typesetting mathematical formulas like 
$x-3y = 7r$ or
\[ f(x) = \int_0^1 e^{-t} g(t) \, dt.  \]
You can also do tables and figures; if you want, \TeX\ will try
to figure out where to place them in your document (i.e., they
``float'').
\end{document}             % End of document.


Author: N. Dwight Barnette
Curator: Computer Science Dept : VA TECH © Copyright 1994.
Last Updated: 1/20/99