3. The LaTex Document Layout

Recall from Chapter 2 that the top part comprising Line #1 and # 2 defines the style components. This is called the Preamble. Lines three to five, enclosed between \begin{document} and \close{document} (both inclusive) contain the content. Any changes in the layout can be made in the preamble, without having to tinker with the content part. This is the key differentiator of LaTex and the family of Markup languages, discussed in Chapter 1.

The document layout is defined in opening line of a LaTex source file which looks like this:
\documentclass[12pt, a4paper]{article}.
There are four elements in this statement.
1. Documentclass : The outer-most environment declaration which tells the compiler which template to use
2. 12 pt: A font size specification
3. a4paper: A page-size specification and
4. article: one of the standard document classes available to LaTex

The generalized format of this opening line is
\document class [option1, option2,option3…]{standard document class}. Each of these layout elements is discussed in subsequent sections.