### Document Structure

An example LaTeX document is shown below.

\documentclass{article}
\usepackage[hang,bf,small]{caption}
\begin{document}
\title{Hello World!}
\author{Krzysztof Fleszar}
\date{}
\maketitle
\section{Introduction}
I have created the first \LaTeX{} document.
\end{document}

If this document is compiled using LaTeX, the result will be:

In the following, some basic structural elements are explained.

#### \documentclass[options]{class_name}

The first line of the document specifies its class. The class contains information about the structure of the document and the formatting of its components. The standard classes are: article, report, book, and letter. Many other are available in LaTeX. Some publishers provide their own document classes, which makes it easier for writers to conform to formatting requirements.

#### \usepackage[options]{package_name}

Includes a package with some formatting modifications or additional functionality. There is a vast number of packages in LaTeX. Package caption used in the example modifies the way of displaying captions of tables and figures.

#### \begin{document} ... \end{document}

These surround the content of the document. Any text after \end{document} is ignored.

#### \title{...} \author{...} \date{...} \maketitle

These define the title and the authors of the document. Note that authors should be separated by the command \and. Command \date is used to replace or omit the current date, which LaTeX puts in the document by default. Command \maketitle creates the title of the document based on the title, authors, and the date defined earlier.

#### \chapter{name}... \section{name}... \subsection{name}

These commands define the division of the document into chapters, sections, and subsections. Articles do not have chapters, only sections and subsections. To automatically create the table of content, use command \tableofcontents. In most document classes, the chapters, sections, and subsections are numbered. If you need one of them without a number, put a star before the opening curly bracket, for example \section*{name}.

Copyright (c) 2008, 2013 by Krzysztof Fleszar

The gadget spec URL could not be found