Contents Up << >>

### Document structure

Here is a sample of a typical LaTeX document:

        \documentstyle[a4,texhelp]{report}
        \title{A title}
        \author{Julian Smart}
        \date{October 1993}
        \begin{document}
        \maketitle

        \chapter{Introduction}

        ...

        \section{A section}

        ...

        \end{document}

The first line is always a `\documentstyle` command. The square brackets enclose optional style files (suffix `.sty`) that alter the appearance of the document or provide new commands, and the curly brackets enclose the mandatory style, in this case 'report'.

Before the document begins properly with `\begin{document}`, you can write various commands that have an effect on the appearance of the document or define title page information. The `\maketitle` command writes the title page using information defined previously (title, author, date).

A report has chapters, which are divided into sections, and can be further divided into subsections and subsubsections. To start a new section, you write the appropriate section command with the section heading; there is no specific end section command, since a new section heading or the end of the document will indicate the end of the previous section.

An article is divided into sections, subsections and subsubsections, but has no chapters. This is so an article can be included in a report as a chapter.

Tex2RTF is written to deal with reports best, so stick with the report style if you can.