Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this document

Formatting Information — An introduction to typesetting with LATEX

### Chapter 2: Basic structures

After the Document Class Declaration, the text of your document is enclosed between two commands we saw in § 1.4 which identify the beginning and end of the actual document (in the example below, you would put your text where the dots are):

\documentclass[11pt,a4paper,oneside]{report}
\begin{document}
...
\end{document}


The reason for marking the beginning of your document text is that LATEX allows you to insert extra setup specifications before it (where the blank line is in the example above: we’ll be using this soon). The reason for marking the end of your document text is to provide a place for LATEX to be programmed to do extra stuff automatically at the end of the document, like making an index.

A useful side-effect of marking the end of the document text is that you can store comments or temporary text underneath the \end{document} in the knowledge that LATEX will never see them and never try to typeset them (they don’t even need to be preceded by the % comment character), but they will remain in your document for you to see in your editor, or maybe to copy and paste in a later edit.

...
\end{document}
Don't forget to get the extra chapter from Jim!


This \begin ...\end pair of commands is an example of a common LATEX structure called an environment. Environments enclose text which is to be handled in a particular way. All environments start with \begin{...} and end with \end{...} (putting the name of the environment in the curly braces each time).

If you’re familiar with HTML, SGML, or XML you’ll recognise this technique: it’s just like start-tags and end-tags.

### Exercise 2: Add the document environment

\usepackage[utf8x]{inputenc}